/* --- Variables & Reset --- */
:root {
    --primary-color: #3498DB;
    /* Blue */
    --secondary-color: #5D6D7E;
    /* Gray Blue */
    --accent-color: #007BFF;
    /* Vivid Blue */
    --light-bg: #F8F9FA;
    --dark-text: #2C3E50;
    --light-text: #ECF0F1;
    --white: #FFFFFF;

    --font-heading: 'Cormorant', serif;
    --font-body: 'Montserrat', sans-serif;

    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);

    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    color: var(--dark-text);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    -webkit-tap-highlight-color: transparent;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-speed);
}

ul {
    list-style: none;
}

/* --- Utilities --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.section {
    padding: 80px 0;
    position: relative;
    overflow: hidden;
    /* For floating elements */
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 20px;
    color: var(--secondary-color);
    position: relative;
    display: block;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    margin: 10px auto 0;
    border-radius: 2px;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--glass-shadow);
    padding: 20px;
}

.bg-light {
    background-color: var(--light-bg);
}

.bg-gradient {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.btn-premium {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    color: var(--white);
    border-radius: 50px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    margin-bottom: 5rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;

}

.btn-premium:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.6);
}

/* --- Navigation --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: all 0.4s ease;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Cinzel Decorative', cursive;
    font-size: 1.8rem;
    /* font-weight: 500; */
    color: var(--dark-text);
}

.logo .ampersand {
    font-family: 'Cinzel Decorative';
    font-size: 0.5em;
    font-style: italic;
    vertical-align: middle;
    margin: 0 5px;
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-link {
    font-weight: 600;
    font-size: 0.95rem;
    /* Reduced for desktop */
    color: var(--secondary-color);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s;
}

.nav-link:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--dark-text);
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
}

/* --- Hero Section --- */
.hero-section {
    min-height: 100dvh;
    /* Allow height to grow if content overflows */
    width: 100%;
    max-width: 100vw;
    background: linear-gradient(rgba(44, 62, 80, 0.4), rgba(44, 62, 80, 0.4)), url('assets/images/sample/7.jpg') no-repeat center center/cover;
    background-attachment: fixed;
    /* Parallax effect */
    /* Placeholder background used above from Unsplash source for wedding implementation */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #cce1f1;
    position: relative;
    /* overflow: hidden; Removed to allow background to scale with content */
    padding: 120px env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    /* Increased top padding to push monogram down on desktop */
}

/* iOS Performance/Display Fix: background-attachment: fixed is buggy on mobile Safari */
@supports (-webkit-touch-callout: none) {
    .hero-section {
        background-attachment: scroll !important;
    }
}



.hero-content {
    z-index: 2;
}

.hero-monogram {
    font-family: 'Cinzel Decorative', cursive;
    font-size: 7rem;
    line-height: 0.8;
    margin-bottom: 20px;
    /* font-weight: 700; */
}

.hero-monogram .ampersand {
    font-family: 'Cinzel Decorative';
    font-size: 0.5em;
    font-style: italic;
    vertical-align: middle;
    margin: 0 5px;
}

.main-headline {
    font-size: 2.2rem;
    margin: 10px 0;
    text-transform: uppercase;
    letter-spacing: 0.4em;
    font-weight: 400;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
}

.sub-headline {
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.5em;
    text-transform: uppercase;
    font-family: var(--font-body);
    margin-bottom: 30px;
}

/* Divider removed */

.date-display {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    letter-spacing: 0.2em;
    margin-bottom: 40px;
    font-weight: 600;
}

/* Countdown */
.countdown-container {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
}

.time-box {
    background: rgba(255, 255, 255, 0.2);
    padding: 15px 20px;
    width: 100px;
    text-align: center;
    color: #cce1f1;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.time-box span {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    font-family: var(--font-heading);
}

.time-box small {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Floating Animation */
@keyframes floating {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0px);
    }
}

.floating {
    animation: floating 4s ease-in-out infinite;
}

.floating-delay-1 {
    animation: floating 4.5s ease-in-out infinite;
    animation-delay: 0.5s;
}

.floating-delay-2 {
    animation: floating 5s ease-in-out infinite;
    animation-delay: 1s;
}

.floating-delay-3 {
    animation: floating 5.5s ease-in-out infinite;
    animation-delay: 1.5s;
}

