﻿:root {
    --text-color: white;
    --accent-color: #B09A7A; /* Soft Gold */
    --accent-color-rgb: 176, 154, 122; /* For rgba() usage */
    --content-overlay-bg: rgba(0, 0, 0, 0.35);
    --button-hover-bg: rgba(var(--accent-color-rgb), 0.2);
    --font-great-vibes: 'Great Vibes', cursive;
    --font-dancing-script: 'Dancing Script', cursive;
    --font-eb-garamond: 'EB Garamond', serif;
}

body, html {
    height: 100vh;
    margin: 0;
    overflow: hidden;
    -webkit-touch-callout: none; /* Disable callout on iOS */
    -webkit-user-select: none; /* Disable selection on iOS */
    -moz-user-select: none; /* Disable selection on Firefox */
    -ms-user-select: none; /* Disable selection on Edge */
    user-select: none; /* Disable selection on other browsers */
}

.container {
    position: absolute;
    display: flex;
    width: 300%; /* This should be pages.length * 100% set by JS if pages vary */
    height: 100%;
    transition: transform 0.5s ease;
    text-align: center;
    z-index: 1;
    will-change: transform; /* Added */
    backface-visibility: hidden; /* Added */
}

.page {
    width: 100vw; /* Each page takes full viewport width */
    height: 100vh;
    display: flex;
    backface-visibility: hidden; /* Added */
    justify-content: center;
    align-items: center;
    z-index: 1;
    color: var(--text-color);
}

.background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('image1.jpg');
    background-size: cover;
    background-position: center;
    filter: brightness(0.8); /* Adjust the brightness value as needed */
}

.content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--text-color);
    padding: 15px 10px; /* Aggressively Reduced padding */
    width: 90%; /* Max width for content area */
    max-width: 650px; /* Cap max width for very wide screens - check if this is an issue */
    /* Removed background-color, border-radius, box-shadow, opacity, transform, animation */
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5); /* Added for readability */
}

/* @keyframes contentFadeIn was removed */

/* Style your content inside .page as needed */

/* Hide scrollbar on mobile */
::-webkit-scrollbar {
    display: none;
}

.transparent-button {
    background-color: transparent;
    border: 2px solid white;
    color: white;
    padding: 13px 20px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
    border-radius: 5px;
    width: 150px;
}

.location-button {
    background-color: rgba(255, 255, 255, 0.3);
    border: 2px solid white;
    color: white;
    padding: 13px 20px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
    border-radius: 5px;
    width: 150px;
}


.slideshow-container {
    display: flex;
    width: 100vw; /* Full viewport width */
    height: 100vh; /* Full viewport height */
    overflow: hidden;
    position: absolute;
    z-index: 0;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-repeat: no-repeat; /* Prevent horizontal repeating */
    background-position: center;
    opacity: 0;
    transition: opacity 0.8s ease, transform 6s ease; /* Smooth transitions */
    transform: scale(1);
    filter: brightness(0.6); /* Adjust the brightness value as needed */
    z-index: 1;
}

.blur-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-repeat: no-repeat; /* Prevent horizontal repeating */
    background-position: center;
    opacity: 0;
    transition: opacity 0.8s ease, transform 6s ease; /* Smooth transitions */
    transform: scale(1);
    filter: brightness(0.5); /* Adjust the brightness value as needed */
    filter: blur(10px);
    z-index: 0;
}

.slide-message {
    position: absolute;
    bottom: 80px;
    width: 100%;
    display: flex;
    justify-content: center;
    color: white;
    opacity: 0.5;
    visibility: hidden;
    animation: glow 1.5s ease-in-out infinite alternate; /* Glowing animation */
    z-index: 1;
}

.active {
    opacity: 1; /* Show active slide */
    transform: scale(1.2); /* Slightly zoom out active slide */
}

@keyframes glow {
    from {
        box-shadow: 0 0 10px 0 transparent; /* Initial glow effect */
        transform: scale(1); /* Initial scale */
        opacity: 0.3;
    }

    to {
        box-shadow: 0 0 20px 5px transparent; /* Stronger glow effect */
        transform: scale(1.1); /* Slightly larger size */
        opacity: 0.6;
    }
}

