/* Global Styles */
:root {
    --primary-color: #e5989b;    /* Soft pink */
    --secondary-color: #f7d1ba;  /* Light beige/peach */
    --accent-color: #f5e1d0;     /* Beige */
    --light-color: #f8f9fa;
    --dark-color: #6d6875;       /* Muted dark color that works with pink/beige */
    --font-primary: 'Playfair Display', serif;
    --font-secondary: 'Montserrat', sans-serif;
    --font-script: 'Great Vibes', cursive;  /* Script font for couple names */
    --gold-color: #d4af37;       /* Gold accent for borders */
    --font-italic: 'Cormorant Garamond', serif; /* Italic font for tagline */
}

body {
    font-family: var(--font-secondary);
    color: var(--dark-color);
    line-height: 1.6;
    /* Optimize scrolling performance */
    will-change: scroll-position;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
}

.section-title {
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.section-title:after {
    content: '';
    position: absolute;
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 100vh;
    min-height: 600px;
    /* Background removed - handled by hero-carousel.js */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.hero-section .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
}

.hero-section .container {
    position: relative;
    z-index: 1;
    padding: 20px;
}

.wedding-date {
    font-family: var(--font-secondary);
    font-size: 1.5rem;
    letter-spacing: 3px;
    margin-bottom: 20px;
}

/* Custom Couple Name Styling with Signature Writing Effect */
.couple-names {
    font-family: var(--font-script);
    font-size: 5rem;
    margin-bottom: 20px;
    color: var(--accent-color);
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    opacity: 1;
    animation: nameGlow 3s ease-in-out infinite alternate;
    animation-delay: 2s; /* Start glow after writing is complete */
    position: relative;
    white-space: nowrap;
}

.couple-names .signature-text {
    position: relative;
    display: inline-block;
    opacity: 0;
    animation: letterReveal 0.3s ease-in-out forwards;
}

.couple-names .signature-text:nth-child(1) { animation-delay: 0.1s; } /* F */
.couple-names .signature-text:nth-child(2) { animation-delay: 0.2s; } /* r */
.couple-names .signature-text:nth-child(3) { animation-delay: 0.3s; } /* a */
.couple-names .signature-text:nth-child(4) { animation-delay: 0.4s; } /* n */
.couple-names .signature-text:nth-child(5) { animation-delay: 0.5s; } /* c */
.couple-names .signature-text:nth-child(6) { animation-delay: 0.6s; } /* i */
.couple-names .signature-text:nth-child(7) { animation-delay: 0.7s; } /* s */
.couple-names .signature-text:nth-child(9) { animation-delay: 1.0s; } /* P */
.couple-names .signature-text:nth-child(10) { animation-delay: 1.1s; } /* r */
.couple-names .signature-text:nth-child(11) { animation-delay: 1.2s; } /* i */
.couple-names .signature-text:nth-child(12) { animation-delay: 1.3s; } /* n */
.couple-names .signature-text:nth-child(13) { animation-delay: 1.4s; } /* c */
.couple-names .signature-text:nth-child(14) { animation-delay: 1.5s; } /* e */
.couple-names .signature-text:nth-child(15) { animation-delay: 1.6s; } /* s */
.couple-names .signature-text:nth-child(16) { animation-delay: 1.7s; } /* s */

.couple-names .ampersand {
    font-family: var(--font-script);
    color: var(--primary-color);
    font-size: 0.9em;
    display: inline-block;
    margin: 0 10px;
    vertical-align: middle;
    opacity: 0;
    animation: letterReveal 0.3s ease-in-out forwards;
    animation-delay: 0.8s; /* Show ampersand after Francis */
}

@keyframes letterReveal {
    0% {
        opacity: 0;
        transform: translateY(10px) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.tagline-small {
    font-family: var(--font-italic);
    font-style: italic;
    font-size: 1.5rem;
    color: var(--accent-color);
    margin: 20px auto 30px;
    letter-spacing: 1px;
    font-weight: 300;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
    animation-delay: 2.5s; /* Show after signature is complete */
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* Apply faster fadeIn where needed */
.fade-in {
    animation: fadeIn 0.3s ease forwards;
}

@keyframes nameGlow {
    from {
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    }
    to {
        text-shadow: 0 0 10px rgba(245, 225, 208, 0.7), 2px 2px 4px rgba(0, 0, 0, 0.3);
    }
}

/* RSVP Button Animation */
.btn-rsvp {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    padding: 12px 30px;
    font-size: 1.1rem;
    letter-spacing: 1px;
    transition: all 0.2s ease; /* Faster transition */
    position: relative;
    overflow: hidden;
    z-index: 1;
    border-radius: 50px;
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
    animation-delay: 2.8s; /* Show after signature and tagline */
}

.btn-rsvp:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.4s ease;
    z-index: -1;
}

.btn-rsvp:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(229, 152, 155, 0.4);
}

.btn-rsvp:hover:before {
    left: 100%;
}

.logo-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.logo-text {
    font-family: var(--font-script);
    font-size: 3rem;
    color: var(--dark-color);
    line-height: 1;
    margin-bottom: 5px;
}

.logo-text .name-highlight {
    color: var(--primary-color);
}

.logo-subtext {
    font-family: var(--font-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--dark-color);
}

.heart-icon {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin: 0 5px;
    display: inline-block;
    transform: translateY(3px);
}

.date-display {
    font-family: var(--font-secondary);
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 10px;
}

/* Navigation */
.navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    background-color: var(--accent-color) !important;
    transition: all 0.2s ease; /* Faster transition for better responsiveness */
}

.navbar-brand {
    font-family: var(--font-script);
    font-size: 1.8rem;
    color: var(--primary-color) !important;
    padding: 0;
    margin: 0;
}

/* Navbar Logo Animation */
.logo-header-nav {
    display: flex;
    align-items: center;
    justify-content: center;
}

.couple-names-nav {
    font-family: var(--font-script);
    font-size: 2rem;
    color: var(--primary-color);
    line-height: 1;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    animation: nameGlow 3s ease-in-out infinite alternate;
    white-space: nowrap;
}

.couple-names-nav .ampersand {
    font-family: var(--font-script);
    color: var(--primary-color);
    font-size: 0.9em;
    display: inline-block;
    margin: 0 2px;
    vertical-align: middle;
}

/* RSVP Button in Nav */
.btn-nav-rsvp {
    background-color: var(--primary-color) !important;
    color: white !important;
    border-radius: 50px !important;
    padding: 0.5rem 1.5rem !important;
    margin-left: 10px;
    transition: all 0.2s ease !important; /* Faster transition */
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-nav-rsvp:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.2s ease; /* Faster transition */
    z-index: -1;
}

.btn-nav-rsvp:hover {
    background-color: #d8787b !important;
    transform: translateY(-2px) scale(1.05) !important;
    box-shadow: 0 8px 20px rgba(229, 152, 155, 0.4) !important;
}

.btn-nav-rsvp:hover:before {
    left: 100%;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: all 0.2s ease; /* Faster transition */
    color: var(--dark-color) !important;
}

/* Remove hover color change for navigation links */
.nav-link:hover {
    color: var(--dark-color) !important; /* Keep the same color on hover */
    transform: translateY(-2px); /* Add a subtle lift effect instead */
}

/* Mobile Navigation - MINIMALIST COMPACT DESIGN */
@media (max-width: 991px) {
    .navbar-collapse {
        text-align: center;
        margin-top: 0.5rem;
        padding: 0.5rem 0;
        background-color: rgba(245, 225, 208, 0.98);
        border-radius: 8px;
        margin: 0.3rem 0;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    }
    
    .navbar-nav {
        align-items: center !important;
        margin: 0 !important;
    }
    
    .nav-item {
        margin: 0.1rem 0;
        text-align: center;
        width: 100%;
    }
    
    .nav-link {
        text-align: center !important;
        display: block !important;
        width: 100% !important;
        padding: 0.5rem 0.8rem !important;
        font-size: 0.9rem;
        font-weight: 600;
        border-radius: 6px;
        margin: 0.05rem 0;
        transition: all 0.2s ease !important;
    }
    
    .nav-link:hover {
        background-color: rgba(229, 152, 155, 0.1);
        transform: scale(1.02);
        color: var(--primary-color) !important;
    }
    
    .btn-nav-rsvp {
        margin: 0.4rem auto 0.2rem !important;
        display: inline-block !important;
        width: auto !important;
        background-color: var(--primary-color) !important;
        color: white !important;
        padding: 0.6rem 1.8rem !important;
        border-radius: 50px !important;
        font-weight: 600;
        font-size: 0.9rem;
    }
    
    .btn-nav-rsvp:hover {
        background-color: #d8787b !important;
        transform: translateY(-2px) scale(1.05) !important;
        box-shadow: 0 6px 15px rgba(229, 152, 155, 0.4) !important;
    }
    
    /* Style the burger button */
    .navbar-toggler {
        border: 2px solid var(--primary-color);
        border-radius: 6px;
        padding: 0.4rem;
        background-color: rgba(229, 152, 155, 0.1);
        transition: all 0.2s ease;
    }
    
    .navbar-toggler:hover,
    .navbar-toggler:focus {
        background-color: rgba(229, 152, 155, 0.2);
        border-color: var(--primary-color);
        box-shadow: 0 2px 6px rgba(229, 152, 155, 0.3);
        transform: scale(1.03);
    }
    
    .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23e5989b' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
        width: 22px;
        height: 22px;
    }
}