.hero-btn {
    margin-top: 60px;
    position: relative;
    z-index: 10;
}



/* --- Our Story --- */
.story-section {
    background-color: #6A84A0;
    /* Matches the gray-blue in the image */
    color: var(--white);
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.story-flex {
    display: flex;
    align-items: center;
    gap: 60px;
    text-align: left;
    position: relative;
    z-index: 1;
}

.story-image-container {
    flex: 1;
    max-width: 45%;
}

.story-image-frame {
    position: relative;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transform: rotate(-2deg);
    transition: transform 0.5s ease;
}

.story-image-frame:hover {
    transform: rotate(0deg) scale(1.02);
}

.story-image-frame::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    pointer-events: none;
}

.story-image {
    width: 100%;
    aspect-ratio: 4/5;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}

.story-text-container {
    flex: 1;
}

.story-headline {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    line-height: 1.4;
    letter-spacing: 0.1em;
    text-transform: none;
    font-weight: 500;
    margin-bottom: 30px;
}

.story-content {
    max-width: 100%;
}

.story-subtitle {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-style: italic;
    margin-bottom: 25px;
    opacity: 0.9;
}

.story-text {
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 20px;
    font-family: var(--font-body);
    opacity: 0.85;
}

.story-decoration {
    position: absolute;
    width: 250px;
    height: 250px;
    opacity: 0.15;
    pointer-events: none;
    fill: var(--white);
    z-index: 0;
}

.story-decoration.top-right {
    top: 0;
    right: 0;
}

.story-decoration.bottom-left {
    bottom: 0;
    left: 0;
    transform: rotate(180deg);
}

@media (max-width: 992px) {
    .story-flex {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }

    .story-image-container {
        max-width: 80%;
    }

    .story-image-frame {
        transform: rotate(0deg);
    }

    .story-headline {
        font-size: 1.8rem;
    }
}

@media (max-width: 576px) {
    .story-image-container {
        max-width: 100%;
    }

    .story-headline {
        font-size: 1.5rem;
    }
}

