/* ===================================================================
   POLAROIDS, LOVE LETTER & MINI ENVELOPES - V3 ULTIMATE AESTHETIC
   Vintage Stationery, Polaroid Gallery, Cute Mini "Open When" Envelopes
   =================================================================== */

/* ───────────────────────────────────────────────────────────────────
   1. THE HANDWRITTEN LOVE LETTER
   ─────────────────────────────────────────────────────────────────── */
.letter-section {
  padding: 60px 0 70px 0;
  display: flex;
  justify-content: center;
}

.letter-stationery {
  position: relative;
  max-width: 760px;
  width: 100%;
  background: #fffdf9;
  border-radius: 20px;
  padding: 55px 48px;
  box-shadow: 0 25px 60px rgba(70, 40, 50, 0.1), 0 0 0 1px rgba(225, 210, 200, 0.5);
  background-image: 
    radial-gradient(#e0d5cb 0.8px, transparent 0.8px),
    linear-gradient(rgba(240, 230, 220, 0.35) 1px, transparent 1px);
  background-size: 26px 26px, 100% 34px;
  border: 1.5px solid rgba(230, 215, 205, 0.7);
}

@media (max-width: 600px) {
  .letter-stationery {
    padding: 38px 22px;
  }
}

/* Washi tape at top of stationery */
.letter-stationery::before {
  content: "";
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 130px;
  height: 28px;
  background: rgba(246, 175, 185, 0.75);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  border-left: 2px dashed rgba(255, 255, 255, 0.85);
  border-right: 2px dashed rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(4px);
  z-index: 5;
}

.letter-header {
  border-bottom: 1.5px dashed var(--blush-300);
  padding-bottom: 22px;
  margin-bottom: 26px;
  text-align: center;
}

.letter-date {
  font-size: 0.85rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.letter-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  color: var(--text-dark);
}

.letter-body {
  font-family: var(--font-cursive);
  font-size: clamp(1.4rem, 3.2vw, 1.7rem);
  line-height: 1.95;
  color: #3b2b2a;
  margin-bottom: 26px;
}

.letter-body p {
  margin-bottom: 18px;
}

.letter-closing {
  margin-top: 35px;
  text-align: right;
  font-family: var(--font-cursive);
  font-size: 1.7rem;
  color: var(--text-dark);
}

.letter-signature {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--blush-deep);
  margin-top: 4px;
}

.letter-ps {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px dashed rgba(200, 180, 175, 0.45);
  font-size: 0.95rem;
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
}

/* ───────────────────────────────────────────────────────────────────
   2. POLAROID KEEPSAKE GALLERY
   ─────────────────────────────────────────────────────────────────── */
.gallery-section {
  padding: 70px 0;
}

.polaroid-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 42px 30px;
  margin-top: 45px;
  perspective: 1000px;
}

@media (max-width: 600px) {
  .polaroid-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 34px 16px;
  }
}

.polaroid-card {
  background: #ffffff;
  padding: 16px 16px 24px 16px;
  border-radius: 8px;
  box-shadow: 0 14px 35px rgba(60, 45, 45, 0.12), 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
}

.polaroid-card:hover {
  transform: translateY(-10px) rotate(0deg) scale(1.04) !important;
  box-shadow: 0 26px 55px rgba(60, 45, 45, 0.18), 0 0 0 1.5px rgba(251, 196, 208, 0.7);
  z-index: 20;
}

/* Washi Tape with soft pastel tones */
.polaroid-tape {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 82px;
  height: 24px;
  background: rgba(246, 185, 195, 0.75);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.09);
  border-left: 2px dashed rgba(255, 255, 255, 0.8);
  border-right: 2px dashed rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(4px);
  z-index: 5;
}

.polaroid-card:nth-child(2) .polaroid-tape { background: rgba(195, 222, 195, 0.75); }
.polaroid-card:nth-child(3) .polaroid-tape { background: rgba(252, 228, 175, 0.75); }
.polaroid-card:nth-child(4) .polaroid-tape { background: rgba(222, 208, 238, 0.75); }
.polaroid-card:nth-child(5) .polaroid-tape { background: rgba(248, 195, 185, 0.75); }
.polaroid-card:nth-child(6) .polaroid-tape { background: rgba(200, 230, 235, 0.75); }

