:root {
    --color-principal: #7396B6;
    --color-secundario: #234F5D;
    --color-fondo: #6ba6b43d;
    --color-fondo-alternativo: #E8EFF5;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    background: var(--color-fondo);
    color: #333;
}

/* MENÚ */

nav {
    position: sticky;
    top: 0;
    width: 100%;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    z-index: 1000;
}

nav ul {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    margin: 0;
    list-style: none;
}

nav a {
    display: block;
    margin: 0 15px;
    text-decoration: none;
    color: #333;
    font-weight: 600;
}

@media (max-width: 600px) {
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 3px;
        padding: 5px;
    }

    nav ul a {
        margin: 0;
        padding: 8px 7px;
        font-size: 12px;
        white-space: nowrap;
    }
}

@media (max-width: 380px) {
    nav ul {
        gap: 1px;
        padding: 4px 2px;
    }

    nav ul a {
        padding: 7px 5px;
        font-size: 11px;
    }
}

/* CABECERA */

.cabecera {
    width: 100%;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    display: block;
    line-height: 0;
    overflow: hidden;
    background: var(--color-fondo);
}

.imagen-cabecera {
    display: block;
    width: 60%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    object-position: center;
    margin: 0 auto;
}

@media (min-width: 601px) and (max-width: 900px) {
    .imagen-cabecera {
        width: 85%;
    }
}

@media (max-width: 600px) {
    .imagen-cabecera {
        width: 100%;
        max-width: 100%;
        height: auto;
        margin: 0 auto;
        position: static;
        transform: none;
    }
}

/* CONTADOR */

.contador-contenedor {
    text-align: center;
    padding: 20px 15px;
    background: var(--color-fondo);
    line-height: normal;
}

#texto-contador {
    margin: 0 0 10px;
    color: var(--color-secundario);
    font-size: 1.1rem;
    font-weight: 600;
}


#contador {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    margin: 0;
    color: var(--color-secundario);
    font-weight: bold;
}

.contador-dias {
    display: block;
    font-size: clamp(1.3rem, 5vw, 1.8rem);
    line-height: 1.4;
}

.contador-hora {
    display: block;
    font-size: clamp(1.1rem, 4vw, 1.5rem);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.08em;
    line-height: 1.3;
}

@media (max-width: 600px) {
    .contador-dias {
        font-size: 1.4rem;
    }

    .contador-hora {
        font-size: 1.1rem;
    }
}

@media (max-width: 380px) {
    .contador-dias {
        font-size: 1.25rem;
    }

    .contador-hora {
        font-size: 1rem;
    }
}


/* SECCIONES GENERALES */

section {
    width: 100%;
    max-width: 1140px;
    padding: 100px 20px;
    margin: 0 auto;
}

@media (min-width: 601px) and (max-width: 900px) {
    section {
        padding: 65px 20px;
    }
}

@media (max-width: 600px) {
    section {
        padding: 45px 15px;
    }
}

@media (max-width: 380px) {
    section {
        padding: 35px 12px;
    }
}

/* TÍTULOS */

h2 {
    text-align: center;
    margin: 0 0 40px;
    font-size: 2em;
    color: var(--color-secundario);
}

@media (min-width: 601px) and (max-width: 900px) {
    h2 {
        font-size: 1.8em;
        margin-bottom: 30px;
    }
}

@media (max-width: 600px) {
    h2 {
        font-size: 1.6rem;
        margin-bottom: 25px;
    }
}

@media (max-width: 380px) {
    h2 {
        font-size: 1.45rem;
        margin-bottom: 22px;
    }
}

/* TARJETAS GENERALES */

.card {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

@media (max-width: 600px) {
    .card {
        padding: 16px;
        border-radius: 14px;
    }
}

/* CARRUSEL DE FOTOGRAFÍAS */

#galeria {
    max-width: 100%;
    padding: 40px 0;
    margin: 0 auto;
}

.carrusel {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 50px;
}

.carrusel-ventana {
    width: 100%;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.carrusel-pista {
    display: flex;
    transition: transform 0.6s ease;
}

.carrusel-pista img {
    flex: 0 0 100%;
    width: 100%;
    height: 450px;
    object-fit: contain;
    background: var(--color-fondo-alternativo);
    display: block;
}

.carrusel-flecha {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: var(--color-principal);
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.carrusel-flecha:hover {
    background: var(--color-secundario);
}

.carrusel-flecha.anterior {
    left: 3px;
}

.carrusel-flecha.siguiente {
    right: 3px;
}

@media (min-width: 601px) and (max-width: 900px) {
    #galeria {
        padding: 30px 0;
    }

    .carrusel {
        padding: 0 40px;
    }

    .carrusel-pista img {
        height: 360px;
    }
}

@media (max-width: 600px) {
    #galeria {
        padding: 25px 0;
    }

    .carrusel {
        padding: 0 30px;
    }

    .carrusel-ventana {
        border-radius: 10px;
    }

    .carrusel-pista img {
        height: clamp(220px, 65vw, 300px);
    }

    .carrusel-flecha {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }

    .carrusel-flecha.anterior {
        left: 1px;
    }

    .carrusel-flecha.siguiente {
        right: 1px;
    }
}

