/* Global Styles */
:root {
    --primary-color: #312D40;
    --secondary-color: #312D40;
    --accent-brown: #73553C;
    --accent-peach: #F2C299;
    --accent-terracotta: #A6886D;
    --bg-color: #F2EBDC;
    --text-color: #312D40;
    --font-heading: 'snell-roundhand-lt-std', cursive;
    --font-body: 'mrs-eaves', serif;
    --font-body: 'mrs-eaves', serif;
}

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

html {
    /* scroll-behavior: smooth;  Removed to allow custom JS slow scroll */
}

body {
    font-family: var(--font-body);
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    /* Page Transition Base State - Default to visible for body (bg/header) */
    opacity: 1;
}

/* NEW: Fixed Background Layer (Solves Mobile Scroll Issue) */
#fixed-bg-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    background-color: var(--accent-light);
    background-image: url('../images/TreeBackground.avif');
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Transition targets: Content elements (not header/overlay/bg) */
body>*:not(header):not(#sticky-header):not(#loading-overlay):not(script):not(#fixed-bg-layer) {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

/* Loaded state: Show content */
body.nav-loaded>*:not(header):not(#sticky-header):not(#loading-overlay):not(script):not(#fixed-bg-layer) {
    opacity: 1;
}

/* Prevent horizontal scroll */


/* Unified Navigation Layout */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* =========================================
   SCROLL ANIMATION LAYERS
   ========================================= */

/* ... (Hero Layers remain same) ... */

/* ... (Rest of file) ... */

/* Bottom Nav (Fancy) */
.hero-bottom-nav {
    position: absolute;
    bottom: 40px;
    width: 100%;
    justify-content: center;
    z-index: 10;
}

.hamburger-menu,
.mobile-nav {
    display: none;
    /* Hidden on Desktop */
}

.hero-menu-toggle {
    display: none;
    /* Removed feature, ensuring clean state */
}

.hero-bottom-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 0;
}

/* Mobile: Hamburger Menu & Hidden Hero Tabs */
@media (max-width: 768px) {

    /* 1. Hide Hero Tabs completely */
    .hero-bottom-nav {
        display: none !important;
    }

    /* 2. Hide Desktop Nav Links */
    .desktop-nav,
    ul.nav-links.desktop-nav {
        display: none !important;
    }

    /* 3. Show Hamburger */
    .hamburger-menu {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 30px;
        height: 25px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 1001;
        /* Above mobile nav */
    }

    .hamburger-menu span {
        width: 100%;
        height: 3px;
        background-color: var(--primary-color);
        border-radius: 2px;
        transition: all 0.3s linear;
        position: relative;
        transform-origin: 1px;
    }

    /* Hamburger Animation */
    .hamburger-menu.active span:nth-child(1) {
        transform: rotate(45deg);
    }

    .hamburger-menu.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger-menu.active span:nth-child(3) {
        transform: rotate(-45deg);
    }

    /* 4. Mobile Nav Dropdown */
    .mobile-nav {
        display: block;
        /* But hidden via visibility/transform */
        position: fixed;
        top: 0;
        right: 0;
        width: 100%;
        /* Full width for overlay feeling */
        height: 100vh;
        background-color: rgba(255, 255, 255, 0.98);
        z-index: 1000;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
        padding-top: 80px;
        /* Space for close button/header */
        backdrop-filter: blur(10px);
    }

    .mobile-nav.active {
        transform: translateX(0);
    }

    .mobile-nav ul {
        list-style: none;
        padding: 0;
        text-align: center;
        display: flex;
        flex-direction: column;
        gap: 25px;
    }

    .mobile-nav a {
        font-family: var(--font-heading);
        font-size: 2rem;
        color: var(--primary-color);
        text-decoration: none;
    }

    /* 5. Mobile Hero Polishing */
    .hero-details {
        font-size: 2.2rem !important;
        /* Force Big */
        bottom: 20px !important;
        /* Force Low */
        width: 100% !important;
        /* Full width container */
        left: 0 !important;
        /* Reset centering hack */
        text-align: center !important;
        padding: 0 10px;
        /* Safety padding */
    }
}

#hero-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 0;
    /* Fades out via JS opacity */
    background: #f2ebdc center/cover no-repeat;
    background-image: url('../images/BannerExpanded.png');
    background-image: image-set(url('../images/BannerExpanded.avif') type('image/avif'),
            url('../images/BannerExpanded.png') type('image/png'));
    /* Identical sizing to body background */
}

#hero-layer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Removed darkening per user general preference for lightness, can add back if text illegible */
}