/* The Photo Frame Inside */
.polaroid-frame {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #fbf7ee;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(220, 210, 200, 0.6);
}

.polaroid-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.polaroid-card:hover .polaroid-img {
  transform: scale(1.06);
}

/* Shimmer overlay on polaroid */
.polaroid-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, transparent 60%);
  pointer-events: none;
  opacity: 0.6;
}

/* Polaroid Text & Caption */
.polaroid-caption-wrap {
  padding-top: 16px;
  text-align: center;
}

.polaroid-caption {
  font-family: var(--font-cursive);
  font-size: 1.45rem;
  color: var(--text-dark);
  line-height: 1.35;
}

.polaroid-date {
  font-size: 0.78rem;
  color: var(--text-light);
  margin-top: 5px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

/* Lightbox modal */
.lightbox-modal .modal-content {
  max-width: 600px;
  padding: 28px;
  border-radius: var(--radius-lg);
}

.lightbox-img-wrap {
  width: 100%;
  max-height: 480px;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 20px;
  background: #faf6f0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.05);
}

.lightbox-img {
  max-width: 100%;
  max-height: 460px;
  object-fit: contain;
  border-radius: 4px;
}

/* ───────────────────────────────────────────────────────────────────
   3. "OPEN WHEN..." MINI ENVELOPES (ADORABLE & HIGH AESTHETIC)
   ─────────────────────────────────────────────────────────────────── */
.openwhen-section {
  padding: 70px 0 80px 0;
}

.openwhen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 28px;
  margin-top: 40px;
}

@media (max-width: 600px) {
  .openwhen-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}

/* Cute Mini Envelope Card */
.openwhen-card {
  position: relative;
  background: #ffffff;
  border-radius: 16px;
  padding: 30px 22px 24px 22px;
  text-align: center;
  box-shadow: 0 12px 30px rgba(60, 40, 50, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04);
  border: 1.5px solid var(--blush-200);
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Envelope flap visual at the top */
.openwhen-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(180deg, rgba(254, 226, 232, 0.6) 0%, rgba(255, 255, 255, 0) 100%);
  border-bottom: 1.5px dashed var(--blush-300);
  pointer-events: none;
}

.openwhen-card:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 20px 45px rgba(232, 93, 117, 0.18);
  border-color: var(--blush-400);
}

/* Card Themes per index */
.openwhen-card:nth-child(1) { background: linear-gradient(180deg, #fff5f7 0%, #ffffff 50%); }
.openwhen-card:nth-child(2) { background: linear-gradient(180deg, #f2f8f2 0%, #ffffff 50%); }
.openwhen-card:nth-child(3) { background: linear-gradient(180deg, #fffbf0 0%, #ffffff 50%); }
.openwhen-card:nth-child(4) { background: linear-gradient(180deg, #f7f3ff 0%, #ffffff 50%); }

.openwhen-card:nth-child(1):hover { border-color: #f48fb1; }
.openwhen-card:nth-child(2):hover { border-color: #a5d6a7; }
.openwhen-card:nth-child(3):hover { border-color: #ffe082; }
.openwhen-card:nth-child(4):hover { border-color: #ce93d8; }

/* Mini Stamp / Seal Icon */
.openwhen-icon {
  font-size: 2.6rem;
  margin-bottom: 12px;
  position: relative;
  z-index: 2;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.openwhen-card:hover .openwhen-icon {
  transform: scale(1.2) rotate(6deg);
}

.openwhen-badge {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(220, 195, 205, 0.6);
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--blush-deep);
  margin-bottom: 10px;
  position: relative;
  z-index: 2;
}

.openwhen-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 14px;
  position: relative;
  z-index: 2;
  line-height: 1.3;
}

.openwhen-action {
  font-size: 0.88rem;
  color: var(--blush-deep);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-full);
  border: 1px dashed var(--blush-300);
  transition: all 0.2s ease;
  position: relative;
  z-index: 2;
}

.openwhen-card:hover .openwhen-action {
  background: var(--blush-500);
  color: #ffffff;
  border-color: var(--blush-500);
  transform: scale(1.05);
}