/* Story Section */
.story-content {
    padding: 20px;
}

.story-content h3 {
    color: var(--primary-color);
    margin-top: 20px;
}

/* Adjust the couple image size */
.couple-image {
    max-width: 100%;
    height: auto;
    max-height: 350px;
    width: auto !important; /* Override Bootstrap's img-fluid if needed */
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    display: block;
    margin: 0 auto; /* Center the image */
}

#story img {
    max-width: 100%;
    height: auto;
    max-height: 350px; /* Reduced from 400px */
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    display: block;
    margin: 0 auto; /* Center the image */
    width: auto; /* Allow natural width based on height constraint */
}

/* Event Details */
.card {
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    background-color: #fff;
    border-radius: 10px;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.card i {
    color: var(--primary-color);
}

/* Event Icons */
.event-icon {
    color: var(--primary-color);
    margin-bottom: 20px;
}

/* Wedding Attire Styles */
.wedding-attire-section {
    background: linear-gradient(135deg, #faf9f7 0%, #f5f0eb 100%);
    border-radius: 20px;
    padding: 40px;
    margin: 20px 0;
    border: 2px solid #e8ddd4;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.attire-theme strong {
    color: var(--primary-color);
    font-weight: 600;
}

.color-palette {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.color-swatch {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    cursor: pointer;
}

.color-swatch:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.outfit-display-horizontal {
    background: linear-gradient(135deg, #ffffff 0%, #faf8f5 100%);
    border-radius: 15px;
    padding: 25px;
    margin: 20px 0;
    border: 1px solid #e8ddd4;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.outfit-section-horizontal {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #fdfcfa 0%, #f8f6f2 100%);
    border-radius: 12px;
    border: 1px solid #f0ede8;
    transition: all 0.3s ease;
}

.outfit-section-horizontal:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    border-color: #e5ddd4;
}

.outfit-section-horizontal h6 {
    color: var(--dark-color);
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.outfit-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 10px 0;
}

.outfit-icon {
    font-size: 1.8rem;
    opacity: 0.9;
    transition: all 0.3s ease;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.outfit-icon:hover {
    transform: scale(1.1);
    opacity: 1;
}

.outfit-icon.male {
    filter: drop-shadow(0 2px 4px rgba(220, 197, 168, 0.4));
}

.outfit-icon.female {
    filter: drop-shadow(0 2px 4px rgba(232, 213, 196, 0.4));
}

.outfit-section-horizontal small {
    color: var(--dark-color);
    font-weight: 500;
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Mobile responsiveness for wedding attire */
@media (max-width: 768px) {
    .wedding-attire-section {
        padding: 25px 20px;
        margin: 15px 0;
    }

    .outfit-display-horizontal {
        padding: 20px 15px;
    }

    .outfit-section-horizontal {
        padding: 15px;
        margin-bottom: 15px;
    }

    .color-swatch {
        width: 20px;
        height: 20px;
    }

    .outfit-icons {
        gap: 10px;
    }

    .outfit-icon {
        font-size: 1.5rem;
    }
}

/* --- Timeline Section --- */
.timeline-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 40px 20px;
    border-radius: 15px;
    margin-top: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.timeline-title {
    color: var(--primary-color);
    font-family: "Playfair Display", serif;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.timeline-subtitle {
    color: #6d6875;
    font-size: 1.1rem;
    font-style: italic;
    margin-bottom: 30px;
}

.timeline-container {
    overflow-x: auto;
    overflow-y: visible;
    padding: 20px 10px;
    scrollbar-width: thin;
    scrollbar-color: rgba(229, 152, 155, 0.3) transparent;
}

.timeline-container::-webkit-scrollbar {
    height: 6px;
}

.timeline-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

.timeline-container::-webkit-scrollbar-thumb {
    background: rgba(229, 152, 155, 0.3);
    border-radius: 3px;
}

.timeline-container::-webkit-scrollbar-thumb:hover {
    background: rgba(229, 152, 155, 0.5);
}

.timeline-years {
    display: flex;
    align-items: flex-start;
    gap: 25px;
    min-width: max-content;
    padding: 0;
    position: relative;
    justify-content: center;
}

.timeline-year {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex-shrink: 0;
}

.year-button {
    background: linear-gradient(135deg, #f5e6d3 0%, #e8d5b7 100%);
    color: #000000;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 1.1rem;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(245, 230, 211, 0.4);
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

/* Year number text - ULTRA MAXIMUM visibility with intense glow */
.year-button {
    text-shadow: 
        0 0 20px rgba(255, 255, 255, 1),
        0 0 25px rgba(255, 255, 255, 1),
        0 0 30px rgba(255, 255, 255, 0.95),
        0 0 35px rgba(255, 255, 255, 0.9),
        0 4px 8px rgba(255, 255, 255, 0.8),
        3px 3px 6px rgba(255, 255, 255, 0.7),
        -2px -2px 4px rgba(255, 255, 255, 0.6);
}

/* Overlay for year buttons with background images */
.year-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(245, 230, 211, 0.85) 0%, rgba(232, 213, 183, 0.85) 100%);
    border-radius: 50%;
    z-index: 1;
    transition: all 0.3s ease;
}

/* Keep year number above overlay */
.year-button {
    position: relative;
}

.year-button > * {
    position: relative;
    z-index: 2;
}

.year-button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(245, 230, 211, 0.6);
    color: #000000;
}

/* Make overlay more transparent on hover to show preview better */
.year-button:hover::before {
    background: linear-gradient(135deg, rgba(245, 230, 211, 0.65) 0%, rgba(232, 213, 183, 0.65) 100%);
}

.year-button:active {
    transform: translateY(-1px) scale(1.02);
}

.special-button {
    animation: specialGlow 2s ease-in-out infinite alternate;
    box-shadow: 0 4px 15px rgba(247, 209, 186, 0.5);
    color: #000000;
    font-weight: 900;
}

/* Special overlay for 2025 wedding year */
.special-button::before {
    background: linear-gradient(135deg, rgba(247, 209, 186, 0.85) 0%, rgba(245, 230, 211, 0.85) 100%);
    z-index: 1;
}

.special-button:hover {
    box-shadow: 0 6px 25px rgba(247, 209, 186, 0.7);
    color: #000000;
}

.special-button:hover::before {
    background: linear-gradient(135deg, rgba(247, 209, 186, 0.65) 0%, rgba(245, 230, 211, 0.65) 100%);
}

@keyframes specialGlow {
    0% { box-shadow: 0 4px 15px rgba(247, 209, 186, 0.5); }
    100% { box-shadow: 0 4px 20px rgba(247, 209, 186, 0.8); }
}

.year-label {
    margin-top: 12px;
    font-size: 0.8rem;
    color: #6d6875;
    text-align: center;
    max-width: 80px;
    line-height: 1.2;
    font-style: italic;
    word-wrap: break-word;
    hyphens: auto;
}

.special-year .year-label {
    color: #8b6f47;
    font-weight: 600;
}

/* Timeline line connecting years */
.timeline-years::before {
    content: '';
    position: absolute;
    top: 30px;
    left: 30px;
    right: 30px;
    height: 2px;
    background: linear-gradient(90deg, #e8d5b7 0%, #e8d5b7 100%);
    z-index: 1;
}

/* Individual year connection indicators */
.timeline-year:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 30px;
    right: -12.5px;
    width: 25px;
    height: 2px;
    background: linear-gradient(90deg, #e8d5b7 0%, rgba(232, 213, 183, 0.8) 100%);
    z-index: 1;
}

/* Year Photo Modal Styling */
.year-photo-modal {
    border-radius: 12px;
    padding: 0 !important;
    overflow: hidden;
    max-width: 95vw !important;
    max-height: 95vh !important;
    width: auto !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
}

.year-modal-title {
    color: var(--primary-color);
    font-size: 1.6rem;
    margin-top: 15px;
    font-weight: 600;
    padding: 0 50px 0 15px;
    font-family: "Playfair Display", serif;
    flex-shrink: 0;
}

.year-modal-subtitle {
    color: #6d6875;
    font-size: 1rem;
    margin: 15px 0;
    font-style: italic;
    padding: 0 50px 0 15px;
    text-align: center;
    flex-shrink: 0;
}

.year-photo-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: calc(95vh - 120px);
    padding: 0 15px;
}

.swal-year-image {
    max-width: calc(100% - 30px) !important;
    max-height: calc(95vh - 200px) !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
    margin: 20px auto 0 auto !important;
    display: block;
    border-radius: 8px;
    flex-shrink: 1;
    flex-grow: 1;
}

.photo-navigation {
    margin-top: 15px;
    margin-bottom: 15px;
    padding: 0 15px;
    text-align: center;
    flex-shrink: 0;
}


/* Responsive Timeline */
@media (max-width: 768px) {
    .timeline-section {
        padding: 30px 15px;
        margin-top: 20px;
    }
    
    .timeline-title {
        font-size: 1.8rem;
    }
    
    .timeline-subtitle {
        font-size: 1rem;
        margin-bottom: 25px;
    }
    
    .timeline-container {
        position: relative;
        padding: 15px 5px;
        margin: 0 -10px;
        overflow-x: auto;
        scrollbar-width: thin;
        scrollbar-color: rgba(229, 152, 155, 0.3) transparent;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }

    .timeline-container::-webkit-scrollbar {
        height: 4px;
    }

    .timeline-container::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.05);
        border-radius: 2px;
    }

    .timeline-container::-webkit-scrollbar-thumb {
        background: rgba(229, 152, 155, 0.4);
        border-radius: 2px;
    }

    .timeline-container::-webkit-scrollbar-thumb:hover {
        background: rgba(229, 152, 155, 0.6);
    }
    
    .timeline-years {
        gap: 20px;
        justify-content: flex-start;
        padding: 0 15px;
    }
    
    .timeline-years::before {
        left: 25px;
        right: 25px;
        top: 24px;
    }
    
    .year-button {
        width: 48px;
        height: 48px;
        font-size: 0.9rem;
        font-weight: 900;
        background-size: cover;
        background-position: center;
    }
    
    /* Keep overlay more opaque on mobile for better text visibility */
    .year-button::before {
        background: linear-gradient(135deg, rgba(245, 230, 211, 0.88) 0%, rgba(232, 213, 183, 0.88) 100%);
    }
    
    /* Special button overlay on mobile */
    .special-button::before {
        background: linear-gradient(135deg, rgba(247, 209, 186, 0.88) 0%, rgba(245, 230, 211, 0.88) 100%);
    }
    
    .year-label {
        font-size: 0.65rem;
        max-width: 60px;
        margin-top: 10px;
    }
    
    .timeline-year:not(:last-child)::after {
        right: -10px;
        width: 20px;
        top: 24px;
    }
}

@media (max-width: 576px) {
    .timeline-container {
        padding: 10px 0;
        margin: 0 -15px;
    }
    
    .timeline-years {
        gap: 18px;
        padding: 0 20px;
    }
    
    .timeline-years::before {
        left: 21px;
        right: 21px;
        top: 21px;
    }
    
    .year-button {
        width: 42px;
        height: 42px;
        font-size: 0.85rem;
        font-weight: 900;
        background-size: cover;
        background-position: center;
    }
    
    .year-label {
        font-size: 0.6rem;
        max-width: 50px;
        margin-top: 8px;
        line-height: 1.1;
    }
    
    .timeline-year:not(:last-child)::after {
        right: -9px;
        width: 18px;
        top: 21px;
    }
}

@media (max-width: 480px) {
    .timeline-years {
        gap: 15px;
        padding: 0 15px;
    }
    
    .timeline-years::before {
        left: 19px;
        right: 19px;
        top: 19px;
    }
    
    .year-button {
        width: 38px;
        height: 38px;
        font-size: 0.8rem;
        font-weight: 900;
        background-size: cover;
        background-position: center;
    }
    
    .year-label {
        font-size: 0.55rem;
        max-width: 45px;
        margin-top: 6px;
    }
    
    .timeline-year:not(:last-child)::after {
        right: -7.5px;
        width: 15px;
        top: 19px;
    }
}

/* Gallery Section */
#gallery {
    width: 100%;
    padding: 60px 20px;
}

#gallery .section-title {
    text-align: center;
    margin-bottom: 50px;
    width: 100%;
}

#gallery .gallery-categories {
    text-align: center;
    margin-bottom: 30px;
    width: 100%;
}

