/* CSS Variables for Autumn Theme */
:root {
    --primary-orange: #D2691E;
    --muted-orange: #CD853F;
    --autumn-red: #B22222;
    --autumn-gold: #DAA520;
    --warm-brown: #8B4513;
    --cream: #FFF8DC;
    --dark-brown: #654321;
    --light-orange: #FFEFD5;
    --text-dark: #2C1810;
    --text-light: #F5F5DC;
    
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Source Sans Pro', sans-serif;
    
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
}

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

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--cream);
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 248, 220, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-orange);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--primary-orange);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-orange);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--primary-orange);
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    height: 100vh;
    background: linear-gradient(135deg, var(--muted-orange) 0%, var(--autumn-red) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="leaves" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="%23DAA520" opacity="0.3"/></pattern></defs><rect width="100" height="100" fill="url(%23leaves)"/></svg>');
    opacity: 0.1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: var(--text-light);
}

.couple-names {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.wedding-date {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 300;
}

.venue {
    font-size: 1.2rem;
    margin-bottom: 3rem;
    opacity: 0.9;
}

/* Countdown Timer */
.countdown {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.countdown-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    min-width: 100px;
}

.countdown-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    font-family: var(--font-heading);
}

.countdown-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}

/* Section Styles */
section {
    padding: 5rem 0;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-orange);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--autumn-gold);
}

/* Story Section */
.story-section {
    background: var(--light-orange);
}

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

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--muted-orange);
    transform: translateX(-50%);
}

.timeline-item {
    margin-bottom: 3rem;
    position: relative;
    display: flex;
    align-items: center;
}

.timeline-item:nth-child(odd) {
    flex-direction: row;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-date {
    background: var(--primary-orange);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.timeline-content {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    width: 45%;
    margin: 0 2rem;
}

.timeline-content h3 {
    font-family: var(--font-heading);
    color: var(--primary-orange);
    margin-bottom: 1rem;
}

.timeline-photo {
    margin-top: 1.5rem;
    text-align: center;
}

.timeline-photo img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow);
    max-height: 300px;
    object-fit: cover;
}

.timeline-photos {
    margin-top: 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.timeline-photos img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

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

/* Clickable timeline photos */
.timeline-clickable {
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.timeline-clickable:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(210, 105, 30, 0.3);
}

.timeline-photo .timeline-clickable:hover {
    transform: scale(1.02);
}

/* Fix for bad crop images */
.bad-crop-fix {
    object-position: center top !important;
    object-fit: cover !important;
}

/* Alternative crop fixes for different scenarios */
.crop-fix-center {
    object-position: center center !important;
}

.crop-fix-bottom {
    object-position: center bottom !important;
}

.crop-fix-left {
    object-position: left center !important;
}

.crop-fix-right {
    object-position: right center !important;
}

/* Gallery Section */
.gallery-section {
    background: var(--cream);
}

.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 2px solid var(--muted-orange);
    color: var(--muted-orange);
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--muted-orange);
    color: white;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s ease;
    aspect-ratio: 1;
}

.gallery-item:hover {
    transform: scale(1.05);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(210, 105, 30, 0.8);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Details Section */
.details-section {
    background: var(--light-orange);
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.detail-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    text-align: center;
}

.detail-card h3 {
    font-family: var(--font-heading);
    color: var(--primary-orange);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

/* Registry Section */
.registry-section {
    background: var(--cream);
    text-align: center;
}

.registry-intro {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.registry-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.registry-link {
    display: inline-block;
    background: var(--primary-orange);
    color: white;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: 600;
}

.registry-link:hover {
    background: var(--autumn-red);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.registry-note {
    margin-top: 2rem;
    font-style: italic;
    color: var(--warm-brown);
    font-size: 0.9rem;
}

/* Honeymoon story section */
.honeymoon-story {
    background: rgba(255, 248, 220, 0.15);
    border: 2px solid rgba(210, 105, 30, 0.3);
    padding: 2rem;
    border-radius: 15px;
    margin: 2rem 0;
    backdrop-filter: blur(5px);
}

.honeymoon-story h3 {
    font-family: var(--font-heading);
    color: #02529C;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    text-align: center;
}

.honeymoon-story p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    color: #02529C;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.honeymoon-photos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.honeymoon-photos img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.honeymoon-photos img:hover {
    transform: scale(1.05);
}

/* RSVP Section */
.rsvp-section {
    background: var(--muted-orange);
    color: white;
    text-align: center;
}

.rsvp-section .section-title {
    color: white;
}

.rsvp-instructions {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.rsvp-deadline {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Footer */
.footer {
    background: var(--dark-brown);
    color: var(--text-light);
    text-align: center;
    padding: 2rem 0;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.lightbox-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.lightbox-close:hover {
    color: var(--primary-orange);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 30px;
    cursor: pointer;
    user-select: none;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-prev,
.lightbox-next {
    background: none;
    border: none;
    color: white;
    font-size: 30px;
    cursor: pointer;
    padding: 10px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    color: var(--primary-orange);
}

.lightbox-info {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    text-align: center;
    max-width: 80%;
}

.lightbox-caption {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.lightbox-metadata {
    font-size: 0.9rem;
    opacity: 0.9;
    line-height: 1.4;
}

.lightbox-metadata .metadata-item {
    margin: 0.2rem 0;
}

.lightbox-metadata .metadata-label {
    font-weight: 600;
    color: var(--primary-orange);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--cream);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

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

    .countdown {
        gap: 1rem;
    }

    .countdown-item {
        min-width: 80px;
        padding: 1rem;
    }

    .countdown-number {
        font-size: 2rem;
    }

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

    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        flex-direction: column !important;
        align-items: flex-start;
        padding-left: 50px;
    }

    .timeline-date {
        left: 20px;
        transform: none;
    }

    .timeline-content {
        width: 100%;
        margin: 1rem 0 0 0;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
    }

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

    .registry-links {
        flex-direction: column;
        align-items: center;
    }
}
