@import url('modal.css');

/* Wedding Styles - Dorothée & David */

:root {
    --primary-color: hsl(140, 30%, 25%);
    /* Deep Forest Green */
    --accent-color: hsl(15, 60%, 50%);
    /* Fall Terracotta */
    --bg-color: hsl(40, 20%, 97%);
    /* Warm cream/ivory */
    --text-color: hsl(140, 20%, 15%);
}

/* CSS Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    width: 100%;
    overflow-x: hidden;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    text-align: center;
    width: 100%;
    min-height: 100vh;
}

header {
    background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url('../images/wedding_header.jpg');
    background-size: cover;
    background-position: center;
    padding: 8rem 1rem;
    /* More height for grandeur */
    margin-bottom: 8rem;
    color: white;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    /* Ensure header is positioning context if needed, though switcher is on body */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.lang-switch {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    z-index: 100;
    color: white;
    font-family: 'Segoe UI', sans-serif;
    font-size: 0.9rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.lang-switch a {
    text-decoration: none;
    color: inherit;
    opacity: 0.7;
    transition: opacity 0.3s;
    margin: 0 0.3rem;
}

.lang-switch a:hover,
.lang-switch a.active {
    opacity: 1;
    font-weight: bold;
}

main,
footer {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 2rem;
    box-sizing: border-box;
}

header h1 {
    font-family: 'Great Vibes', cursive;
    font-weight: 400;
    font-size: 5rem;
    margin-bottom: 0.5rem;
    color: white;
    /* Changed to white for better contrast on image */
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.date {
    font-size: 2rem;
    color: #f0f0f0;
    /* Light variant */
    font-style: italic;
    margin-bottom: 0;
    text-align: center;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

/* Countdown Timer */
#countdown {
    display: flex;
    justify-content: center;
    gap: 2rem;
    position: absolute;
    bottom: -50px;
    width: 100%;
    z-index: 10;
}

.time-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: white;
    color: var(--primary-color);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.time-unit span:first-child {
    font-size: 2.2rem;
    font-weight: bold;
    line-height: 1;
}

.time-unit .label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0;
    color: var(--primary-color);
}

#gallery {
    margin: 4rem 0;
}

.gallery-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 1rem;
    padding-bottom: 1rem;
    margin-top: 2rem;
    -webkit-overflow-scrolling: touch;
}

/* Custom Webkit Scrollbar for Gallery Container */
.gallery-grid::-webkit-scrollbar {
    height: 8px;
}

.gallery-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.gallery-grid::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.gallery-grid::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

.gallery-grid img {
    flex: 0 0 auto;
    scroll-snap-align: center;
    width: 250px;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.gallery-grid img:hover {
    transform: scale(1.02);
    cursor: pointer;
}

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

.lightbox-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 900px;
    max-height: 80vh;
    object-fit: contain;
    animation-name: zoom;
    animation-duration: 0.6s;
}

@keyframes zoom {
    from {
        transform: scale(0)
    }

    to {
        transform: scale(1)
    }
}

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

.close:hover,
.close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* Next & previous buttons */
.prev,
.next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 20px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    -webkit-user-select: none;
}

/* Position the "next button" to the right */
.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

/* Position the "prev button" to the left */
.prev {
    left: 0;
    border-radius: 0 3px 3px 0;
}

/* On hover, add a black background color with a little bit see-through */
.prev:hover,
.next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

address {
    font-style: normal;
    line-height: 1.6;
    margin-top: 1rem;
}



/* Location Section */
.location-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5rem;
    /* Increased gap */
    margin-top: 2rem;
    text-align: left;
}

.location-image {
    position: relative;
    width: 450px;
    height: 450px;
    flex-shrink: 0;
}

.collage-img {
    position: absolute;
    border-radius: 50%;
    border: 5px solid white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    object-fit: cover;
    transition: transform 0.3s ease, z-index 0s;
    -webkit-tap-highlight-color: transparent;
}

.collage-img:hover {
    transform: scale(1.05);
    z-index: 10;
}

/* Top Left */
.img-1 {
    width: 220px;
    height: 220px;
    top: 0;
    left: 20px;
    z-index: 1;
}

/* Middle Right */
.img-2 {
    width: 260px;
    height: 260px;
    top: 85px;
    right: 0;
    z-index: 2;
}

/* Bottom Left */
.img-3 {
    width: 210px;
    height: 210px;
    bottom: 10px;
    left: 60px;
    z-index: 3;
}

.location-text {
    max-width: 500px;
}

.location-text h2 {
    margin-bottom: 0.5rem;
}

.location-text a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: bold;
    border-bottom: 2px solid transparent;
    transition: border-bottom 0.3s, color 0.3s;
}

.location-icon {
    width: 1.2rem;
    height: 1.2rem;
    vertical-align: text-bottom;
    margin-right: 0.2rem;
    fill: currentColor;
}

