/* -------------------------------------------------------------
   DESIGN SYSTEM & CUSTOM PROPERTIES
   ------------------------------------------------------------- */
:root {
    --bg-dark: #121212;
    --bg-card: rgba(28, 28, 28, 0.65);
    --gold: #d4af37;
    --gold-light: #f3e5ab;
    --gold-gradient: linear-gradient(135deg, #b38728, #fbf5b7, #daab3a, #aa771c);
    --text-light: #f5f5f5;
    --text-muted: #c2c2c2;
    --accent-terracotta: #b85d43;
    --border-color: rgba(212, 175, 55, 0.25);
    --font-title: 'Cinzel', serif;
    --font-body: 'Cormorant Garamond', serif;
    --font-sans: 'Montserrat', sans-serif;
    --transition-smooth: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Reset and Global Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    font-family: var(--font-body);
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Locking scroll when invitation is closed */
body.locked {
    overflow: hidden;
}

/* Decorative Backgrounds */
.bg-vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle, transparent 40%, rgba(0, 0, 0, 0.8) 100%);
    pointer-events: none;
    z-index: 1;
}

.bg-texture {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: radial-gradient(rgba(212, 175, 55, 0.05) 1px, transparent 0);
    background-size: 24px 24px;
    pointer-events: none;
    z-index: 1;
    opacity: 0.7;
}

/* -------------------------------------------------------------
   ENVELOPE OVERLAY & OPENING FLOW
   ------------------------------------------------------------- */
.envelope-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #171717;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 1.2s cubic-bezier(0.7, 0, 0.3, 1), 
                transform 1.2s cubic-bezier(0.7, 0, 0.3, 1);
}

/* Envelope Opening Transition Classes */
.envelope-overlay.opened {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-100px) scale(1.05);
}

.envelope-wrapper {
    width: 90%;
    max-width: 450px;
    perspective: 1000px;
    cursor: pointer;
}

.envelope {
    position: relative;
    width: 100%;
    height: 300px;
    background: #242424;
    border-radius: 8px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), 
                inset 0 0 40px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
}

.envelope-front {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

/* Open Invitation Button */
.open-invitation-btn {
    font-family: var(--font-title);
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: var(--gold-gradient);
    border: none;
    color: #121212;
    padding: 16px 32px;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.3),
                0 0 15px rgba(212, 175, 55, 0.15);
    transition: var(--transition-smooth);
    z-index: 10;
    position: relative;
    outline: none;
}

.open-invitation-btn:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 15px 30px rgba(212, 175, 55, 0.5),
                0 0 25px rgba(212, 175, 55, 0.25);
    filter: brightness(1.1);
}

.envelope-wrapper:hover .open-invitation-btn {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 15px 30px rgba(212, 175, 55, 0.5),
                0 0 25px rgba(212, 175, 55, 0.25);
}

/* Tag Information inside Envelope */
.envelope-tag {
    margin-top: 25px;
    text-align: center;
}

.tag-title {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 5px;
}

.tag-names {
    font-family: var(--font-title);
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-light);
    letter-spacing: 1px;
}

.click-hint {
    display: block;
    margin-top: 15px;
    font-family: var(--font-sans);
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
    opacity: 0.6;
    animation: pulseHint 2s infinite;
}

@keyframes pulseHint {
    0%, 100% { opacity: 0.4; transform: scale(0.98); }
    50% { opacity: 0.8; transform: scale(1.02); }
}

/* -------------------------------------------------------------
   MAIN CONTAINER & TYPOGRAPHY
   ------------------------------------------------------------- */
.invitation-container {
    position: relative;
    z-index: 10;
    max-width: 650px;
    margin: 0 auto;
    padding: 10px 10px 40px 10px;
    opacity: 1;
    transition: opacity 1s ease;
}

/* Locked state prevents flashes before envelope opening */
.invitation-container.locked {
    height: 100vh;
    overflow: hidden;
    opacity: 0;
}

/* Typography styles */
h1, h2, h3, h4 {
    font-family: var(--font-title);
    text-align: center;
    letter-spacing: 1px;
}

h1 {
    color: var(--text-light);
    font-weight: 400;
}

h2 {
    color: var(--gold);
}

/* Sections Base Styling */
.section {
    padding: 30px 15px;
    margin-bottom: 20px;
    text-align: center;
    position: relative;
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    padding: 20px 15px;
    position: relative;
    overflow: hidden;
}

/* Vintage Ornaments */
.vintage-ornament-top {
    width: 120px;
    height: 15px;
    margin: 0 auto 15px auto;
    background: radial-gradient(circle, var(--gold) 20%, transparent 20%);
    background-size: 10px 10px;
    position: relative;
}