#gallery .gallery-navigation {
    margin-top: 30px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Gallery Categories */
.gallery-categories {
    margin-bottom: 20px;
    padding: 15px 0;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.4s ease;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.gallery-categories.show {
    opacity: 1;
    transform: translateY(0);
}

.category-btn {
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--dark-color);
    border: 2px solid var(--primary-color);
    padding: 10px 24px;
    margin: 0 8px 12px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 2px 8px rgba(229, 152, 155, 0.15);
    backdrop-filter: blur(5px);
}

.category-btn:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(229, 152, 155, 0.3);
}

.category-btn.active {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(229, 152, 155, 0.3);
    transform: translateY(-1px);
}

.category-btn:active {
    transform: translateY(0) scale(0.95);
    transition: all 0.1s ease;
}

/* Gallery Carousel Container */
.gallery-carousel-container {
    width: 100%;
    overflow: visible; /* Allow scrollbar to be visible */
    position: relative;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin: 0 auto 20px auto; /* Center the container horizontally */
    padding: 20px 0;
    background-color: var(--secondary-color);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    justify-content: center; /* Center content within container */
}

.gallery-carousel-container.grid-view {
    padding: 15px;
    height: auto;
    background-color: var(--secondary-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    /* Remove flexbox properties from this container */
}

/* Gallery Carousel - Free Horizontal Scroll */
.gallery-carousel {
    display: flex;
    justify-content: flex-start; /* Start alignment for better scrolling */
    align-items: center; /* Center items vertically */
    height: 400px;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--accent-color);
    padding: 0 20px; /* Add padding for better visual spacing */
    gap: 15px; /* Use gap instead of margin for better spacing */
    transition: all 0.3s ease;
    cursor: grab; /* Default cursor for desktop */
    user-select: none; /* Prevent text selection during drag */
}

/* Active dragging state */
.gallery-carousel:active {
    cursor: grabbing;
    scroll-behavior: auto; /* Disable smooth scroll during drag for better performance */
}

/* Custom Scrollbar for Desktop */
.gallery-carousel::-webkit-scrollbar {
    height: 8px;
}

.gallery-carousel::-webkit-scrollbar-track {
    background: var(--accent-color);
    border-radius: 4px;
}