select.form-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: #ffffff;
    color: #333;
    padding: 10px 40px 10px 15px;
    font-size: 18px;
    font-family: "Times New Roman", serif;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23333" height="18" viewBox="0 0 24 24" width="18" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

    select.form-control:hover {
        border-color: #999;
    }

    select.form-control:focus {
        outline: none;
        border-color: #555;
        box-shadow: 0 0 0 3px rgba(100, 100, 100, 0.2);
    }


.timeline {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 120px;
}

.event {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    position: relative;
}

.header {
    margin-bottom: 10px;
}

.time {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
}

.icon img {
    width: 40px;
    height: 40px;
}

.details h2 {
    margin: 10px 0;
    font-size: 20px;
}

.details p {
    margin: 5px 0;
}

button {
    background: #ffffff20;
    color: white;
    border: none;
    padding: 8px 12px;
    margin-top: 10px;
    border-radius: 5px;
    cursor: pointer;
}

    button:hover {
        background: #ffffff40;
    }

/* --- FONT STYLES --- */
body { /* Apply a base readable font */
    font-family: var(--font-eb-garamond); /* MODIFIED */
    font-size: 18px;
    color: var(--text-color); /* MODIFIED */
    /* Keep existing: height, margin, overflow, -webkit-touch-callout, user-select */
    height: 100vh;
    margin: 0;
    overflow: hidden;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.font-main-script {
    font-family: var(--font-great-vibes);
    font-weight: normal; /* Script fonts usually don't need to be bolded by default */
    line-height: 1.3; /* Adjust line height for script fonts */
}

.font-secondary-script {
    font-family: var(--font-dancing-script);
    font-weight: normal; /* Script fonts usually don't need to be bolded by default */
    line-height: 1.4; /* Adjust line height for script fonts */
}

.font-serif-body {
    font-family: var(--font-eb-garamond);
}

/* Apply to elements identified previously */

/* Page 1 (Start Page) - Old styles removed/superceded by new rules below */
/* .page.start-page .content div { ... } */

/* Page 2 (Elie & Lutchiana) - Old styles removed/superceded by new rules below */
/* .page:nth-child(2) .content b h1 { ... } */
/* .page:nth-child(2) .content h3 { ... } */
/* .page:nth-child(2) .content h2, #timer { ... } */

/* Page 3 (Quote & Full Names) */
.page:nth-child(3) .content h3 { /* Quote */
    font-family: var(--font-dancing-script);
    font-size: 1.5em; /* Aggressively Reduced from 1.8em */
    font-style: italic;
    line-height: 1.4; /* Adjusted */
    color: var(--text-color);
    margin-bottom: 0.3em; /* Reduced */
}
.page:nth-child(3) .content h5 { /* Quote attribution */
    font-family: var(--font-eb-garamond);
    font-style: italic;
    font-size: 1em; /* Reduced from 1.1em */
    opacity: 0.8;
    color: var(--text-color);
    margin-bottom: 0.8em; /* Reduced */
}
.page:nth-child(3) .content .quote-divider { /* New class for optional divider */
    width: 40%; /* Reduced from 50% */
    max-width: 150px; /* Reduced from 180px */
    height: 1px;
    background-color: rgba(var(--accent-color-rgb), 0.5);
    margin: 0 auto 0.8em auto; /* Reduced bottom margin */
}
.page:nth-child(3) .content b h1 { /* Full Names */
    font-family: var(--font-great-vibes);
    font-size: 2.2em; /* Aggressively Reduced from 2.8em */
    line-height: 1.2; /* Added for script font */
    color: var(--accent-color);
    margin-top: 0.3em; /* Reduced */
}

/* Page 4 & 5 (Timeline events) - Old Styles Commented Out */
/*
.timeline {
    width: 100%; 
    max-width: 700px; 
    margin: 0 auto; 
    padding: 15px 0; 
}

.timeline > h2 { 
    font-family: var(--font-dancing-script);
    font-size: 2.5em; 
    color: var(--accent-color);
    margin-bottom: 8px; 
    text-align: center;
}
.timeline > span > h2 { 
    font-family: var(--font-dancing-script);
    font-size: 1.8em; 
    color: var(--text-color);
    margin-bottom: 10px; 
    text-align: center;
}

.timeline > button {
    font-family: var(--font-eb-garamond);
    font-weight: bold;
    font-size: 0.9em; 
    padding: 8px 15px; 
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    background-color: transparent;
    border-radius: 6px; 
    transition: background-color 0.3s, color 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 auto 20px auto; 
    display: block; 
    width: fit-content; 
}
.timeline > button:hover {
    background-color: var(--button-hover-bg);
    color: var(--text-color);
}

.event {
    background-color: rgba(var(--accent-color-rgb), 0.05); 
    border: 1px solid rgba(var(--accent-color-rgb), 0.2); 
    border-radius: 8px;
    padding: 15px; 
    margin-bottom: 15px; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.2); 
    text-align: center; 
}
.event .icon img {
    width: 40px; 
    height: 40px; 
    margin-bottom: 10px; 
}
.event .time {
    font-family: var(--font-eb-garamond);
    font-size: 1.5em; 
    font-weight: bold;
    color: var(--accent-color);
    margin-bottom: 6px; 
}
.event .details b { 
    font-family: var(--font-eb-garamond);
    font-weight: bold;
    font-size: 1.3em; 
    color: var(--text-color);
    display: block;
    margin-bottom: 6px; 
}
.event .details span { 
    font-family: var(--font-eb-garamond);
    font-size: 1em; 
    color: var(--text-color);
    line-height: 1.4; 
}
*/

/* Timeline Styling - Elegant Vertical Flow (Styled List) */

.timeline-container {
    width: 90%;
    max-width: 550px; 
    margin: 15px auto; /* Reduced vertical margin */
    padding: 15px 5px; /* Reduced padding */
    position: relative;
    text-align: center;
     text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5); 
}

