/* ======================
   Fonts (unchanged)
   ====================== */

@font-face {
    font-family: 'Cardo';
    src: url('./assets/fonts/Cardo-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Cardo';
    src: url('./assets/fonts/Cardo-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Cardo';
    src: url('./assets/fonts/Cardo-Italic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
}

@font-face {
    font-family: 'Parfumerie Script';
    src: url('./assets/fonts/Parfumerie-script-text.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Symphony Pro';
    src: url('./assets/fonts/SymphonyPro-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'The Seasons';
    src: url('./assets/fonts/The Seasons Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'The Seasons';
    src: url('./assets/fonts/The Seasons Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'The Seasons';
    src: url('./assets/fonts/The Seasons Italic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
}

@font-face {
    font-family: 'The Seasons';
    src: url('./assets/fonts/The Seasons Bold Italic.ttf') format('truetype');
    font-weight: 700;
    font-style: italic;
}

@font-face {
    font-family: 'The Seasons';
    src: url('./assets/fonts/The Seasons Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'The Seasons';
    src: url('./assets/fonts/The Seasons Light Italic.ttf') format('truetype');
    font-weight: 300;
    font-style: italic;
}

/* ===== Responsive font-size variables =====
   Desktop keeps original sizes; under 800px variables switch to clamp()
   Mapping (desktop -> mobile clamp min):
   48px -> clamp(32px, 5vw, 48px)
   36px -> clamp(24px, 4vw, 36px)
   28px -> clamp(20px, 3.5vw, 28px)
   24px -> clamp(18px, 3vw, 24px)
   20px -> clamp(16px, 2.8vw, 20px)
   18px -> clamp(15px, 2.5vw, 18px)
   16px -> clamp(14px, 2vw, 16px)
   14px -> clamp(12px, 1.8vw, 14px)
   12px -> clamp(10px, 1.6vw, 12px)
*/

:root{
    /* Colors and fonts */
    --wine: #6b3c43;
    --wine-darker: #462127;
    --gray-dark: #474747;
    --gray-light: #747474;
    --gray-lightest: #cbcbcb;
    --white: #fff;
    --body-white: #EBEBEB;

    --font-body: 'Cardo', serif;
    --font-title: 'The Seasons', serif;

    /* Increased desktop font-size values */
    --fs-48: 56px;
    --fs-40: 46px;
    --fs-36: 40px;
    --fs-32: 36px;
    --fs-28: 32px;
    --fs-24: 28px;
    --fs-20: 22px;
    --fs-18: 20px;
    --fs-16: 18px;
    --fs-14: 16px;
    --fs-12: 14px;
    --fs-10: 12px;

    --fs-btn: 24px;
    --fs-toast: 1rem;

    --gap: 12px;
    --min-thumb-size: min(100%, 120px); /* minimum thumbnail size */
    --max-cols: 4;
    --bg: #111;
    --fg: #f7f7f7;
    --accent: #1ea7fd;
}


/* Override variables under 800px to be clamped (scales down) */
@media (max-width: 800px) {
    :root{
        --fs-48: clamp(24px, 8vw, 56px);
        --fs-40: clamp(20px, 6vw, 46px);
        --fs-36: clamp(18px, 5vw, 40px);
        --fs-32: clamp(16px, 4.8vw, 36px);
        --fs-28: clamp(14px, 4vw, 32px);
        --fs-24: clamp(12px, 3.6vw, 28px);
        --fs-20: clamp(11px, 3.2vw, 22px);
        --fs-18: clamp(8px, 2.8vw, 20px);
        --fs-16: clamp(8px, 2.5vw, 18px);
        --fs-14: clamp(8px, 2.4vw, 16px);
        --fs-12: clamp(8px, 2vw, 14px);
        --fs-10: clamp(8px, 1.8vw, 12px);

        --fs-btn: clamp(8px, 4vw, 24px);
        --fs-toast: clamp(8px, 3vw, 18px);
        
        --fs-entourage: clamp(6px, 2.4vw, 20px);
    }
}


/* ===== GLOBAL ===== */
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    max-width: 100%;
}
body {
    margin: 0;
    font-family: var(--font-body);
    background: var(--body-white);
    color: #333;
    /* base font - use 16px desktop; will remain visually same, but you can change */
    font-size: var(--fs-16);
}

h1, h2, h3, h4, p {
    margin-block-start: 0;
    margin-block-end: 0;
    overflow-wrap: break-word;
}

/* Sections */
.section {
    padding: 80px;
    text-align: center;
    align-items: center;
    justify-content: center;
}

.section-content {
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

/* Section title & subtitle - using the responsive variables */
.section-title {
    font-weight: bold;
    font-family: 'The Seasons', serif;
    /* original used a clamp for sections - keep responsive variable mapping */
    font-size: var(--fs-48);
    margin-bottom: 0px;
    line-height: 1.05;
    overflow-wrap: break-word;
}

.section-subtitle {
    font-size: var(--fs-24);
    margin-bottom: clamp(16px, 8vw, 40px);
    font-family: 'The Seasons', serif;
    font-weight: normal;
    letter-spacing: clamp(2px, 0.5vw, 4px);
}

/* BUTTONS */
.btn-primary {
    display: inline-block;
    padding: 12px 32px;
    background: var(--wine);
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-size: var(--fs-20);
}

.btn-outline {
    padding: 10px 26px;
    border: 2px solid var(--gray-dark);
    border-radius: 6px;
    text-decoration: none;
    color: var(--gray-dark);
    font-size: var(--fs-18);
}

.small { font-size: var(--fs-14); }


/* ===== HERO =====
   NOTE: hero text left unchanged per request. Keep existing hero clamp rules.
*/

.hero-section {
    position: relative;
    height: 110vh;
    min-height: 800px;
    background: url('assets/images/Hero.jpg') center/cover no-repeat;
    align-items: center;
}

.hero-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(235, 235, 235, 0) 50%, rgba(235, 235, 235, 1) 95%);
}

.hero-content {
    position: relative;
    text-align: center;
    color: white;
    height: max(500px, calc(100% - 350px));
    display: flex;
    justify-content: center;
    flex-direction: column;
}

/* Keep hero titles as originally defined (they already use clamp in your file) */
.hero-title {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    margin-bottom: 16px;
    max-height: 300px;
    margin-top: 64px;
}

.hero-title1 {
    margin-bottom: 16px;
    font-family: 'Symphony Pro', serif;
    font-weight: normal;
    color: var(--gray-dark);
    /* hero clamp intentionally preserved */
}

.hero-title2 {
    margin-bottom: 40px;
    font-family: 'Parfumerie script', cursive;
    font-weight: normal;
    color: var(--gray-dark);
}

.hero-title3 {
    margin-bottom: 16px;
    font-family: 'Symphony Pro', serif;
    font-weight: normal;
    color: var(--gray-dark);
}

/* Keep hero font-size rules the same as original (they use clamp already) */
.hero-title1,
.hero-title3 {
    font-size: clamp(24px, 18vw, 240px);
}

.hero-title2 {
    font-size: clamp(20px, 14vw, 220px);
}

.hero-title {
    gap: clamp(4px, 3vw, 24px);
    margin-top: clamp(16px, 6vw, 64px);
}

.hero-date {
    font-size: clamp(14px, 4vw, 36px);
    margin-bottom: 24px;
    font-family: 'The Seasons', serif;
    color: var(--gray-dark);
    height: fit-content;
}

/* Hollow buttons - use responsive var for font-size */
.hollow-btn {
    font-size: var(--fs-28);
    padding: 14px;
    text-align: center;
    padding-left: 32px;
    padding-right: 32px;
    min-width: min(320px, 80%);
    border: var(--wine) 2px solid;
    font-family: 'The Seasons', serif;
    text-decoration: none;
    font-weight: bold;
    color: var(--wine);
    display: inline-flex;
    justify-content: center;
}

.hollow-btn:hover {
    background: var(--wine);
    color: white;
    transition: .3s ease-out;
}

.hollow-btn-grey {
    font-size: var(--fs-28);
    padding: 14px;
    text-align: center;
    padding-left: 32px;
    padding-right: 32px;
    min-width: min(320px, 80%);
    border: var(--gray-light) 2px solid;
    font-family: 'The Seasons', serif;
    text-decoration: none;
    font-weight: bold;
    color: var(--gray-light);
    display: block;
    justify-content: center;
}

.hollow-btn-grey:hover {
    background: var(--gray-light);
    color: white;
    transition: .3s ease-out;
}

/* Button min-width responsive tweak */
.hollow-btn, .hollow-btn-grey {
    font-size: clamp(var(--fs-20), 1.5vw, var(--fs-28));
    padding: clamp(10px, 1.5vw, 14px) clamp(4px, 3vw, 32px);
    min-width: clamp(min(80%, 180px), 40vw, min(80%,320px));
    cursor: pointer;
}

/* ===== NAVBAR ===== */
.navbar {
    padding: 20px 0;
    position: relative;
    top: 0;
    z-index: 10;
    padding-top: 100px;
}

.navbar ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: clamp(30px, 8vw, 80px);
}

.navbar a {
    text-decoration: none;
    color: var(--gray-dark);
    font-size: var(--fs-28);
    font-family: "The Seasons", serif;
    text-decoration-line: none;
}

.navbar a:hover {
    color: var(--wine);
    transition: .5s ease-out;
    text-decoration-line: underline;
}

/* ===== LOCATION ===== */
.location-title {
    font-size: var(--fs-24);
    margin-bottom: 20px;
    color: var(--gray-dark);
    font-family: 'The Seasons', serif;
    letter-spacing: clamp(4px, 2vw, 16px);
    font-weight: lighter;
}
.location-grid {
    display: grid;
    justify-content: center;
    align-items: center;
    gap: 24px;
    grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr));
    margin-top: 32px;
    margin-bottom: 32px;
}

.location-image {
    width: 100%;
    max-width: 100vw;
    justify-content: center;
    align-items: center;
    display: flex;
}

.location-image img {
    max-width: 600px;
    width: 100%;
}

.location-details {
    margin-bottom: 16px;
    width: 100%;
}

/* Convert nested location-card rules to flat selectors */
.location-card {
    width: fit-content;
    align-items: start;
    justify-items: start;
    text-align: left;
    width: 100%;
}

.location-card h3 {
    font-size: var(--fs-40);
    color: var(--wine);
    font-family: 'The Seasons', serif;
    margin-bottom: 10px;
}

.location-card h4 {
    font-size: var(--fs-24);
    color: var(--gray-light);
    font-family: 'Cardo', serif;
    font-weight: bold;
    margin-bottom: 10px;
}

.location-card p {
    font-size: var(--fs-20);
    margin-bottom: 10px;
    color: var(--gray-light);
    font-family: 'Cardo', serif;
    font-weight: normal;
}

.location-card .hollow-btn-grey {
    font-size: var(--fs-20);
    min-width: 0;
    padding: 8px;
    padding-left: 30px;
    padding-right: 30px;
    margin-top: 0 !important;
}


.details-left {
    align-items: end;
    justify-items: end;
    padding-right: 24px;
    text-align: left;
    display: inline;
    width: 100%;
}

.card-left {
    align-items: end;
    justify-items: end;
    text-align: right;
}

#location .center-btn {
    margin-top: 20px;
    display: inline-flex;
}

.illustration {
    width: 120px;
    margin: 0 auto 20px;
    display: block;
}

.details-title {
    font-size: var(--fs-16);
    margin-bottom: 16px;
    color: #fff;
    font-family: 'The Seasons', serif;
    letter-spacing: clamp(2px, 1.5vw, 8px);
    font-weight: normal;
}

.centered {
    display: none;
    width: 100%;
}

/* mobile-specific tweaks preserved */
@media (max-width: 920px) {
    .details-left {
        display: none;
    }
    
    .centered{
        display: inline;
        text-align: center;
        padding-right: 0;
        align-items: center;
        justify-items: center;
    }

    .card-left {
        text-align: center;
        align-items: center;
        justify-items: center;
    }

    .details-right{
        text-align: center;
        padding-right: 0;
        align-items: center;
        justify-items: center;
    }

    .card-right {
        text-align: center;
        align-items: center;
        justify-items: center;
    }

    #location .center-btn {
        display: block;
    }
}

/* ===== TIMELINE SECTION ===== */
.timeline-section {
    background: var(--gray-dark);
    text-align: start;
}

.white {
    color: #fff;
}

.timeline-grid {
    display: grid;
    justify-content: center;
    align-items: center;
    gap: 24px;
    grid-template-columns: repeat(auto-fit, minmax(min(80px, 100%), 1fr));
    margin-top: 32px;
    margin-bottom: 32px;
}


.tl-item {
    color: #fff;
    font-size: var(--fs-15, var(--fs-16)); /* fallback to 16 if var not set */
    min-height: clamp(80px, 30vw, 300px);
    align-items: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tl-item img {
    width: clamp(50px, 10vw, 80px);
    height: clamp(50px, 10vw, 80px);
    margin-bottom: 12px;
}

.tl-item h4 {
    font-size: var(--fs-20);
    font-family: 'Cardo', serif;
    font-weight: bold;
    text-align: center;
}

.tl-item p {
    font-size: var(--fs-16);
    font-family: 'Cardo', serif;
    font-weight: lighter;
    text-align: center;
}

.tl-item:hover {
    transform: scale(1.1);
    transition: .5s ease-out;
    border: #fff solid 1.5px;
}

@media (max-width: 599px) {
    .timeline-section {
        text-align: center;
    }
    .timeline-grid {
        gap: 16px;
        grid-template-columns: repeat(1, minmax(min(80px, 100%), 1fr));
        margin-top: 16px;
        margin-bottom: 16px;
    }
}

/* ===== ENTOURAGE ===== */
.entourage-section .details-title {
    color: var(--gray-dark);
}
.entourage-section .section-title {
    color: var(--wine);
    margin-bottom: 16px;
}
.entourage-section .section-subtitle {
    color: var(--gray-dark);
}

.entourage-list h3 {
    margin-top: clamp(4px, 2vw, 8px);
    font-size: var(--fs-40);
    margin-bottom: clamp(4px, 3vw, 16px);
    color: var(--gray-dark);
    font-family: 'The Seasons', serif;
    line-height: 1;
}

.entourage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100px, 100%), 1fr));
    gap: clamp(2px, 2vw, 8px) clamp(8px, 6vw, 48px);
    text-align: left;
    margin-bottom: clamp(4px, 2vw, 16px);
    align-items: start;
}

