:root {
    --primary-font: 'Playfair Display', serif;
    --secondary-font: 'Montserrat', sans-serif;
    --script-font: 'Great Vibes', cursive;
    --bg-color: #FFF9EE; /* Creamy background from landing page */
    --section-bg: #FFFFFF;
    --text-color: #2C2C2C; /* Softer black */
    --accent-color: #C5A065; /* Gold */
    --spacing-unit: 2rem;
    --transition: all 0.4s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--secondary-font);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.8; /* More breathing room */
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased; /* Smoother fonts */
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.fade-in-page {
    animation: fadeInPage 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes fadeInPage {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

h1, h2, h3 {
    font-family: var(--primary-font);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 3px; /* More elegant spacing */
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

h1 {
    font-size: 3.5rem;
    font-style: italic; /* Elegant touch */
}

h2 {
    font-size: 2.2rem;
    text-align: center;
    margin-top: 1rem;
    position: relative;
    display: block; /* Changed back to block for easier centering */
    width: fit-content; /* Fit content for underline */
    margin-left: auto; /* Center block */
    margin-right: auto; /* Center block */
    padding-bottom: 10px;
}

/* Gold underline effect for H2 */
h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background-color: var(--accent-color);
}

p {
    margin-bottom: 1.2rem;
    font-weight: 300;
    font-size: 1.05rem;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.bw-image {
    filter: grayscale(100%) contrast(1.1); /* Higher contrast BW */
    transition: var(--transition);
}

.bw-image:hover {
    filter: grayscale(0%); /* Subtle reveal of color on hover */
}

.full-width-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.centered {
    text-align: center;
}

.content-padding {
    padding: 4rem 2rem;
    max-width: 900px;
    margin: 0 auto;
}

/* Landing Page */
#landing-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--bg-color);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.landing-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.landing-image-wrapper {
    position: relative;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100vh; /* Ensure it never exceeds viewport height */
    display: flex;
    justify-content: center;
}

.landing-image {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100vh; /* Scales down if too tall */
    object-fit: contain;
}

/* Desktop constraint */
@media (min-width: 768px) {
    .landing-image, .landing-image-wrapper {
        max-width: 500px; /* Keep it reasonable on desktop */
    }
}

.click-area {
    position: absolute;
    bottom: 6%; /* Moved down from 8% */
    width: 18%;
    height: 12%;
    cursor: pointer;
    z-index: 10;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.click-area:hover {
    background-color: rgba(255, 255, 255, 0.2); /* Subtle highlight on hover */
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

.area-ru { left: 18%; }
.area-rs { left: 41%; }
.area-at { left: 64%; }


/* Hero Section */
.hero-section {
    position: relative;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column; /* Enable column layout */
    align-items: center;
    justify-content: space-between; /* Push content apart */
    text-align: center;
    color: white;
}

#bg-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: -2;
    transform: translateX(-50%) translateY(-50%);
    filter: grayscale(100%) brightness(0.5); /* Darker for better text readability */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.2);
    z-index: -1;
}

.hero-content {
    z-index: 1;
    padding: 20px;
    opacity: 0;
    animation: fadeInUp 1.5s ease-out 0.5s forwards;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-grow: 1; /* Take up available space to center names */
    width: 100%;
}

/* Hero Names - New Layout */
.names-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    line-height: 0.8;
    /* Margin handled by flex spacing now */
}

.hero-name {
    font-family: var(--primary-font);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #ffffff;
    margin: 0;
    font-size: 3.5rem; /* Base size */
    z-index: 2;
}

.hero-and {
    font-family: var(--script-font);
    font-size: 3rem;
    color: #ffffff;
    font-weight: 400;
    z-index: 3;
    margin: -10px 0; /* Overlap */
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    position: relative;
}

/* Hero Date - New Layout */
.hero-date-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #ffffff;
    border-top: 1px solid rgba(255,255,255,0.7);
    /* border-bottom: 1px solid rgba(255,255,255,0.7); Removed bottom border for cleaner look at bottom */
    padding: 20px 0 40px 0; /* More padding at bottom */
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.5), transparent); /* Subtle gradient for readability at bottom */
}