@media (max-width: 380px) {
    .carrusel {
        padding: 0 26px;
    }

    .carrusel-pista img {
        height: 230px;
    }

    .carrusel-flecha {
        width: 26px;
        height: 26px;
        font-size: 12px;
    }
}

/* EVENTO */

.evento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    text-align: center;
}

.evento-item {
    background: var(--color-fondo-alternativo);
    padding: 20px;
    border-radius: 12px;
}

@media (max-width: 600px) {
    .evento-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .evento-item {
        padding: 14px 8px;
        border-radius: 10px;
        font-size: 0.9rem;
        overflow-wrap: anywhere;
    }
}

@media (max-width: 380px) {
    .evento-grid {
        gap: 8px;
    }

    .evento-item {
        padding: 12px 5px;
        font-size: 0.82rem;
    }
}

/* UBICACIÓN Y MAPA */

.mapa iframe {
    display: block;
    width: 100%;
    height: 400px;
    border-radius: 20px;
    border: 0;
}

@media (max-width: 600px) {
    .mapa iframe {
        height: 280px;
        border-radius: 12px;
    }
}

@media (max-width: 380px) {
    .mapa iframe {
        height: 240px;
    }
}

/* PLANNING */

.timeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

#planning .timeline {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    width: 60%;
    margin: 0px auto;
}

#planning .timeline-item {
    display: block;
    background: var(--color-fondo-alternativo);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    border-top: 3px solid var(--color-principal);
}

#planning .timeline-item strong {
    display: block;
    margin-bottom: 5px;
    color: var(--color-secundario);
}

#planning .timeline-item:hover {
    transform: translateY(-3px);
}

.detalle {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    margin-top: 10px;
    font-size: 0.9em;
}

#planning .timeline-item.activo .detalle {
    max-height: 200px;
}

@media (max-width: 600px) {
    #planning .timeline {
        grid-template-columns: 1fr; /*grid-template-columns: repeat(2, minmax(0, 1fr));*/
        gap: 10px;
        padding: 12px;
        grid-template-columns: 1fr;
    }

    #planning .timeline-item {
        padding: 12px 8px;
        font-size: 0.9rem;
        overflow-wrap: anywhere;
        grid-template-columns: 1fr;
    }

    #planning .timeline-item strong {
        font-size: 1rem;
    }

    .detalle {
        font-size: 0.82rem;
    }

    #planning .timeline-item.activo .detalle {
        max-height: 400px;
    }
}

@media (max-width: 380px) {
    #planning .timeline {
        grid-template-columns: 1fr;
    }

    #planning .timeline-item {
        padding: 10px 6px;
        font-size: 0.82rem;
    }

    #planning .timeline-item strong {
        font-size: 0.9rem;
    }
}

/* AUTOBÚS */

.autobus {
    text-align: center;
}

@media (max-width: 600px) {
    .autobus {
        padding: 14px;
        font-size: 0.95rem;
    }

    .autobus p {
        margin: 10px 0;
    }
}

/* ALOJAMIENTOS: HOTELES, HOSTALES, PENSIONES Y APARTAMENTOS */

#alojamientos > h3 {
    text-align: center;
    margin: 60px 0 30px;
    font-size: 1.5em;
    color: var(--color-secundario);
}

.alojamientos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    align-items: stretch;
}

.alojamiento {
    min-width: 0;
    height: 230px;
    padding: 25px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    text-align: center;
    box-sizing: border-box;
}

.alojamiento h3 {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 52px;
    margin: 0 0 20px;
    text-align: center;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.alojamiento a {
    display: inline-block;
    margin: 0;
    padding: 10px 12px;
    background: var(--color-principal);
    color: white;
    border-radius: 8px;
    text-decoration: none;
}

.alojamiento a:hover {
    background: var(--color-secundario);
}

.estrellas {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    height: 25px;
    margin-top: 30px;
}

.estrellas svg {
    flex-shrink: 0;
}

@media (min-width: 601px) and (max-width: 900px) {
    .alojamientos {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 15px;
    }

    .alojamiento {
        padding: 15px 10px;
    }

    .alojamiento a {
        padding: 8px 7px;
        font-size: 0.9rem;
    }
}

@media (max-width: 600px) {
    #alojamientos > h3 {
        margin: 35px 0 20px;
        font-size: 1.25rem;
    }

    .alojamientos {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        align-items: stretch;
    }

    .alojamiento {
        width: 100%;
        min-width: 0;
        height: auto;
        min-height: 125px;
        padding: 8px 5px;
        border-radius: 10px;
    }

    .alojamiento h3 {
        height: 44px;
        margin: 0 0 5px;
        font-size: 11.5px;
        line-height: 1.15;
        overflow-wrap: anywhere;
    }

    .alojamiento a {
        margin: 2px 0;
        padding: 5px 4px;
        font-size: 10px;
        line-height: 1.2;
        border-radius: 5px;
        max-width: 100%;
    }

    .estrellas {
        height: 16px;
        margin-top: 8px;
        gap: 1px;
    }

    .estrellas svg {
        width: 12px;
        height: 12px;
    }
}