/* --- Date & Venue --- */
.venue-cards {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.card {
    flex: 1;
    min-width: 300px;
    max-width: 400px;
    text-align: center;
    padding: 40px 30px;
    background: rgba(255, 255, 255, 0.8);
    /* Fallback */
    /* Glassmorphism applied via helper class */
    transform-style: preserve-3d;
    transform: perspective(1000px);
}

.card-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.card h3 {
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.venue-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.venue-address {
    color: #7f8c8d;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.btn-link {
    display: inline-block;
    margin-top: 15px;
    color: var(--accent-color);
    font-weight: 600;
    border-bottom: 1px solid transparent;
}

.btn-link:hover {
    border-bottom: 1px solid var(--accent-color);
}

/* --- Entourage --- */
/* Replacing old grid with structured layout */
.entourage-group {
    margin-bottom: 40px;
    text-align: center;
}

.role-title {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.3rem;
    letter-spacing: 1px;
}

.entourage-group p {
    margin-bottom: 5px;
    font-size: 1.05rem;
}

.group-row {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 30px;
}

.group-column {
    flex: 1;
    min-width: 250px;
}

/* .sponsors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    max-width: 900px;
    margin: 0 auto;
} */

.sponsors-grid p {
    margin-bottom: 0;
}

.secondary-sponsors h4,
.bearers-row h4,
.flower-girls h4 {
    font-family: var(--font-heading);
    color: var(--secondary-color);
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.highlight-name {
    /*font-weight: 600;*/
    font-size: 1.1rem;
}

.flower-girls {
    margin-top: 20px;
}

/* --- Timeline / Events --- */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 40px auto 0;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--primary-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
    border-radius: 2px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    top: 25px;
    background-color: var(--white);
    border: 4px solid var(--primary-color);
    border-radius: 50%;
    z-index: 1;
}

.timeline-item:nth-child(even)::after {
    left: -10px;
}

.timeline-content {
    padding: 20px;
    position: relative;
}

/* --- Attire Guide --- */
.mood-board {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 30px 0 50px;
}

.color-swatch {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.color-swatch:hover {
    transform: translateY(-5px) scale(1.1);
}

.attire-vertical-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 60px;
    text-align: center;
}

.attire-group-vertical {
    max-width: 700px;
}

.attire-role-title {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-size: 1.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 25px;
}

.attire-visuals {
    /* Removed font-size: 4rem; as we are using images now */
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.attire-img {
    max-width: 100%;
    height: auto;
    max-height: 400px;
    /* Prevent it from being too huge */
    mix-blend-mode: multiply;
    /* Blends white background into the light gray section background */
    border-radius: 8px;
    /* Optional: adds subtle rounding */
}

.attire-instruction {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--primary-color);
    /* Matches the blue text in image */
    text-transform: uppercase;
    line-height: 1.8;
    letter-spacing: 1px;
}


/* --- Gallery Carousel --- */
/* --- Gallery Carousel (3D) --- */
.carousel-container {
    position: relative;
    max-width: 900px;
    margin: 40px auto;
    overflow: hidden;
    /* Keep hidden to contain overflowing 3D elements initially */
    perspective: 1000px;
    /* 3D Depth */
    padding: 20px 0;
    /* Space for shadow/depth */
}

.gallery-carousel {
    position: relative;
    width: 100%;
    height: 60vh;
    /* Set explicit height for absolute children */
    min-height: 400px;
    max-height: 600px;
    transform-style: preserve-3d;
}

.carousel-slide {
    position: absolute;
    width: 60%;
    /* Smaller width to see side items */
    height: 100%;
    left: 20%;
    /* Center it: (100% - 60%) / 2 */
    top: 0;
    transition: transform 0.5s ease, opacity 0.5s ease, filter 0.5s ease;
    display: block !important;
    /* Override any JS display toggle */
    opacity: 0;
    z-index: 0;
    filter: brightness(0.5);
    /* Dim inactive items */
    pointer-events: none;
    /* Only active is clickable */
}

/* 3D States */
.carousel-slide.active {
    opacity: 1;
    z-index: 10;
    transform: translateX(0) scale(1) rotateY(0deg);
    filter: brightness(1);
    pointer-events: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.carousel-slide.prev {
    opacity: 0.7;
    z-index: 5;
    transform: translateX(-70%) scale(0.8) rotateY(45deg);
}

.carousel-slide.next {
    opacity: 0.7;
    z-index: 5;
    transform: translateX(70%) scale(0.8) rotateY(-45deg);
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
}

@keyframes fadeEffect {
    from {
        opacity: 0.4
    }

    to {
        opacity: 1
    }
}

/* Controls */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.3);
    color: white;
    border: none;
    padding: 16px;
    cursor: pointer;
    font-size: 24px;
    border-radius: 0 3px 3px 0;
    transition: 0.3s;
    user-select: none;
}

.carousel-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.next-btn {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.prev-btn {
    left: 0;
    border-radius: 3px 0 0 3px;
}

/* Dots */
.carousel-dots {
    text-align: center;
    position: absolute;
    bottom: 20px;
    width: 100%;
}

.dot {
    cursor: pointer;
    height: 12px;
    width: 12px;
    margin: 0 5px;
    background-color: #bbb;
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.3s;
}

.active,
.dot:hover {
    background-color: var(--primary-color);
}

.gallery-text-container {
    text-align: center;
    margin-top: 30px;
}

.gallery-hint-text {
    color: var(--secondary-color);
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-style: italic;
    letter-spacing: 1px;
    opacity: 0.8;
    animation: gentle-pulse 2.5s infinite ease-in-out;
}

@keyframes gentle-pulse {

    0%,
    100% {
        opacity: 0.5;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.03);
    }
}

.gallery-hint-text i {
    font-size: 0.8rem;
    margin-left: 5px;
}

/* --- Lightbox --- */
/* --- Lightbox --- */
.lightbox {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    /* Manage overflow internally */
    background-color: rgba(30, 30, 30, 0.95);
    /* Darker background per image */
    flex-direction: column;
    /* Stack main image and thumbs */
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    position: relative;
    max-width: 80%;
    max-height: 70vh;
    /* Leave room for thumbs */
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.lightbox-content img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 0;
    /* Cleaner look */
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: 300;
    cursor: pointer;
    z-index: 10001;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.close-lightbox:hover {
    opacity: 1;
}

.lightbox-nav {
    cursor: pointer;
    position: absolute;
    top: 45%;
    /* Moved up slightly */
    transform: translateY(-50%);
    color: white;
    font-weight: 100;
    font-size: 50px;
    /* Thinner, larger arrows */
    border: none;
    background: transparent;
    transition: 0.3s;
    user-select: none;
    padding: 20px;
    z-index: 10002;
    opacity: 0.7;
}

.lightbox-nav:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.lightbox-nav.next {
    right: 30px;
}

.lightbox-nav.prev {
    left: 30px;
}

/* Thumbnail Strip */
.lightbox-thumbnails {
    width: 100%;
    height: 100px;
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 10px 0;
    overflow-x: auto;
    background: rgba(0, 0, 0, 0.3);
    position: absolute;
    bottom: 20px;
    scrollbar-width: thin;
    /* Firefox */
    scrollbar-color: #555 transparent;
}

.lightbox-thumbnails::-webkit-scrollbar {
    height: 6px;
}

.lightbox-thumbnails::-webkit-scrollbar-thumb {
    background-color: #555;
    border-radius: 3px;
}

.thumb-img {
    height: 100%;
    width: 120px;
    /* Fixed aspect ratio roughly */
    object-fit: cover;
    opacity: 0.4;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
    border: 2px solid transparent;
}

.thumb-img:hover {
    opacity: 0.8;
}

.thumb-img.active {
    opacity: 1;
    border-color: #3498db;
    /* Blue accent color */
    transform: scale(1.05);
}

/* --- RSVP --- */
.rsvp-subtitle {
    text-align: center;
    margin-bottom: 40px;
    font-family: var(--font-body);
}

.rsvp-container {
    max-width: 600px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.9);
}

.rsvp-iframe-wrapper {
    position: relative;
    width: 100%;
    margin-top: 0;
    /* Reduced since spacing is now handled by container/subtitle */
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    /* Match Google Form background */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.rsvp-iframe-wrapper iframe {
    border: none;
    display: block;
}

/* --- Notes on Gifts --- */
.notes-section {
    background-color: #6A84A0;
    color: var(--white);
    text-align: center;
    padding: 80px 0;
}

.notes-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 30px;
    font-weight: 400;
}

.gift-icon-container {
    margin: 0 auto 30px;
    width: 80px;
    height: 80px;
    color: var(--white);
}

.gift-icon {
    width: 100%;
    height: 100%;
}

.notes-text {
    font-size: 1rem;
    line-height: 2;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-family: var(--font-body);
    max-width: 800px;
    margin: 0 auto;
}

/* --- FAQ --- */
.accordion {
    max-width: 800px;
    margin: 40px auto 0;
}

.accordion-item {
    margin-bottom: 15px;
}

.accordion-header {
    width: 100%;
    padding: 20px;
    background: none;
    border: none;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-text);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    padding: 0 20px;
    transition: max-height 0.3s ease-out, padding 0.3s ease;
}