/* 2b. Hero Mask Layer (Sits on top of Logo) */
#hero-mask-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 5;
    /* Mask at Level 5 */
    background: transparent center/cover no-repeat;
    background-image: url('../images/HeroMask.png');
    background-image: image-set(url('../images/HeroMask.avif') type('image/avif'),
            url('../images/HeroMask.png') type('image/png'));
    pointer-events: none;
    /* KEY: Allows clicking through to the logo/nav links underneath */
}

/* Loading Overlay */
#loading-overlay {
    position: fixed;
    inset: 0;
    background: #ffffff;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease-out;
}

.loading-inner {
    text-align: center;
}

.loading-spinner {
    width: 42px;
    height: 42px;
    border: 3px solid rgba(49, 45, 64, 0.15);
    border-top-color: #312D40;
    border-radius: 50%;
    margin: 0 auto 12px;
    animation: spin 0.8s linear infinite;
}

.loading-text {
    font-family: var(--font-body);
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #312D40;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 3. Sticky Header / Generic Site Header */
header,
#sticky-header {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    /* Always fixed/sticky for consistency */
    top: 0;
    width: 100%;
    z-index: 1000;
}

#sticky-header {
    transform: translateY(-100%);
    /* Hidden top on Home Page initially */
    transition: transform 0.4s ease-in-out;
}

#sticky-header.visible {
    transform: translateY(0);
}

header .logo a,
#sticky-header .logo a {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--primary-color);
}

/* Registry Item Titles */
.registry-info h3 {
    font-family: var(--font-body);
    /* Mrs Eaves */
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.nav-links li a {
    font-size: 0.9rem;
    font-family: var(--font-body);
    font-weight: bold;
    text-transform: uppercase;
}

.btn-header-rsvp {
    padding: 8px 20px;
    font-size: 0.8rem;
}



.registry-intro {
    text-align: center;
    margin: 0 auto 40px auto;
    font-size: 1.3rem;
    max-width: 800px;
    background-color: color-mix(in srgb, var(--accent-terracotta), transparent 50%);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    /* Subtle shadow for depth */
}

/* 4. Scrollable Wrapper */
#scroll-wrapper {
    position: relative;
    z-index: 10;
    /* Ensure content stays above mask (z=5) */
    width: 100%;
    /* No bg here, so we can see through to fixed layers */
}

/* -------------------------------------------------- */
/* Animations */
/* -------------------------------------------------- */
@keyframes fadeUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }

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

@keyframes fadeIn {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

/* Hero Content Section (Scrolls away) */
#hero-content {
    height: 100vh;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    text-align: center;
    color: var(--primary-color);
    /* Changed to Primary Color*/
}

/* Mask Layer Animation */
#hero-mask-layer {
    opacity: 0;
    /* Start hidden */
    transition: opacity 1.5s ease-out;
}

body.loaded #hero-mask-layer {
    opacity: 1;
    /* Fade in via transition */
}

/* Hero Logo Layer (Fixed) */
#hero-logo-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 10vh;
    /* Push down slightly from very top */
    z-index: 3;
    /* Above Background (0), Below Mask (5) */
    pointer-events: none;
}

/* Hero Element Animations (Triggered by body.loaded) */
.hero-logo {
    max-width: 80vw;
    height: auto;
    margin-top: 0;
    opacity: 0;
}

body.loaded .hero-logo {
    animation: fadeUp 1s ease-out forwards;
    animation-delay: 0.5s;
    /* Wait for mask to establish */
}

.hero-details {
    position: absolute;
    bottom: 160px;
    width: 100%;
    font-family: var(--font-body);
    font-size: clamp(0.9rem, 2.5vw, 1.8rem);
    color: var(--primary-color);
    margin-bottom: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    z-index: 10;
    opacity: 0;
}

body.loaded .hero-details {
    animation: fadeUp 1s ease-out forwards;
    animation-delay: 1.0s;
}

.hero-bottom-nav {
    position: absolute;
    bottom: 40px;
    width: 100%;
    justify-content: center;
    z-index: 10;
    opacity: 0;
}

body.loaded .hero-bottom-nav {
    animation: fadeUp 1s ease-out forwards;
    animation-delay: 1.4s;
}

.hero-bottom-nav {
    position: absolute;
    bottom: 40px;
    width: 100%;
    justify-content: center;
    /* Override global nav space-between */
    z-index: 10;
    /* Above Mask (5) */
    opacity: 0;
    /* Start hidden */
    animation: fadeUp 1s ease-out forwards;
    animation-delay: 1.2s;
}

