/* ==========================================================================
   VARIABLES DE COLOR Y FUENTES (Tema: Bosque Encantado)
   ========================================================================== */
:root {
    /* F-02: roles de color bien definidos */
    --dusty-rose: #c9807a;           /* titulación — más rico y legible   */
    --golden-deco: #e8b730;          /* decoración únicamente (marco)     */
    --golden-cta:  #f0b74d;          /* botones + interacción             */
    --golden: #c8860a;               /* alias para compatibilidad         */
    --bg: #dacabb;
    /* F-01: texto con ratio WCAG AA sobre --bg */
    --text: #4a5230;
    --text-light: #4a5230;
    --bg-dark: #dacabb;

    --font-titulos: 'Cinzel', serif;
    --font-textos: 'Montserrat', sans-serif;

    /* Marco doble desfasado */
    --marco-color:   #e8b730;        /* dorado del marco          */
    --marco-grosor:  1px;            /* grosor de cada línea      */
    --marco-desfase: 8px;            /* separación entre ambas    */
    --marco-padding: 28px;           /* espacio entre marco y contenido */
    --marco-radio:   2px;            /* redondeo sutil de esquinas */
}

/* ==========================================================================
   RESET Y ESTILOS BASE (Mobile First)
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-textos);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: var(--font-titulos);
    font-weight: 400;
    text-align: center;
}

h3 {
    color: var(--dusty-rose);
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
}

/* ==========================================================================
   SWITCH DE IDIOMA
   ========================================================================== */
.lang-switch-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 1rem 0 0.5rem;
}

.lang-btn {
    background: none;
    border: 1px solid var(--golden-deco);
    color: var(--text);
    font-family: var(--font-titulos);
    font-size: 0.8rem;
    letter-spacing: 2px;
    padding: 0.3rem 0.75rem;
    border-radius: 2px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.lang-btn:hover {
    background: var(--golden-deco);
    color: #fff;
}

.lang-btn.lang-active {
    background: var(--golden-deco);
    color: #fff;
    cursor: default;
}

.lang-divider {
    color: var(--golden-deco);
    font-size: 0.9rem;
    line-height: 1;
}

/* ==========================================================================
   INTRO SCREEN (video de apertura)
   ========================================================================== */
#intro-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #000;
    transition: opacity 0.8s ease;
}

#intro-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

#intro-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

#btn-saltar-intro {
    position: absolute;
    bottom: 2rem;
    right: 1.5rem;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.5);
    font-family: var(--font-textos);
    font-size: 0.8rem;
    letter-spacing: 1px;
    padding: 0.5rem 1.1rem;
    border-radius: 2px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.4s ease, background 0.2s;
    z-index: 10000;
}

#btn-saltar-intro.visible {
    opacity: 1;
}

#btn-saltar-intro:hover {
    background: rgba(0, 0, 0, 0.7);
}

/* ==========================================================================
   HERO SECTION (Portada)
   ========================================================================== */
.hero-section {
    position: relative;
    width: 100%;
    height: 100vh;
    background-image: url('asset/1.webp');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Capa semitransparente: alineamos el contenido al pie */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(218, 202, 187, 0) 40%,
        rgba(218, 202, 187, 0.6) 100%
    );
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end; /* contenido al pie */
    padding-bottom: 2.5rem;
    z-index: 1;
}

.hero-content {
    text-align: center;
    z-index: 1;
}

.hero-content h2 {
    color: rgba(30, 30, 30, 0.75); /* negro sutil */
    font-size: 1.5rem;
    letter-spacing: 3px;
    margin-bottom: 0.5rem;
}

.hero-content h1 {
    color: var(--golden);
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    text-shadow: 1px 1px 6px rgba(0,0,0,0.25);
}

.fecha-destacada {
    font-family: var(--font-titulos);
    color: rgba(30, 30, 30, 0.7); /* negro sutil */
    font-size: 1.1rem;
    letter-spacing: 5px;
}

/* ==========================================================================
   GIF DE SECCIÓN
   ========================================================================== */
.seccion-gif {
    display: block;
    width: 72px;
    height: 72px;
    object-fit: contain;
    margin: 0 auto 0.75rem;
    /* Evita que el navegador recalcule layout en cada frame */
    will-change: auto;
    /* Redondeado sutil opcional */
    border-radius: 4px;
}

/* En cards (detalle-card) el gif queda centrado dentro */
.detalle-card .seccion-gif {
    margin-bottom: 0.6rem;
}