.accordion-content p {
    padding-bottom: 20px;
}

.accordion-item.active .accordion-content {
    max-height: 200px;
    /* Arbitrary large height */
}

.accordion-item.active .accordion-header i {
    transform: rotate(180deg);
}

/* --- Footer --- */
.footer {
    background-color: #2C3E50;
    color: var(--white);
    padding: 50px 0;
    text-align: center;
}

.footer h2 {
    margin-bottom: 10px;
}

.social-links {
    margin: 20px 0;
}

.social-links a {
    color: var(--white);
    font-size: 1.5rem;
    margin: 0 10px;
}

.social-links a:hover {
    color: var(--primary-color);
}

/* --- Responsive Design --- */
/* --- Lightbox Zoom Controls --- */
/* (Controls removed for gesture support) */

.lightbox-content img {
    /* transition: transform 0.3s ease; */
    /* Remove transition for instant drag/zoom response */
    transform-origin: center center;
    cursor: grab;
    touch-action: none;
    /* Prevent browser zooming/scrolling */
}

.lightbox-content img:active {
    cursor: grabbing;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .section-title {
        font-size: 1.8rem;
    }

    .menu-toggle {
        display: block;
        z-index: 1001;
    }

    .menu-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-menu {
        position: fixed;
        right: -100%;
        left: auto;
        top: 0;
        gap: 0;
        flex-direction: column;
        background-color: var(--white);
        width: 100%;
        height: 100vh;
        text-align: center;
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        padding-top: 80px;
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }

    .nav-menu.active {
        right: 0;
        left: auto;
    }

    .nav-item {
        margin: 16px 0;
    }

    .nav-link {
        font-size: 1.1rem;
        /* Restore original size for mobile menu */
    }

    .main-headline {
        font-size: 2.5rem;
        letter-spacing: 0.15rem;
        margin: 25px 0;
    }

    .hero-content {
        margin-top: -50px;
        /* Shift content upwards slightly */
    }

    .hero-monogram {
        font-size: 8.5rem;
        margin-bottom: 30px;
    }

    .sub-headline {
        font-size: 1.0rem;
        letter-spacing: 0.3em;
        margin-bottom: 40px;
    }

    .date-display {
        font-size: 2.2rem;
        /* Increased size */
        margin-bottom: 40px;
    }

    .countdown-container {
        flex-wrap: wrap;
        gap: 15px;
        /* Increased gap */
        justify-content: center;
        margin-top: 30px;
        width: 100%;
        /* Ensure full width usage */
    }

    .time-box {
        width: 120px;
        /* Increased width even further */
        padding: 15px 10px;
    }

    .time-box span {
        font-size: 2rem;
        /* Increased size further */
    }

    .time-box small {
        font-size: 0.7rem;
    }

    .hero-btn {
        margin-top: 30px;
        padding: 10px 24px;
        font-size: 0.9rem;
    }

    /* Story Section */
    .story-headline {
        font-size: 1.3rem;
        letter-spacing: 0.1em;
        line-height: 1.5;
    }

    .story-subtitle {
        font-size: 0.95rem;
        letter-spacing: 0.2em;
    }

    .story-text {
        font-size: 0.8rem;
        letter-spacing: 0.1em;
    }

    /* Timeline */
    .timeline::after {
        left: 31px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .timeline-item::after {
        left: 21px;
    }

    .timeline-item:nth-child(even) {
        left: 0;
    }

    .timeline-item:nth-child(even)::after {
        left: 21px;
    }

    /* Entourage Mobile: Keep Desktop-like Layout */
    .group-row {
        flex-wrap: nowrap;
        gap: 5px;
    }

    .group-column {
        min-width: 0;
    }

    .sponsors-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        text-align: center;
    }

    .secondary-sponsors .group-column h4,
    .bearers-row h4,
    .group-column,
    .flower-girls h4 {
        font-size: 0.8rem;
        word-wrap: break-word;
    }

    .entourage-group p {
        font-size: 0.8rem;
        word-wrap: break-word;
    }

    .role-title {
        font-size: 1.0rem;
    }

    /* Attire */
    .attire-role-title {
        font-size: 1.3rem;
        letter-spacing: 1px;
    }

    .attire-instruction {
        font-size: 0.85rem;
        letter-spacing: 0.5px;
    }

    .mood-board {
        gap: 12px;
    }

    .color-swatch {
        width: 45px;
        height: 45px;
    }

    /* Gallery Carousel */
    .carousel-slide {
        width: 80%;
        left: 10%;
    }

    .carousel-slide.prev {
        transform: translateX(-55%) scale(0.75) rotateY(35deg);
    }

    .carousel-slide.next {
        transform: translateX(55%) scale(0.75) rotateY(-35deg);
    }

    .gallery-carousel {
        height: 40vh;
        min-height: 250px;
        max-height: 400px;
    }

    .carousel-btn {
        padding: 10px;
        font-size: 18px;
    }

    /* Notes */
    .notes-title {
        font-family: var(--font-heading);
        font-size: 1.8rem;
        letter-spacing: 0.15em;
        text-transform: uppercase;
        margin-bottom: 25px;
        font-weight: 400;
    }

    .notes-text {
        font-size: 0.85rem;
        letter-spacing: 0.1em;
        line-height: 1.8;
    }

    /* Lightbox mobile */
    .lightbox-content {
        max-width: 95%;
        max-height: 60vh;
    }

    .lightbox-nav {
        font-size: 35px;
        padding: 10px;
    }

    .lightbox-nav.next {
        right: 5px;
    }

    .lightbox-nav.prev {
        left: 5px;
    }

    .close-lightbox {
        top: 10px;
        right: 15px;
        font-size: 30px;
    }

    .lightbox-thumbnails {
        height: 70px;
    }

    .thumb-img {
        width: 80px;
    }

    /* Venue cards */
    .card {
        min-width: unset;
        width: 100%;
    }

    .venue-cards {
        gap: 20px;
        flex-direction: column;
        align-items: center;
    }

    /* FAQ */
    .accordion-header {
        font-size: 0.95rem;
        padding: 15px;
    }
}