/* RSVP Form Styling */
.rsvp-form-container {
    background-color: white;
    /* Card Background */
    max-width: 600px;
    margin: 0 auto;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

#rsvp-search-form,
#rsvp-submit-form {
    display: flex;
    flex-direction: column;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--secondary-color);
    font-weight: bold;
}

/* Premium Input Styles */
input[type="text"],
select,
textarea {
    width: 100%;
    padding: 12px 15px;
    font-size: 1rem;
    font-family: var(--font-body);
    /* Serif for elegance */
    border: 1px solid #ddd;
    border-radius: 4px;
    /* Soft edges */
    background-color: #fafafa;
    /* Slightly distinct from white card */
    transition: all 0.3s ease;
    box-sizing: border-box;
    /* Fix width issues */
}

input[type="text"]:focus,
select:focus,
textarea:focus {
    border-color: var(--primary-color);
    background-color: #fff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(49, 45, 64, 0.1);
}

textarea {
    resize: vertical;
}

.hero-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    /* Force content to top */
    padding-top: 0;
    /* No buffer, right at top */
    height: 100%;
    width: 100%;
}

.hero-logo {
    max-width: 500px;
    width: 60%;
    margin-bottom: 20px;
    margin-top: -5vh;
    /* Pull up further per user request */
    position: relative;
    z-index: 1;
    /* Below Mask (5) */
}

.hero-details {
    position: absolute;
    /* Anchor to bottom */
    bottom: 160px;
    /* Increased spacing (was 120px) */
    width: 100%;
    font-family: var(--font-body);
    font-size: clamp(0.9rem, 2.5vw, 1.8rem);
    /* Slightly smaller per request */
    color: var(--primary-color);
    /* Changed back to Primary */
    margin-bottom: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    /* Added shadow for readability against image */
    z-index: 10;
    /* Above Mask (5) */
}

.hero-text-line {
    margin: 0;
}

/* Bottom Nav (Fancy) */
.hero-bottom-nav {
    position: absolute;
    bottom: 40px;
    /* Slightly lower (was 50px) */
    width: 100%;
    justify-content: center;
    /* Override global nav space-between */
    z-index: 10;
    /* Above Mask (5) */
}

.hero-bottom-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 0;
}

@media (max-width: 768px) {
    .hero-bottom-nav {
        bottom: 20px;
        /* Give more room on small screens */
    }

    .hero-bottom-nav ul {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }

    .hero-bottom-nav li a {
        font-size: 1.6rem;
        /* Good touch target */
        display: block;
        /* Ensure full click width */
        padding: 5px;
    }
}

.hero-bottom-nav li a {
    font-family: var(--font-heading);
    font-size: clamp(1.4rem, 3vw, 2.5rem);
    /* Slightly bigger */
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s, transform 0.3s;
}

.hero-bottom-nav li a:hover {
    color: var(--accent-brown);
    transform: scale(1.05);
}


/* Page Content (See-through to background) */
.page-content {
    background-color: transparent;
    /* Changed to Transparent */
    position: relative;
    z-index: 2;
    padding-top: 60px;
    min-height: 100vh;
}

/* Map Placeholder */
.map-placeholder {
    margin-top: 50px;
    background: #e0dcd5;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: var(--primary-color);
    font-family: var(--font-body);
}


/* =========================================
   STANDARD STYLES (Restored)
   ========================================= */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--secondary-color);
    margin: 15px auto 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Buttons */
.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 12px 30px;
    border: 2px solid var(--primary-color);
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    font-family: var(--font-body);
}