/* ==========================================================================
   MARCO DOBLE DESFASADO (Mobile First)
   ========================================================================== */

/*
  Estructura visual:
  ::before → borde exterior (pegado al borde del contenedor)
  ::after  → borde interior (retraído --marco-desfase px hacia adentro)
  Ambos son inset absolutos que crecen con el contenido.
*/

.marco-contenedor {
    position: relative;

    /* Padding generoso para que el contenido no tape los bordes.
       Mínimo necesario: --marco-desfase + --marco-padding           */
    padding: calc(var(--marco-desfase) + var(--marco-padding))
             calc(var(--marco-desfase) + var(--marco-padding));

    /* Margen exterior para que el marco no toque los bordes del viewport
       en pantallas muy estrechas                                     */
    margin: 1.5rem 1rem;

    /* El contenedor no tiene borde propio — los marcos son pseudo-elementos */
}

/* ---- Borde exterior (::before) ---- */
.marco-contenedor::before {
    content: '';
    position: absolute;
    inset: 0;                           /* cubre todo el contenedor  */
    border: var(--marco-grosor) solid var(--marco-color);
    border-radius: var(--marco-radio);
    pointer-events: none;
}

/* ---- Borde interior desfasado (::after) ---- */
.marco-contenedor::after {
    content: '';
    position: absolute;
    inset: var(--marco-desfase);        /* retrocede --marco-desfase en cada lado */
    border: var(--marco-grosor) solid var(--marco-color);
    border-radius: var(--marco-radio);
    pointer-events: none;
}

/* En pantallas más anchas, aumentamos el margen lateral del contenedor */
@media (min-width: 480px) {
    .marco-contenedor {
        margin: 2rem 1.5rem;
    }
}

@media (min-width: 768px) {
    .marco-contenedor {
        margin: 2.5rem 2.5rem;
    }
}

