/* =====================================================
   RESPONSIVE STYLESHEET — Maya & Fikri Wedding Invitation
   Optimized for mobile readability, clarity, and performance
   ===================================================== */

/* ─── MOBILE PHONES & SMALL TABLETS (<= 767px) ───────── */
@media (max-width: 767px) {
  :root {
    --section-padding: 68px 0;
    --container-padding: 0 20px;
  }

  /* ─── 1. COVER SCREEN ─── */
  #cover {
    padding: 16px 12px !important;
  }

  .cover-card {
    width: 100% !important;
    max-width: 420px !important;
    border-radius: 28px !important;
  }

  .cover-card-inner {
    padding: 34px 20px 28px !important;
    border-radius: 26px !important;
  }

  .cover-photo-frame {
    width: 165px !important;
    height: 205px !important;
    border-radius: 82px 82px 16px 16px !important;
    margin: 0 auto 16px !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5) !important;
  }

  .cover-tagline {
    font-size: 0.85rem !important;
    letter-spacing: 5px !important;
    font-weight: 600 !important;
    color: #E0CBA1 !important;
    margin-bottom: 12px !important;
  }

  .cover-names {
    font-size: 2.8rem !important;
    font-weight: 500 !important;
    color: #FFFFFF !important;
    margin-bottom: 10px !important;
    line-height: 1.15 !important;
  }

  .cover-names .cover-ampersand {
    font-size: 0.7em !important;
    color: #E0CBA1 !important;
    margin: 0 8px !important;
  }

  .cover-date-wrapper {
    margin-bottom: 16px !important;
  }

  .cover-date {
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    letter-spacing: 2px !important;
    color: #E0CBA1 !important;
  }

  .cover-guest-card {
    padding: 16px 18px 14px !important;
    margin: 18px auto 22px !important;
    max-width: 340px !important;
    border-radius: 14px !important;
    border: 1.5px solid rgba(224, 203, 161, 0.35) !important;
    background: rgba(255, 255, 255, 0.08) !important;
  }

  .cover-guest-label {
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    letter-spacing: 2px !important;
    color: #E0CBA1 !important;
    margin-bottom: 6px !important;
  }

  .cover-guest-name {
    font-size: 1.55rem !important;
    font-weight: 600 !important;
    color: #FFFFFF !important;
    line-height: 1.25 !important;
  }

  .cover-guest-subtext {
    font-size: 0.75rem !important;
    color: rgba(255, 255, 255, 0.8) !important;
  }

  .btn-open {
    padding: 15px 44px !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    letter-spacing: 2px !important;
    border-radius: 50px !important;
    min-height: 52px !important;
  }

  /* ─── 2. GENERAL SECTION TITLES ─── */
  .section-label {
    font-size: 0.85rem !important;
    letter-spacing: 3px !important;
    font-weight: 700 !important;
    color: var(--gold-text) !important;
    margin-bottom: 8px !important;
  }

  .section-title {
    font-size: 2.4rem !important;
    font-weight: 600 !important;
    color: var(--forest-green) !important;
    margin-bottom: 16px !important;
    line-height: 1.2 !important;
  }

  /* ─── 3. OPENING / AYAT SECTION ─── */
  .opening-greeting {
    font-size: clamp(1.6rem, 5.5vw, 2.2rem) !important;
    font-weight: 600 !important;
    color: var(--forest-green) !important;
    margin-bottom: 18px !important;
  }

  .opening-verse {
    font-size: 1.2rem !important;
    line-height: 2 !important;
    color: #1D1E1B !important;
    font-weight: 500 !important;
    font-style: italic !important;
    max-width: 580px !important;
    margin: 0 auto 16px !important;
  }

  .opening-verse-source {
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    color: var(--gold-text) !important;
    letter-spacing: 2px !important;
    margin-top: 12px !important;
  }

  .opening-text {
    font-size: 1.05rem !important;
    line-height: 1.85 !important;
    color: #2C2D2A !important;
    margin-top: 24px !important;
    max-width: 580px !important;
  }

  /* ─── 4. COUPLE SECTION (VERTICAL STACK) ─── */
  .couple-grid {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 36px !important;
    max-width: 440px !important;
    margin: 0 auto !important;
  }

  .couple-card {
    width: 100% !important;
  }

  .couple-separator {
    padding: 8px 0 !important;
    margin: 0 auto !important;
  }

  .couple-ampersand {
    font-size: 3rem !important;
    color: var(--gold-text) !important;
    display: block !important;
    text-align: center !important;
    line-height: 1 !important;
  }

  .couple-photo-frame {
    width: 210px !important;
    height: 280px !important;
    margin: 0 auto 20px !important;
    border-radius: 120px 120px 14px 14px !important;
    border: 3px solid var(--champagne-gold) !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12) !important;
  }

  .couple-name {
    font-size: 2.2rem !important;
    font-weight: 600 !important;
    color: var(--forest-green) !important;
    margin-bottom: 8px !important;
    font-style: italic !important;
  }

  .couple-child-order {
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: var(--gold-text) !important;
    letter-spacing: 1.5px !important;
    margin-bottom: 6px !important;
    text-transform: uppercase !important;
  }

  .couple-parents {
    font-size: 1.25rem !important;
    font-weight: 600 !important;
    color: #1D1E1B !important;
    line-height: 1.5 !important;
  }

  /* ─── 5. COUNTDOWN SECTION ─── */
  .countdown-section .section-title {
    color: #FFFFFF !important;
    font-size: 2.3rem !important;
  }

  .countdown-grid {
    gap: 10px !important;
    justify-content: center !important;
  }

  .countdown-item {
    min-width: 76px !important;
    padding: 16px 10px !important;
    border-radius: 14px !important;
  }

  .countdown-number {
    font-size: 2.2rem !important;
    font-weight: 700 !important;
    color: #E0CBA1 !important;
  }

  .countdown-label {
    font-size: 0.78rem !important;
    letter-spacing: 2px !important;
    font-weight: 700 !important;
    color: #FFFFFF !important;
  }

  /* ─── 6. EVENTS SECTION ─── */
  .events-grid {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
    max-width: 480px !important;
    margin: 0 auto !important;
  }

  .event-card {
    padding: 36px 24px !important;
    border-radius: 20px !important;
  }

  .event-title {
    font-size: 2rem !important;
    font-weight: 600 !important;
    color: var(--forest-green) !important;
  }

  .event-date {
    font-size: 1.2rem !important;
    font-weight: 600 !important;
    color: var(--gold-text) !important;
  }

  .event-time {
    font-size: 1.15rem !important;
    font-weight: 600 !important;
    color: #1D1E1B !important;
  }

  .event-venue {
    font-size: 1.35rem !important;
    font-weight: 700 !important;
    color: var(--forest-green) !important;
  }

  .event-address {
    font-size: 1.05rem !important;
    line-height: 1.7 !important;
    color: #2C2D2A !important;
  }

  .event-notes {
    font-size: 0.95rem !important;
    line-height: 1.7 !important;
    color: #4A4B48 !important;
  }

  .event-actions {
    flex-direction: column !important;
    align-items: center !important;
    gap: 12px !important;
  }

  .event-actions .btn {
    width: 100% !important;
    justify-content: center !important;
    min-height: 50px !important;
    font-size: 0.92rem !important;
    font-weight: 700 !important;
    border-radius: 50px !important;
  }

  /* ─── 7. LOVE STORY SECTION ─── */
  .timeline {
    padding-left: 36px !important;
  }

  .timeline::before {
    left: 12px !important;
  }

  .timeline-badge {
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    color: var(--gold-text) !important;
  }

  .timeline-title {
    font-size: 1.55rem !important;
    font-weight: 600 !important;
    color: var(--forest-green) !important;
  }

  .timeline-text {
    font-size: 1.05rem !important;
    line-height: 1.8 !important;
    color: #2C2D2A !important;
  }

  .timeline-photo img {
    height: auto !important;
    aspect-ratio: 4 / 3 !important;
    object-fit: cover !important;
    object-position: center 20% !important;
  }

  /* ─── 8. GALLERY SECTION ─── */
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  .gallery-item:nth-child(1) {
    grid-row: span 1 !important;
  }

  /* ─── 9. RSVP & GUESTBOOK ─── */
  .rsvp-form,
  .guestbook-form-card {
    padding: 32px 20px !important;
    border-radius: 18px !important;
  }

  .form-group label {
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    color: var(--forest-green) !important;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    font-size: 1.05rem !important;
    padding: 14px 16px !important;
    border-radius: 12px !important;
  }

  .attendance-options {
    flex-direction: column !important;
  }

  .attendance-option {
    min-width: auto !important;
    padding: 14px 16px !important;
  }

  .btn-submit {
    min-height: 52px !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    border-radius: 50px !important;
  }

  /* ─── 10. GIFT SECTION ─── */
  .gift-cards {
    grid-template-columns: 1fr !important;
  }

  .gift-card {
    padding: 26px 20px !important;
    border-radius: 16px !important;
    font-size: 1.05rem !important;
    line-height: 1.7 !important;
  }

  /* ─── 11. CLOSING SECTION ─── */
  .closing-text {
    font-size: 1.15rem !important;
    line-height: 2.1 !important;
    color: #FFFFFF !important;
  }

  .closing-signature {
    font-size: 1.35rem !important;
    color: #E0CBA1 !important;
    font-style: italic !important;
  }

  .closing-names {
    font-size: 2.9rem !important;
    color: #FFFFFF !important;
    font-style: italic !important;
  }

  .closing-thankyou {
    font-size: 0.95rem !important;
    letter-spacing: 4px !important;
    color: #E0CBA1 !important;
    font-weight: 700 !important;
  }

  /* ─── 12. SHARE & NAVIGATION ─── */
  .share-buttons {
    flex-direction: column !important;
    align-items: center !important;
    gap: 12px !important;
  }

  .share-buttons .btn-whatsapp,
  .share-buttons .btn-copy-url {
    width: 280px !important;
    justify-content: center !important;
    min-height: 50px !important;
    font-size: 0.95rem !important;
  }

  .nav-dots {
    display: none !important;
  }

  .lightbox-content {
    max-width: 95vw !important;
  }

  .lightbox-prev,
  .lightbox-next {
    top: auto !important;
    bottom: -50px !important;
    transform: none !important;
  }

  .lightbox-prev {
    left: calc(50% - 60px) !important;
  }

  .lightbox-next {
    right: calc(50% - 60px) !important;
  }

  .lightbox-close {
    top: -44px !important;
    right: 4px !important;
  }
}