.date-row {
    display: flex;
    align-items: center;
    gap: 15px;
    font-family: var(--primary-font); /* Or serif */
    font-size: 1.2rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.date-part {
    font-weight: 400;
}

.date-separator {
    font-weight: 300;
    font-size: 1rem;
    opacity: 0.7;
}

.hero-time-location p {
    font-family: var(--secondary-font); /* Or script */
    font-size: 1rem; /* Smaller script */
    margin: 0;
    letter-spacing: 0.05em;
    font-weight: 300;
    font-style: italic;
}

/* Countdown Section */
.countdown-section {
    padding: 5rem 1rem;
    background-color: var(--bg-color);
    display: flex;
    justify-content: center;
}

.timer-container {
    display: flex;
    gap: 3rem;
    text-align: center;
}

.time-box {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.time-box span:first-child {
    font-family: var(--primary-font);
    font-size: 3.5rem;
    color: var(--accent-color);
    line-height: 1;
    font-style: italic;
}

.time-box .label {
    font-size: 0.7rem;
    text-transform: uppercase;
    margin-top: 0.5rem;
    letter-spacing: 2px;
    color: #888;
}

/* Save Date */
.save-date-section {
    background-color: var(--section-bg);
}
.save-date-section .image-container {
    height: 60vh;
    overflow: hidden;
}
.save-date-section .image-container img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    transition: transform 3s ease;
}
/* Subtle zoom effect on scroll visible via JS class or hover */
.save-date-section:hover .image-container img {
    transform: scale(1.05);
}

.date-highlight {
    font-family: var(--primary-font);
    font-size: 2rem;
    color: var(--accent-color);
    margin-top: 1.5rem;
    font-style: italic;
}

/* Timeline */
.timeline-section {
    background-color: var(--bg-color);
    position: relative;
}

.timeline-split {
    display: flex;
    flex-direction: column;
}

.timeline-image {
    width: 100%;
    height: 500px;
    position: relative;
}

.timeline-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.timeline-content {
    padding: 4rem 2rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center; /* Center align content by default */
}

.timeline-items {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    max-width: 600px;
    margin: 2rem auto 0;
    position: relative;
    padding-left: 0; /* Reset padding to align with center line design */
}

/* Elegant line */
.timeline-items::before {
    content: '';
    position: absolute;
    left: 50%; /* Center line */
    transform: translateX(-50%);
    top: 10px;
    bottom: 10px;
    width: 1px;
    background: linear-gradient(to bottom, transparent, var(--accent-color), transparent);
    z-index: 0;
}

.timeline-item {
    display: flex;
    flex-direction: row; /* Force row even on mobile for split view */
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    position: relative;
    z-index: 1;
    text-align: center;
}

/* Gold dots */
.timeline-item::before {
    content: '';
    position: absolute;
    left: 50%; /* Center dots */
    transform: translateX(-50%);
    top: 50%; /* Center vertically relative to item */
    margin-top: -4px; /* Adjust for height */
    width: 8px;
    height: 8px;
    background-color: var(--section-bg);
    border: 1px solid var(--accent-color);
    border-radius: 50%;
    transition: background-color 0.3s;
}

.timeline-item:hover::before {
    background-color: var(--accent-color);
}

.timeline-item .time {
    font-family: var(--primary-font);
    font-weight: 400;
    font-style: italic;
    flex: 1;
    text-align: right;
    padding-right: 1.5rem;
    color: var(--accent-color);
    font-size: 1.2rem;
}

.timeline-item .event {
    flex: 1;
    text-align: left;
    padding-left: 1.5rem;
    font-size: 1.1rem;
    letter-spacing: 1px;
}

.sub-text {
    font-size: 0.9rem;
    font-style: italic;
    color: #777;
    display: block;
    margin-top: 0.2rem;
}

/* Text Only Sections (Beograd, Dress Code, Story) */
.info-section, .story-section {
    background-color: var(--section-bg);
}

/* Story Gallery Styles */
.story-gallery {
    width: 100%;
}

.gallery-item {
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.03);
}

.main-story-img {
    width: 100%;
    max-height: 600px; /* Limit height so it doesn't take too much space */
}

