:root {
    --color-bg:         #F4F2EB;          /* crema de fondo */
    --color-text:       #2B2C28;          /* casi negro */
    --color-light:      #FFFFFF;

    /* Verde boda — color principal */
    --color-green:      #4A6741;
    --color-green-dark: #243322;          /* panel hero, footer */

    /* Dorado — solo detalles pequeños */
    --color-gold:       #A98F6B;

    /* Alias para no reescribir todo el CSS */
    --color-accent:     var(--color-green);

    --font-heading: 'Cormorant Garamond', serif;
    --font-body: 'Montserrat', sans-serif;
    --font-script: 'Alex Brush', cursive;

    --transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; overflow-x: hidden; }
body { background-color: var(--color-bg); color: var(--color-text); font-family: var(--font-body); font-weight: 400; line-height: 1.7; overflow-x: hidden; }
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 600; }
p { margin-bottom: 1.5rem; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 5%; }

.reveal { opacity: 0; transform: translateY(40px); transition: var(--transition); }
.reveal.active { opacity: 1; transform: translateY(0); }
.slide-left { transform: translateX(40px); }
.slide-left.active { transform: translateX(0); }

/* ─── Hero — split layout (foto izquierda, panel oscuro derecha) ─── */
.hero {
    background-color: var(--color-green-dark);
}

.hero-inner {
    height: 100vh;
    min-height: 560px;
    display: grid;
    grid-template-columns: 50% 50%;
    overflow: hidden;
    max-width: 1440px;
    margin: 0 auto;
}

.hero-photo {
    position: relative;
    background-color: var(--color-green-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 2.5rem;
}
.hero-photo img {
    width: auto;
    max-height: 100vh;
    max-width: 100%;
    object-fit: contain;
    display: block;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.hero-panel {
    position: relative;
    background-color: var(--color-green-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 3rem 3rem 1.5rem;
}

.hero-content { text-align: center; width: 100%; }

.hero-subtitle {
    font-size: 0.82rem;
    letter-spacing: 0.4em;
    font-family: var(--font-body);
    text-transform: uppercase;
    margin-bottom: 2rem;
    font-weight: 600;
    color: var(--color-gold);
}

.hero-title {
    font-size: clamp(3.5rem, 6vw, 7rem);
    line-height: 1.05;
    margin-bottom: 2rem;
    font-family: var(--font-script);
    font-weight: 400;
    color: var(--color-light);
}

.hero-date {
    font-size: 0.9rem;
    letter-spacing: 0.3em;
    font-weight: 600;
    text-transform: uppercase;
    font-family: var(--font-body);
    color: #ffffff;
}

.scroll-indicator {
    position: absolute;
    bottom: 1.75rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.35);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
    40% { transform: translateY(-10px) translateX(-50%); }
    60% { transform: translateY(-5px) translateX(-50%); }
}

@media (max-width: 768px) {
    /* Móvil: foto a pantalla completa con texto en overlay */
    .hero-inner {
        display: block;
        position: relative;
        height: 100vh;
        min-height: 560px;
    }

    .hero-photo {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        padding: 0;
        background: none;
    }

    /* Imagen ocupa todo sin encuadre */
    .hero-photo img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center top;
        box-shadow: none;
        max-height: none;
    }

    /* Overlay verde oscuro sobre la foto */
    .hero-photo::after {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(
            to bottom,
            rgba(20, 40, 18, 0.65) 0%,
            rgba(20, 40, 18, 0.4) 72%,
            rgba(20, 40, 18, 0.15) 100%
        );
        z-index: 1;
    }

    /* El panel pasa a ser transparente, ocupa toda la pantalla */
    .hero-panel {
        position: absolute;
        inset: 0;
        background: transparent;
        z-index: 2;
        display: flex;
        align-items: flex-start;
        justify-content: center;
        padding: 4rem 2rem 2rem;
    }

    .hero-title { font-size: clamp(3rem, 13vw, 5.5rem); }
    .hero-subtitle { color: #ffffff; }
    .hero-content { text-align: center; }

    .scroll-indicator {
        color: #ffffff;
        font-size: 2rem;
        opacity: 1;
        bottom: 2.5rem;
    }
}

/* ─── Invitation Section ─── */
.invitation-section { padding: 8rem 0; background-color: var(--color-light); }

.invitation-grid {
    max-width: 680px;
    margin: 0 auto;
}

.invitation-text p.lead {
    font-family: var(--font-heading);
    font-size: 1.9rem;
    line-height: 1.35;
    color: var(--color-accent);
    margin-bottom: 2rem;
    font-style: italic;
}

.invitation-text p { font-size: 1.1rem; color: #3A3A38; }

.invitation-text p.signature {
    margin-top: 3rem;
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-style: italic;
    color: var(--color-accent);
    text-align: center;
}

.invitation-image .image-wrapper {
    position: relative;
    padding-bottom: 110%;
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.12);
}

.invitation-image img {
    position: absolute;
    inset: 0; width: 100%; height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform 3s ease;
}
.invitation-image:hover img { transform: scale(1.03); }

.mobile-only { display: none; }

@media (max-width: 900px) {
    .invitation-section { padding: 4rem 0; }
    .invitation-grid { grid-template-columns: 1fr; gap: 0; }
    .mobile-only { display: block; margin: 2rem 0; }
    .desktop-only { display: none; }
    .invitation-image .image-wrapper { padding-bottom: 75%; }
}

/* ─── Countdown Section ─── */
.countdown-section {
    padding: 7rem 0;
    position: relative;
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    background-image: url('images/lazafra.jpeg');
    text-align: center;
    color: white;
}

.countdown-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(20, 36, 18, 0.87);
}

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

/* Título sobre fondo oscuro — sobreescribe el verde */
.countdown-section .section-title {
    color: var(--color-light);
    margin-bottom: 3rem;
}

.countdown-timer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2.5rem;
    font-family: var(--font-heading);
}