.timeline-main-title {
    font-family: var(--font-dancing-script);
    font-size: 2em; /* Aggressively Reduced from 2.6em */
    line-height: 1.3; /* Added */
    color: var(--accent-color);
    margin-bottom: 5px; /* Reduced */
}

.timeline-location {
    font-family: var(--font-dancing-script);
    font-size: 1.4em; /* Aggressively Reduced from 1.7em */
    line-height: 1.3; /* Added */
    color: var(--text-color);
    margin-bottom: 12px; /* Reduced */
}

.timeline-location-button {
    font-family: var(--font-eb-garamond);
    font-size: 0.8em; /* Aggressively Reduced from 0.9em */
    font-weight: bold;
    padding: 6px 12px; /* Aggressively Reduced from 8px 18px */
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    background-color: transparent;
    border-radius: 5px; /* Reduced */
    text-transform: uppercase;
    letter-spacing: 0.5px; /* Reduced */
    margin-bottom: 25px; /* Reduced */
    display: inline-block;
    transition: background-color 0.3s, color 0.3s;
}
.timeline-location-button:hover {
    background-color: var(--button-hover-bg);
    color: var(--text-color);
}

.timeline-spine {
    position: absolute;
    left: 30px; /* Adjusted to align with new padding logic */
    top: 0; /* Will be adjusted if header content varies significantly */
    bottom: 0;
    width: 2px;
    background-color: rgba(var(--accent-color-rgb), 0.3);
    /* Consider adjusting top/bottom if header/footer of container is large */
}

.timeline-event {
    position: relative;
    margin-bottom: 20px; /* Original spec margin */
    text-align: left;
    list-style: none;
    display: flex; /* Use flex to align icon and details */
    align-items: flex-start; /* Align items to the top */
    padding-left: 30px; /* Space for the spine and dot */
}
.timeline-event:last-child {
    margin-bottom: 0;
}

.timeline-event::before { /* Dot on the spine */
    content: '';
    position: absolute;
    /* To center the dot on the 0px line of the padding-left:30px box: */
    left: -4px; /* (0px desired center - (8px dot width / 2) ) */
    top: 10px; /* Adjusted for better vertical alignment with icon/text (was 8px, trying to center with icon) */
               /* Icon is 32px high, text starts a bit lower. 32/2 = 16. If text line height is ~20px, top 10px is fine. */
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--accent-color);
    z-index: 1;
}