.gallery-carousel::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
    transition: background 0.3s ease;
}

.gallery-carousel::-webkit-scrollbar-thumb:hover {
    background: #d8787b;
}

/* Remove auto-scroll animation completely */
.gallery-carousel.auto-scroll {
    animation: none;
}

@keyframes galleryScroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-400px * 4 - 60px));
    }
}


/* Gallery Carousel - Multi-Row Grid with Horizontal Scroll */
.gallery-carousel.grid-layout {
    position: relative;
    display: grid;
    grid-template-rows: repeat(3, 1fr); /* 3 rows of photos */
    grid-auto-flow: column; /* Photos flow horizontally (left to right) */
    grid-auto-columns: 280px; /* Fixed width for each column */
    gap: 15px; /* NORMAL spacing for regular photos */
    height: auto; /* Auto height to prevent cutting */
    min-height: 700px; /* Minimum height for desktop */
    width: 100%;
    padding: 20px;
    margin: 0 auto;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
    user-select: none;
    justify-content: flex-start; /* Align items to start to prevent centering issues */
}

.gallery-carousel.grid-layout:active {
    cursor: grabbing;
}

/* Grid layout scrollbar styling */
.gallery-carousel.grid-layout::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}

.gallery-carousel.grid-layout::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    margin: 0 10px;
}

.gallery-carousel.grid-layout::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.gallery-carousel.grid-layout::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Video-only grid layout - centered and compact */
.gallery-carousel.grid-layout[data-filtered="videos"] {
    grid-template-rows: 1fr; /* Single row for videos */
    grid-auto-columns: 450px; /* Larger columns for videos */
    justify-content: center; /* Center videos */
    min-height: 350px; /* Reduced height for videos only */
    gap: 30px; /* More space between videos */
}

/* ===============================================
   MASONRY COLLAGE LAYOUT FOR PRE-NUP PHOTOS
   =============================================== */

.gallery-carousel.grid-layout[data-filtered="collage"] {
    display: block;
    columns: 2;
    column-gap: 25px;
    height: auto;
    min-height: 200px;
    padding: 20px;
    overflow-y: auto;
    overflow-x: hidden;
    background: linear-gradient(135deg, rgba(245, 225, 208, 0.1), rgba(232, 213, 196, 0.1));
}

@media (min-width: 1200px) {
    /* Only use 3 columns on very large screens */
    .gallery-carousel.grid-layout[data-filtered="collage"] {
        columns: 3;
        column-gap: 30px;
    }
}

.gallery-carousel.grid-layout[data-filtered="collage"] .gallery-slide[data-category*="pre-nup"] {
    background-color: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
    width: 100%;
    height: auto;
    display: inline-block;
    margin-bottom: 25px;
    break-inside: avoid;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.4s ease;
    position: relative;
}

.gallery-carousel.grid-layout[data-filtered="collage"] .gallery-slide[data-category*="pre-nup"] .gallery-image {
    width: 100%;
    height: 100%; /* Change to 100% to fill the container */
    object-fit: cover;
    display: block;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    filter: grayscale(100%) contrast(1.1);
    margin: 0;
    padding: 0;
    background: transparent;
}

.gallery-carousel.grid-layout[data-filtered="collage"] .gallery-slide[data-category*="pre-nup"]:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
    z-index: 10;
}

.gallery-carousel.grid-layout[data-filtered="collage"] .gallery-slide[data-category*="pre-nup"]:hover .gallery-image {
    filter: grayscale(0%) contrast(1.1);
}

.gallery-carousel-container[data-category-filter="collage"] {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 30px 25px;
    min-height: 700px;
    position: relative;
    border-radius: 12px;
}