.vintage-ornament-top::after, .vintage-ornament-top::before {
    content: '';
    position: absolute;
    top: 50%;
    width: 40px;
    height: 1px;
    background: var(--gold);
}
.vintage-ornament-top::before { left: -50px; }
.vintage-ornament-top::after { right: -50px; }

.vintage-ornament-bottom {
    width: 120px;
    height: 15px;
    margin: 15px auto 0 auto;
    background: radial-gradient(circle, var(--gold) 20%, transparent 20%);
    background-size: 10px 10px;
    position: relative;
}

.vintage-ornament-bottom::after, .vintage-ornament-bottom::before {
    content: '';
    position: absolute;
    top: 50%;
    width: 40px;
    height: 1px;
    background: var(--gold);
}
.vintage-ornament-bottom::before { left: -50px; }
.vintage-ornament-bottom::after { right: -50px; }

/* -------------------------------------------------------------
   HERO / HEADER SECTION
   ------------------------------------------------------------- */
.hero-section {
    padding-top: 15px;
    min-height: calc(100vh - 50px);
    min-height: calc(100svh - 50px); /* Small viewport height fallback to prevent mobile browser bottom bar overlap */
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    padding-bottom: 85px; /* Increased from 50px to 85px to avoid overlapping with quote */
}

.pre-title {
    font-size: 0.9rem;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.main-title {
    font-size: 1.8rem;
    color: var(--text-light);
    margin-bottom: 10px; /* Reduced from 15px to optimize vertical space */
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.names-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px; /* Reduced from 25px to optimize vertical space */
}

.name-block {
    display: flex;
    flex-direction: column;
}

.celebrant-name {
    font-family: var(--font-title);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--gold-light);
    text-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
    line-height: 1;
}

.celebrant-age {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 5px;
}

.ampersand {
    font-family: var(--font-title);
    font-size: 2rem;
    color: var(--gold);
    opacity: 0.7;
    font-style: italic;
}

/* Celebrant Photo Frame styling */
.photo-frame-wrapper {
    width: 200px;
    height: 200px;
    margin: 0 auto 15px auto; /* Reduced from 20px to optimize vertical space */
    position: relative;
}

.photo-frame-border {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    padding: 6px;
    background: var(--gold-gradient);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 
                0 0 25px rgba(212, 175, 55, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-container {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--bg-dark);
}

.celebrant-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(15%) sepia(20%);
    transition: transform 0.5s ease;
}

.photo-frame-wrapper:hover .celebrant-photo {
    transform: scale(1.05);
    filter: grayscale(0%) sepia(0%);
}

.love-quote {
    font-style: italic;
    font-size: 1.1rem;
    max-width: 90%;
    margin: 0 auto;
    color: var(--text-muted);
    font-weight: 300;
}

/* -------------------------------------------------------------
   COUNTDOWN TIMER
   ------------------------------------------------------------- */
.countdown-section {
    padding: 15px 10px;
}

.section-subtitle {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 15px;
}

.countdown-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    max-width: 480px;
    margin: 0 auto;
}

.countdown-item {
    background: var(--bg-card);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 8px;
    min-width: 55px;
    padding: 10px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    flex: 1;
    max-width: 75px;
}

.countdown-value {
    font-family: var(--font-sans);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--gold-light);
}

.countdown-label {
    font-family: var(--font-sans);
    font-size: 0.55rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 5px;
}

.countdown-separator {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--gold);
    opacity: 0.6;
    margin-bottom: 12px;
}

/* -------------------------------------------------------------
   DETAILS SECTION & CARDS
   ------------------------------------------------------------- */
.section-title {
    font-size: 1.5rem;
    color: var(--text-light);
    margin-bottom: 20px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 1px;
    background: var(--gold);
    margin: 10px auto 0 auto;
}

.details-grid {
    display: flex;
    justify-content: center;
    width: 100%;
}

.details-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    max-width: 480px;
}

.card-icon-container {
    color: var(--gold);
    margin-bottom: 20px;
    background: rgba(212, 175, 55, 0.08);
    padding: 15px;
    border-radius: 50%;
    border: 1px solid rgba(212, 175, 55, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
}

.details-card h4 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: var(--gold-light);
}

.highlight-text {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-light);
}

.sub-text {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 5px;
}

/* Dress Code Color Palette styling */
.palette-colors {
    display: flex;
    gap: 12px;
    margin-top: 15px;
}

.color-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    cursor: help;
}

