:root {
    --azul-main: #005599;
    --azul-dark: #003F73;
    --verde-lima: #A3E33B;
    --amarillo-bg: #F7E4A1;
    --gris-bg: #f0f2f5;
    --blanco: #ffffff;
    --texto-oscuro: #333333;
    --naranja: #FFA500;
    --gris-caja: #f4f5f7;
}

@font-face {
    font-family: 'Helios';
    src: url('../fonts/Helios Stencil Regular.otf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--gris-bg);
    color: var(--texto-oscuro);
    font-family: 'Arial', 'Helvetica', sans-serif;
}

/* Títulos e Interacciones usan tu tipografía institucional Helios */
h1, h2, h3, .badge-categoria, .btn-portal, .dropdown-menu li a, .menu-toggle, .schools-title-bar h2, .laboral-title-bar h2 {
    font-family: 'Helios', 'Arial', sans-serif;
}

/*header y menu*/
.page-layout {
    display: grid;
    grid-template-areas:
        "header"
        "main"
        "footer";
    grid-template-rows: auto 1fr auto;
    min-height: 100vh;
}

.app-header {
    grid-area: header;
    background-color: var(--azul-main);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    height: 70px;
    position: relative;
    z-index: 100;
}

.app-header a {
    display: inline-flex;
    align-items: center;
}

.logo-img {
    height: 45px;
    width: auto;
    object-fit: contain;
}

.menu-toggle {
    background-color: var(--verde-lima);
    border: none;
    width: 45px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    padding: 8px;
}

.menu-toggle .bar {
    width: 100%;
    height: 4px;
    background-color: var(--azul-main);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.dropdown-menu {
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background-color: var(--azul-main);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.dropdown-menu.menu-open {
    max-height: 450px;
}

.dropdown-menu ul {
    list-style: none;
    padding: 8px 0;
}

.dropdown-menu li a {
    display: block;
    padding: 12px 20px;
    color: var(--blanco);
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown-menu li a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--verde-lima);
}

/*main*/
.app-main {
    grid-area: main;
}

.intro-banner {
    background-color: var(--amarillo-bg);
    padding: 35px 24px;
    text-align: center;
}

.intro-banner h1 {
    color: var(--azul-main);
    font-size: 24px;
    font-weight: bold;
    line-height: 1.3;
}

.mission-container {
    display: flex;
    flex-direction: row;
    width: 100%;
}

.mission-graphic {
    background-color: var(--verde-lima);
    width: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
}

.graphic-img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.mission-text-box {
    background-color: var(--blanco);
    width: 50%;
    padding: 35px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
}

.mission-text-box h2 {
    color: var(--azul-main);
    font-size: 18px;
    font-weight: bold;
    line-height: 1.3;
}

.mission-text-box p {
    color: var(--azul-dark);
    font-size: 14px;
    font-weight: bold;
    line-height: 1.5;
}

.portal-comunidad {
    background-color: var(--gris-bg);
    padding: 35px 16px;
    width: 100%;
}

.portal-header-bar {
    text-align: center;
    margin-bottom: 25px;
    padding: 0 10px;
}

.portal-header-bar h2 {
    color: var(--azul-main);
    font-size: 22px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.portal-header-bar p {
    color: #555;
    font-size: 14px;
    margin-top: 6px;
    font-weight: bold;
}

.portal-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    width: 100%;
}

.portal-card {
    background-color: var(--blanco);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
}

.card-media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.badge-categoria {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: var(--verde-lima);
    color: var(--azul-main);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.card-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-grow: 1;
}

.card-info h3 {
    color: var(--azul-dark);
    font-size: 18px;
    font-weight: bold;
}

.text-destacado {
    color: var(--naranja);
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.text-detalle {
    color: var(--texto-oscuro);
    font-size: 14px;
    line-height: 1.45;
}

.btn-portal {
    display: block;
    text-align: center;
    text-decoration: none;
    background-color: var(--azul-main);
    color: var(--blanco);
    font-weight: bold;
    font-size: 14px;
    padding: 12px 20px; 
    border-radius: 25px;
    margin-top: auto; 
    transition: background-color 0.2s ease, transform 0.2s ease;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}

.btn-portal:hover {
    background-color: var(--azul-dark);
}

/*listado*/
.section-hero, .hero-img {
    width: 100%;
    display: block;
}

.section-hero {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.hero-img {
    height: auto;
}

.section-description {
    background-color: var(--blanco);
    padding: 20px 16px;
    text-align: center;
    border-bottom: 4px solid var(--verde-lima);
}

.section-description p {
    color: var(--azul-main);
    font-size: 14px;
    font-weight: bold;
    line-height: 1.5;
}

.schools-title-bar, .laboral-title-bar {
    padding: 14px 16px;
    text-align: center;
}

.schools-title-bar {
    background-color: var(--verde-lima);
}

.laboral-title-bar {
    background-color: var(--amarillo-bg);
}

.schools-title-bar h2, .laboral-title-bar h2 {
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 0.5px;
    line-height: 1.3;
}

.schools-title-bar h2 {
    color: var(--texto-oscuro);
}

.laboral-title-bar h2 {
    color: var(--azul-dark);
}

.schools-list-section {
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    width: 100%;
}

.school-card {
    display: flex;
    flex-direction: row;
    gap: 16px;
    align-items: flex-start;
    background-color: var(--blanco);
    padding: 14px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.school-img-box {
    width: 35%;
    flex-shrink: 0;
}

.school-card-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 6px;
}

.school-info-box {
    width: 65%;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.school-info-box h3 {
    font-size: 15px;
    color: var(--azul-main);
    font-weight: bold;
}

.school-info-box p {
    font-size: 14px;
    color: var(--texto-oscuro);
    line-height: 1.4;
}

/* Rediseño de botón interno: área táctil extendida segura */
.btn-visit-page {
    align-self: flex-start;
    background-color: #f7b700; 
    color: var(--blanco);
    text-decoration: none;
    font-size: 13px;
    font-weight: bold;
    padding: 8px 16px;
    border-radius: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-top: 8px;
    display: inline-block;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn-visit-page:hover {
    background-color: var(--azul-dark);
}

/*footer*/
.main-footer {
    grid-area: footer;
    background-color: var(--azul-main);
    padding: 25px 20px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.main-footer p {
    color: var(--verde-lima);
    font-size: 11px;
    line-height: 1.5;
    text-align: center;
    font-weight: bold;
    max-width: 600px;
}

/*listado detallado de cada categoria*/

.detail-hero {
    position: relative;
    width: 100%;
    line-height: 0;
}

.detail-hero-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.detail-hero-title {
    position: absolute;
    top: 15%;
    width: 100%;
    text-align: center;
    color: #A3E33B; 
    font-size: 1.8rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    margin: 0;
    padding: 0 10px;
    box-sizing: border-box;
}

/* Bloque Verde Claro de Información */
.detail-info-block {
    background-color: #A3E33B; 
    padding: 30px 20px;
    text-align: center;
    color: #003F73; 
}

.detail-text-main {
    font-size: 1rem;
    line-height: 1.4;
    margin-bottom: 25px;
    font-weight: 600;
}

.detail-subtitle {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 20px;
}

/* Contenedor de Etiquetas (Pills) */
.tags-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 30px;
}

.tag-pill {
    background-color: #FFFFFF;
    color: #003F73;
    padding: 8px 16px;
    border-radius: 10px; /* Bordes redondeados del diseño */
    font-size: 0.95rem;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.detail-text-callout {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 15px;
}

/* Botón de Acción Amarillo */
.btn-yellow-action {
    display: inline-block;
    background-color: #FFA500; /* Amarillo/Naranja del botón */
    color: #FFFFFF;
    text-decoration: none;
    font-weight: bold;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 1.1rem;
    box-shadow: 0 3px 6px rgba(0,0,0,0.16);
    transition: background 0.2s ease;
}

.btn-yellow-action:hover {
    background-color: #FFA500;
}

/* Banner Separador "Descubrí más colegios" */
.separator-banner {
    background-color: #EED7A1; /* Tono beige/crema */
    padding: 10px 20px;
    text-align: center;
}

.separator-banner h2 {
    color: #333333;
    font-size: 1.1rem;
    font-weight: bold;
    margin: 0;
    letter-spacing: 0.5px;
}

/*Scroll Horizontal*/
.carousel-section {
    padding: 20px 0;
    width: 100%;
    overflow: hidden; /* Evita que cualquier desborde rompa la pantalla */
}

.carousel-container {
    display: flex;
    gap: 15px;
    overflow-x: auto; /* Permite scroll horizontal */
    scroll-snap-type: x mandatory; /* Hace que las tarjetas se "peguen" al deslizar */
    padding: 10px 20px 20px 20px; /* Margen interno para que no se corten las sombras */
    
    /* Oculta la barra de scroll nativa en la mayoría de celulares para que se vea más limpio */
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; 
}

.carousel-container::-webkit-scrollbar {
    display: none;
}

.carousel-card {
    flex: 0 0 45%;
    scroll-snap-align: start;
    box-sizing: border-box;
}

.carousel-img-box {
    width: 100%;
    aspect-ratio: 4 / 3; 
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

.carousel-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-card h3 {
    margin-top: 8px;
    font-size: 0.95rem;
    text-align: left;
}

.carousel-card h3 a {
    color: #005691;
    text-decoration: none;
    font-weight: bold;
}

/*boton ver mas-lista principal*/
.carousel-footer-box {
    text-align: center;
    margin-top: 15px;
    margin-bottom: 10px;
}

.text-center {
    text-align: center;
}

/*PANTALLAS GRANDES (ESCRITORIO / TABLET)*/
@media (min-width: 768px) {

    .menu-toggle {
        display: none;
    }

    .dropdown-menu {
        position: static;
        max-height: none;
        width: auto;
        background-color: transparent;
        box-shadow: none;
        overflow: visible;
    }

    .dropdown-menu ul {
        display: flex;
        flex-direction: row;
        gap: 16px;
        padding: 0;
    }

    .dropdown-menu li a {
        padding: 8px 12px;
        font-size: 14px;
        border-bottom: none;
        border-radius: 4px;
        transition: background-color 0.2s ease;
    }

    .dropdown-menu li a:hover {
        background-color: rgba(255, 255, 255, 0.15);
    }

    .intro-banner {
        padding: 50px 40px;
    }

    .intro-banner h1 {
        font-size: 36px;
    }

    .mission-text-box {
        padding: 50px 40px;
        gap: 20px;
    }

    .mission-text-box h2 {
        font-size: 32px;
    }

    .mission-text-box p {
        font-size: 16px;
    }

    .portal-comunidad {
        max-width: 1100px;
        margin: 0 auto;
        padding: 50px 20px;
    }

    .portal-header-bar h2 {
        font-size: 32px;
    }

    .portal-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .card-info h3 {
        font-size: 22px;
    }

    .section-description {
        padding: 24px 40px;
    }

    .section-description p {
        font-size: 18px;
    }
    
    .schools-title-bar, .laboral-title-bar {
        padding: 16px;
    }

    .schools-title-bar h2, .laboral-title-bar h2 {
        font-size: 24px;
    }

    .schools-list-section {
        max-width: 900px;
        margin: 0 auto;
        padding: 40px 20px;
        gap: 35px;
    }

    .school-card {
        gap: 30px;
        align-items: center;
        padding: 20px;
    }

    .school-img-box {
        width: auto;
        flex: 0 0 25%;
    }

    .school-info-box {
        width: auto;
        flex: 1;
        gap: 8px;
    }

    .school-info-box h3 {
        font-size: 26px;
    }

    .school-info-box p {
        font-size: 15px;
        line-height: 1.4;
    }

    .btn-visit-page {
        font-size: 13px;
        padding: 8px 20px;
    }
}

@media (min-width: 1024px) {
    .portal-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}