.timeline-event .event-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: rgba(var(--accent-color-rgb), 0.1);
    border: 1px solid rgba(var(--accent-color-rgb), 0.25);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 15px; /* Space between icon and text details */
    flex-shrink: 0; /* Prevent icon from shrinking */
    /* The icon itself is now part of the flex flow, no absolute positioning needed here */
    /* The dot (::before) will be visually behind/partially obscured by this icon */
}

.timeline-event .event-icon img {
    display: block; 
    width: 18px;
    height: 18px;
}

.timeline-event .event-details {
    /* No specific styles needed unless further refinement */
}

.timeline-event .event-time {
    font-family: var(--font-eb-garamond);
    font-size: 0.9em; /* Aggressively Reduced from 1.0em */
    font-weight: bold;
    color: var(--accent-color);
    display: block;
    margin-bottom: 1px; /* Reduced */
}

.timeline-event .event-title {
    font-family: var(--font-eb-garamond);
    font-weight: bold;
    font-size: 1.1em; /* Aggressively Reduced from 1.2em */
    line-height: 1.3; /* Added */
    color: var(--text-color);
    display: block;
    margin-bottom: 2px; /* Reduced */
}

.timeline-event .event-description {
    font-family: var(--font-eb-garamond);
    font-size: 0.85em; /* Aggressively Reduced from 0.9em */
    color: rgba(255,255,255,0.8);
    line-height: 1.3; /* Adjusted */
    display: block;
}

/* Page 6 (Adults-only message) */
.page:nth-child(6) .content h2 { /* The main text block */
    font-family: var(--font-eb-garamond);
    font-style: italic;
    font-size: 1.1em; /* Aggressively Reduced from 1.2em */
    line-height: 1.5; /* Adjusted */
    color: var(--text-color);
    padding: 5px 0; /* Reduced */
}

/* Page 7 (Wedding Gift) */
.page:nth-child(7) .content h1:first-of-type { /* "Wedding Gift" heading */
    font-family: var(--font-dancing-script);
    font-size: 2.2em; /* Aggressively Reduced from 2.8em */
    line-height: 1.3; /* Added */
    color: var(--accent-color);
    margin-bottom: 0.3em; /* Adjusted */
}
.page:nth-child(7) .content h3 { /* Informational text */
    font-family: var(--font-eb-garamond);
    font-size: 1em; /* Aggressively Reduced from 1.1em */
    line-height: 1.4; /* Adjusted */
    color: var(--text-color);
    margin-bottom: 0.8em; /* Reduced */
    text-align: center; 
}
.page:nth-child(7) .content h1:last-of-type { /* "Whish Account: ..." */
    font-family: var(--font-eb-garamond);
    font-weight: bold;
    font-size: 1.5em; /* Aggressively Reduced from 1.6em */
    line-height: 1.3; /* Added */
    color: var(--accent-color); 
    margin-top: 0.3em; /* Reduced */
}

/* Page 8 (RSVP Section) - Old styles removed/superceded by new rules below */
/* .page:nth-child(8) .content h1 { ... } */
/* .page:nth-child(8) .content h2 { ... } */
/* .page:nth-child(8) .content h3 { ... } */


/* General content styling adjustment if needed */
/* .content class was already modified above to remove font-family and adjust padding */

/* --- NEW PAGE SPECIFIC STYLES FROM DESIGN ENHANCEMENT --- */

/* Start Page Specifics */
.page.start-page .content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px; /* Aggressively Reduced from 20px */
}

.page.start-page .content div {
    font-family: var(--font-dancing-script);
    font-size: 1.6em; /* Aggressively Reduced from 1.9em */
    line-height: 1.4; /* Adjusted */
    color: var(--text-color);
}

#startButton.transparent-button {
    font-family: var(--font-eb-garamond);
    font-size: 0.9em; /* Aggressively Reduced from 1em */
    font-weight: bold;
    padding: 8px 15px; /* Aggressively Reduced from 10px 25px */
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    background-color: transparent;
    border-radius: 6px; /* Reduced */
    transition: background-color 0.3s, color 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.8px; /* Adjusted */
}

#startButton.transparent-button:hover {
    background-color: var(--button-hover-bg);
    color: var(--text-color);
    border-color: var(--accent-color);
}