.time-box { display: flex; flex-direction: column; align-items: center; min-width: 80px; }

.time-box span {
    font-size: 4.5rem;
    line-height: 1;
    font-weight: 500;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.time-box small {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-top: 0.5rem;
    opacity: 0.85;
}

.separator { font-size: 3.5rem; opacity: 0.5; margin-top: -1.5rem; font-weight: 300; }

@media (max-width: 600px) {
    .countdown-section { background-attachment: scroll; padding: 4rem 0; }
    .countdown-label { font-size: 1.5rem; margin-bottom: 2rem; }

    /* Grid 2×2: cada unidad ocupa la mitad de pantalla */
    .countdown-timer {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0;
    }
    .separator { display: none; }
    .time-box {
        min-width: 0;
        padding: 1.5rem 0.5rem;
        border: 1px solid rgba(255, 255, 255, 0.08);
    }
    .time-box span { font-size: clamp(2.2rem, 10vw, 3rem); }
    .time-box small { font-size: 0.62rem; letter-spacing: 0.15em; }
}

/* ─── Location Section ─── */
.location-section { padding: 8rem 0; background-color: var(--color-bg); }

.location-header { text-align: center; margin-bottom: 4rem; }

.section-title { font-size: clamp(2.5rem, 5vw, 3.5rem); color: var(--color-accent); margin-bottom: 0.5rem; }

.eyebrow {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--color-gold);
    display: block;
    margin-bottom: 0.75rem;
    font-family: var(--font-body);
    font-weight: 600;
}

.venue-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 3rem;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.07);
}

.venue-card--reverse .venue-image { order: 2; }
.venue-card--reverse .venue-info  { order: 1; }

.venue-image { position: relative; min-height: 380px; overflow: hidden; }

.venue-image img {
    position: absolute;
    inset: 0; width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}