.bottom-align {
    align-items: end;
}

.entourage-container {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
    justify-content: end;
}

.entourage-container h4 {
    font-size: var(--fs-24);
    margin-bottom: 8px;
    color: var(--gray-dark);
    font-family: 'The Seasons', serif;
}

.entourage-container p {
    font-size: var(--fs-entourage);
    color: var(--gray-light);
    font-family: 'Cardo', serif;
    font-weight: normal;
}

.entourage-left {
    text-align: right;
    align-items: end;
}

.entourage-right {
    text-align: left;
    align-items: start;
}

@media (max-width: 308px) {
    .entourage-left {
        text-align: center;
        align-items: center;
    }

    .entourage-right {
        text-align: center;
        align-items: center;
    }

    .entourage-grid {
        text-align: center;
    }
    .entourage-container {
        align-items: center;
        justify-content: center;
        margin-bottom: 16px;
    }

    .entourage-list {
        text-align: center;
        align-items: center;
        justify-content: center;
    }
}

/* ===== ATTIRE SECTION ===== */
.attire-section {
    text-align: end;
    background: var(--gray-dark);
}
.attire-section .details-title {
    color: var(--white);
}
.attire-section .section-title {
    color: var(--white);
}
.attire-section .section-subtitle {
    color: var(--white);
}