.color-beige { background-color: #e3d2be; }
.color-terracotta { background-color: #b85d43; }
.color-gold { background-color: #c5a059; }
.color-sage { background-color: #8fa08f; }

/* -------------------------------------------------------------
   LOCATION & MAP SECTION
   ------------------------------------------------------------- */
.location-name {
    font-family: var(--font-title);
    font-size: 1.5rem;
    color: var(--gold-light);
    margin-bottom: 5px;
}

.location-address {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 25px;
    max-width: 80%;
    margin-left: auto;
    margin-right: auto;
}

.map-container {
    padding: 10px;
    margin-bottom: 20px;
    overflow: hidden;
    height: 270px;
}

.map-container iframe {
    border-radius: 8px;
    filter: invert(90%) hue-rotate(180deg) grayscale(20%) contrast(90%);
    width: 100%;
    height: 100%;
}

.map-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold);
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 12px 20px;
    border-radius: 50px;
    text-decoration: none;
    transition: var(--transition-smooth);
}

/* -------------------------------------------------------------
   SCROLL INDICATOR WIDGET
   ------------------------------------------------------------- */
.scroll-indicator {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translate(-50%, 0);
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    animation: bounceIndicator 2.5s infinite ease-in-out;
}

.scroll-text {
    font-family: var(--font-sans);
    font-size: 0.65rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold-light);
    margin-bottom: 5px;
}

.scroll-arrow {
    color: var(--gold);
    display: flex;
    align-items: center;
}

@keyframes bounceIndicator {
    0%, 20%, 50%, 80%, 100% {
        transform: translate(-50%, 0);
    }
    40% {
        transform: translate(-50%, -8px);
    }
    60% {
        transform: translate(-50%, -4px);
    }
}

.map-link-btn:hover {
    background: var(--gold-gradient);
    color: var(--bg-dark);
    border-color: transparent;
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.3);
    transform: translateY(-2px);
}

/* -------------------------------------------------------------
   RSVP FORM
   ------------------------------------------------------------- */
.rsvp-instructions {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 30px;
    max-width: 85%;
    margin-left: auto;
    margin-right: auto;
}

.rsvp-form {
    text-align: left;
    max-width: 500px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--gold);
    margin-bottom: 8px;
    font-weight: 600;
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 6px;
    padding: 12px 15px;
    color: var(--text-light);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.25);
    background: rgba(0, 0, 0, 0.6);
}

.form-select option {
    background: var(--bg-dark);
    color: var(--text-light);
}

/* Radio Group styling */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--text-light);
    position: relative;
    user-select: none;
}

.radio-label input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.custom-radio {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(212, 175, 55, 0.4);
    border-radius: 50%;
    margin-right: 12px;
    display: inline-block;
    position: relative;
    transition: var(--transition-smooth);
}

.radio-label:hover input ~ .custom-radio {
    border-color: var(--gold);
}

.radio-label input:checked ~ .custom-radio {
    border-color: var(--gold);
    background-color: transparent;
}

.radio-label input:checked ~ .custom-radio::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gold-gradient);
}

/* RSVP Submit Button */
.rsvp-submit-btn {
    width: 100%;
    background: var(--gold-gradient);
    border: none;
    color: #121212;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 16px 20px;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition-smooth);
    margin-top: 10px;
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.2);
}

.rsvp-submit-btn:hover {
    box-shadow: 0 15px 30px rgba(212, 175, 55, 0.4);
    transform: translateY(-2px);
    filter: brightness(1.1);
}

/* -------------------------------------------------------------
   FLOATING MUSIC CONTROLLER
   ------------------------------------------------------------- */
.music-toggle-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 1000;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 50%;
    color: var(--gold);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    transition: var(--transition-smooth);
    opacity: 0.65;
    overflow: hidden;
}

.music-toggle-btn:hover {
    transform: scale(1.05);
    border-color: var(--gold);
    color: var(--gold-light);
    opacity: 1;
}

/* Make SVG icons smaller for subtle layout */
.music-toggle-btn svg {
    width: 14px;
    height: 14px;
}

/* Music SVG states toggling */
.music-toggle-btn.playing .icon-play { display: none; }
.music-toggle-btn.playing .icon-pause { display: block; }
.music-toggle-btn:not(.playing) .icon-play { display: block; }
.music-toggle-btn:not(.playing) .icon-pause { display: none; }

/* Visualizer Bars */
.eq-bars {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 2px;
    height: 10px;
    margin-bottom: 1px;
}

.bar {
    width: 2px;
    height: 2px;
    background-color: var(--gold);
    border-radius: 1px;
}

/* Animation for active visualizer */
.music-toggle-btn.playing .bar-1 { animation: eqAnimation 1.2s ease-in-out infinite alternate; }
.music-toggle-btn.playing .bar-2 { animation: eqAnimation 0.8s ease-in-out infinite alternate 0.2s; }
.music-toggle-btn.playing .bar-3 { animation: eqAnimation 1.5s ease-in-out infinite alternate 0.4s; }
.music-toggle-btn.playing .bar-4 { animation: eqAnimation 1.0s ease-in-out infinite alternate 0.1s; }