.venue-card:hover .venue-image img { transform: scale(1.04); }

.venue-info {
    padding: 3.5rem 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: var(--color-light);
}

.venue-type {
    font-family: var(--font-body);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--color-gold);
    margin-bottom: 1rem;
    font-weight: 600;
}

.venue-name {
    font-family: var(--font-heading);
    font-size: 1.9rem;
    color: var(--color-text);
    line-height: 1.2;
    margin-bottom: 1.25rem;
    font-weight: 500;
}

.venue-address { font-size: 0.95rem; color: #444; line-height: 1.8; margin-bottom: 2rem; font-weight: 400; }

.btn-location {
    display: inline-block;
    padding: 0.85rem 1.8rem;
    background-color: transparent;
    border: 1px solid var(--color-accent);
    color: var(--color-text);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.75rem;
    font-family: var(--font-body);
    transition: var(--transition);
    align-self: flex-start;
}
.btn-location:hover { background-color: var(--color-accent); color: white; }

@media (max-width: 768px) {
    .venue-card { grid-template-columns: 1fr; }
    .venue-card--reverse .venue-image,
    .venue-card--reverse .venue-info { order: unset; }
    .venue-image { min-height: 260px; }
    .venue-info { padding: 2.5rem 2rem; }
}

/* ─── RSVP Section ─── */
.rsvp-section { padding: 8rem 0; background-color: var(--color-light); }

.form-container {
    max-width: 760px;
    margin: 0 auto;
    background-color: var(--color-bg);
    padding: 4rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.06);
    border-radius: 2px;
}

.form-desc {
    text-align: left;
    margin-bottom: 3rem;
    color: #555;
    font-style: italic;
    font-family: var(--font-heading);
    font-size: 1.3rem;
}

.elegant-form .form-group { margin-bottom: 2.5rem; text-align: left; }

.elegant-form label {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
    color: var(--color-text);
}

.elegant-form .help-text { font-size: 0.85rem; color: #777; margin-bottom: 0.8rem; margin-top: -0.3rem; }

.elegant-form input[type="text"],
.elegant-form textarea {
    width: 100%;
    padding: 0.9rem 0;
    background-color: transparent;
    border: none;
    border-bottom: 1px solid #ccc;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-text);
    transition: var(--transition);
    resize: none;
    outline: none;
}
.elegant-form input[type="text"]:focus,
.elegant-form textarea:focus { border-bottom-color: var(--color-accent); }

.radio-group { display: flex; gap: 2rem; margin-top: 1rem; }
.radio-group.vertical { flex-direction: column; gap: 1rem; }

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-family: var(--font-body) !important;
    font-size: 0.95rem !important;
    color: #3A3A38 !important;
    font-weight: 400 !important;
}

.radio-label input[type="radio"] { position: absolute; opacity: 0; cursor: pointer; }

.radio-custom {
    position: relative;
    display: inline-block;
    min-width: 18px; height: 18px;
    border: 1px solid #bbb;
    border-radius: 50%;
    margin-right: 10px;
    transition: all 0.3s ease;
}
.radio-label input[type="radio"]:checked ~ .radio-custom { border-color: var(--color-accent); }
.radio-custom::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 9px; height: 9px;
    border-radius: 50%;
    background-color: var(--color-accent);
    transition: all 0.3s ease;
}
.radio-label input[type="radio"]:checked ~ .radio-custom::after { transform: translate(-50%, -50%) scale(1); }

.btn-submit {
    display: block;
    width: 100%;
    padding: 1.2rem;
    background-color: var(--color-accent);
    color: white;
    border: none;
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 3rem;
}
.btn-submit:hover { background-color: var(--color-text); }

#form-message { margin-top: 1.2rem; text-align: center; font-size: 0.95rem; font-weight: 500; }
.hidden { display: none; }

@media (max-width: 600px) {
    .form-container { padding: 2.5rem 1.5rem; }
}