.attire-grid {
    position: relative; /* VERY IMPORTANT */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
    gap: 8px clamp(10px, 5vw, 40px);
}

.attire-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: translateY(-80px);
    padding-right: clamp(2px, 5vw, 8px);
}

.attire-left h3 {
    font-size: var(--fs-40);
    color: var(--white);
    font-family: 'The Seasons', serif;
    text-align: center;
}

.attire-left .colors {
    margin-top: 16px;
    font-style: italic;
    color: var(--gray-lightest);
    font-size: var(--fs-16);
    text-align: center;
}

.attire-left p {
    font-size: var(--fs-20);
    color: var(--white);
    font-family: 'Cardo', serif;
    font-weight: normal;
    max-width: 400px;
    text-align: center;
}

.attire-left .outfit-type {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    color: var(--gray-lightest);
    font-size: var(--fs-20);
    text-align: center;
}

.attire-left .outfit {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    color: var(--gray-lightest);
    font-size: var(--fs-20);
    text-align: left;
}


.attire-left .divider {
    width: 10px;
    text-align: center;
}

.attire-left .outfit-identifier {
    font-weight: bold;
    text-align: right;
}

.attire-right {
    position: relative;
    width: 100%;
    height: 100%;
}

.attire-right img {
    width: clamp(200px, 40vw, 450px);
    height: auto;
    position: absolute;
    right: 0;
}