.btn:hover {
    background-color: color-mix(in srgb, var(--primary-color), transparent 40%);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-secondary {
    background-color: var(--accent-terracotta);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-secondary:hover {
    background-color: color-mix(in srgb, var(--accent-brown), transparent 40%);
    color: var(--accent-brown);
    border-color: var(--primary-color);
}

.btn-amazon {
    background-color: #FF9900;
    color: #232f3e;
    border: none;
    transition: background-color 0.3s;
}

.btn-amazon:hover {
    background-color: #e68a00;
}

/* Registry Grid */
.registry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.registry-item {
    background: color-mix(in srgb, var(--primary-color), transparent 80%);
    border: 1px solid rgba(166, 136, 109, 0.1);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    /* For badge positioning */
}

.purchased-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--secondary-color);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.registry-item.purchased .registry-image img {
    opacity: 0.7;
    /* Dim image slightly */
    filter: grayscale(80%);
}

.registry-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.registry-image {
    height: 250px;
    background-color: color-mix(in srgb, var(--primary-color), transparent 90%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.registry-image img {
    max-width: 100%;
    max-height: 100%;
    padding: 10px;
    object-fit: contain;
}

.registry-info {
    padding: 20px;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.item-price {
    font-weight: bold;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

/* Registry Filter Toolbar */
.registry-toolbar {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    background: color-mix(in srgb, var(--primary-color), transparent 70%);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 2px solid rgba(166, 136, 109, 0.1);
}

.registry-toolbar .filter-group {
    display: flex;
    flex-direction: column;
    min-width: 150px;
    text-align: left;
}

.registry-toolbar label {
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: bold;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.registry-toolbar select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: var(--font-body);
}

/* Pagination */
.pagination-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.page-btn {
    padding: 8px 16px;
    border: 1px solid var(--primary-color);
    background: white;
    color: var(--primary-color);
    cursor: pointer;
    border-radius: 4px;
    font-family: var(--font-body);
    transition: all 0.2s;
}

.page-btn.active,
.page-btn:hover {
    background: var(--primary-color);
    color: white;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f9f9f9;
    color: #999;
    border-color: #ddd;
}

/* Details Grid */
/* Details Grid */
.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 4rem;
    /* Increased spacing */
}

.details-header {
    background: transparent;
    padding: 0;
    margin-bottom: 0;
    width: 100%;
    margin-left: 0;
}

/* Timeline Cards (Printed Card Look) */
.detail-card {
    background: color-mix(in srgb, var(--accent-terracotta), transparent 40%);
    /* Very warm white "Paper" */
    padding: 40px;
    border-radius: 10px;
    /* Slight rounding, mostly sharp paper edge */
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.05),
        0 10px 20px rgba(0, 0, 0, 0.02);
    /* Soft directional shadow */
    display: flex;
    flex-direction: column;
    gap: 10px;
    border: none;
    transform: rotate(0deg);
    transition: transform 0.3s ease;
    height: 100%;
    /* Ensure equal heights */
}

/* Divider */
.details-divider {
    width: 60%;
    height: 1px;
    background: var(--accent-terracotta);
    margin: 4rem auto;
    opacity: 0.6;
}

/* Accordion Styles (Themed Pills) */
.accordion-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    /* Tighter gap */
}

.accordion-item {
    /* Using Theme Color: Soft Terracotta Overlay */
    background: color-mix(in srgb, var(--primary-color), transparent 80%);
    /* Parchment color, slightly transparent */
    border-radius: 4px;
    /* Soft, almost square edges */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    /* Very subtle shadow */
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(166, 136, 109, 0.1);
    /* Faint border */
}

.accordion-item.active {
    background: color-mix(in srgb, var(--primary-color), transparent 80%);
    /* Slightly darker on active */
    /* More opaque when active */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.accordion-header {
    padding: 18px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    color: var(--accent-brown);
    letter-spacing: 0.1em;
}

.accordion-header h3 {
    margin: 0;
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: inherit;
    text-transform: uppercase;
    letter-spacing: inherit;
    font-weight: 500;
}

.accordion-icon {
    font-size: 1.2rem;
    color: var(--accent-brown);
    /* Muted brown */
    opacity: 0.8;
    transition: transform 0.4s ease;
}

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

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    background: transparent;
}

.accordion-content p {
    padding: 0 24px 24px 24px;
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-color);
}

/* Navigation Links (Shared) */
.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
    margin: 0;
    padding: 0;
    align-items: center;
}

.logo a {
    text-decoration: none;
    color: inherit;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s;
}

a:hover {
    color: var(--secondary-color);
}

/* Sections */
section {
    padding: 80px 0;
    scroll-margin-top: 80px;
    /* Offset for sticky header */
}

/* Extra padding for non-home pages to clear fixed header */
#registry,
#rsvp,
#story {
    padding-top: 150px;
}