/* ─── Gift Section ─── */
.gift-section { padding: 7rem 0; background-color: var(--color-bg); text-align: center; }

.gift-inner { max-width: 680px; margin: 0 auto; }

.gift-text {
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: #444;
    line-height: 1.7;
    margin-bottom: 3rem;
}

.iban-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2.5rem 3rem;
    background-color: var(--color-light);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
    border-top: 2px solid var(--color-accent);
}

.iban-label {
    font-family: var(--font-body);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--color-gold);
    margin-bottom: 0;
    font-weight: 600;
}

.iban-number {
    font-family: var(--font-heading);
    font-size: clamp(1.35rem, 3.5vw, 1.8rem);
    letter-spacing: 0.06em;
    color: var(--color-text);
    margin-bottom: 0;
    word-break: break-all;
}

.btn-copy {
    margin-top: 0.5rem;
    padding: 0.6rem 1.6rem;
    background-color: transparent;
    border: 1px solid var(--color-accent);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    cursor: pointer;
    transition: var(--transition);
}
.btn-copy:hover { background-color: var(--color-accent); color: white; }

.copy-message { margin-top: 1rem; font-size: 0.85rem; color: var(--color-accent); font-weight: 500; letter-spacing: 0.05em; }

/* ─── Collage / Carrusel infinito ─── */
:root {
    --slide-w:   320px;
    --slide-gap: 28px;
}

.collage-section {
    padding: 8rem 0 0;
    background-color: var(--color-light);
    text-align: center;
}

.collage-header {
    margin-bottom: 4rem;
    padding: 0 5%;
}
.collage-header .section-title { line-height: 1.25; }

/* Wrapper a borde a borde con fade lateral */
.carousel {
    width: 100%;
    overflow: hidden;
    padding: 2.5rem 0 3rem;   /* espacio vertical para las rotaciones */
    mask-image: linear-gradient(
        to right,
        transparent 0%,
        black 8%,
        black 92%,
        transparent 100%
    );
    -webkit-mask-image: linear-gradient(
        to right,
        transparent 0%,
        black 8%,
        black 92%,
        transparent 100%
    );
}

/* Pista: 3 fotos originales + 3 clones */
.carousel-track {
    display: flex;
    gap: var(--slide-gap);
    width: max-content;
    animation: marquee 18s linear infinite;
    align-items: center;
}

.carousel:hover .carousel-track {
    animation-play-state: paused;
}

/* Estilo instantánea / polaroid */
.carousel-item {
    flex-shrink: 0;
    width: var(--slide-w);
    background: #fff;
    padding: 10px 10px 42px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.carousel-item img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
}

/* Rotaciones con patrón módulo 3 — funciona con cualquier número de copias */
.carousel-item:nth-child(3n+1) { transform: rotate(-2.8deg); }
.carousel-item:nth-child(3n+2) { transform: rotate(1.6deg); }
.carousel-item:nth-child(3n)   { transform: rotate(-1.1deg); }

.carousel-item:hover {
    transform: rotate(0deg) scale(1.03) !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
}

/* 3 items originales → translateX(-3 × (ancho + gap)) */
@keyframes marquee {
    to {
        transform: translateX(
            calc(-3 * (var(--slide-w) + var(--slide-gap)))
        );
    }
}

@media (max-width: 768px) {
    :root { --slide-w: 220px; }
    .carousel-item { padding: 8px 8px 32px; }
    .carousel-item img { height: 200px; }
    .carousel { mask-image: none; -webkit-mask-image: none; padding: 2rem 0; }
}

/* ─── Footer ─── */
.site-footer {
    padding: 4rem 0;
    text-align: center;
    background-color: var(--color-green-dark);
    color: rgba(255, 255, 255, 0.75);
}

.footer-names {
    font-family: var(--font-script);
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.5rem;
}

.site-footer .small {
    font-family: var(--font-body);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    margin-bottom: 0;
    font-weight: 500;
}
