/* Basic Reset and Fonts */
body {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    color: #14375c;
    background-color: #e0e9f1; /* Fallback color / base blend color */
    background-repeat: no-repeat;
    /* Remove background-image from body */
    position: relative; /* Needed for pseudo-element positioning */
    min-height: 100vh; /* Ensure body takes full height for background to cover */
    z-index: 1; /* Ensure content is above background pseudo-element */
}

/* Pseudo-element for the transparent background image */
body::before {
    content: '';
    position: fixed; /* Fixed so it covers the whole viewport */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('static/cherry_blossom_ext.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    opacity: 0.3; /* Adjust this value for desired transparency (0.0 to 1.0) */
    z-index: -1; /* Place it behind the actual content */
}


/* Navigation Bar */
nav {
    display: flex;
    justify-content: center;
    padding: 20px;
    background-color: #385a7e;
    border-bottom: 2px solid #aebcce;
    position: relative; /* Ensure it stays above the pseudo-element */
    z-index: 2;
}

nav a {
    text-decoration: none;
    color: #d1d9e6;
    font-weight: 550;
    padding: 10px 20px;
    margin: 0 40px; /* Increased margin for more space */
    transition: color 0.3s ease-in-out;
}

nav a:hover {
    color: #8c9daf;
}

/* Biblical Verse Positioning */
.verse-container {
    width: 90%;
    max-width: 33vw;
    margin: 30px 0 0 55vw;
    text-align: right;
    color: #14375c;
    position: fixed;
    z-index: 2;
    font-size: smaller;
}

#biblical-verse-text {
    margin: 0;
    font-size: 1.5em;
}

#biblical-verse-source {
    margin: 5px 0 0 0;
    font-size: 1em;
    font-weight: 300;
    transform: translateX(10px);
}

/* Main Content Section */
.hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    position: relative;
    z-index: 2;
}

/* Hero Banner with Image and Overlay Text */
.hero-banner {
    position: fixed;
    width: 90%; /* Match width of verse-container */
    max-width: 1200px; /* Match max-width of verse-container */
    margin: 30px auto;
    border-radius: 10px;
    overflow: hidden;
    display: flex; /* Use flex to center the text */
    justify-content: center;
    align-items: center;
    top: 40%; /* Position the top edge 50% down the viewport */
    left: 50%; /* Position the left edge 50% across the viewport */
    transform: translate(-50%, -50%);
}

/* Invitation Image Container within Hero Banner */
.invitation-image-container {
    /* margin-top: -8vh;*/
    min-width: 500px;
    width: 50%; /* Take full width of parent */
    position: relative; /* For absolute positioning of text */
}

/* Blending Image Effect - Ellipse is longer horizontally and shorter vertically */
#invitation-photo {
    width: 100%;
    height: auto;
    display: block;
    /* The first percentage (e.g., 80%) controls the horizontal radius, the second (e.g., 60%) controls the vertical */
    -webkit-mask-image: radial-gradient(ellipse 80% 60%, white 1%, transparent 60%);
    mask-image: radial-gradient(ellipse 80% 60%, white 1%, transparent 60%);
}

/* Container to group both headings */
.countdown-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center; 
    gap: 10px; /* Space between the two lines */
}

/* Shared styling for both text blocks */
.we-are-getting-married {
    /* clamp(MIN, PREFERRED, MAX). Shrinks smoothly on small screens! */
    font-size: clamp(1.2rem, 5vw, 3rem); 
    font-weight: 700;
    color: white; 
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7); 
    margin: 0; 
    text-align: center;
}

/* Counter-specific styling */
#we-are-getting-married-counter {
    font-variant-numeric: tabular-nums; /* Keeps numbers identical widths */
    text-align: center; 
    white-space: nowrap; /* STRICTLY prevents splitting into two lines */
    
    /* 27ch is roughly the width of "100 dní 10 h 05 min a 09 s". 
       Because it's a font-relative unit, it shrinks perfectly when the clamp() shrinks the font! */
    width: 27ch; 
}

/* Text Below the Image (now on two lines) */
.invitation-details {
    width: 70%;
    max-width: 800px;
    margin: 20px auto;
    position: fixed;
    z-index: 2;
    /* margin-top: 55vh; */
    top: 65%; /* Position the top edge 50% down the viewport */
    left: 50%; /* Position the left edge 50% across the viewport */
    transform: translate(-50%, -50%);
}

#wedding-date-time {
    text-align: center; /* Right-aligned */
    font-size: 1.6em;
    font-weight: 300;
}