/* ─── TABLET / DESKTOP (>= 768px) ────────────────────── */
@media (min-width: 768px) {
  :root {
    --section-padding: 90px 0;
    --container-padding: 0 32px;
  }

  .couple-grid {
    grid-template-columns: 1fr auto 1fr;
    gap: 40px;
    align-items: start;
    max-width: 900px;
    margin: 0 auto;
  }

  .couple-photo-frame {
    width: 200px;
    height: 260px;
  }

  .events-grid {
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 32px;
  }

  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  .timeline {
    padding-left: 56px;
  }

  .timeline::before {
    left: 24px;
  }
}

/* ─── TOUCH INTERACTION OPTIMIZATIONS ─────────────────── */
@media (pointer: coarse) {
  .btn, .btn-open, .btn-copy, .btn-submit,
  .btn-whatsapp, .btn-copy-url, .music-toggle,
  .nav-dot, .lightbox-close, .lightbox-prev, .lightbox-next {
    min-height: 48px;
    min-width: 48px;
  }

  .gallery-item .gallery-caption {
    transform: translateY(0);
  }
}

/* ─── PRINT STYLES ───────────────────────────────────── */
@media print {
  #cover,
  .music-toggle,
  .lightbox,
  .nav-dots,
  .share-section,
  .toast {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  section {
    background: white !important;
    page-break-inside: avoid;
  }
}