@keyframes eqAnimation {
    0% { height: 2px; }
    100% { height: 10px; }
}

/* -------------------------------------------------------------
   FOOTER
   ------------------------------------------------------------- */
.invitation-footer {
    text-align: center;
    padding: 40px 20px;
    margin-top: 30px;
    border-top: 1px solid rgba(212, 175, 55, 0.1);
}

.invitation-footer p {
    font-size: 1.3rem;
    color: var(--text-muted);
    font-style: italic;
}

.footer-signature {
    font-family: var(--font-title);
    font-size: 1.1rem !important;
    font-weight: 600;
    color: var(--gold) !important;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 15px;
    font-style: normal !important;
}

/* -------------------------------------------------------------
   SCROLL REVEAL ANIMATIONS
   ------------------------------------------------------------- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s cubic-bezier(0.25, 0.8, 0.25, 1), 
                transform 1s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* -------------------------------------------------------------
   RESPONSIVE MEDIA QUERIES
   ------------------------------------------------------------- */
@media (min-width: 480px) {
    .invitation-container {
        padding: 20px 15px 50px 15px;
    }

    .section {
        padding: 40px 20px;
        margin-bottom: 25px;
    }

    .glass-card {
        padding: 30px 20px;
    }

    .vintage-ornament-top, .vintage-ornament-bottom {
        width: 150px;
        margin-bottom: 20px;
    }
    
    .vintage-ornament-top::before, .vintage-ornament-bottom::before {
        width: 60px;
        left: -70px;
    }
    
    .vintage-ornament-top::after, .vintage-ornament-bottom::after {
        width: 60px;
        right: -70px;
    }

    .hero-section {
        min-height: calc(100vh - 70px);
        min-height: calc(100svh - 70px);
        padding-bottom: 95px; /* Increased from 60px to 95px */
    }

    .pre-title {
        font-size: 1.1rem;
        letter-spacing: 4px;
    }

    .main-title {
        font-size: 2.2rem;
    }

    .celebrant-name {
        font-size: 2.8rem;
    }

    .ampersand {
        font-size: 2.5rem;
    }

    .names-container {
        gap: 15px;
        margin-bottom: 30px;
    }

    .photo-frame-wrapper {
        width: 240px;
        height: 240px;
    }

    .love-quote {
        font-size: 1.25rem;
    }

    .countdown-container {
        gap: 12px;
    }
    
    .countdown-item {
        min-width: 80px;
        padding: 15px 8px;
        max-width: 95px;
    }
    
    .countdown-value {
        font-size: 1.8rem;
    }

    .countdown-label {
        font-size: 0.65rem;
        letter-spacing: 1px;
    }

    .countdown-separator {
        font-size: 1.4rem;
        margin-bottom: 18px;
    }

    .section-title {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }

    .map-container {
        height: 320px;
    }

    .map-link-btn {
        padding: 15px 25px;
        font-size: 0.8rem;
        letter-spacing: 2px;
    }
}

@media (min-width: 768px) {
    .invitation-container {
        padding: 40px 30px 60px 30px;
    }

    .section {
        padding: 50px 30px;
        margin-bottom: 35px;
    }

    .hero-section {
        padding-top: 30px;
        min-height: calc(100svh - 100px);
        padding-bottom: 110px; /* Increased from 70px to 110px */
    }

    .music-toggle-btn {
        top: 25px;
        right: 25px;
        width: 44px;
        height: 44px;
    }

    .music-toggle-btn svg {
        width: 16px;
        height: 16px;
    }

    .eq-bars {
        height: 12px;
    }
    
    .main-title {
        font-size: 2.8rem;
    }

    .celebrant-name {
        font-size: 3.5rem;
    }

    .ampersand {
        font-size: 3rem;
    }

    .names-container {
        gap: 20px;
        margin-bottom: 40px;
    }

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

    .love-quote {
        font-size: 1.4rem;
    }

    .countdown-item {
        min-width: 90px;
        padding: 20px 10px;
    }

    .countdown-value {
        font-size: 2.2rem;
    }

    .countdown-label {
        font-size: 0.70rem;
    }

    .map-container {
        height: 370px;
    }
}

/* Extra safety for extremely narrow viewports */
@media (max-width: 359px) {
    .celebrant-name {
        font-size: 1.8rem;
    }
    .ampersand {
        font-size: 1.6rem;
    }
    .countdown-separator {
        display: none !important;
    }
    .countdown-container {
        gap: 8px;
    }
}