@media (max-width: 380px) {
    .alojamientos {
        gap: 8px;
    }

    .alojamiento {
        min-height: 120px;
        padding: 7px 4px;
    }

    .alojamiento h3 {
        font-size: 10.5px;
    }

    .alojamiento a {
        padding: 5px 3px;
        font-size: 9px;
    }

    .estrellas svg {
        width: 11px;
        height: 11px;
    }
}

/* PIE DE PÁGINA */

footer {
    text-align: center;
    padding: 40px;
    background: var(--color-fondo-alternativo);
}

@media (max-width: 600px) {
    footer {
        padding: 25px 12px;
        font-size: 0.9rem;
    }
}

/* ===== INTRODUCCIÓN DE LA BODA ===== */
#intro-boda {
    position: fixed;
    inset: 0;
    z-index: 99999;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(ellipse at center, #173d50 0%, #102c3b 48%, #091923 100%);
    /*background: radial-gradient(
        ellipse at center,
        #6ba6b4 0%,
        #568f9d 55%,
        #3f7482 100%
    );*/
    color: #fff;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

#intro-boda.intro-salida {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#canvas-fuegos {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.intro-contenido {
    position: relative;
    z-index: 2;
    width: 90%;
    text-align: center;
    animation: intro-aparecer 1.2s ease both;
    pointer-events: none;
}

.intro-pretexto {
    margin: 0 0 22px;
    font-size: 11px;
    letter-spacing: 5px;
    color: #b8dcd9;
}

.intro-contenido h1 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 400;
    font-size: clamp(35px, 7vw, 68px);
    line-height: 1.2;
    color: #fff;
    text-shadow: 0 0 25px #8bdedb40;
}

.intro-contenido h1 span {
    color: #e6c989;
    font-style: italic;
}

.intro-separador {
    margin: 24px 0 16px;
    color: #e6c989;
    font-size: 23px;
}

.intro-mensaje {
    margin: 0 0 14px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(22px, 4vw, 34px);
    font-style: italic;
    color: #d9eeec;
}

.intro-fecha {
    margin: 0;
    font-size: 12px;
    letter-spacing: 5px;
    color: #c9dce4;
}

#saltar-intro {
    position: absolute;
    z-index: 5;
    top: 22px;
    right: 22px;
    color: #d8e8ec;
    text-decoration: none;
    font-size: 11px;
    letter-spacing: 1px;
    opacity: 0.7;
    padding: 8px 10px;
    transition: opacity 0.2s ease;
}

#saltar-intro:hover {
    opacity: 1;
}

@keyframes intro-aparecer {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .intro-pretexto {
        letter-spacing: 3px;
        font-size: 9px;
    }

    .intro-fecha {
        letter-spacing: 3px;
    }

    #saltar-intro {
        top: 12px;
        right: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .intro-contenido {
        animation: none;
    }

    #intro-boda {
        transition-duration: 0.2s;
    }
}


/* Entrada de los novios */
.novios-entrada {
    position: absolute;
    z-index: 3;
    left: 50%;
    bottom: 7vh;
    width: clamp(165px, 25vw, 245px);
    opacity: 0;
    transform: translate(-50%, 260px);
    animation: entrada-novios 4s cubic-bezier(.2,.7,.25,1) 3.5s forwards;
    pointer-events: none;
}

.novios-entrada svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
    filter: drop-shadow(0 5px 12px #183b4930);
}

@keyframes entrada-novios {
    0% {
        opacity: 0;
        transform: translate(-50%, 260px);
    }
    15% {
        opacity: 1;
    }
    75% {
        transform: translate(-50%, -5px);
    }
    85% {
        transform: translate(-50%, 4px);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

@media (max-width: 480px) {
    .novios-entrada {
        width: 180px;
        bottom: 5vh;
    }

    .intro-contenido {
        transform-origin: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .novios-entrada {
        animation-duration: 0.5s;
        animation-delay: 0s;
    }
}

