/**
 * Saket ❤️ Deeksha Wedding Invitation
 * Responsive Layout & Mobile-First Media Queries
 * Breakpoints: 320px, 375px, 390px, 414px, 768px, 1024px, 1280px+
 */

/* ==================================================
   MOBILE (Default / <768px)
   ================================================== */

/* Zero horizontal scrolling constraint */
html, body {
  max-width: 100vw;
  overflow-x: hidden;
}

/* Touch targets */
button, a, input, select, textarea {
  min-height: 44px;
}

/* Hero Couple Crop */
.hero-couple-img {
  height: 48vh;
  min-height: 320px;
  object-fit: cover;
  object-position: center top;
}

/* Fluid responsive couple names on mobile */
.couple-hero-title {
  font-size: clamp(2rem, 7.5vw, 4.75rem);
  line-height: 1.05;
}

/* Dedicated Hindi typography scaling on mobile devices */
html[lang="hi"] .couple-hero-title,
html[lang="cg"] .couple-hero-title {
  font-size: clamp(2.2rem, 8vw, 4.25rem);
  line-height: 1.25;
}

.couple-ampersand {
  font-size: clamp(1.75rem, 6vw, 3.5rem);
}

html[lang="hi"] .couple-ampersand,
html[lang="cg"] .couple-ampersand {
  font-size: clamp(1.6rem, 5.5vw, 2.75rem);
  line-height: 1.3;
}

/* Fluid countdown digits on mobile */
.countdown-digit {
  font-size: clamp(1.35rem, 5vw, 2.85rem);
  line-height: 1.1;
}

.countdown-label {
  font-size: clamp(0.55rem, 2vw, 0.75rem);
  letter-spacing: 0.12em;
}

html[lang="hi"] .countdown-label,
html[lang="cg"] .countdown-label {
  font-size: clamp(0.68rem, 2.4vw, 0.82rem);
  letter-spacing: normal !important;
  white-space: nowrap;
}

/* Mobile-specific adjustments for very small screens (<380px) */
@media (max-width: 380px) {
  .content-container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .ganesh-top-medallion {
    width: 60px;
    height: 60px;
    padding: 6px;
  }

  .countdown-box {
    padding: 0.5rem 0.2rem;
  }
}

@media (max-width: 640px) {
  .sanskrit-shloka-banner {
    padding: 0.5rem 0.75rem;
    font-size: 0.88rem;
    line-height: 1.55;
  }
  
  .royal-envelope-card {
    padding: 1.75rem 1.25rem;
    border-radius: 16px;
  }
}

/* Mobile Vertical Timeline */
.timeline-track-mobile {
  display: flex;
  flex-direction: column;
  position: relative;
  padding-left: 2.25rem;
}

.timeline-track-mobile::before {
  content: '';
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 17px;
  width: 2px;
  background: linear-gradient(180deg, rgba(197, 160, 89, 0.3) 0%, rgba(197, 160, 89, 0.9) 50%, rgba(197, 160, 89, 0.3) 100%);
}

.timeline-mobile-node {
  position: relative;
  margin-bottom: 2rem;
}

.timeline-mobile-node:last-child {
  margin-bottom: 0;
}

.timeline-mobile-indicator {
  position: absolute;
  left: -2.25rem;
  top: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 2px solid var(--color-gold-champagne);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-wine-deep);
  box-shadow: 0 2px 8px rgba(197, 160, 89, 0.25);
}

.timeline-mobile-node.highlighted .timeline-mobile-indicator {
  background: var(--color-wine-deep);
  border-color: var(--color-gold-light);
  color: #FFFFFF;
}

/* Gallery 2-column on mobile */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

/* Safe padding for bottom floating controls on mobile */
.footer-padding-safe {
  padding-bottom: 5.5rem;
}

/* QR Code responsive dimensions */
#venue-qr-canvas {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

/* ==================================================
   TABLET & DESKTOP (>=768px)
   ================================================== */
@media (min-width: 768px) {
  .hero-couple-img {
    height: 72vh;
    min-height: 520px;
  }

  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
  }

  .timeline-track-mobile {
    display: none;
  }

  .timeline-track-desktop {
    display: flex;
  }

  .floating-music-btn {
    bottom: 32px;
    right: 32px;
  }

  .footer-padding-safe {
    padding-bottom: 3rem;
  }
}

/* ==================================================
   LARGE DESKTOP (>=1024px)
   ================================================== */
@media (min-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
  }

  .hero-couple-img {
    height: 82vh;
  }
}