.main-story-img img {
    object-position: center 20%; /* Adjust focus if needed */
}

.gallery-row {
    display: flex;
    width: 100%;
}

.gallery-row .gallery-item {
    width: 50%;
    height: 400px; /* Fixed height for uniformity */
}

.text-only-section {
    background-color: var(--bg-color); /* Cream */
    padding: 6rem 2rem;
    position: relative;
}

/* Border effect for Dress Code */
.text-only-section .content-padding {
    border: 1px solid rgba(197, 160, 101, 0.3); /* Light gold border */
    padding: 3rem;
    position: relative;
}
.text-only-section .content-padding::after { /* Double border effect */
    content: '';
    position: absolute;
    top: 5px; left: 5px; right: 5px; bottom: 5px;
    border: 1px solid rgba(197, 160, 101, 0.3);
    pointer-events: none;
}

/* Locations Grid */
.location-section {
    background-color: var(--section-bg);
    padding: 4rem 1rem;
}

.locations-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 900px;
    margin: 3rem auto;
    padding: 0 1rem;
}

.location-card {
    background: var(--bg-color);
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03); /* Soft elegant shadow */
    border-radius: 4px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.location-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.06);
}

.location-card h3 {
    color: var(--accent-color);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.map-link {
    display: inline-block;
    margin-top: 1.5rem;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--accent-color);
    padding-bottom: 2px;
    transition: color 0.3s;
}

.map-link:hover {
    color: var(--accent-color);
}

/* Footer */
.footer-section {
    background-color: var(--section-bg);
    text-align: center;
    padding-bottom: 6rem;
}

.contact-buttons {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
    margin-top: 3rem;
}

.whatsapp-btn {
    display: inline-block;
    background-color: transparent;
    color: var(--text-color);
    padding: 14px 32px;
    border: 1px solid var(--text-color);
    border-radius: 0; /* Sharp corners for elegance */
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 1px;
    min-width: 220px;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.whatsapp-btn:hover {
    background-color: var(--text-color);
    color: white;
    transform: translateY(-2px);
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Desktop Responsive */
@media (min-width: 768px) {
    .timeline-split {
        flex-direction: row;
    }
    
    .timeline-image, .timeline-content {
        width: 50%;
    }
    
    .timeline-image {
        height: auto;
        min-height: 700px;
    }

    .timeline-items {
        margin: 0 auto;
        /* padding-left already 0 */
    }

    .timeline-item {
        /* already centered row */
        gap: 3rem; /* Wider gap on desktop */
    }
    
    .timeline-item .time {
        font-size: 1.5rem;
    }

    .locations-grid {
        flex-direction: row;
    }
    
    .location-card {
        flex: 1;
    }

    .contact-buttons {
        flex-direction: row;
        justify-content: center;
    }
    
    /* Desktop Hero Adjustments */
    .hero-name {
        font-size: 5rem;
    }
    .hero-and {
        font-size: 4rem;
    }

    /* Desktop Gallery Adjustments */
    .main-story-img {
        max-height: 800px; /* Increased height for desktop */
    }
    
    .gallery-row .gallery-item {
        height: 600px; /* Increased height for desktop */
    }

    /* Save Date Section Desktop Adjustments */
    .save-date-section .image-container {
        height: 120vh; /* Even taller on desktop for dramatic effect */
    }
}

/* Mobile adjustments */
@media (max-width: 480px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 1.8rem; }
    
    .timer-container {
        gap: 1.5rem;
    }
    
    .time-box span:first-child {
        font-size: 2rem;
    }

    .timeline-items {
        padding-left: 0;
    }
    
    .timeline-item .time {
        font-size: 1rem;
        padding-right: 1rem;
    }
    
    .timeline-item .event {
        font-size: 1rem;
        padding-left: 1rem;
    }
    
    .gallery-row .gallery-item {
        height: 300px; /* Smaller height on mobile */
    }
    
    .hero-name {
        font-size: 3rem;
    }
    
    .hero-and {
        font-size: 2.5rem;
    }
    
    .date-row {
        font-size: 1rem;
    }
}