/* Footer */
footer {
    background-color: transparent;
    /* Transparent per request */
    color: var(--primary-color);
    padding: 60px 0 40px 0;
    /* Increased bottom padding for copyright space */
    margin-top: 40px;
    position: relative;
    text-align: center;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.footer-box {
    background-color: rgba(255, 255, 255, 0.5);
    /* 50% Opacity White */
    padding: 40px 60px;
    border-radius: 4px;
    /* Slight rounding */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    /* Soft shadow */
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.footer-logo {
    width: 150px;
    margin-bottom: 15px;
}

.footer-verse {
    font-family: var(--font-heading);
    /* Snell Roundhand */
    font-size: 1.5rem;
    margin-bottom: 0;
    color: var(--primary-color);
}

.footer-copyright {
    position: absolute;
    bottom: 0;
    right: 0;
    font-family: var(--font-body);
    font-size: 1.3rem;
    /* Bigger (was 1rem) */
    opacity: 0.9;
    /* More visible */
    margin: 0;
}

/* Mobile adjust for copyright */
@media (max-width: 768px) {
    .footer-copyright {
        position: relative;
        margin-top: 20px;
        right: auto;
        bottom: auto;
    }
}

/* =========================================
   PHOTOS PAGE
   ========================================= */
.photos-intro {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 40px;
    font-family: var(--font-body);
    font-size: 1.05rem;
    color: var(--primary-color);
}

.photo-section {
    margin-bottom: 70px;
}

.photo-tabs {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin: 0 auto 30px;
    flex-wrap: wrap;
}

.photo-tab-btn {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 10px 26px;
    border-radius: 999px;
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.photo-tab-btn.active {
    background: var(--primary-color);
    color: #fff;
}

.photo-tab-panel {
    display: none;
}

.photo-tab-panel.active {
    display: block;
}

.photo-section-header {
    text-align: center;
    margin-bottom: 25px;
}

.photo-section-header h3 {
    font-size: 2rem;
}

.photo-section-header p {
    font-family: var(--font-body);
    color: var(--primary-color);
    opacity: 0.8;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 20px;
}

.photo-masonry {
    column-count: 3;
    column-gap: 18px;
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 18px;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(166, 136, 109, 0.2);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.08);
    position: relative;
}

.masonry-item img {
    width: 100%;
    height: auto;
    display: block;
    transform: scale(1.02);
    transition: transform 0.4s ease;
}

.masonry-item a {
    display: block;
}

.masonry-item:hover img {
    transform: scale(1.06);
}

.masonry-item.medium {
    transform: translateY(6px);
}

.masonry-item.large {
    transform: translateY(-6px);
}

.photo-card {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(166, 136, 109, 0.2);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
}

.photo-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.photo-meta {
    padding: 12px 14px 16px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.85rem;
    font-family: var(--font-body);
    color: var(--primary-color);
}

.photo-meta a {
    color: var(--accent-brown);
    text-decoration: none;
    font-weight: bold;
}

.photo-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 30px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 8px;
    font-family: var(--font-body);
    color: var(--primary-color);
}

.photo-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--secondary-color);
    color: white;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.photo-remove {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: #c0392b;
    color: white;
    border: none;
    padding: 6px 10px;
    font-size: 0.7rem;
    border-radius: 6px;
    cursor: pointer;
}

.event-code-panel {
    background: #fdfcf8;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 20px;
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    align-items: end;
    margin-bottom: 20px;
}

.event-code-panel label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
    font-family: var(--font-body);
}

.event-code-panel input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #ddd;
    font-family: var(--font-body);
}

.event-code-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.event-code-hint {
    grid-column: 1 / -1;
    font-size: 0.85rem;
    color: #666;
    margin: 0;
}

.event-status {
    margin-bottom: 16px;
    font-family: var(--font-body);
}

.event-status-success {
    color: #2e7d32;
}

.event-status-error {
    color: #c0392b;
}

.event-share {
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(166, 136, 109, 0.25);
    padding: 16px;
    border-radius: 10px;
    margin: 40px 0 20px;
    font-family: var(--font-body);
}

.event-share-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.event-share input {
    flex: 1 1 260px;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #ddd;
}

.event-upload-panel {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(166, 136, 109, 0.25);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.event-upload-panel h4 {
    margin-top: 0;
}

.event-upload-form input[type="file"] {
    display: block;
    margin: 10px 0 15px;
}

.event-upload-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.event-upload-note {
    font-size: 0.85rem;
    color: #666;
    margin-top: 10px;
}

.event-upload-progress {
    margin-top: 12px;
    font-family: var(--font-body);
}

.is-hidden {
    display: none;
}

.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 10, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 9999;
}

.lightbox-overlay.is-hidden {
    display: none;
}

.lightbox-overlay img {
    max-width: min(92vw, 1200px);
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 24px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    font-size: 2rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: white;
    font-size: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
}

.lightbox-prev {
    left: 24px;
}

.lightbox-next {
    right: 24px;
}

@media (max-width: 1024px) {
    .photo-masonry {
        column-count: 2;
    }
}

@media (max-width: 768px) {
    .photo-card img {
        height: 200px;
    }

    .photo-masonry {
        column-count: 1;
    }
}
