/* CSS Variables - Design System */
:root {
    /* Colors - Navy & Champagne Gold */
    --color-primary: #2C3E50;        /* Deep navy */
    --color-secondary: #34495E;      /* Lighter navy */
    --color-accent: #8B7355;         /* Darker bronze/brown for readability */
    --color-neutral-light: #FAF9F6;  /* Cream white */
    --color-neutral-dark: #333333;   /* Charcoal */
    --color-overlay: rgba(0, 0, 0, 0.4);

    /* Typography */
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Inter', sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* Breakpoints (used in media queries) */
    --bp-mobile: 768px;
    --bp-tablet: 1024px;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--color-neutral-dark);
    background-color: var(--color-neutral-light);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Fade-in white background overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-neutral-light);
    opacity: var(--white-bg-opacity, 0);
    z-index: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-out;
}

/* Removed - background now handled by hero parallax */

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Section Titles */
.section-title {
    font-family: var(--font-serif);
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--spacing-lg);
    color: var(--color-primary);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
    position: relative;
    height: 75vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Fixed background container for parallax */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 120vh;
    background-image: url('images/LOCATION.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    will-change: transform, filter;
    z-index: -1;
    transform: var(--hero-bg-transform, translateY(0));
    filter: var(--hero-bg-filter, blur(0px));
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 120vh;
    background-color: rgb(44, 62, 80);
    opacity: var(--hero-overlay-opacity, 0.4);
    will-change: opacity;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: white;
    animation: fadeInUp 1.5s ease-out;
}

.names {
    font-family: var(--font-serif);
    font-size: 5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    letter-spacing: 2px;
}

.announcement {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: var(--spacing-md);
    letter-spacing: 1px;
}

.wedding-date {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 400;
    color: white;
}

/* ============================================
   WEDDING DETAILS SECTION
   ============================================ */
.details-section {
    padding: var(--spacing-xl) 0;
    background-color: var(--color-neutral-light);
    background-image: url('images/patterns/FLORAL2.avif');
    background-size: 180px 180px;
    background-repeat: repeat;
    position: relative;
    z-index: 2;
}

/* Soft overlay to blend pattern */
.details-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(250, 249, 246, 0.8);
    pointer-events: none;
    z-index: 1;
}

.details-section > .container {
    position: relative;
    z-index: 2;
}

/* Top row: 3 columns */
.details-top-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

/* Bottom row: Left column + Map */
.details-bottom-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--spacing-lg);
    align-items: start;
}

.details-left {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.detail-item h3 {
    font-family: var(--font-serif);
    font-size: 2rem;
    color: var(--color-primary);
    margin-bottom: var(--spacing-sm);
}

.detail-content {
    font-size: 1.25rem;
    font-weight: 400;
    margin-bottom: var(--spacing-xs);
}

.detail-subtitle {
    font-size: 1rem;
    font-style: italic;
    color: #666;
    margin-top: var(--spacing-xs);
}

.details-map iframe {
    width: 100%;
    height: 450px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* ============================================
   OUR STORY TIMELINE SECTION
   ============================================ */
.story-section {
    padding: var(--spacing-xl) 0;
    background-color: var(--color-neutral-light);
    background-image: url('images/patterns/FLORAL2.avif');
    background-size: 180px 180px;
    background-repeat: repeat;
    position: relative;
    z-index: 2;
}

/* Soft overlay to blend pattern */
.story-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(250, 249, 246, 0.8);
    pointer-events: none;
    z-index: 1;
}

.story-section > .container {
    position: relative;
    z-index: 2;
}

.timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

/* Timeline center line (desktop only) */
.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 60px; /* Start after the prelude dot */
    bottom: 80px; /* End before the final dot */
    width: 3px;
    background: linear-gradient(to bottom, var(--color-primary), var(--color-accent));
    transform: translateX(-50%);
}

.timeline-event {
    margin-bottom: var(--spacing-lg);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.timeline-event.visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
    align-items: center;
}

/* Left-aligned events */
.timeline-event.left .timeline-content {
    grid-template-areas: "image text";
}

.timeline-event.left .timeline-image {
    grid-area: image;
}

.timeline-event.left .timeline-text {
    grid-area: text;
    padding-left: var(--spacing-md);
}

/* Right-aligned events */
.timeline-event.right .timeline-content {
    grid-template-areas: "text image";
}

.timeline-event.right .timeline-image {
    grid-area: image;
}

.timeline-event.right .timeline-text {
    grid-area: text;
    padding-right: var(--spacing-md);
    text-align: right;
}

/* Prelude event (baby photos at start) */
.timeline-event.prelude {
    position: relative;
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-lg);
}

/* Decorative dot at top of timeline */
.timeline-event.prelude::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 20px;
    height: 20px;
    background-color: var(--color-primary);
    border-radius: 50%;
    transform: translateX(-50%);
    z-index: 2;
    box-shadow: 0 0 0 4px white, 0 0 0 8px var(--color-primary);
}

.timeline-event.prelude .timeline-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-md);
}

.timeline-event.prelude .timeline-title {
    margin-bottom: 0;
}

.timeline-event.prelude .baby-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    max-width: 900px;
    width: 100%;
}

.timeline-event.prelude .baby-photo {
    text-align: center;
}

.timeline-event.prelude .baby-photo img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    object-position: center top;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    margin-bottom: var(--spacing-md);
}

.timeline-event.prelude .baby-name {
    font-family: var(--font-serif);
    font-size: 2rem;
    color: var(--color-accent);
    font-weight: 600;
}