/* Small phones (≤ 480px) */
/* Small phones (≤ 480px) */
@media (max-width: 480px) {
    .hero-monogram {
        font-size: 7.5rem;
        line-height: 0.9;
    }

    .main-headline {
        font-size: 2.2rem;
        letter-spacing: 0.1rem;
    }

    .sub-headline {
        font-size: 0.9rem;
    }

    .date-display {
        font-size: 1.5rem;
    }

    .time-box {
        width: 62px;
    }

    .time-box span {
        font-size: 1.25rem;
    }

    .story-headline {
        font-size: 1.1rem;
    }

    .section {
        padding: 50px 0;
    }

    .story-section {
        padding: 60px 0;
    }
}

/* Desktop Specifics */
@media (min-width: 992px) {
    .carousel-container {
        max-width: 1200px;
    }

    .carousel-slide {
        height: 75vh;
        max-height: 800px;
    }
}

/* --- Intro Overlay --- */
body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    /* Prevent scrolling while overlay is up */
}

#intro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #000;
    /* Black opaque background per user request */
    transition: opacity 2s ease;
    perspective: 1000px;
    /* Enable 3D transforms */
    overflow: hidden;
}

/* --- Envelope Container --- */
.envelope-wrapper {
    position: relative;
    width: 300px;
    height: 200px;
    /* Standard envelope ratio */
    display: flex;
    justify-content: center;
    align-items: center;
    animation: floating 6s ease-in-out infinite;
    z-index: 105;
    /* Above intro content usually, but here envelope IS the content */
}

