:root {
    --bg-cream: #FDFBF7;
    --text-olive: #4A5D23;
    --accent-olive-light: #6A8A34;
    --white-glass: rgba(255, 255, 255, 0.45);
    --border-glass: rgba(255, 255, 255, 0.8);
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Playfair Display', serif;
    --font-cursive: 'Dancing Script', cursive;
}

html {
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    background: radial-gradient(circle at top center, #ffffff 0%, var(--bg-cream) 100%);
    background-attachment: fixed;
    color: var(--text-olive);
    font-family: var(--font-main);
    overflow-x: hidden;
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
.pre-title,
.post-title {
    font-family: var(--font-heading);
    color: var(--text-olive);
    text-align: center;
    margin: 0 0 20px 0;
    font-weight: normal;
    /* Elegant un-bolded headings matching image */
}

.date-text,
.time-text {
    font-family: var(--font-cursive);
    font-size: 5rem;
    color: var(--accent-olive-light);
    margin: 10px 0;
    cursor: pointer;
    transition: transform 0.3s ease, color 0.3s ease;
    display: inline-block;
}

.date-text:hover,
.time-text:hover {
    transform: scale(1.05);
    color: var(--text-olive);
}

/* Flash Messages */
.flash-messages {
    position: fixed;
    top: 80px;
    /* Moved down to avoid overlapping the new navbar */
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
}

.flash {
    padding: 15px 30px;
    border-radius: 30px;
    /* Pill shape */
    background: var(--white-glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--accent-olive-light);
    margin-bottom: 10px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(74, 93, 35, 0.1);
}

/* Top Navigation (New addition to match image) */
.top-nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(253, 251, 247, 0.85);
    /* Cream semi-transparent */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(74, 93, 35, 0.2);
    z-index: 999;
    padding: 15px 0;
    text-align: center;
    box-shadow: 0 2px 10px rgba(74, 93, 35, 0.05);
}

.nav-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--text-olive);
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-olive);
    font-family: var(--font-heading);
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent-olive-light);
}

/* Layout */
.single-column {
    max-width: 800px;
    margin: 0 auto;
    padding: 100px 20px 20px;
    /* Added top padding for fixed nav */
    position: relative;
}

/* Sections */
.section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(74, 93, 35, 0.1);
    scroll-snap-align: start;
    scroll-snap-stop: normal;
}

.content-box {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--white-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    /* More rounded */
    border: 1px solid var(--border-glass);
    /* glowing white inner border */
    padding: 50px;
    box-shadow:
        0 4px 30px rgba(74, 93, 35, 0.1),
        /* soft olive shadow */
        0 0 20px rgba(255, 255, 255, 0.6) inset;
    /* white glow inside */
    width: 100%;
    max-width: 600px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Add delicate corner decorations via pseudo-elements */
.glass-card::before,
.glass-card::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 50px;
    border: 1px solid rgba(74, 93, 35, 0.15);
    border-radius: 50%;
    pointer-events: none;
}

.glass-card::before {
    top: -25px;
    left: -25px;
}

.glass-card::after {
    bottom: -25px;
    right: -25px;
}

/* Couple Section */
.couple {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.couple-names {
    font-size: 3.5rem;
    margin: 20px 0;
    letter-spacing: 2px;
}

.pre-title,
.post-title {
    font-size: 1.2rem;
    font-style: italic;
    color: var(--accent-olive-light);
    font-family: var(--font-main);
    /* Match lighter text style in image */
    font-weight: 300;
}

/* Images */
.couple-image-container,
.venue-image-container {
    width: 100%;
    max-width: 800px;
    margin: 30px auto 0;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(74, 93, 35, 0.15);
    border: 5px solid rgba(255, 255, 255, 0.8);
}

.main-couple-image,
.venue-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.main-couple-image:hover,
.venue-image:hover {
    transform: scale(1.02);
}

/* Overlapping Background Collage */
.couple-hero-container {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 40px auto 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 500px;
    /* Adjust based on image size */
}

.background-collage {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    pointer-events: none;
    /* Let clicks pass through container */
}

.bg-collage-item {
    position: absolute;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(74, 93, 35, 0.15);
    border: 5px solid rgba(255, 255, 255, 0.8);
    object-fit: cover;
    opacity: 0.6;
    /* Slight transparency for background effect */
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    pointer-events: auto;
}

.bg-collage-item:hover,
.bg-collage-item.is-active,
.couple-image-container:hover,
.couple-image-container.is-active {
    opacity: 1;
    z-index: 20 !important;
    transform: scale(1.1) rotate(0deg) !important;
    box-shadow: 0 20px 50px rgba(74, 93, 35, 0.3);
}

/* Specific positions for the 3 engagement photos */
.bg-collage-pos-1 {
    width: 250px;
    height: 300px;
    top: 0;
    left: 10%;
    transform: rotate(-10deg);
}

.bg-collage-pos-2 {
    width: 280px;
    height: 320px;
    bottom: -10%;
    right: 5%;
    transform: rotate(15deg);
}

.bg-collage-pos-3 {
    width: 200px;
    height: 250px;
    top: -5%;
    right: 20%;
    transform: rotate(5deg);
}

.bg-collage-pos-4 {
    width: 220px;
    height: 280px;
    bottom: -5%;
    left: 15%;
    transform: rotate(-5deg);
}

.couple-image-container {
    position: relative;
    z-index: 1;
    /* Keep above background collage */
    width: 100%;
    max-width: 600px;
    /* Slightly smaller to reveal background */
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(74, 93, 35, 0.25);
    border: 8px solid rgba(255, 255, 255, 0.95);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

.venue-image-container {
    width: 100%;
    max-width: 800px;
    margin: 30px auto 0;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(74, 93, 35, 0.15);
    border: 5px solid rgba(255, 255, 255, 0.8);
}

/* Entourage */
.entourage-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    width: 100%;
}

.entourage-group {
    flex: 1;
    min-width: 200px;
    text-align: center;
}

.entourage-group ul {
    list-style: none;
    padding: 0;
}

.entourage-group li {
    margin-bottom: 8px;
    font-weight: 300;
}

/* Travel */
.travel-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    width: 100%;
    max-width: 600px;
}