.gallery-carousel-container[data-category-filter="collage"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 25% 75%, rgba(229, 152, 155, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 75% 25%, rgba(245, 225, 208, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.gallery-carousel.grid-layout[data-filtered="collage"] {
    position: relative;
    z-index: 1;
}

@media (min-width: 769px) {
    .gallery-carousel.grid-layout[data-filtered="collage"] .gallery-slide[data-category*="pre-nup"]:nth-child(1) {
        min-height: 350px;
    }
    .gallery-carousel.grid-layout[data-filtered="collage"] .gallery-slide[data-category*="pre-nup"]:nth-child(2) {
        min-height: 280px;
    }
}


/* Gallery Slides */
.gallery-slide {
    position: relative;
    width: 400px;
    height: 300px;
    flex-shrink: 0;
    display: flex;
    margin: 0 15px;
    align-items: center;
    justify-content: center;
    background-color: var(--accent-color);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    transform: scale(1);
    opacity: 1;
    cursor: pointer;
    scroll-snap-align: start;
    scroll-snap-stop: normal;
}

.gallery-slide:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    z-index: 2;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
    display: block;
    border-radius: 6px;
    min-width: 100%;
    min-height: 100%;
}

.gallery-carousel.grid-layout .gallery-slide {
    width: 280px;
    height: 210px;
    position: relative;
    background-color: var(--accent-color);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transform: scale(0.8) translateY(20px);
    opacity: 0;
    animation: slideInGrid 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    text-align: left;
    transition: all 0.3s ease;
    align-self: stretch;
    justify-self: stretch;
    margin: 0; /* FIX: Remove margin to rely on grid gap */
}

.gallery-carousel.grid-layout .gallery-slide.hidden {
    display: none;
}

.gallery-carousel.grid-layout .gallery-slide:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.gallery-carousel.grid-layout .gallery-slide:hover .gallery-image {
    transform: scale(1.05);
}

@keyframes slideInGrid {
    0% {
        transform: scale(0.8) translateY(20px);
        opacity: 0;
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.gallery-slide.carousel-enter {
    animation: slideInCarousel 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideInCarousel {
    0% {
        transform: scale(0.9) translateX(-20px);
        opacity: 0.7;
    }
    100% {
        transform: scale(1) translateX(0);
        opacity: 1;
    }
}

/* Special styling for videos */
.gallery-slide[data-category*="videos"] {
    width: 450px;
    height: 320px;
}

.gallery-slide[data-category*="proposal"],
.gallery-slide[data-category*="pre-wedding"] {
    width: 500px;
    height: 350px;
}

.gallery-carousel[data-filtered="videos"] {
    gap: 15px;
    padding: 0 25px;
    justify-content: center;
    align-items: center;
    overflow-x: auto;
}

.gallery-carousel[data-filtered="videos"] .gallery-slide {
    scroll-snap-align: center;
}

/* Mobile video centering */
@media (max-width: 768px) {
    .gallery-carousel[data-filtered="videos"] {
        padding: 0 20px;
        justify-content: center;
        align-items: center;
    }
    
    .gallery-slide[data-category*="videos"] {
        width: 320px;
        height: 240px;
    }
    
    .gallery-slide[data-category*="videos"] .media-overlay {
        width: 55px;
        height: 55px;
        font-size: 22px;
    }
}

.gallery-carousel-container[data-category-filter="videos"] {
    min-height: auto;
    padding: 30px 20px;
}

/* Gallery Navigation */
.gallery-navigation {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 30px;
    padding: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15), 0 3px 10px rgba(229, 152, 155, 0.2);
    justify-content: center;
    align-items: center;
    border: 2px solid rgba(229, 152, 155, 0.2);
    backdrop-filter: blur(10px);
    gap: 5px;
}

.gallery-nav-btn {
    background: linear-gradient(135deg, var(--primary-color), #d8787b);
    border: none;
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    margin: 0 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(229, 152, 155, 0.3);
    position: relative;
    overflow: hidden;
    font-size: 16px;
}

.gallery-nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.3s ease;
}

.gallery-nav-btn:hover {
    transform: translateY(-2px) scale(1.08);
    box-shadow: 0 6px 20px rgba(229, 152, 155, 0.4);
    background: linear-gradient(135deg, #e8a1a4, var(--primary-color));
}

.gallery-nav-btn:hover::before {
    left: 100%;
}

.gallery-nav-btn:active {
    transform: translateY(0) scale(0.95);
    transition: all 0.1s ease;
}

.gallery-nav-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(229, 152, 155, 0.4);
}

.gallery-nav-btn.active {
    background: linear-gradient(135deg, #4a90e2, #357abd);
    color: white;
    box-shadow: 0 4px 20px rgba(74, 144, 226, 0.4);
    transform: translateY(-1px);
}

.gallery-nav-btn.active:hover {
    background: linear-gradient(135deg, #5a9ef3, #4a90e2);
    transform: translateY(-2px) scale(1.05);
}

#scrollLeftButton,
#scrollRightButton {
    background: linear-gradient(135deg, #4a90e2, #357abd);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

#scrollLeftButton:hover,
#scrollRightButton:hover {
    background: linear-gradient(135deg, #5a9ef3, #4a90e2) !important;
    transform: translateY(-2px) scale(1.08);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4) !important;
}

#playPauseButton {
    background: linear-gradient(135deg, var(--primary-color), #d8787b);
    color: white;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    outline: none;
    box-shadow: 0 4px 12px rgba(229, 152, 155, 0.3);
    margin: 0 2px;
    position: relative;
    overflow: hidden;
    font-size: 16px;
    opacity: 1;
    transform: scale(1);
}

#playPauseButton i,
.gallery-nav-btn i {
    font-size: 16px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

#playPauseButton[style*="display: none"],
#scrollLeftButton[style*="display: none"],
#scrollRightButton[style*="display: none"] {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

/* Media Overlays */
.media-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px;
    border-radius: 50%;
    font-size: 16px;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 2;
}

.gallery-slide:hover .media-overlay {
    opacity: 1;
}

/* Video specific styling */
.gallery-slide video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    border-radius: 8px;
}

.gallery-slide video::-webkit-media-controls,
.gallery-slide video::-webkit-media-controls-enclosure {
    display: none !important;
}

.gallery-slide[data-category*="videos"] .media-overlay {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(229, 152, 155, 0.9);
    width: 60px;
    height: 60px;
    padding: 0;
    font-size: 24px;
    border-radius: 50%;
    opacity: 0.8;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.gallery-slide[data-category*="videos"]:hover .media-overlay {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
    background-color: rgba(229, 152, 155, 1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.media-overlay .fa-play-circle {
    display: inline-block !important;
}

/* Lightbox Modal */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.3);
    transition: opacity 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                visibility 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    will-change: opacity, transform;
    backface-visibility: hidden;
}

.lightbox.show {
    display: flex;
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.lightbox.closing {
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8) rotate(5deg);
    transition: opacity 0.25s cubic-bezier(0.55, 0.085, 0.68, 0.53), 
                transform 0.25s cubic-bezier(0.55, 0.085, 0.68, 0.53),
                visibility 0s linear 0.25s;
}

.lightbox-content {
    position: relative;
    width: 100vw;
    height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    flex-direction: column;
    box-sizing: border-box;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px) scale(0.5) rotate(-3deg);
    transition: opacity 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    will-change: opacity, transform;
    backface-visibility: hidden;
}

.lightbox.show .lightbox-content {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0deg);
}

.lightbox.closing .lightbox-content {
    opacity: 0;
    transform: translateY(-20px) scale(0.7) rotate(2deg);
    transition: opacity 0.2s cubic-bezier(0.55, 0.085, 0.68, 0.53), 
                transform 0.2s cubic-bezier(0.55, 0.085, 0.68, 0.53);
}

.lightbox-content img,
.lightbox-content video {
    opacity: 0;
    transform: scale(0.4) rotate(-5deg);
    transition: opacity 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    will-change: opacity, transform;
    backface-visibility: hidden;
}

.lightbox.show .lightbox-content img,
.lightbox.show .lightbox-content video {
    opacity: 1;
    transform: scale(1) rotate(0deg);
    transition-delay: 0.1s;
}

.lightbox.closing .lightbox-content img,
.lightbox.closing .lightbox-content video {
    opacity: 0;
    transform: scale(0.3) rotate(8deg);
    transition: opacity 0.15s cubic-bezier(0.55, 0.085, 0.68, 0.53), 
                transform 0.15s cubic-bezier(0.55, 0.085, 0.68, 0.53);
    transition-delay: 0s;
}

.lightbox-content img {
    width: 95vw;
    height: 90vh;
    max-width: 1200px;
    max-height: 900px;
    object-fit: contain;
    object-position: center;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    background: #000;
    display: block;
}

.lightbox-content video {
    width: 95vw;
    height: 90vh;
    max-width: 1200px;
    max-height: 900px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    background: #000;
    min-width: 320px;
    min-height: 180px;
    pointer-events: auto;
}

.lightbox-close {
    position: fixed;
    top: 25px;
    right: 35px;
    color: white;
    font-size: 30px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    padding: 12px 15px;
    border-radius: 50%;
    z-index: 10003;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.2) rotate(180deg);
    transition: opacity 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    will-change: opacity, transform;
}

.lightbox.show .lightbox-close {
    opacity: 1;
    transform: scale(1) rotate(0deg);
    transition-delay: 0.15s;
}

.lightbox.closing .lightbox-close {
    opacity: 0;
    transform: scale(0.6) rotate(-90deg);
    transition: opacity 0.15s cubic-bezier(0.4, 0, 0.6, 1), 
                transform 0.15s cubic-bezier(0.4, 0, 0.6, 1);
    transition-delay: 0s;
}

.lightbox-close:hover {
    color: var(--primary-color);
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.2) rotate(0deg);
    box-shadow: 0 8px 25px rgba(229, 152, 155, 0.6);
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

body.lightbox-open,
html.lightbox-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
}

/* Lightbox Video Controls & Overlay */
.lightbox-video-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 100%;
    max-height: 100%;
}

.lightbox-video-controls {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    gap: 10px;
    z-index: 10004;
}

.video-control-btn-small {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-control-btn-small:hover {
    background: rgba(229, 152, 155, 0.9);
    transform: scale(1.1);
    box-shadow: 0 5px 20px rgba(229, 152, 155, 0.4);
}

.video-control-btn-small:active {
    transform: scale(0.95);
    transition: all 0.1s ease;
}

.lightbox-video-container video {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

video:fullscreen,
video:-webkit-full-screen,
video:-moz-full-screen,
video:-ms-fullscreen {
    object-fit: contain;
    background: #000;
}

.lightbox-content video::-webkit-media-controls-download-button,
.lightbox-content video::-webkit-media-controls-fullscreen-button {
    display: none !important;
}

video, video::context-menu {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    display: none !important;
}

.video-player-overlay,
.image-credits-overlay,
.mobile-video-branding {
    opacity: 0;
    transform: translateY(20px) scale(0.6);
    transition: opacity 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                transform 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    will-change: opacity, transform;
}

.lightbox.show .video-player-overlay.show,
.lightbox.show .image-credits-overlay.show,
.lightbox.show .mobile-video-branding {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition-delay: 0s;
}

.lightbox.closing .video-player-overlay,
.lightbox.closing .image-credits-overlay,
.lightbox.closing .mobile-video-branding {
    opacity: 0;
    transform: translateY(15px) scale(0.5);
    transition: opacity 0.12s cubic-bezier(0.55, 0.085, 0.68, 0.53), 
                transform 0.12s cubic-bezier(0.55, 0.085, 0.68, 0.53);
    transition-delay: 0s;
}

/* Video/Image Overlay Content */
.video-player-overlay,
.image-credits-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10001;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-player-overlay.show,
.image-credits-overlay.show {
    opacity: 1;
}

.video-header {
    position: absolute;
    top: 25px;
    left: 25px;
    text-align: left;
    color: white;
    z-index: 10002;
    background: rgba(0, 0, 0, 0.6);
    padding: 15px 20px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 300px;
}

.couple-names-video {
    font-family: var(--font-script);
    font-size: 2.2rem;
    line-height: 1;
    margin-bottom: 5px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
    color: var(--accent-color);
}

.ampersand-video {
    font-family: var(--font-script);
    color: var(--primary-color);
    font-size: 0.9em;
    margin: 0 8px;
    display: inline-block;
    vertical-align: middle;
}

.wedding-subtitle {
    font-family: var(--font-secondary);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.video-footer {
    position: absolute;
    bottom: 25px;
    right: 25px;
    color: white;
    z-index: 10002;
    text-align: right;
    display: block !important;
}

.copyright-notice {
    font-family: var(--font-secondary);
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 6px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    letter-spacing: 0.3px;
    line-height: 1.3;
}

.image-credits-content {
    position: absolute;
    bottom: 25px;
    right: 25px;
    transform: none;
    text-align: center;
    color: white;
    z-index: 10002;
    background: rgba(0, 0, 0, 0.6);
    padding: 15px 20px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 300px;
}

.image-couple-names {
    font-family: var(--font-script);
    font-size: 2.2rem;
    line-height: 1;
    margin-bottom: 5px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
    color: var(--accent-color);
}

.ampersand-image {
    font-family: var(--font-script);
    color: var(--primary-color);
    font-size: 0.9em;
    margin: 0 8px;
    display: inline-block;
    vertical-align: middle;
}

.image-wedding-subtitle {
    font-family: var(--font-secondary);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    margin-bottom: 8px;
}

.image-copyright {
    font-family: var(--font-secondary);
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
    letter-spacing: 0.3px;
    line-height: 1.3;
}

.mobile-video-branding {
    display: none;
    width: 100%;
    padding: 15px 20px;
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
    border-radius: 0 0 8px 8px;
    text-align: center;
    margin-top: 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.mobile-couple-names {
    font-family: var(--font-script);
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 5px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.mobile-wedding-subtitle {
    font-family: var(--font-secondary);
    font-size: 0.8rem;
    color: var(--dark-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin-bottom: 8px;
}

.mobile-copyright {
    font-family: var(--font-secondary);
    font-size: 0.7rem;
    color: var(--dark-color);
    opacity: 0.8;
    letter-spacing: 0.3px;
}

/* RSVP Form */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(229, 152, 155, 0.25);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: #d8787b;
    border-color: #d8787b;
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Footer */
footer {
    background-color: var(--accent-color);
    padding: 30px 0;
    position: relative;
}

footer h3 {
    font-family: var(--font-script);
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 15px;
}

footer p {
    color: var(--dark-color);
    margin-bottom: 10px;
}

footer .wedding-date {
    font-family: var(--font-secondary);
    font-size: 1.2rem;
    letter-spacing: 2px;
    color: var(--dark-color);
    margin-bottom: 15px;
}

footer .footer-ampersand {
    font-family: var(--font-script);
    color: var(--primary-color);
    font-size: 0.9em;
    display: inline-block;
    margin: 0 5px;
}

footer a.admin-link {
    color: var(--dark-color);
    opacity: 0.7;
    transition: all 0.3s ease;
    text-decoration: none;
}

footer a.admin-link:hover {
    opacity: 1;
    color: var(--primary-color);
}

/* Confirmation Page */
.confirmation-container {
    max-width: 700px;
    margin: 50px auto;
    padding: 30px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.confirmation-header {
    text-align: center;
    margin-bottom: 30px;
}

.confirmation-details {
    border: 1px solid #eee;
    padding: 20px;
    border-radius: 5px;
    background-color: var(--accent-color);
}

.confirmation-details h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.qr-code {
    text-align: center;
    margin: 30px 0;
}

.qr-code img {
    max-width: 200px;
}

/* Countdown Styling */
.countdown-item {
    background-color: var(--accent-color);
    border-radius: 8px;
    padding: 15px;
    margin: 10px;
    min-width: 100px;
    text-align: center;
}

.countdown-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    display: block;
}

.countdown-label {
    font-size: 1rem;
    color: var(--dark-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.countdown-item.special-day {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 10px 30px rgba(229, 152, 155, 0.4);
    animation: wedding-glow 2s ease-in-out infinite alternate;
    min-width: 300px;
    padding: 25px;
}

.countdown-item.special-day .countdown-number {
    font-size: 3rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.countdown-item.special-day .countdown-label {
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.wedding-live {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 8px;
    font-style: italic;
}

/* Wedding Day Body Celebration */
.wedding-day-celebration {
    background: linear-gradient(45deg,
        var(--accent-color) 0%,
        var(--secondary-color) 25%,
        var(--accent-color) 50%,
        var(--secondary-color) 75%,
        var(--accent-color) 100%);
    background-size: 400% 400%;
    animation: wedding-background 10s ease infinite;
}

@keyframes wedding-glow {
    from {
        box-shadow: 0 10px 30px rgba(229, 152, 155, 0.4);
        transform: scale(1);
    }
    to {
        box-shadow: 0 15px 40px rgba(229, 152, 155, 0.7);
        transform: scale(1.02);
    }
}

@keyframes wedding-background {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-10px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Background colors for sections */
.bg-light {
    background-color: var(--secondary-color) !important;
}

/* Elegant border */
.elegant-border {
    position: relative;
    padding: 30px;
}

.elegant-border::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 1px solid var(--gold-color);
    transform: translateZ(0); /* Force GPU acceleration */
}

/* Optimize animations for 60-70fps */
@media (prefers-reduced-motion: no-preference) {
    .smooth-scroll {
        scroll-behavior: smooth;
    }
    
    .animated {
        transition-property: opacity, transform;
        transition-duration: 0.3s;
        transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
        will-change: opacity, transform;
        backface-visibility: hidden;
        transform: translateZ(0);
    }
    
    .fade-in {
        opacity: 0;
        transform: translateY(20px);
    }
    
    .fade-in.visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Active Click State for Buttons and Links */
.active-click {
    transform: scale(0.95);
    opacity: 0.8;
    transition: transform 0.05s ease, opacity 0.05s ease !important;
}

/* Make all interactive elements respond faster */
a, button, .btn, .nav-link {
    transition: all 0.1s ease !important;
    -webkit-tap-highlight-color: transparent; /* Remove default mobile tap highlight */
}

/* Gallery buttons have their own optimized transitions */
.gallery-nav-btn, .category-btn {
    -webkit-tap-highlight-color: transparent;
}

/* Optimize button hover states */
.btn:hover, .nav-link:hover {
    transform: translateY(-2px);
    transition: transform 0.1s ease !important;
}

/* Optimize button active states for touch devices */
.btn:active, .nav-link:active {
    transform: scale(0.95);
    transition: transform 0.05s ease !important;
}

/* --- RESPONSIVE STYLES (FINAL CORRECTED VERSION) --- */

/* Laptops & Desktops */
@media (min-width: 1200px) {
    .lightbox-content video {
        max-width: 1200px;
        max-height: 675px; /* 16:9 aspect ratio */
    }
}

/* Tablets */
@media (max-width: 1199px) and (min-width: 769px) {
    .lightbox-content video {
        max-width: 900px;
        max-height: 506px; /* 16:9 aspect ratio */
    }
}

/* General Tablet & All Mobile Sizes (max-width: 768px) */
@media (max-width: 768px) {
    .couple-names { 
        font-size: 3.5rem;
        white-space: nowrap;
    }
    .couple-names-nav {
        font-size: 1.8rem;
        white-space: nowrap;
    }
    .wedding-date { font-size: 1.2rem; }
    .hero-section { min-height: 100vh; height: 100vh; }
    .hero-section .overlay { background-color: rgba(0, 0, 0, 0.35); }
    .hero-section .couple-names { text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.7); }
    .hero-section .wedding-date, .hero-section .tagline-small { text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7); }
    .logo-text { font-size: 2.5rem; }
    .tagline-small { font-size: 1.2rem; }
    #story img { max-height: 300px; }

    /* Gallery */
    #gallery { padding: 30px 15px; }
    #gallery .section-title { margin-bottom: 30px; }
    .gallery-carousel-container { padding: 8px 0; margin-bottom: 8px; }
    .gallery-carousel-container.grid-view { padding: 15px; min-height: 300px; }
    .gallery-nav-btn, #playPauseButton, #scrollLeftButton, #scrollRightButton { width: 42px; height: 42px; font-size: 15px; margin: 0 1px; }
    .gallery-navigation { padding: 8px; gap: 3px; }
    .category-btn { padding: 8px 18px; font-size: 13px; margin: 0 6px 10px; }

    /* Carousel View (Horizontal Scroll) */
    .gallery-carousel { height: 240px; padding: 0 15px; gap: 8px; scrollbar-width: none; -ms-overflow-style: none; scroll-snap-type: x mandatory; }
    .gallery-carousel::-webkit-scrollbar { display: none; }
    .gallery-slide:hover { transform: scale(1); box-shadow: none; }
    
    /* Grid View (All Photos) */
    .gallery-carousel.grid-layout {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        width: 100%;
        height: auto;
        overflow: hidden;
        padding: 0; 
        min-height: unset; 
        grid-auto-flow: row;
    }

    .gallery-carousel.grid-layout .gallery-slide {
        width: 100%;
        height: auto;
        aspect-ratio: 4 / 5;
        margin: 0;
        overflow: hidden;
    }

    .gallery-carousel.grid-layout .gallery-slide .gallery-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    
    /* Collage View */
    .gallery-carousel.grid-layout[data-filtered="collage"] .gallery-slide[data-category*="pre-nup"] { 
        min-height: 180px; 
    }

    /* Lightbox & Overlays */
    .lightbox-content, 
    .lightbox-content img, 
    .lightbox.show .lightbox-content, 
    .lightbox.show .lightbox-content img, 
    .image-credits-overlay, 
    .lightbox.show .image-credits-overlay.show { 
        opacity: 1; 
        transform: none; 
        transition: none; 
    }
    
    .lightbox-content img { 
        width: 95vw; 
        height: 85vh; 
        max-width: 800px; 
        max-height: 700px; 
    }
    
    .lightbox-content video { 
        width: 90vw; 
        height: 67.5vw; 
        max-width: 600px; 
        max-height: 338px; 
    }
    .lightbox-close { top: 15px; right: 20px; font-size: 24px; width: 45px; height: 45px; z-index: 10010; background: rgba(0, 0, 0, 0.8); backdrop-filter: blur(5px); border: 1px solid rgba(255, 255, 255, 0.3); }
    .lightbox-close:hover { background: rgba(0, 0, 0, 0.9); color: var(--primary-color); }
    .lightbox-video-controls { top: 10px; right: 10px; gap: 8px; }
    .video-control-btn-small { width: 40px; height: 40px; font-size: 14px; }

    /* Mobile Lightbox Fixes */
    .lightbox, .lightbox-content { width: 100vw; height: 100dvh; min-height: -webkit-fill-available; top: 0; left: 0; right: 0; bottom: 0; margin: 0; padding: 0; overflow: hidden; position: fixed; -webkit-overflow-scrolling: touch; }
    .lightbox-content { padding: 5px; }
    .lightbox-content img, .lightbox-content video { max-width: calc(100vw - 10px); max-height: calc(100dvh - 10px); width: auto; height: auto; object-fit: contain; border-radius: 4px; }
    .lightbox-video-container { width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; position: relative; }
    .lightbox.show { touch-action: manipulation; -webkit-user-select: none; user-select: none; }
    @supports (-webkit-touch-callout: none) { .lightbox, .lightbox-content { height: calc(100vh + 1px); } }

    /* RSVP Modal Responsive Design */
    .rsvp-modal-content { width: 95%; max-width: none; max-height: 95vh; margin: 2.5vh auto; border-radius: 12px; }
    .rsvp-modal-header { padding: 20px 25px; }
    .rsvp-modal-title { font-size: 2rem; }
    .rsvp-modal-close { width: 40px; height: 40px; font-size: 24px; }
    .rsvp-modal-body { padding: 30px 25px 25px; max-height: 70vh; }
    .rsvp-modal .form-control { padding: 10px 12px; font-size: 16px; }
    .rsvp-modal .btn-primary { padding: 12px 35px; font-size: 1rem; }
    .rsvp-modal.show { touch-action: manipulation; -webkit-user-select: none; user-select: none; }
    .rsvp-modal.show input, .rsvp-modal.show textarea { -webkit-user-select: text !important; user-select: text !important; touch-action: auto !important; }
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .lightbox-content { padding: 3px; }
    .video-header { top: 10px; left: 10px; padding: 8px 12px; max-width: 200px; }
    .couple-names-video { font-size: 1.4rem; }
    .ampersand-video { margin: 0 4px; font-size: 0.85em; }
    .wedding-subtitle { font-size: 0.7rem; letter-spacing: 0.3px; }
    .video-footer { bottom: 10px; right: 10px; }
    .copyright-notice { font-size: 0.7rem; padding: 6px 8px; }
    .mobile-video-branding { display: none; }
}

/* Portrait Mobile */
@media (max-width: 768px) and (orientation: portrait) {
    .video-header, .video-footer { display: none !important; }
    .mobile-video-branding { display: block; position: relative; z-index: 10002; transform: translateY(30px) scale(0.5); transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
    .lightbox.show .mobile-video-branding { transform: translateY(0) scale(1); transition-delay: 0.3s; }
    .lightbox.closing .mobile-video-branding { transform: translateY(20px) scale(0.3); transition: transform 0.12s cubic-bezier(0.55, 0.085, 0.68, 0.53), opacity 0.12s cubic-bezier(0.55, 0.085, 0.68, 0.53); }
    
    .lightbox-content:has(.image-credits-overlay):not(:has(video)) { flex-direction: row; padding: 0; max-height: 100vh; justify-content: center; align-items: center; position: relative; overflow: hidden; }
    .lightbox-content:has(.image-credits-overlay):not(:has(video)) img { width: 100vw; height: 100dvh; max-width: 100vw; max-height: 100dvh; margin: 0; object-fit: contain; position: absolute; top: 0; left: 0; right: 0; bottom: 0; }
    .lightbox-content:has(.image-credits-overlay):not(:has(video)) .image-credits-overlay { position: absolute !important; top: auto !important; bottom: 0 !important; left: 0 !important; right: 0 !important; opacity: 1 !important; pointer-events: auto; margin: 0; z-index: 10005; transition: none !important; }
    .lightbox-content:has(.image-credits-overlay):not(:has(video)) .image-credits-content { position: relative; bottom: auto; right: auto; left: auto; transform: none; padding: 8px 15px; max-width: 100%; text-align: center; background: rgba(245, 225, 208, 0.95); border: none; border-radius: 0; backdrop-filter: blur(10px); margin: 0; box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.2); }
    .lightbox-content:has(.image-credits-overlay):not(:has(video)) .image-credits-content .image-couple-names { font-size: 1.4rem; color: var(--primary-color); text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3); margin-bottom: 2px; line-height: 1.1; }
    .lightbox-content:has(.image-credits-overlay):not(:has(video)) .image-credits-content .image-wedding-subtitle { font-size: 0.65rem; margin-bottom: 2px; color: var(--dark-color); text-shadow: none; line-height: 1.1; }
    .lightbox-content:has(.image-credits-overlay):not(:has(video)) .image-credits-content .image-copyright { font-size: 0.55rem; color: var(--dark-color); text-shadow: none; opacity: 0.8; margin-bottom: 0; line-height: 1.1; }
}

/* Small Mobile (max-width: 576px) */
@media (max-width: 576px) {
    .couple-names { 
        font-size: 3rem;
        white-space: nowrap;
    }
    .couple-names-nav {
        font-size: 1.6rem;
        white-space: nowrap;
    }
    .wedding-date { font-size: 1.1rem; }
    .tagline-small { font-size: 1.1rem; }
    
    .gallery-carousel { height: 200px; padding: 0 10px; gap: 6px; }
    .gallery-carousel.grid-layout { gap: 10px; }
    .gallery-carousel-container.grid-view { padding: 10px; }
}

/* Very Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
    .couple-names { 
        font-size: 2.8rem;
        white-space: nowrap;
    }
    .couple-names-nav {
        font-size: 1.4rem;
        white-space: nowrap;
    }
    .wedding-date { font-size: 1rem; }
    .tagline-small { font-size: 1rem; }
}

/* Ultra Small Mobile (max-width: 430px) */
@media (max-width: 430px) {
    .couple-names { 
        font-size: 2.5rem;
        white-space: nowrap;
        letter-spacing: -1px;
    }
    .couple-names-nav {
        font-size: 1.3rem;
        white-space: nowrap;
    }
    .wedding-date { font-size: 0.95rem; }
    .tagline-small { font-size: 0.95rem; }
    
    #gallery { padding: 15px 8px; }
    #gallery .section-title { margin-bottom: 15px; font-size: 1.8rem; }
    #gallery .gallery-carousel-container.grid-view { 
        padding: 10px 5px; 
        min-height: 150px; 
        margin-bottom: 10px; 
    }
    #gallery .gallery-navigation { margin-top: 15px; }
}

/* Extra Small Mobile (max-width: 360px) */
@media (max-width: 360px) {
    .couple-names { 
        font-size: 2.2rem;
        white-space: nowrap;
        letter-spacing: -1px;
    }
    .couple-names-nav {
        font-size: 1.2rem;
        white-space: nowrap;
    }
    .wedding-date { 
        font-size: 0.9rem;
        letter-spacing: 1px;
    }
    .tagline-small { 
        font-size: 0.9rem;
        letter-spacing: 0.5px;
    }
}

/* Tiny Mobile (max-width: 320px) */
@media (max-width: 320px) {
    .couple-names { 
        font-size: 2rem;
        white-space: nowrap;
        letter-spacing: -2px;
    }
    .couple-names-nav {
        font-size: 1.1rem;
        white-space: nowrap;
        letter-spacing: -1px;
    }
    .wedding-date { 
        font-size: 0.85rem;
        letter-spacing: 0.5px;
    }
    .tagline-small { 
        font-size: 0.85rem;
        letter-spacing: 0px;
    }
}

/* ===============================================
   RSVP MODAL SYSTEM (COMPLETE)
   =============================================== */

.rsvp-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;
    min-height: 100vh;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    justify-content: center;
    align-items: center;
    transition: opacity 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                visibility 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.rsvp-modal.show {
    display: flex;
    opacity: 1;
    visibility: visible;
}

.rsvp-modal.closing {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s cubic-bezier(0.55, 0.085, 0.68, 0.53), 
                visibility 0s linear 0.25s;
}

.rsvp-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(229, 152, 155, 0.85) 0%, 
        rgba(247, 209, 186, 0.85) 50%, 
        rgba(245, 225, 208, 0.85) 100%);
    backdrop-filter: blur(15px);
    z-index: 1;
}

.rsvp-modal-content {
    position: relative;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    margin: auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 25px 60px rgba(229, 152, 155, 0.3),
                0 15px 35px rgba(0, 0, 0, 0.2);
    z-index: 2;
    transform: scale(0.5) translateY(-100px) rotate(-5deg);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.rsvp-modal.show .rsvp-modal-content {
    transform: scale(1) translateY(0) rotate(0deg);
}

.rsvp-modal.closing .rsvp-modal-content {
    transform: scale(0.7) translateY(-50px) rotate(3deg);
    transition: transform 0.2s cubic-bezier(0.55, 0.085, 0.68, 0.53);
}

.rsvp-modal-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 25px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 15px 15px 0 0;
    position: relative;
}

.rsvp-modal-header::before {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 0 0 50% 50%;
    transform: scaleY(0.5);
}

.rsvp-modal-title {
    font-family: var(--font-primary);
    font-size: 2.5rem;
    color: white;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 2px;
    position: relative;
    z-index: 3;
}

.rsvp-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 28px;
    cursor: pointer;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 4;
}

.rsvp-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.rsvp-modal-close:active {
    transform: scale(0.95) rotate(90deg);
    transition: all 0.1s ease;
}

.rsvp-modal-body {
    padding: 40px 30px 30px;
    max-height: 60vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--accent-color);
}

.rsvp-modal-body::-webkit-scrollbar {
    width: 8px;
}

.rsvp-modal-body::-webkit-scrollbar-track {
    background: var(--accent-color);
    border-radius: 4px;
}

.rsvp-modal-body::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
    transition: background 0.3s ease;
}

.rsvp-modal-body::-webkit-scrollbar-thumb:hover {
    background: #d8787b;
}

.rsvp-modal .form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 8px;
    font-size: 1rem;
}

.rsvp-modal .form-control {
    border: 2px solid var(--accent-color);
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background-color: #fefefe;
}

.rsvp-modal .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(229, 152, 155, 0.25);
    background-color: white;
    transform: translateY(-2px);
}

.rsvp-modal .form-check {
    margin-bottom: 15px;
    padding-left: 2rem;
}

.rsvp-modal .form-check-input {
    width: 1.5rem;
    height: 1.5rem;
    margin-top: 0.1rem;
    margin-left: -2rem;
    cursor: pointer;
}

.rsvp-modal .form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.rsvp-modal .form-check-label {
    font-size: 1rem;
    color: var(--dark-color);
    cursor: pointer;
    padding-left: 10px;
}

.rsvp-modal .btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #d8787b);
    border: none;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 1px;
    border-radius: 50px;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 25px rgba(229, 152, 155, 0.3);
    position: relative;
    overflow: hidden;
}

