
/* ========================================
   ESTILOS GENERALES
======================================== */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", Arial, sans-serif;
    color: #20364a;
    background: #f2f8fc;
    line-height: 1.65;
}

/* ========================================
   MENÚ DE NAVEGACIÓN
======================================== */

nav {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 16px 20px;
    margin-bottom: 35px;
    background: linear-gradient(110deg, #075985, #087fbd);
    box-shadow: 0 4px 12px rgba(12, 45, 70, 0.16);
}

nav a {
    display: inline-block;
    padding: 9px 17px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 8px;
    transition: 0.2s ease;
}

nav a:hover {
    color: #075985;
    background: #ffffff;
    transform: translateY(-2px);
}

/* ========================================
   TÍTULOS Y TEXTO
======================================== */

body > h1 {
    width: min(1050px, calc(100% - 36px));
    margin: 35px auto 20px;
    color: #075985;
    font-size: clamp(2.2rem, 5vw, 3.3rem);
    font-weight: 800;
    line-height: 1.15;
    text-align: center;
}

body > h2 {
    width: min(1000px, calc(100% - 36px));
    margin: 28px auto 10px;
    color: #075985;
    font-size: clamp(1.35rem, 3vw, 1.7rem);
    font-weight: 750;
}

body > p {
    width: min(1000px, calc(100% - 36px));
    margin: 0 auto;
    padding: 18px 22px;
    color: #40566a;
    background: #ffffff;
    border: 1px solid #dceaf3;
    border-radius: 12px;
    box-shadow: 0 5px 18px rgba(18, 64, 95, 0.06);
}

/* ========================================
   SECCIÓN DEL CARRUSEL
======================================== */

.seccion-carrusel {
    width: min(1050px, calc(100% - 32px));
    margin: 45px auto;
    padding: 24px;
    background: #ffffff;
    border: 1px solid #e0ebf3;
    border-radius: 18px;
    box-shadow: 0 12px 32px rgba(21, 62, 91, 0.10);
}

.encabezado-carrusel {
    margin-bottom: 20px;
    text-align: center;
}

.encabezado-carrusel .etiqueta {
    display: inline-block;
    margin-bottom: 8px;
    padding: 5px 12px;
    color: #08618e;
    background: #e3f4fc;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.2px;
}

.encabezado-carrusel h2 {
    width: auto;
    margin: 0 0 5px;
    color: #173b55;
    font-size: clamp(1.5rem, 3vw, 2rem);
}

.encabezado-carrusel p {
    margin: 0;
    color: #617487;
}

/* ========================================
   CARRUSEL E IMÁGENES
======================================== */

#miCarrusel {
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    border-radius: 14px;
    background: #10283e;
}

#miCarrusel .carousel-inner {
    position: relative;
    width: 100%;
    overflow: hidden;
}

#miCarrusel .carousel-item {
    position: relative;
    display: none;
    width: 100%;
    height: clamp(260px, 42vw, 440px);
    overflow: hidden;
    background: #10283e;
}

#miCarrusel .carousel-item.active {
    display: block;
}

#miCarrusel .carousel-item img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Sombra para que el texto se lea mejor */

#miCarrusel .carousel-item::after {
    content: "";
    position: absolute;
    inset: 35% 0 0;
    background: linear-gradient(
        to bottom,
        transparent,
        rgba(3, 20, 34, 0.82)
    );
    pointer-events: none;
}

/* ========================================
   TEXTO SOBRE LAS IMÁGENES
======================================== */

#miCarrusel .texto-imagen,
#miCarrusel .capa-imagen {
    position: absolute;
    z-index: 2;
    right: 42px;
    bottom: 42px;
    left: 42px;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

#miCarrusel .texto-imagen small,
#miCarrusel .capa-imagen span {
    display: inline-block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

#miCarrusel .texto-imagen h3,
#miCarrusel .capa-imagen h3 {
    margin: 0 0 5px;
    color: #ffffff;
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 800;
}

#miCarrusel .texto-imagen p,
#miCarrusel .capa-imagen p {
    max-width: 650px;
    margin: 0;
    color: #f4f9fc;
    font-size: clamp(0.9rem, 1.5vw, 1.05rem);
    line-height: 1.45;
}

/* ========================================
   INDICADORES DEL CARRUSEL
======================================== */

#miCarrusel .carousel-indicators {
    position: absolute;
    z-index: 4;
    right: 0;
    bottom: 10px;
    left: 0;
    display: flex;
    justify-content: center;
    gap: 7px;
    margin: 0;
    padding: 0;
}

#miCarrusel .carousel-indicators [data-bs-target] {
    flex: 0 1 26px;
    width: 26px;
    height: 5px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.55);
    opacity: 1;
}

#miCarrusel .carousel-indicators .active {
    background: #ffffff;
}

/* ========================================
   FLECHAS ANTERIOR Y SIGUIENTE
======================================== */

#miCarrusel .carousel-control-prev,
#miCarrusel .carousel-control-next {
    position: absolute;
    z-index: 4;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 10%;
    padding: 0;
    border: 0;
    background: transparent;
    opacity: 0.95;
    cursor: pointer;
}

#miCarrusel .carousel-control-prev {
    left: 0;
}

#miCarrusel .carousel-control-next {
    right: 0;
}

#miCarrusel .carousel-control-prev-icon,
#miCarrusel .carousel-control-next-icon {
    display: inline-block;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: rgba(5, 31, 49, 0.75);
    background-size: 48% 48%;
}

/* ========================================
   TEXTO DEBAJO DEL CARRUSEL
======================================== */

.nota-carrusel {
    margin: 12px 0 0;
    color: #6a7d8e;
    font-size: 13px;
    text-align: center;
}

/* ========================================
   PIE DE PÁGINA
======================================== */

footer {
    margin-top: 45px;
    padding: 20px;
    color: #eaf7ff;
    background: #073b5b;
    font-size: 14px;
    text-align: center;
}

/* ========================================
   DISEÑO PARA CELULARES
======================================== */

@media (max-width: 600px) {

    nav {
        gap: 7px;
        padding: 12px 8px;
        margin-bottom: 25px;
    }

    nav a {
        padding: 8px 10px;
        font-size: 13px;
    }

    body > h1 {
        margin-top: 26px;
    }

    body > p {
        padding: 15px;
    }

    .seccion-carrusel {
        width: calc(100% - 20px);
        margin: 30px auto;
        padding: 13px;
    }

    #miCarrusel .carousel-item {
        height: 280px;
    }

    #miCarrusel .texto-imagen,
    #miCarrusel .capa-imagen {
        right: 20px;
        bottom: 35px;
        left: 20px;
    }

    #miCarrusel .carousel-control-prev,
    #miCarrusel .carousel-control-next {
        width: 13%;
    }

    #miCarrusel .carousel-control-prev-icon,
    #miCarrusel .carousel-control-next-icon {
        width: 32px;
        height: 32px;
    }
}