@media (max-width: 500px) {
    .attire-section {
        text-align: center;
    }
    .attire-grid .attire-right img {
        display: none;
    }

    .attire-left {
        transform: none;
    }
}

/* SWATCHES */
.swatches {
    display: flex;
    gap: clamp(2px, 3vw, 16px);
    margin: 20px 0;
}

.swatch {
    width: clamp(20px, 5vw, 60px);
    height: clamp(20px, 5vw, 60px);
    border-radius: 50%;
}

.sw1 { background: #C0BDD0; }
.sw2 { background: #C7AFB5; }
.sw3 { background: #D8CDCE; }
.sw4 { background: #C6C6C6; }
.sw5 { background: #C6CDC1; }

/* Tooltip */
#colorTooltip {
    position: absolute;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    border-radius: 12px;
    font-family: 'Cardo', serif;
    font-size: var(--fs-14);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, -10px);
    transition: opacity .3s ease, transform .5s ease;
    z-index: 999;
    display: none;
}

#colorTooltip.show {
    display: block;
    opacity: 1;
    transform: translate(-50%, -14px);
}

/* ===== GIFTING ===== */
.gifting-section {
    background: var(--gray-light);
}
.gifting-section .details-title {
    color: var(--white);
}
.gifting-section .section-title {
    color: var(--white);
    margin-bottom: 16px;
}
.gifting-section .section-subtitle {
    color: var(--gray-lightest);
}
.gifting-note {
    max-width: 600px;
    margin: auto;
    font-size: var(--fs-20);
    color: var(--white);
}

/* ===== GALLERY SLIDER ===== */
.gallery-section {
    text-align: left;
}
.gallery-section .section-title { color: var(--wine); }
.gallery-section .section-subtitle { color: var(--gray-dark); }

.gallery-slider {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Crossfade Image Wrapper */
.gallery-image-wrapper {
    position: relative;
    width: 80%;
    aspect-ratio: calc(16/9);
    max-height: 600px;
    transform: scale(1.1);
    z-index: 1;
    overflow: hidden;
    align-items: center;
    justify-content: center;
}

/* Stacked images */
.gallery-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.8s ease;
}

/* Visible image */
.gallery-img.show {
    opacity: 1;
}

/* Buttons */
.gallery-btn {
    width: 60px;
    height: 100px;
    background-color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
}

.gallery-btn:hover {
    background-color: var(--wine);
    transition: .3s ease-out;
}
.gallery-btn:hover .prev,
.gallery-btn:hover .next {
    color: white;
    transition: .3s ease-out;
}

.prev, .next {
    background: none;
    border: none;
    font-size: var(--fs-36);
    cursor: pointer;
}

@media (max-width: 800px) {
    .gallery-section {
        text-align: center;
    }
}

/* ===== FAQ ===== */
.faq-section .section-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.faq-section .section-title {
    background-color: var(--wine);
    padding: 16px 32px;
    margin-bottom: 16px;
    width: fit-content;
    color: var(--white);
}

.faq {
    width: 100%;
}

.faq-item {
    width: 100%;
    margin: 10px auto;
    text-align: left;
}

.faq-question {
    position: relative;
    width: 100%;
    padding: clamp(4px, 3vw, 24px);
    padding-right: clamp(6px, 3.5vw, 24px);
    background: var(--white);
    color: var(--gray-dark);
    border: none;
    font-size: var(--fs-22, var(--fs-20));
    cursor: pointer;
    font-family: 'Cardo', serif;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    overflow-wrap: break-word;
    white-space: normal;
}

/* Default: + icon */
.faq-question::after {
    content: "+";
    font-size: var(--fs-28);
    font-weight: bold;
    transition: transform .5s ease-out;
    color: var(--gray-light);
}

/* Active: – icon */
.faq-question.active::after {
    content: "–";
    transform: rotate(180deg);
}

.faq-answer {
    width: calc(100% - clamp(20px, 3vw, 40px) - clamp(20px, 3vw, 40px));
    padding: clamp(12px, 2vw, 24px);
    padding-left: clamp(20px, 3vw, 40px);
    padding-right: clamp(20px, 3vw, 40px);
    display: none;
    background: #f7f7f7;
    font-size: var(--fs-20);
    overflow-wrap: break-word;
    text-align: justify;
}

/* Bottom buttons section */

.bottom-btn {
    padding-top: 0 !important;
}
.bottom-btn .section-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 16px;
}
.bottom-btn .rsvp {
    background-color: var(--wine);
    color: var(--white);
}
.bottom-btn .rsvp:hover{
    background-color: var(--wine-darker);
    transition: .3s ease-out;
}

/* FOOTER */
.footer {
    background: var(--gray-dark);
    color: white;
    text-align: center;
    height: 144px;
}

.footer .burgundy {
    background: var(--wine);
    height: 24px;
    width: 100%;
}
.footer .footer-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 120px;
}
.footer img {
    width: 48px;
    height: auto;
    padding-bottom: 4px;
}
.footer .footer-date {
    margin-top: 8px;
    font-size: var(--fs-14);
    font-family: 'The Seasons', serif;
    color: var(--gray-lightest);
}