.travel-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.travel-card li {
    width: 100%;
    display: flex;
    justify-content: center;
}

.travel-item {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(74, 93, 35, 0.1);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.travel-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.travel-item-name {
    margin: 0 0 10px 0 !important;
    font-size: 1.2rem;
}

.travel-distance {
    font-size: 0.9rem;
    color: var(--accent-olive-light);
    margin: 0 0 15px 0;
    line-height: 1.4;
    text-align: center;
}

.travel-btn {
    font-size: 0.8rem;
    padding: 10px 20px;
    width: fit-content;
}

/* Forms (Matching RSVP in image) */
.rsvp-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: center;
    /* Center align like image */
}

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

.form-group label {
    font-weight: 400;
    font-size: 1.1rem;
}

input[type="text"],
input[type="email"],
select {
    padding: 15px 25px;
    border: 1px solid rgba(74, 93, 35, 0.2);
    border-radius: 30px;
    /* Pill shape */
    background: rgba(255, 255, 255, 0.6);
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-olive);
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 5px rgba(74, 93, 35, 0.02);
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    /* Center placeholder text */
}

input[type="text"]::placeholder,
input[type="email"]::placeholder {
    color: rgba(74, 93, 35, 0.6);
}

input[type="text"]:focus,
input[type="email"]:focus,
select:focus {
    outline: none;
    border-color: var(--accent-olive-light);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 15px rgba(106, 138, 52, 0.15);
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A5D23' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 20px center;
    background-size: 15px;
}

.radio-group {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 5px;
    font-size: 0.95rem;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 300;
}

/* Custom radio button styling */
input[type="radio"] {
    accent-color: var(--text-olive);
    /* Modern way to style radios in supported browsers */
    width: 16px;
    height: 16px;
}

.btn-submit,
.btn-link {
    background: linear-gradient(135deg, #7b9c45, var(--text-olive));
    color: var(--bg-cream);
    padding: 15px 40px;
    border: none;
    border-radius: 30px;
    /* Pill shape */
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(74, 93, 35, 0.3);
    text-decoration: none;
    display: inline-block;
    text-align: center;
    margin-top: 10px;
}

.btn-submit:hover,
.btn-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 93, 35, 0.4);
    background: linear-gradient(135deg, var(--accent-olive-light), var(--text-olive));
}

/* Date Section Layout */
.date-layout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    width: 100%;
    max-width: 1000px;
}

.date-image-container {
    flex: 1;
    min-width: 200px;
    text-align: center;
}

.date-image-left,
.date-image-right {
    max-width: 100%;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(74, 93, 35, 0.15);
    border: 5px solid rgba(255, 255, 255, 0.8);
}

/* Theme-specific styles are loaded dynamically from static/css/themes/ */

@media (max-width: 800px) {
    .date-layout {
        flex-direction: column;
        gap: 20px;
    }

    .date-image-container {
        width: 100%;
        max-width: 400px;
    }

    .date-layout .content-box {
        order: 2;
    }

    .date-layout .date-image-container:first-child {
        order: 1;
    }

    .date-layout .date-image-container:last-child {
        order: 3;
    }

    .couple-hero-container {
        min-height: 300px; /* Reduced from 400px for mobile */
    }

    /* Scale images smaller on mobile */
    .couple-image-container,
    .venue-image-container {
        margin: 15px auto 0;
        border-radius: 16px;
        border-width: 3px;
        max-width: 90%;
    }

    .main-couple-image,
    .venue-image {
        max-height: 250px;
        object-fit: cover;
    }
    
    .date-image {
        max-height: 150px;
        object-fit: cover;
    }

    .bg-collage-item {
        opacity: 0.2;
        /* More transparent on mobile */
    }

    .couple-names {
        font-size: 2.5rem;
    }

    .nav-links {
        gap: 15px;
        font-size: 0.9rem;
        flex-wrap: wrap;
    }

    .nav-title {
        font-size: 1.4rem;
        margin-bottom: 5px;
    }

    .date-text,
    .time-text {
        font-size: 3rem;
    }

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

    .radio-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding-left: 10px;
    }
}