@media (min-width: 768px) {
    .envelope-wrapper {
        width: 450px;
        /* Reduced from 650px */
        height: 300px;
        /* Reduced from 430px */
    }

    /* Responsive adjustments for seal and paper */
    .wax-seal {
        width: 90px !important;
        height: 90px !important;
    }

    #intro-overlay.envelope-open .envelope-paper {
        transform: translateY(-200px) !important;
    }
}

.envelope {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: rgba(204, 225, 241, 0.2);
    /* Transparent/Glassy Base */
    backdrop-filter: blur(2px);
}

/* --- Envelope Parts --- */
/* Back of the envelope (inside color) */
.envelope-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(174, 191, 214, 0.3);
    border-radius: 5px;
    z-index: 1;
}

/* The Paper/Letter inside */
.envelope-paper {
    position: absolute;
    top: 10%;
    left: 5%;
    width: 90%;
    height: 85%;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 2;
    transition: transform 1s ease 0.5s;
    /* Slide out delay */
}

/* The Bottom Pocket */
.envelope-pocket {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(204, 225, 241, 0.85);
    backdrop-filter: blur(5px);
    /* Puzzle fit: Pocket covers sides and bottom, cutout for flap */
    clip-path: polygon(0% 0%, 50% 50%, 100% 0%, 100% 100%, 0% 100%);
    z-index: 3;
    /* Texture */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    pointer-events: none;
    /* Let clicks pass to seal */
}

/* The Top Flap */
.envelope-flap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(204, 225, 241, 0.85);
    backdrop-filter: blur(5px);
    /* Slightly darker for depth */
    /* Triangle Clip Path for Flap - fits into pocket cutout */
    clip-path: polygon(0% 0%, 100% 0%, 50% 51%);
    z-index: 4;
    transform-origin: top;
    transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    /* Texture */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* --- Wax Seal --- */
.wax-seal {
    position: absolute;
    top: 50%;
    /* Align with flap tip */
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    z-index: 10;
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.5s ease;
}

.wax-seal:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

/* Ensure image and fallback overlap */
.seal-image,
.seal-fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    /* Ensure roundness */
}

.seal-image {
    z-index: 2;
    object-fit: contain;
}

.seal-fallback {
    z-index: 1;
    /* Styles from before */
    background: #1c55b5;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3), 0 4px 6px rgba(0, 0, 0, 0.3);
    border: 4px solid #10367a;
    display: flex;
    justify-content: center;
    align-items: center;
}

.seal-fallback::before {
    content: "AM";
    font-family: 'Cinzel Decorative', cursive;
    color: #acc6e8;
    font-size: 1.5rem;
    font-weight: bold;
}