/* Overlay / Popup */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    z-index: 1000;
    padding: 20px;
    box-sizing: border-box;
}

.popup {
    background: #fff;
    padding: 30px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    transform: scale(0.8);
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    position: relative;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

.overlay.active .popup {
    transform: scale(1);
    opacity: 1;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--wine);
    border: none;
    color: white;
    font-size: var(--fs-20);
    font-weight: bold;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.2s ease, transform 0.2s ease;
}

.close-btn:hover {
    background: var(--wine-darker);
    transform: rotate(90deg);
}

.popup-content {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.popup-content iframe {
    width: auto;
    height: 300px;
    border: none;
    border-radius: 10px;
}

/* QR Link block inside popup */
.qrlink {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.qrlink img {
    max-width: 200px;
    height: auto;
}
.qrlink p {
    font-size: var(--fs-18);
    color: var(--gray-dark);
    font-family: 'Cardo', serif;
    font-weight: normal;
}
.qrlink a button {
    font-family: 'Cardo', serif;
    padding: 12px 24px;
    background-color: var(--wine);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.3s ease;
}
.qrlink a button:hover {
    background-color: var(--wine-darker);
}

/* Mobile adjustments for popup */
@media (max-width: 480px) {
    .popup {
        padding: 20px;
        border-radius: 10px;
        max-height: 100%;
    }
}

#popupOverlayMap img {
    width: 100%;
    max-width: 600px;
    max-height: auto;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    width: 30px;
}

.hamburger span {
    width: 25px;
    height: 2px;
    background: var(--gray-dark);
    display: block;
    border-radius: 2px;
}

/* Overlay Menu with slide animation */
.overlay-menu-hmb {
    position: fixed;
    top: -100%;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(30, 30, 30, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: top 0.4s ease;
    opacity: 0;
}

.overlay-menu-hmb.active {
    top: 0;
    opacity: 1;
}

.overlay-menu-hmb ul {
    list-style: none;
    padding: 0;
    text-align: center;
}

.overlay-menu-hmb ul li {
    margin: 20px 0;
}

.overlay-menu-hmb ul li a {
    color: white;
    font-size: var(--fs-28);
    text-decoration: none;
}

.overlay-menu-hmb ul li a:hover {
    color: var(--wine);
    font-size: var(--fs-28);
    text-decoration: underline;
}

.close-btn-hmb {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: var(--fs-36);
    color: white;
    cursor: pointer;
}

/* Responsive Navbar toggles */
@media (max-width: 800px) {
    .navbar {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .navbar ul{
        display: none;
    }
    .hamburger {
        display: flex;
    }
}

/* Base animation */
.animate {
  opacity: 0;
  transition: all 0.8s ease-out;
}

/* Directions */
.from-left { transform: translateX(-40px); }
.from-right { transform: translateX(40px); }
.from-top { transform: translateY(-40px); }
.from-bottom { transform: translateY(40px); }

/* Show state */
.animate.show {
  opacity: 1;
  transform: translateX(0) translateY(0);
}

/* RSVP Popup overrides */
#popupOverlayRSVP .popup-content {
    display: block;
}

/* RSVP form */
.rsvp-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-family: inherit;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

label {
  font-weight: 600;
  margin-bottom: 6px;
  margin-top: 8px;
  font-size: var(--fs-16);
}

input, textarea {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: var(--fs-16);
  outline-color: var(--wine);
}

.radio-group {
  display: flex;
  gap: 2rem;
  margin-top: 5px;
}

.rsvp-submit {
    margin-top: 16px;
    padding: 12px;
    background: var(--wine);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: var(--fs-16);
    cursor: pointer;
    font-family: 'cardo', serif;
}

.rsvp-submit:hover {
  background: var(--wine-darker);
}

/* Responsive: general layout padding changes */
@media (max-width: 600px) {
    .section {
        padding: 30px 30px;
    }

    .hero-section {
        min-height: 600px;
    }
}

/* Toast */
.toast {
  position: fixed;
  top: 25px;
  right: 25px;
  background: #000;
  color: #fff;
  padding: 14px 20px;
  border-radius: 8px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
  z-index: 999999;
  font-size: var(--fs-toast);
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}


/* gallery container — capped so grid never exceeds --max-cols */
  .gallery {
    --gap: 12px;
    --max-columns: 4;

    display: grid;
    gap: var(--gap);
    /* auto-fit columns that stretch fully */
    grid-template-columns: repeat(4, minmax(min(100%, 120px), 1fr));

    /* Prevent more than 4 columns */
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    }

    @media (max-width: calc((4 *120px) + (3 * 12px) + (160px))) {
        .gallery {
            grid-template-columns: repeat(auto-fit, minmax(min(100%, 120px), 1fr));
        }
    }
  /* square thumbnail using aspect-ratio */
  .thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1; /* keeps it square */
    overflow: hidden;
    cursor: zoom-in;
    background: #eee;
    box-shadow: 0 6px 18px rgba(16,16,16,0.08);
  }

  .thumb img{
    width:100%;
    height:100%;
    display:block;
    object-fit: cover; /* crop to fill square */
    transition: transform .35s cubic-bezier(.2,.9,.2,1);
  }

  .thumb:hover img{
    transform: scale(1.03);
  }

  /* Lightbox overlay */
  .lightbox {
    position: fixed;
    inset: 0;
    display: none; /* shown when active */
    align-items: center;
    justify-content: center;
    background: rgba(8,8,10,0.75);
    z-index: 9999;
    padding: 24px;
  }
  .lightbox.visible { display:flex; }

  .viewer {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
  }

  /* the image wrapper keeps the image centered and constrained */
  .imgwrap {
    max-width: calc(100vw - 220px);
    max-height: calc(100vh - 80px);
    display:flex;
    align-items:center;
    justify-content:center;
    overflow: hidden;
    border-radius: 8px;
    background:#111;
  }

  .imgwrap img {
    display:block;
    max-width: 100%;
    max-height: 100%;
    transform-origin: center center;
    transition: transform .12s linear;
    user-select: none;
    -webkit-user-drag: none;
    z-index: 1;
  }

  /* Controls column on the right for larger desktop */
  .controls {
    display:flex;
    flex-direction:column;
    gap:8px;
    margin-left:12px;
    align-items:center;
    z-index: 2;
  }

  .btn {
    background: rgba(255,255,255,0.06);
    color: var(--fg);
    border: none;
    padding:10px 12px;
    border-radius:8px;
    cursor:pointer;
    width:44px;
    height:44px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  }
  .btn:active { transform: scale(.98); }
  .btn.large {
    width:44px;height:44px;font-weight:700;
  }

  .nav-controls{
    position:absolute;
    left: 12px;
    right: 80px;
    top: 50%;
    transform: translateY(-50%);
    display:flex;
    justify-content: space-between;
    pointer-events:none;
    z-index: 2;
  }

  .nav-controls button{
    pointer-events:auto;
    background: rgba(255,255,255,0.06);
    border: none;
    color:var(--fg);
    width:52px;height:52px;border-radius:10px;
    display:inline-grid;place-items:center;
  }

  .lightbox .close {
    position:absolute;
    top:18px;
    right:18px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.08);
    width:44px;height:44px;border-radius:8px;
    color:var(--fg);
  }

  .meta {
    margin-top:10px;
    color:#ddd;
    font-size:13px;
    text-align:center;
  }

  /* responsive tweaks */
  @media (max-width: 720px){
    .controls { display:none; } /* hide right controls on small screens; use nav buttons and pinch/wheel */
    .imgwrap { max-width: 100vw; max-height: calc(100vh - 110px); }
    .nav-controls button { width:44px;height:44px; }

    .nav-controls{
        right: 12px;
    }
  }

  /* keyboard hint */
  .hint{
    text-align:center;
    margin-top:10px;
    color:#666;
    font-size:13px;
  }