.polaroid {
  position: relative;
  width: clamp(160px, 14vw, 180px);
  text-align: center;
  font-family: 'Overpass Mono', monospace;
  cursor: pointer;
    display: flex;          
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}


.polaroid-meta {
  position: absolute;
  top: 6%;
  left: 7%;
  width: 86%;
  display: flex;
  justify-content: space-between;
  z-index: 3;
  pointer-events: none;

}

.meta-left {
  text-align: left;
}

.meta-right {
  text-align: right;
}

.date,
.time,
.location {
  font-size: 8.5px;
  color: white;
  mix-blend-mode: difference;
  line-height: 1.2;
}

.polaroid:nth-child(3) {
  z-index: 10;
}

.polaroid-tape {
  display: none;
}
.polaroid:nth-child(3) .polaroid-tape {
  display: block;
  position: absolute;

  top: clamp(-50px, -5vh, -40px);
  right: clamp(-80px, -7vw, -70px);
  width: clamp(150px, 20vw, 175px);
  transform: rotate(13deg);
  z-index: 15;
  pointer-events: none;
}

.polaroid-frame {
  width: 100%;
  aspect-ratio: 4 / 5; /* width : height */
  position: relative;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 4px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

/* Image inside frame */
.polaroid-image {
  position: absolute;
  top: 5%;
  left: 5%;
  width: 90%;
  height: 75%; /* leaves bottom for caption */
  object-fit: cover;
  z-index: 0;
}

/* Filters */
.filter-wash, .filter-blue {
  position: absolute;
  top: 5%;
  left: 5%;
  width: 90%;
  height: 75%;
  z-index: 1;
}

.filter-wash {
  background: rgba(255,255,255,0.2);
}

.filter-blue {
  background: linear-gradient(180deg, rgba(0,196,255,0.2), rgba(255,140,219,0.2));
  mix-blend-mode: color;
}

.polaroid-caption {
  position: absolute;
  top: 85%;          
  bottom: 8%;        
  left: 50%;
  transform: translateX(-50%);
  width: 90%;

  display: flex;
  align-items: center;   
  justify-content: center;

  text-align: center;
  z-index: 2;
}

.caption {
  font-family: 'schoolbell', 'comic sans';
  font-size: 14px;
  line-height: 1.0;
}


#polaroid-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
}

#polaroid-modal .modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(2px);
}

.polaroid-modal {
    position: relative;
    max-width: 420px;
    margin: 6vh auto;
    background: #fff;
    padding: 16px 16px 20px;
    border-radius: 6px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    text-align: center;
}

.modal-polaroid-img {
    width: 100%;
    display: block;
}

.modal-meta {
    margin-top: 14px;
    font-family: monospace;
    font-size: 0.85rem;
}

.modal-caption {
    font-weight: 600;
    margin-bottom: 6px;
}

.modal-details {
    opacity: 0.7;
}

.modal-details span {
    display: block;
}

.modal-close {
    position: absolute;
    top: 6px;
    right: 10px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}


@media (max-width: 767px) {
  .polaroid {
    width: 100%; /* keep your existing mobile width */
  }

  /* Meta text (date, time, location) smaller on mobile */
  .date,
  .time,
  .location {
    font-size: 6px;  /* smaller for mobile */
    line-height: 1.1;
  }

  /* Caption text smaller */
  .caption {
    font-size: 8px;  /* scale down for mobile */
    line-height: 1.1;
  }

  /* Optional: reduce polaroid-tape size for smaller screens */
  .polaroid:nth-child(3) .polaroid-tape {
    top: clamp(-35px, -4vh, -30px);
    right: clamp(-60px, -6vw, -50px);
    width: clamp(100px, 15vw, 120px);
  }
}