
/* ========================================
   CONFIGURACIÓN GENERAL
======================================== */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    color: #294256;
    background: linear-gradient(135deg, #edf8ff, #f8fbff, #e4f3fc);
    line-height: 1.7;
}

/* ========================================
   BARRA DE NAVEGACIÓN
======================================== */
nav {
    position: sticky;
    top: 0;
    z-index: 1000;

    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;

    padding: 16px 20px;
    background: linear-gradient(120deg, #073b5b, #075985, #087eaa);
    border-bottom: 3px solid #38bdf8;
    box-shadow: 0 5px 18px rgba(7, 59, 91, 0.18);
}

nav a {
    display: inline-block;
    padding: 10px 19px;

    color: #f0f9ff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;

    font-size: 14px;
    font-weight: 650;
    text-decoration: none;

    transition: all 0.25s ease;
}

nav a:hover {
    color: #075985;
    background: #ffffff;
    border-color: #bae6fd;
    transform: translateY(-3px);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.15);
}

/* ========================================
   CONTENEDOR PRINCIPAL
======================================== */
.contenedor {
    width: min(1120px, calc(100% - 36px));
    margin: 0 auto;
}

/* ========================================
   ENCABEZADO
======================================== */
.encabezado {
    max-width: 850px;
    margin: 55px auto 40px;
    text-align: center;
}

.etiqueta {
    display: inline-block;
    margin-bottom: 12px;
    padding: 6px 15px;

    color: #07618c;
    background: #d8f1ff;
    border: 1px solid #bce6fa;
    border-radius: 30px;

    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.encabezado h1 {
    margin: 0 0 18px;
    color: #075985;
    font-size: clamp(2.3rem, 5vw, 3.5rem);
    line-height: 1.15;
    letter-spacing: -1px;
}

.encabezado p {
    max-width: 780px;
    margin: 0 auto;
    color: #536b7d;
    font-size: 1.05rem;
}

/* ========================================
   SECCIÓN DEL VIDEO
======================================== */
.seccion-video {
    margin-bottom: 60px;
    padding: clamp(18px, 4vw, 35px);

    background: #ffffff;
    border: 1px solid #dcebf5;
    border-radius: 22px;
    box-shadow: 0 12px 35px rgba(25, 76, 108, 0.10);
}

.texto-video {
    margin-bottom: 24px;
    text-align: center;
}

.texto-video h2,
.titulo-seccion h2 {
    margin: 0 0 10px;
    color: #164866;
    font-size: clamp(1.55rem, 3vw, 2rem);
    line-height: 1.3;
}

.texto-video p,
.titulo-seccion p {
    margin: 0;
    color: #657b8c;
}

/* Marco adaptable del reproductor */
.marco-video {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    overflow: hidden;
    aspect-ratio: 16 / 9;

    background: #10283e;
    border: 4px solid #e7f5fc;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(16, 40, 62, 0.17);
}

.marco-video iframe {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.enlace-video {
    margin: 18px 0 0;
    color: #647b8b;
    font-size: 0.94rem;
    text-align: center;
}

/* ========================================
   ENLACES
======================================== */
a {
    color: #0879b4;
    font-weight: 650;
    overflow-wrap: anywhere;
}

a:hover {
    color: #064b73;
}

/* ========================================
   CENTROS DE APOYO
======================================== */
.seccion-centros {
    margin-bottom: 60px;
}

.titulo-seccion {
    margin-bottom: 28px;
    text-align: center;
}

.centros {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    align-items: stretch;
}

/* Tarjetas */
.tarjeta {
    position: relative;
    padding: 28px 23px;

    background: #ffffff;
    border: 1px solid #dcebf5;
    border-top: 5px solid #159bd0;
    border-radius: 17px;

    box-shadow: 0 8px 25px rgba(25, 76, 108, 0.07);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.tarjeta:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 32px rgba(25, 76, 108, 0.14);
}

.numero {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 44px;
    height: 44px;
    margin-bottom: 15px;

    color: #075985;
    background: linear-gradient(135deg, #dff4ff, #c3eaff);
    border: 1px solid #b9e4fa;
    border-radius: 13px;

    font-size: 0.95rem;
    font-weight: 800;
}

.tarjeta h3 {
    margin: 0 0 18px;
    color: #075985;
    font-size: 1.3rem;
    line-height: 1.35;
}

.tarjeta p {
    margin: 0 0 14px;
    color: #506779;
    font-size: 0.94rem;
    overflow-wrap: anywhere;
}

.tarjeta p:last-child {
    margin-bottom: 0;
}

.tarjeta strong {
    color: #24445a;
}

/* Enlaces dentro de las tarjetas */
.tarjeta a {
    color: #0879b4;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.tarjeta a:hover {
    color: #064b73;
    text-decoration: underline;
}

/* ========================================
   PIE DE PÁGINA
======================================== */
footer {
    padding: 26px 20px;
    color: #eaf7ff;
    background: linear-gradient(120deg, #073b5b, #075985);
    border-top: 4px solid #38bdf8;
    text-align: center;
}

footer p {
    margin: 0;
    font-size: 0.96rem;
}

/* ========================================
   TABLET
======================================== */
@media (max-width: 900px) {
    .centros {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tarjeta:last-child {
        grid-column: 1 / -1;
    }
}

/* ========================================
   CELULARES
======================================== */
@media (max-width: 600px) {
    nav {
        position: relative;
        gap: 7px;
        padding: 12px 9px;
    }

    nav a {
        flex: 1 1 135px;
        padding: 10px 9px;
        font-size: 13px;
        text-align: center;
    }

    .contenedor {
        width: calc(100% - 24px);
    }

    .encabezado {
        margin: 35px auto 28px;
    }

    .encabezado p {
        font-size: 0.97rem;
    }

    .seccion-video {
        margin-bottom: 40px;
        padding: 15px;
        border-radius: 16px;
    }

    .marco-video {
        border-width: 2px;
        border-radius: 11px;
    }

    .centros {
        grid-template-columns: 1fr;
        gap: 17px;
    }

    .tarjeta:last-child {
        grid-column: auto;
    }

    .tarjeta {
        padding: 23px 19px;
    }
}

/* Respetar la preferencia de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
    }
}