#wedding-place {
    text-align: center; /* Left-aligned */
    font-size: 1.6em;
    font-weight: 300;
}

.wedding-spatial-detail{
    text-align: center;
    font-size: 1.2em;
    font-weight: 300;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-banner, .invitation-details {
        width: 80vw;
        max-width: none;
        text-align: center;
    }

    #we-are-getting-married {
        font-size: 2.2em; /* Adjust font size for smaller screens */
    }

    #wedding-date-time, #wedding-place {
        text-align: center;
        font-size: 1.4em;
    }
}

@media (max-width: 480px) {
    nav {
        flex-direction: column;
        align-items: center;
    }
    nav a {
        margin: 5px 0;
    }
    #biblical-verse-text {
        font-size: 1em;
    }
    #biblical-verse-source {
        font-size: 0.8em;
    }
    #we-are-getting-married {
        font-size: 1.8em; /* Further adjust for very small screens */
    }
    #wedding-date-time, #wedding-place {
        font-size: 1.2em;
    }
}

@media (max-width: 400px){
    #biblical-verse-lower-text{
        display: none;
    }
    #biblical-verse-lower-source{
       display: none;
    } 
}

/* ==================================== */
/* Newlyweds Page Specific Styles */
/* ==================================== */

/* General Container for Content */
.section-container {
    width: 90%;
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.7); /* Slightly transparent background for readability over the background image */
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 2; /* Keep content above background */
    position: relative;
}

.page-title {
    text-align: center;
    font-size: 2.5em;
    font-weight: 700;
    color: #385a7e;
    margin-top: 20px;
    margin-bottom: 30px;
}

.section-header {
    text-align: center;
    font-size: 1.8em;
    font-weight: 550;
    color: #14375c;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 1px solid #aebcce;
}

/* Newlyweds Profile Cards */
.newlyweds-profiles {
    display: flex;
    justify-content: center;
    gap: 40px; /* Space between the two cards */
    width: 90%;
    max-width: 1200px;
    margin: 40px auto;
    z-index: 2;
    position: relative;
}

.newlywed-card {
    flex: 1;
    max-width: 500px;
    text-align: center;
    padding: 20px;
    background-color: #f7f9fb;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.profile-photo {
    width: 100%;
    max-width: 250px; /* Max size for the image */
    height: auto;
    border-radius: 50%; /* Circular image */
    object-fit: cover;
    margin-bottom: 15px;
    border: 4px solid #385a7e; /* Border matching the nav color */
}

.newlywed-name {
    font-size: 1.8em;
    font-weight: 700;
    color: #385a7e;
    margin-bottom: 10px;
}

.newlywed-bio {
    font-size: 1em;
    line-height: 1.6;
    text-align: left;
    color: #14375c;
}

/* Relationship Timeline */
.timeline {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 0;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background-color: #aebcce;
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}

.timeline-event {
    padding: 5px 20px;
    position: relative;
    width: 50%;
    box-sizing: border-box;
}

.timeline-event.left {
    left: 0;
    text-align: right;
}

.timeline-event.right {
    left: 50%;
    text-align: left;
}

.timeline-event::after {
    content: '';
    position: absolute;
    width: 15px;
    height: 15px;
    background-color: #385a7e;
    border: 2px solid #e0e9f1;
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}

.timeline-event.left::after {
    right: -7.5px;
}

.timeline-event.right::after {
    left: -7.5px;
}

.event-content {
    background-color: #fff;
    padding: 15px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.event-content h3 {
    margin-top: 0;
    font-size: 1.2em;
    color: #385a7e;
}

.event-content p {
    margin-bottom: 0;
    font-size: 0.95em;
}


/* Image Gallery */
/* --- Gallery Styles --- */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 30px;
}

/* NEW: Wrapper that holds both the image and the overlay */
.gallery-item {
    position: relative;
    cursor: pointer;
    border-radius: 6px; /* Moved here to clip the overlay cleanly */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); /* Moved here */
    overflow: hidden; /* Ensures zoomed image and overlay stay inside the rounded corners */
}

.gallery-photo {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease-in-out;
}

/* Hover effect triggers on the wrapper now */
.gallery-item:hover .gallery-photo {
    transform: scale(1.03);
}

/* NEW: Hover Overlay for the short story */
.gallery-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0; /* Covers the whole thumbnail */
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 15px;
    opacity: 0; /* Hidden by default */
    transition: opacity 0.3s ease-in-out;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1; /* Fades in on hover */
}

/* --- Modal (Lightbox) Styles --- */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.modal-content {
    max-width: 90%;
    max-height: 75vh;
    border-radius: 4px;
    object-fit: contain;
    animation: zoomIn 0.3s ease;
}