/* --- Intro Text --- */
.intro-content {
    position: absolute;
    bottom: 10%;
    /* Position below the envelope */
    width: 100%;
    text-align: center;
    color: var(--white);
    z-index: 106;
    pointer-events: none;
    transition: opacity 0.5s ease;
    padding: 0 20px;
    box-sizing: border-box;
}

.invite-text {
    font-family: 'Pinyon Script', cursive;
    letter-spacing: 2px;
    font-size: 1.8rem;
    /* Reduced for longer text */
    line-height: 1.4;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    margin: 0 auto;
    max-width: 800px;
    text-transform: none;
}

.envelope-seal-hint {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 2px;
    margin-top: 20px;
    animation: hintPulse 2s infinite ease-in-out;
}

@keyframes hintPulse {

    0%,
    100% {
        opacity: 0.5;
        transform: translateY(0);
    }

    50% {
        opacity: 1;
        transform: translateY(-5px);
    }
}

/* Hide hint when envelope is opened */
#intro-overlay.envelope-open .envelope-seal-hint {
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* --- OPENING ANIMATIONS --- */

/* 1. Flap Opens */
#intro-overlay.envelope-open .envelope-flap {
    transform: rotateX(180deg);
    z-index: 1;
    /* Move behind pocket once open? No, keep logic simple, just rotate */
    transition-delay: 0.2s;
}

/* 2. Seal Fades Out or Breaks */
#intro-overlay.envelope-open .wax-seal {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.5);
    pointer-events: none;
}

/* 3. Paper Slides Up (optional) */
#intro-overlay.envelope-open .envelope-paper {
    transform: translateY(-150px);
    z-index: 5;
    /* Ensure it pops over the pocket if needed, though 3d space handles it usually */
    transition-duration: 2.0s;
}

.paper-content {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

/* 4. Overlay Fades Out */
#intro-overlay.envelope-open {
    opacity: 0;
    pointer-events: none;
    transition-delay: 2.5s;
    /* Give more time for the pop up to be seen */
    /* Wait for envelope animation */
}

/* --- Particles --- */
.particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 50;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

.petal {
    position: absolute;
    background: rgba(78, 202, 239, 0.8);
    /* Light pinkish tint */
    border-radius: 60% 40% 40% 60% / 60% 40% 60% 40%;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.2);
    opacity: 0.8;
}

@keyframes drift {
    0% {
        transform: translateY(-10vh) rotate(0deg) translateX(0);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    100% {
        transform: translateY(110vh) rotate(360deg) translateX(50px);
        opacity: 0;
    }
}

/* Floating Animation for Idle State */
@keyframes floating {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* --- Interaction Hint (removed from HTML) --- */

/* --- Mobile Intro Responsive --- */
@media (max-width: 768px) {
    .invite-text {
        font-size: 1.1rem;
        letter-spacing: 1px;
        line-height: 1.5;
        padding: 0 15px;
    }

    .intro-content {
        bottom: 30%;
        /* Increased from 15% to move closer to envelope */
    }

    .envelope-wrapper {
        width: 260px;
        height: 175px;
    }

    .interaction-hint {
        display: none;
    }

    .hint-text {
        font-size: 0.7rem;
    }

    .envelope-seal-hint {
        font-size: 0.85rem;
        margin-top: 50px;
    }
}

@media (max-width: 480px) {
    .invite-text {
        font-size: 1.0rem;
        letter-spacing: 0.5px;
    }

    .intro-content {
        bottom: 20%;
        /* Increased from 20% for extra small screens */
    }

    .envelope-wrapper {
        width: 230px;
        height: 155px;
    }

    .wax-seal {
        width: 55px;
        height: 55px;
    }
}

/* --- Music Control Button --- */
.music-control {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 1001;
    /* Above navbar but below intro overlay */
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: var(--dark-text);
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    outline: none;
    -webkit-tap-highlight-color: transparent;
    padding: 0;
}

.music-control:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.music-control i {
    font-size: 1.1rem;
    color: var(--dark-text);
}

.music-control.paused i::before {
    content: "\f6a9";
    /* FontAwesome volume-xmark/mute */
}

@media (max-width: 768px) {
    .music-control {
        bottom: 25px;
        right: 25px;
        width: 40px;
        height: 40px;
    }
}