/* Main Invitation Page Specifics (Page 2) */
.page:nth-child(2) .content b h1 {
    font-family: var(--font-great-vibes);
    font-size: 3.2em; /* Aggressively Reduced from 3.8em */
    line-height: 1.15; /* Adjusted */
    color: var(--text-color);
    margin-bottom: 0.1em; /* Reduced */
}

.page:nth-child(2) .content h3 {
    font-family: var(--font-dancing-script);
    font-size: 1.8em; /* Aggressively Reduced from 2em */
    line-height: 1.3; /* Added */
    color: var(--accent-color);
    margin-top: 0;
    margin-bottom: 0.4em; /* Reduced */
}

.page:nth-child(2) .content h2,
#timer {
    font-family: var(--font-eb-garamond);
    font-size: 1.4em; /* Aggressively Reduced from 1.5em */
    font-weight: bold;
    color: var(--text-color);
}

/* RSVP Page Specifics (Page 8) */
.page:nth-child(8) .content h1 {
    font-family: var(--font-great-vibes);
    font-size: 3em; /* Aggressively Reduced from 3.5em */
    line-height: 1.1; /* Added */
    color: var(--text-color);
    margin-bottom: 0.1em; /* Reduced */
}

.page:nth-child(8) .content h2 {
    font-family: var(--font-dancing-script);
    font-size: 1.5em; /* Aggressively Reduced from 1.7em */
    line-height: 1.3; /* Adjusted */
    color: var(--accent-color);
    margin-bottom: 0.8em; /* Reduced */
}

.page:nth-child(8) .content h3 {
    font-family: var(--font-eb-garamond);
    font-weight: bold;
    font-size: 1.2em; /* Aggressively Reduced from 1.3em */
    color: var(--text-color);
    margin-bottom: 0.4em; /* Reduced */
}

.page:nth-child(8) .form-control {
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
    font-family: var(--font-eb-garamond);
    font-size: 1em; 
    border: 1px solid var(--accent-color);
    border-radius: 6px; /* Reduced */
    padding: 8px 10px; /* Aggressively Reduced */
    margin-bottom: 8px; /* Added margin */
}

.page:nth-child(8) .location-button {
    font-family: var(--font-eb-garamond);
    font-weight: bold;
    font-size: 0.9em; 
    padding: 8px 12px; /* Aggressively Reduced */
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    background-color: transparent;
    border-radius: 6px; /* Reduced */
    transition: background-color 0.3s, color 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 5px; 
}

.page:nth-child(8) .location-button:hover {
    background-color: var(--button-hover-bg);
    color: var(--text-color);
}

.page:nth-child(8) .location-button[onclick*="true"]:hover {
     background-color: rgba(var(--accent-color-rgb), 0.4);
}
/* --- Flying Leaves Styling & Animations --- */
.flying-leaves-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3;
    overflow: hidden;
}
.leaf {
    position: absolute;
    opacity: 0;
    filter: blur(0.2px);
    animation-name: snowFall;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    will-change: transform;
}

/* Individual snowflakes */
.leaf:nth-child(1) {
    left: 10%;
    width: 14px;
    animation-duration: 18s;
    --drift: 0.8vw;
}

.leaf:nth-child(2) {
    left: 25%;
    width: 20px;
    animation-duration: 22s;
    animation-delay: 3s;
    --drift: -1vw;
}

.leaf:nth-child(3) {
    left: 45%;
    width: 12px;
    animation-duration: 20s;
    animation-delay: 6s;
    --drift: 0.5vw;
}

.leaf:nth-child(4) {
    left: 65%;
    width: 22px;
    animation-duration: 26s;
    animation-delay: 2s;
    --drift: -0.7vw;
}

.leaf:nth-child(5) {
    left: 80%;
    width: 16px;
    animation-duration: 19s;
    animation-delay: 8s;
    --drift: 0.9vw;
}

.leaf:nth-child(6) {
    left: 90%;
    width: 10px;
    animation-duration: 30s;
    animation-delay: 4s;
    --drift: -0.4vw;
}

/* ❄️ Snow animations */
@keyframes snowFall {
    from {
        transform: translate3d(0, -10vh, 0);
        opacity: 0;
    }
    5% {
        opacity: 0.8;
    }
    to {
        transform: translate3d(var(--drift), 110vh, 0);
        opacity: 0;
    }
}