@media (min-width: 1024px) {
    .marco-contenedor {
        max-width: 960px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* ==========================================================================
   SECCIONES COMUNES
   ========================================================================== */
section {
    padding: 4rem 1.5rem;
    text-align: center;
}

/* ==========================================================================
   RELOJ CUENTA REGRESIVA
   ========================================================================== */
.countdown-section {
    background: linear-gradient(to bottom, var(--bg), #c9b8a8);
}

.reloj-container {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    flex-wrap: nowrap;   /* siempre en una sola línea */
}

.tiempo {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.3);
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    flex: 1 1 0;         /* los 4 bloques reparten el espacio por igual */
    max-width: 80px;
    border: 1px solid rgba(110, 119, 83, 0.25);
}

.tiempo span {
    font-family: var(--font-titulos);
    font-size: 1.4rem;
    color: var(--text);
    font-weight: 700;
}

.tiempo p {
    font-size: 0.65rem;
    color: var(--dusty-rose);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ==========================================================================
   TARJETAS DE DETALLES Y BOTONES
   ========================================================================== */
.detalles-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.detalle-card {
    background: rgba(255, 255, 255, 0.35);
    padding: 2rem;
    border-radius: 15px;
    border-top: 3px solid var(--dusty-rose);
}

.payment-card {
    max-width: 560px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 15px;
    border-top: 3px solid var(--dusty-rose);
}

.payment-card .seccion-gif {
    width: 56px;
    height: 56px;
}

.payment-card h3 {
    margin-bottom: 0.75rem;
}

.payment-amount {
    color: var(--text);
    font-family: var(--font-titulos);
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
}

.payment-details {
    display: grid;
    gap: 0.75rem;
    max-width: 360px;
    margin: 1.5rem auto;
    padding: 1rem 0;
    border-top: 1px solid rgba(232, 183, 48, 0.4);
    border-bottom: 1px solid rgba(232, 183, 48, 0.4);
}

.payment-details div {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.payment-details dt {
    color: var(--dusty-rose);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.payment-details dd {
    overflow-wrap: anywhere;
    font-weight: 600;
}

.payment-note {
    max-width: 420px;
    margin: 0 auto;
}

/* F-07: h4 diferenciado de h3 por tamaño + uppercase */
.detalle-card h4 {
    color: var(--dusty-rose);
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 1rem;
}

.btn-primario {
    display: inline-block;
    background-color: var(--golden);
    color: #4a3f2a;
    padding: 1rem 2rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 1.5rem;
    transition: transform 0.3s ease, opacity 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-family: var(--font-textos);
}

.btn-primario:hover {
    transform: scale(1.05);
    opacity: 0.85;
}

/* F-08: foco visible accesible (solo teclado, no mouse/touch) */
.btn-primario:focus-visible,
.btn-secundario:focus-visible {
    outline: 2px solid var(--golden-cta);
    outline-offset: 3px;
}

.btn-secundario {
    display: inline-block;
    background-color: transparent;
    color: var(--golden);
    padding: 0.8rem 2rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 1rem;
    border: 2px solid var(--golden);
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-secundario:hover {
    background-color: var(--golden);
    color: #4a3f2a;
}

/* ==========================================================================
   FORMULARIOS
   ========================================================================== */
form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

input, select {
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid rgba(110, 119, 83, 0.3);
    background: rgba(255, 255, 255, 0.5);
    color: var(--text);
    font-family: var(--font-textos);
    font-size: 1rem;
}

input::placeholder {
    color: rgba(110, 119, 83, 0.5);
}

input:focus, select:focus {
    outline: none;
    border-color: var(--dusty-rose);
}

label {
    text-align: left;
    font-size: 0.9rem;
    color: var(--dusty-rose);
}

.mensaje-form {
    margin-top: 1rem;
    font-size: 0.9rem;
    min-height: 20px;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer {
    padding: 3rem 1rem;
    text-align: center;
    font-family: var(--font-titulos);
    color: var(--dusty-rose);
    font-size: 1.2rem;
    background: var(--bg);
    border-top: 1px solid rgba(220, 161, 161, 0.3);
}

/* F-03: separador sutil entre secciones dentro del marco */
section + section {
    border-top: 1px solid rgba(232, 183, 48, 0.2);
}

/* ==========================================================================
   MEDIA QUERIES (Desktop)
   ========================================================================== */
@media (min-width: 768px) {
    h3 {
        font-size: 2rem;
    }

    .detalles-section {
        flex-direction: row;
        justify-content: center;
    }
    
    .detalle-card {
        flex: 1;
        max-width: 400px;
    }
    
    .hero-content h1 {
        font-size: 6rem;
    }

    .hero-content h2 {
        font-size: 1.8rem;
    }

    /* F-05: GIFs dentro de cards en desktop */
    .detalle-card .seccion-gif {
        width: 56px;
        height: 56px;
    }
}

/* ==========================================================================
   INFO SECTION
   ========================================================================== */
.info-section {
    background: rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   CARRUSEL DE FOTOS
   ========================================================================== */
.carrusel-section {
    background: #c9b8a8;
    /* Respeta el padding lateral del marco */
    padding: 4rem 0;
    /* Compensa negativamente el padding lateral del marco-contenedor
       para que el fondo del carrusel llegue de borde a borde interno */
    margin-left:  calc(-1 * (var(--marco-desfase) + var(--marco-padding)));
    margin-right: calc(-1 * (var(--marco-desfase) + var(--marco-padding)));
}

/* F-06: decoración del título "Momentos" con líneas CSS, sin guiones en HTML */
.carrusel-section h3 {
    color: rgba(30, 30, 30, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0 1.5rem;
}

.carrusel-section h3::before,
.carrusel-section h3::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(232, 183, 48, 0.45);
}

.carrusel-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0 0.5rem;
}

.carrusel-track-container {
    overflow: hidden;
    width: 100%;
    max-width: 360px;
    border-radius: 12px;
}

.carrusel-track {
    display: flex;
    transition: transform 0.45s ease;
    will-change: transform;
}

.carrusel-slide {
    min-width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: 12px;
}

.carrusel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 12px;
}

.carrusel-btn {
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(110, 119, 83, 0.3);
    color: var(--text);
    font-size: 2rem;
    line-height: 1;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carrusel-btn:hover {
    background: rgba(240, 220, 130, 0.4);
    border-color: var(--golden);
}

.carrusel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 1.2rem;
    flex-wrap: wrap;
    padding: 0 1rem;
}

.carrusel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(110, 119, 83, 0.3);
    cursor: pointer;
    border: none;
    padding: 0;
    transition: background 0.3s ease, transform 0.3s ease;
}

.carrusel-dot.activo {
    background: var(--dusty-rose);
    transform: scale(1.3);
}

@media (min-width: 768px) {
    .carrusel-track-container {
        max-width: 600px;
    }
}

@media (min-width: 1024px) {
    .carrusel-track-container {
        max-width: 800px;
    }

    .carrusel-slide {
        aspect-ratio: 16 / 9;
    }
}