.rsvp-modal .btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.3s ease;
}

.rsvp-modal .btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 35px rgba(229, 152, 155, 0.4);
    background: linear-gradient(135deg, #e8a1a4, var(--primary-color));
}

.rsvp-modal .btn-primary:hover::before {
    left: 100%;
}

.rsvp-modal .btn-primary:active {
    transform: translateY(-1px) scale(0.98);
    transition: all 0.1s ease;
}

.rsvp-modal .alert-danger {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    border: 2px solid #f5c6cb;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 25px;
    animation: alertSlideIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes alertSlideIn {
    0% {
        opacity: 0;
        transform: translateY(-20px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.rsvp-modal .alert-danger h5 {
    color: #721c24;
    font-weight: 600;
    margin-bottom: 10px;
}

.rsvp-modal .alert-danger ul {
    color: #721c24;
    font-weight: 500;
}

body.rsvp-modal-open,
html.rsvp-modal-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
}

/* RSVP Modal Responsive Design */
@media (max-width: 768px) {
    .rsvp-modal-content {
        width: 95%;
        max-width: none;
        max-height: 95vh;
        margin: 2.5vh auto;
        border-radius: 12px;
    }
    
    .rsvp-modal-header {
        padding: 20px 25px;
    }
    
    .rsvp-modal-title {
        font-size: 2rem;
    }
    
    .rsvp-modal-close {
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
    
    .rsvp-modal-body {
        padding: 30px 25px 25px;
        max-height: 70vh;
    }
    
    .rsvp-modal .form-control {
        padding: 10px 12px;
        font-size: 16px;
    }
    
    .rsvp-modal .btn-primary {
        padding: 12px 35px;
        font-size: 1rem;
    }

    .rsvp-modal.show {
        touch-action: manipulation;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
    
    .rsvp-modal.show input,
    .rsvp-modal.show textarea {
        -webkit-user-select: text !important;
        -moz-user-select: text !important;
        -ms-user-select: text !important;
        user-select: text !important;
        touch-action: auto !important;
    }
}

@media (max-width: 576px) {
    .rsvp-modal-content {
        width: 98%;
        max-height: 98vh;
        margin: 1vh auto;
        border-radius: 10px;
    }
    
    .rsvp-modal-header {
        padding: 18px 20px;
    }
    
    .rsvp-modal-title {
        font-size: 1.8rem;
        letter-spacing: 1px;
    }
    
    .rsvp-modal-close {
        width: 38px;
        height: 38px;
        font-size: 22px;
    }
    
    .rsvp-modal-body {
        padding: 25px 20px 20px;
        max-height: 75vh;
    }
    
    .rsvp-modal .form-control {
        padding: 8px 10px;
    }
    
    .rsvp-modal .btn-primary {
        padding: 10px 30px;
        font-size: 0.95rem;
    }
}