.location-text a:hover {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

.evening-content,
.parking-content {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.location-text h3,
.parking-content h3,
.evening-content h3 {
    color: var(--accent-color);
    font-family: 'Great Vibes', cursive;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* Login Styles */
#login {
    max-width: 400px;
    margin: 4rem auto;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

#login input {
    width: 100%;
    padding: 0.8rem;
    margin: 1rem 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

#login button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    transition: background-color 0.3s;
    width: 100%;
}

#login button:hover {
    background-color: var(--accent-color);
}

#login button:hover {
    background-color: var(--accent-color);
}

/* Registration Form */
#rsvp {
    max-width: 500px;
    margin: 4rem auto;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    text-align: left;
}

#rsvp h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-weight: bold;
}

#rsvp select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IiMyYzRhMzQiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48cG9seWxpbmUgcG9pbnRzPSI2IDkgMTIgMTUgMTggOSI+PC9wb2x5bGluZT48L3N2Zz4=');
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2rem;
    padding-right: 2.5rem;
    cursor: pointer;
    border-radius: 6px;
    /* Ensure radius is consistent */
}

#rsvp input,
#rsvp select,
#rsvp textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: #fcfcfc;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

#rsvp input:focus,
#rsvp select:focus,
#rsvp textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    background-color: white;
}

#rsvp button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-size: 1.1rem;
    transition: background-color 0.3s;
    width: 100%;
    font-weight: bold;
    margin-top: 1rem;
}

#rsvp button:hover {
    background-color: var(--accent-color);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-size: 1.1rem;
    transition: background-color 0.3s;
    font-weight: bold;
}

.btn-primary:hover {
    background-color: var(--accent-color);
}

.success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
    padding: 1rem;
    margin: 1rem auto;
    border: 1px solid transparent;
    border-radius: 8px;
    font-weight: normal;
    font-size: 1.1rem;
    max-width: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.success::before {
    content: "✓";
    font-weight: bold;
    font-size: 1.3rem;
}

.error {
    color: var(--accent-color);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}


h2 {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    font-family: 'Great Vibes', cursive;
    /* Optional: Use fancy font for headers */
}

p {
    margin-bottom: 1rem;
}

strong {
    color: var(--primary-color);
}

footer {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
    color: white;
    font-size: 0.9rem;
    position: relative;
    z-index: 10;
    margin-top: 4rem;
    padding: 0;
}

.footer-content {
    background-color: var(--primary-color);
    padding: 2rem 2rem 4rem 2rem;
    /* Leaf background picture */
    background-image: linear-gradient(rgba(20, 60, 40, 0.95), rgba(20, 60, 40, 0.85)), url('../images/footer_background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.thank-you {
    font-family: 'Great Vibes', cursive;
    font-size: 4rem;
    color: white;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Footer Button */
.btn-footer {
    background-color: transparent;
    color: white;
    border: 2px solid white;
    padding: 0.8rem 2rem;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-size: 1.1rem;
    transition: all 0.3s;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-footer:hover {
    background-color: white;
    color: var(--primary-color);
}

/* Contact Section */
.contact-grid {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.contact-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    width: 300px;
    text-align: center;
    transition: transform 0.3s;
}

.contact-card:hover {
    transform: translateY(-5px);
}

.contact-img-placeholder {
    width: 120px;
    height: 120px;
    background-color: #f0f0f0;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    overflow: hidden;
    position: relative;
    border: 3px solid var(--primary-color);
}

/* Fallback icon if no image */
.contact-img-placeholder::before {
    content: "User";
    /* Simple fallback text or could use an icon font */
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: #ccc;
    font-weight: bold;
    z-index: 1;
}

.contact-img-placeholder img {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Be sure to hide the "User" text if an image is present, usually by ensuring img sits on top with z-index, or user removes the placeholder class/content manually, 
   but for now, img with object-fit cover will cover it if src is valid. To be safe, we can remove the ::before if we had a class 'has-image'. 
   For this template, let's keep it simple. */


.contact-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.contact-card .role {
    color: var(--accent-color);
    font-style: italic;
    margin-bottom: 1rem;
    font-weight: bold;
}

.contact-card .contact-info a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
}

.contact-card .contact-info a:hover {
    color: var(--accent-color);
}



/* Responsive Styles */
@media (max-width: 768px) {
    header {
        padding: 3rem 1rem;
    }

    header h1 {
        font-size: 3.5rem;
    }

    .date {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    #countdown {
        gap: 0.5rem;
        flex-wrap: wrap;
        bottom: -35px;
    }

    .time-unit {
        width: 70px;
        height: 70px;
    }

    .time-unit span:first-child {
        font-size: 1.5rem;
    }

    .time-unit .label {
        font-size: 0.6rem;
    }

    .location-content {
        flex-direction: column-reverse;
        text-align: center;
        gap: 1.5rem;
    }

    .location-image {
        transform: none;
        /* Reset shift on mobile */
    }

    .location-image img {
        width: 200px;
        height: 200px;
    }
}