#modal-caption {
    margin-top: 20px;
    color: #f1f1f1;
    text-align: center;
    max-width: 80%;
    font-size: 1.1rem;
    line-height: 1.5;
    animation: zoomIn 0.3s ease;
}

.close-modal {
    position: absolute;
    top: 20px; right: 30px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 1001;
}

.close-modal:hover {
    color: #bbb;
}

@keyframes zoomIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}


/* --- Responsive adjustments for Newlyweds Page (Unchanged) --- */
@media (max-width: 768px) {
    .newlyweds-profiles {
        flex-direction: column;
        gap: 30px;
    }
    
    .newlywed-card {
        max-width: 100%;
    }

    /* Timeline on smaller screens */
    .timeline::after {
        left: 20px; 
    }

    .timeline-event {
        width: 100%;
        padding-left: 50px; 
        padding-right: 5px;
    }

    .timeline-event.left, .timeline-event.right {
        left: 0;
        text-align: left;
    }

    .timeline-event::after {
        left: 14px; 
    }
    
    .timeline-event.left::after {
        right: auto;
    }
}

/* ==================================== */
/* Schedule Page Specific Styles */
/* ==================================== */

.schedule-intro {
    text-align: center;
    max-width: 800px;
    margin: 10px auto 40px auto;
    font-size: 1.1em;
    color: #14375c;
}

.schedule-section {
    margin-bottom: 60px;
    padding: 30px;
}

.schedule-content {
    display: flex;
    gap: 40px;
    align-items: flex-start; /* Aligns items to the top */
}

.schedule-details {
    flex: 1; /* Takes up space */
    min-width: 300px;
}

.schedule-description {
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 1.05em;
}

.schedule-time, .schedule-location {
    font-size: 1.2em;
    margin-bottom: 15px;
    color: #385a7e;
    font-weight: 500;
}

/* Map Styling */
.map-container {
    flex: 1; /* Takes up the remaining space */
    min-width: 300px;
    border-radius: 8px;
    overflow: hidden; /* Ensures the iframe corners are rounded */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.schedule-separator {
    width: 50%;
    max-width: 600px;
    margin: 50px auto;
    border: 0;
    border-top: 2px dashed #aebcce;
}

/* Responsive adjustments for Schedule Page */
@media (max-width: 900px) {
    .schedule-content {
        flex-direction: column;
        gap: 20px;
    }

    .schedule-details, .map-container {
        width: 100%;
        min-width: auto;
    }
}

/* ==================================== */
/* Registration Form Specific Styles */
/* ==================================== */

.registration-container {
    max-width: 700px;
    padding: 40px;
}

.registration-intro {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.1em;
    color: #14375c;
}

/* Form Structure */
#rsvp-form {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.form-section {
    border: 2px solid #aebcce;
    border-radius: 8px;
    padding: 20px;
    background-color: #fff;
}

.form-section legend {
    font-size: 1.4em;
    font-weight: 700;
    color: #385a7e;
    padding: 0 10px;
    margin-left: -10px; /* Align legend with section border */
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 550;
    margin-bottom: 5px;
    color: #14375c;
}

/* Input Styles */
input[type="text"], 
input[type="number"], 
input[type="email"], 
input[type="tel"], 
textarea {
    width: calc(100% - 20px);
    padding: 10px;
    border: 1px solid #aebcce;
    border-radius: 4px;
    font-size: 1em;
    font-family: 'Montserrat', sans-serif;
    transition: border-color 0.3s;
}

input:focus, textarea:focus {
    border-color: #385a7e;
    outline: none;
}

textarea {
    resize: vertical;
}

/* Checkbox/Attendance Group Styling */
.attendance-prompt, .help-prompt {
    font-weight: 500;
    margin-bottom: 15px;
    color: #385a7e;
}

.form-check-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px 30px;
    align-items: center;
}

.form-check-group input[type="checkbox"] {
    /* Base style for checkbox */
    width: 20px;
    height: 20px;
    margin-right: 5px;
    vertical-align: middle;
    cursor: pointer;
}

.form-check-group label {
    font-weight: 400;
    color: #14375c;
    cursor: pointer;
}

/* Volunteer Grid Styling */
.multiple-choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.help-option-item {
    display: flex;
    align-items: center;
}

/* Submit Button */
.submit-button {
    padding: 15px 30px;
    background-color: #385a7e;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1.2em;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s ease;
    align-self: center;
    width: 100%;
    max-width: 300px;
}

.submit-button:hover {
    background-color: #14375c;
}