/* Center-aligned final event */
.timeline-event.center {
    position: relative;
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
}

/* Decorative dot at bottom of timeline */
.timeline-event.center::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    width: 20px;
    height: 20px;
    background-color: var(--color-accent);
    border-radius: 50%;
    transform: translateX(-50%);
    z-index: 2;
    box-shadow: 0 0 0 4px white, 0 0 0 8px var(--color-accent);
}

.timeline-event.center .timeline-content {
    grid-template-columns: 1fr;
    justify-items: center;
}

.timeline-event.center .timeline-text {
    max-width: 600px;
}

.timeline-text.centered {
    text-align: center;
}

.timeline-image {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.timeline-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

/* Specific adjustments for certain timeline images */
.timeline-image img[src*="DATING.png"] {
    height: 500px;
    object-position: center top;
}

.timeline-image img[src*="BIG_BROTHER.jpg"] {
    height: 500px;
    object-position: center 30%;
}

.timeline-image img[src*="MATERNITY.JPG"] {
    height: 500px;
}

.timeline-image:hover img {
    transform: scale(1.05);
}

.timeline-date {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    color: var(--color-accent);
    margin-bottom: var(--spacing-xs);
    font-weight: 600;
}

.timeline-title {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    color: var(--color-primary);
    margin-bottom: var(--spacing-sm);
}

.timeline-text {
    background-color: white;
    padding: var(--spacing-md);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-text:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.timeline-text p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--color-neutral-dark);
}

/* ============================================
   PHOTO CAROUSEL SECTION (Auto-scrolling Strip)
   ============================================ */
.carousel-section {
    position: relative;
    height: 33vh; /* 1/3 of monitor height */
    background-image: url('images/patterns/HEART.avif');
    background-size: 100px 100px;
    background-repeat: repeat;
    overflow: hidden;
    z-index: 2;
    display: flex;
    align-items: center;
    border-top: 3px solid rgba(255, 72, 144, 0.75);
}

.photo-strip-container {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.photo-strip {
    display: flex;
    gap: 15px; /* White border between photos */
    width: fit-content;
    will-change: transform;
}

.photo-strip img {
    height: 25vh; /* Slightly smaller than container for padding effect */
    width: auto; /* Maintain aspect ratio - different widths OK */
    object-fit: cover;
    border: 8px solid white; /* White border around each photo */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
    pointer-events: none; /* Prevent image dragging */
    user-select: none; /* Prevent text selection */
}

@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%); /* Move exactly half (one set of images) */
    }
}

/* Baby photos animations when in timeline */
.timeline-event.prelude .baby-photo {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.timeline-event.prelude .baby-photo:nth-child(2) {
    transform: translateX(50px);
}

.timeline-event.prelude .baby-photo.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
    .section-title {
        font-size: 2.5rem;
    }

    .names {
        font-size: 4rem;
    }

    .announcement {
        font-size: 1.75rem;
    }

    .wedding-date {
        font-size: 2rem;
    }

    .timeline-image img {
        height: 350px;
    }
}

/* Mobile (< 768px) */
@media (max-width: 768px) {
    :root {
        --spacing-lg: 3rem;
        --spacing-xl: 4rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .names {
        font-size: 3rem;
    }

    .announcement {
        font-size: 1.5rem;
    }

    .wedding-date {
        font-size: 1.75rem;
    }

    /* Hero - reduce height on mobile */
    .hero-section {
        height: 70vh;
    }

    .hero-section::before,
    .hero-overlay {
        height: 90vh;
    }

    /* Wedding Details - stack vertically on mobile */
    .details-top-row {
        grid-template-columns: 1fr;
    }

    .details-bottom-row {
        grid-template-columns: 1fr;
    }

    .details-map iframe {
        height: 300px;
    }

    /* Timeline - simplified vertical layout for mobile */
    .timeline::before {
        display: none; /* Hide timeline center line */
    }

    .timeline-content {
        grid-template-columns: 1fr !important;
        grid-template-areas:
            "image"
            "text" !important;
        gap: var(--spacing-md);
    }

    .timeline-event.left .timeline-text,
    .timeline-event.right .timeline-text {
        text-align: left;
    }

    .timeline-image {
        margin-bottom: 0;
    }

    .timeline-image img {
        height: 300px;
    }

    .timeline-title {
        font-size: 1.5rem;
    }

    .timeline-text p {
        font-size: 1rem;
    }

    /* Baby Photos - stack vertically */
    .baby-grid {
        grid-template-columns: 1fr;
    }

    .timeline-event.prelude .baby-grid {
        grid-template-columns: 1fr;
    }

    .timeline-event.prelude .baby-photo img {
        height: 400px;
    }

    /* Hide timeline decorative dots on mobile */
    .timeline-event.prelude::after,
    .timeline-event.center::before {
        display: none;
    }

    /* Remove animations on mobile for baby photos */
    .timeline-event.prelude .baby-photo {
        transform: none;
        opacity: 1;
    }

    /* Photo carousel - half screen on mobile */
    .carousel-section {
        height: 50vh;
    }

    .photo-strip img {
        height: 38vh; /* Slightly smaller for padding */
    }
}

/* Very small mobile (< 480px) */
@media (max-width: 480px) {
    .names {
        font-size: 2.5rem;
    }

    .announcement {
        font-size: 1.25rem;
    }

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

    .section-title {
        font-size: 1.75rem;
    }

    .timeline-event.prelude .baby-photo img {
        height: 350px;
    }
}
