/* styler.css — v09 (2025-10-08) - MENÚ HAMBURGUESA FUNCIONAL */
/* =========================
   1) Fuentes (opcional)
   ========================= */
   @font-face {
    font-family: 'Overpass Mono';
    src: url('fonts/OverpassMono-VariableFont_wght.ttf') format('truetype');
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'League Spartan';
    src: url('fonts/LeagueSpartan-VariableFont_wght.ttf') format('truetype');
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
}

/* =========================
   2) Reset básico
   ========================= */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
img { display: block; max-width: 100%; height: auto; }

/* =========================
   3) Variables globales
   ========================= */
:root{
    --blue-900: #1f3864;
    --blue-800: #173a63;
    --pill: #465565;
    --text: #333;
    --bg: #ffffff;
    --white: #fff;
    --header-h: 64px;
    --footer-h: 48px;
    --title-fixed-h: 50px;
    --safe-top: env(safe-area-inset-top);
}

html { 
    scroll-behavior: smooth; 
    scroll-padding-top: calc(var(--header-h) + var(--title-fixed-h) + var(--safe-top)); 
}

body {
    font-family: 'Overpass', 'League Spartan', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
}

/* =========================
   4) Header (barra superior)
   ========================= */
.header-panel {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    width: 100%;
    background: var(--blue-900);
    color: #fff;
    border: none;
    box-shadow: 0 1px 0 rgba(0,0,0,.25);
}
.header-inner {
    width: 100%;
    margin: 0 auto;
    display: flex; 
    align-items: center; 
    justify-content: space-between;
    padding: 10px 12px;
    min-height: var(--header-h);
}
.logo-img-btn { border: 0; background: none; padding: 0; pointer-events: none; }
.logo-img-btn img { height: 46px; width: auto; opacity: .98; }

/* =========================
   5) Menú de navegación - ESCRITORIO
   ========================= */
.nav-menu { 
    display: flex; 
    margin-left: auto; 
}
.nav-menu ul { 
    list-style: none; 
    display: flex; 
    gap: 70px; 
    align-items: center; 
}
.nav-menu li { display: block; }
.nav-menu a {
    display: inline-block; 
    text-decoration: none; 
    color: #fff; 
    font-weight: 600; 
    font-size: 1rem;
    padding: 5px 20px; 
    border-radius: 25px; 
    transition: background .15s ease, opacity .15s ease; 
    white-space: nowrap;
}
.nav-menu a:hover { background: var(--blue-800); }
.nav-menu a.active { background: var(--pill); color: #fff; padding: 5px 30px 2px 30px; }

/* =========================
   6) Botón Hamburguesa
   ========================= */
.hamburger { 
    display: none;
    margin-left: 10px; 
    width: 44px; 
    height: 44px; 
    border-radius: 8px; 
    border: 1px solid rgba(255,255,255,.25); 
    background: transparent; 
    cursor: pointer; 
    position: relative;
}
.hamburger-box { 
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px; 
    height: 18px; 
}
.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after { 
    position: absolute; 
    left: 0; 
    width: 24px; 
    height: 2px; 
    background: #fff; 
    transition: transform .2s ease, opacity .2s ease; 
}
.hamburger-inner { top: 8px; }
.hamburger-inner::before { content: ""; top: -8px; }
.hamburger-inner::after  { content: ""; top: 8px; }
.hamburger.is-active .hamburger-inner { transform: rotate(45deg); top: 8px; }
.hamburger.is-active .hamburger-inner::before { transform: rotate(90deg); top: 0; }
.hamburger.is-active .hamburger-inner::after  { opacity: 0; }

/* =========================
   7) Botón Cerrar Menú
   ========================= */
.close-menu {
    display: none;
    position: absolute; 
    top: 10px; 
    right: 10px;
    font-size: 2.2rem; 
    font-weight: 200; 
    line-height: 1; 
    color: #fff;
    border: none; 
    background: transparent; 
    cursor: pointer; 
    padding: 5px 10px; 
    z-index: 1001;
}

/* =========================
   8) Hero Title Fijo
   ========================= */
.hero-title-fixed{
    position: fixed;
    top: calc(var(--header-h) + var(--safe-top));
    left: 0; right: 0;
    height: var(--title-fixed-h);
    display: flex; 
    align-items: center; 
    justify-content: center;
    background-color: rgba(135, 161, 177, 0.7);
    color: var(--blue-900);
    padding: 10px 20px;
    box-sizing: border-box;
    z-index: 150;
}
.main-title-hero{
    max-width: 66.67%;
    margin: 0 auto;
    font-size: clamp(1rem, 2.5vw, 1.8rem);
    font-weight: 700;
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: clip;
}

.hero-title-movil,
.hero .hero-title-container { 
    display: none !important; 
}

/* =========================
   9) Icons Grid
   ========================= */
.icons-section{
    width: 100%;
    margin: 18px auto 24px;
    padding: 0 12px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
    justify-items: stretch;
}
.icon{
    width: 100%; 
    text-align: center; 
    text-decoration: none; 
    color: #0d1b2a; 
    background: #fff; 
    border-radius: 20px;
    padding: 10px 10px 10px;
    transition: transform .15s ease, box-shadow .15s ease; 
    box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.icon img { width: min(300px, 80%); margin: 0 auto 0.5px; }
.icon p { font-weight: 700; font-size: 1.06rem; line-height: 1.28; color: var(--blue-900); }
.icon:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0,0,0,.12); }

/* =========================
   10) Footer
   ========================= */
.site-footer { 
    background: #fff; 
    border-top: 1px solid #e0e0e0; 
    margin-top: auto; 
}
.footer-container { 
    width: 100%; 
    margin: 0 auto; 
    padding: 12px 16px; 
    text-align: center; 
    height: var(--footer-h); 
    display:flex; 
    align-items:center; 
    justify-content:center; 
}
.derechos { 
    font-size: 13px; 
    color: #666; 
    margin: 0; 
}

/* =========================
   11) MÓVIL / TABLET PEQUEÑA (<=992px) - MENÚ HAMBURGUESA
   ========================= */
@media (max-width: 992px){
    /* Ocultar hero en móvil */
    .hero{ 
        display: none !important; 
        height: 0 !important; 
    }
    
    /* Ajustar padding del body - REDUCIDO */
    .page-recursos-body{ 
        padding-top: calc(var(--header-h) + var(--title-fixed-h) + 10px) !important; 
    }
    
    /* Grid para móvil */
    .icons-section{ 
        grid-template-columns: repeat(2, 1fr); 
        gap: 8px; 
        padding: 10px 5px 20px; 
    }

    /* === MOSTRAR HAMBURGUESA EN MÓVIL === */
    .hamburger { 
        display: inline-block !important;
    }
    
    /* === OCULTAR MENÚ NORMAL EN MÓVIL === */
    .nav-menu { 
        display: none;
    }
    
    /* === MENÚ ABIERTO EN MÓVIL === */
    .nav-menu.is-open{
        display: block !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        padding-top: calc(var(--header-h) + var(--safe-top)) !important;
        background: rgba(10,37,64,.98) !important;
        backdrop-filter: blur(2px);
        z-index: 999 !important;
        margin: 0 !important;
        overflow-y: auto !important;
    }
    
    .nav-menu.is-open ul { 
        flex-direction: column !important;
        gap: 25px !important;
        align-items: center !important;
        justify-content: flex-start !important;
        padding-top: 40px !important;
        height: auto !important;
    }
    
    .nav-menu.is-open a { 
        font-size: 1.2rem !important;
        padding: 12px 20px !important;
        border-radius: 999px !important;
        width: auto !important;
    }
    
    .nav-menu.is-open a.active { 
        padding: 12px 25px !important;
    }
    
    /* === MOSTRAR BOTÓN CERRAR EN MÓVIL === */
    .close-menu { 
        display: block !important;
    }
}

/* =========================
   12) TABLET (993px–1200px)
   ========================= */
@media (min-width: 993px) and (max-width: 1200px){
    .hero{ 
        display: none !important; 
        height: 0 !important; 
    }
    .hero-title-fixed {
        margin-top: 4.5%;
    }    
    .page-recursos-body{ 
        padding-top: calc(var(--header-h) + var(--title-fixed-h) + 10px) !important; 
    }
    .icons-section{ 
        grid-template-columns: repeat(3, 1fr); 
        gap: 12px; 
        padding-left: 16px; 
        padding-right: 16px;
        padding-top: 5%; 
    }
    .header-inner { 
        flex-wrap: wrap; 
        justify-content: center; 
        gap: 10px; 
        padding-top: 10px; 
    }
    .logo-img-btn img { height: 46px; }
    .nav-menu { 
        width: 100%; 
        justify-content: center; 
        margin-left: 0; 
    }
    .nav-menu ul { 
        gap: 5px; 
        flex-wrap: wrap; 
        justify-content: center; 
    }
    .nav-menu a { 
        font-size: 1rem; 
        padding: 8px 24px; 
    }
    .nav-menu a.active { 
        padding: 8px 30px; 
    }
    
    /* OCULTAR HAMBURGUESA Y CERRAR EN TABLET */
    .close-menu, .hamburger { 
        display: none !important; 
    }
}

/* =========================
   13) ESCRITORIO (>=1201px)
   ========================= */
@media (min-width: 1201px){
    .hero-title-fixed .main-title-hero { 
        font-size: clamp(1.2rem, 2.2vw, 2.1rem); 
    }
    .header-inner { 
        justify-content: space-between; 
        flex-wrap: nowrap; 
    }
    .nav-menu { 
        margin-left: auto; 
    }
    .nav-menu ul { 
        gap: 15px; 
    }
    .nav-menu a { 
        padding: 5px 12px; 
    }
    .hero{ 
        display: block; 
    }
    .page-recursos-body .icons-section{
        margin-top: calc(8vh + 24px);
        padding-top: var(--title-fixed-h);
    }
    
    /* OCULTAR HAMBURGUESA Y CERRAR EN ESCRITORIO */
    .close-menu, .hamburger { 
        display: none !important; 
    }
}

@media (min-width: 1201px) and (max-width: 1400px){
    .page-recursos-body .icons-section{
        grid-template-columns: repeat(4, 1fr);
        gap: 12px; 
        padding-left: 16px; 
        padding-right: 16px;
    }
}

@media (min-width: 1600px){
    .page-recursos-body .icons-section{
        grid-template-columns: repeat(5, 1fr);
        gap: 12px; 
        padding-left: 16px; 
        padding-right: 16px;
    }
}

/* =========================
   14) Smartphones muy estrechos (<=480px)
   ========================= */
@media (max-width: 480px){
    .icons-section{ 
        grid-template-columns: 1fr; 
        padding-left: 5px; 
        padding-right: 5px; 
        gap: 5px; 
    }
    .icon{ 
        padding: 18px 5px 10px; 
    }
    .icon img{ 
        width: min(150px, 95%); 
        margin: 0 auto 6px; 
    }
    .main-title-hero {
        max-width: 90%;
    }
    .hero-title-fixed {
        margin-top: 0.5% !important;
    }
    .icons-section {
        padding-top: 0.5% !important;
    }
}

/* =========================
   15) ESTILOS ESPECÍFICOS PARA PÁGINA RECURSOS
   ========================= */
.page-recursos-body .icon-text-lines span{ 
    display: block; 
    white-space: nowrap; 
    letter-spacing: .3px; 
    margin-top: .5px; 
    line-height: 1.1; 
}
.page-recursos-body .icon-text-lines .line-1{
    font-size: 1.2rem; 
    font-weight: 700; 
    font-family: 'League Spartan', sans-serif; 
    font-variant: small-caps; 
    letter-spacing: .3px; 
    color: var(--blue-900);
}
.page-recursos-body .icon-text-lines .line-2{
    font-size: 1.0rem; 
    font-weight: 600;
    font-family: 'Overpass','League Spartan',system-ui,-apple-system, Segoe UI, Roboto, Ubuntu,'Helvetica Neue',Arial,sans-serif;
    font-variant: small-caps; 
    color: var(--blue-800);
}
.page-recursos-body .icon-text-lines .line-3{
    font-size: .85rem; 
    font-family: 'Overpass','League Spartan',system-ui,-apple-system, Segoe UI, Roboto, Ubuntu,'Helvetica Neue',Arial,sans-serif;
    color: var(--text);
}
.page-recursos-body .icons-section .icon p{ 
    padding: 0; 
}

.hero-title-section {
    position: relative;
    left: 0;
    right: 0;
    width: 100%;
    height: var(--title-fixed-h);
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #8dc8e0;
    color: #ffffff;
    padding: 10px 20px;
    box-sizing: border-box;
    z-index: 140;
    margin: 10px 0 20px 0; /* REDUCIDO el margen superior */
}

.main-title-section {
    max-width: 66.67%;
    margin: 0 auto;
    font-size: clamp(1rem, 2.5vw, 1.8rem);
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
    text-align: center;
}

.section-container {
    margin-bottom: 40px;
}

.page-recursos-body .section-container .icons-section {
    margin-top: 0;
    padding-top: 0;
}

/* PADDING GENERAL REDUCIDO PARA TODAS LAS PANTALLAS */
.page-recursos-body {
    padding-top: calc(var(--header-h) + var(--title-fixed-h) + 10px) !important;
}

/* AJUSTE ESPECÍFICO PARA LA PRIMERA SECCIÓN */
.page-recursos-body .servicios-disponibles:first-child {
    margin-top: 0;
    padding-top: 0;
}

/* Cards styles */
.page-recursos-body .servicios-disponibles .icon,
.page-recursos-body .enlaces-interes .icon {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto auto;
    grid-template-areas: 
        "icono titulo"
        "icono subtitulo"
        "desc desc";
    gap: 8px 12px;
    align-items: start;
    justify-items: start;
    text-align: left;
    padding: 15px;
    min-height: 150px;
    border: 2px solid #8dc8e0;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(141, 200, 224, 0.3);
    transition: all 0.3s ease;
}

.page-recursos-body .servicios-disponibles .icon img,
.page-recursos-body .enlaces-interes .icon img {
    grid-area: icono;
    width: 70px;
    height: 70px;
    object-fit: contain;
    margin: 0;
    padding: 0;
    align-self: start;
    justify-self: start;
}

.page-recursos-body .servicios-disponibles .icon .line-1,
.page-recursos-body .enlaces-interes .icon .line-1 {
    grid-area: titulo;
    font-size: 1.15rem;
    margin: 0;
    padding: 0;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    line-height: 1.3;
    align-self: start;
    justify-self: start;
    width: 100%;
}

.page-recursos-body .servicios-disponibles .icon .line-2,
.page-recursos-body .enlaces-interes .icon .line-2 {
    grid-area: subtitulo;
    font-size: 0.95rem;
    color: var(--blue-800);
    line-height: 1.3;
    white-space: normal;
    overflow: visible;
    margin: 0;
    padding: 0;
    align-self: start;
    justify-self: start;
    width: 100%;
}

.page-recursos-body .servicios-disponibles .icon .line-3,
.page-recursos-body .enlaces-interes .icon .line-3 {
    grid-area: desc;
    white-space: normal;
    line-height: 1.4;
    font-size: 0.85rem;
    color: var(--text);
    margin: 0;
    padding: 0;
    align-self: start;
    justify-self: start;
    width: 100%;
}

.page-recursos-body .servicios-disponibles .icon-text-lines,
.page-recursos-body .enlaces-interes .icon-text-lines {
    display: contents;
}

.page-recursos-body .servicios-disponibles .icon p,
.page-recursos-body .enlaces-interes .icon p {
    margin: 0;
    padding: 0;
    display: contents;
}

.page-recursos-body .icons-section {
    align-items: stretch;
}

.page-recursos-body .servicios-disponibles .icon,
.page-recursos-body .enlaces-interes .icon {
    height: 100%;
    display: grid !important;
    align-content: start !important;
    justify-content: start !important;
}

.hero-description {
    width: 80%;
    margin: 10px auto 20px;
    padding: 20px 0;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    box-shadow: 
        0 4px 15px rgba(141, 200, 224, 0.3),
        0 2px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(141, 200, 224, 0.2);
}

.hero-description-content {
    padding: 0 20px;
    text-align: left;
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text);
}

.hero-description-content p {
    margin-bottom: 15px;
}

.hero-description-content p:last-child {
    margin-bottom: 0;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .hero-description {
        width: 85%;
        padding: 15px 0;
        margin: 8px auto 15px;
    }
    .hero-description-content {
        font-size: 1rem;
        padding: 0 15px;
    }
    .hero-description-content p {
        margin-bottom: 12px;
    }
    
    .page-recursos-body .servicios-disponibles .icon,
    .page-recursos-body .enlaces-interes .icon {
        grid-template-columns: 60px 1fr;
        grid-template-rows: auto auto auto;
        gap: 6px 10px;
        padding: 12px;
        min-height: 140px;
    }
    .page-recursos-body .servicios-disponibles .icon img,
    .page-recursos-body .enlaces-interes .icon img {
        width: 60px;
        height: 60px;
    }
    .page-recursos-body .servicios-disponibles .icon .line-1,
    .page-recursos-body .enlaces-interes .icon .line-1 {
        font-size: 1.1rem;
    }
    .page-recursos-body .servicios-disponibles .icon .line-2,
    .page-recursos-body .enlaces-interes .icon .line-2 {
        font-size: 0.9rem;
    }
    .page-recursos-body .servicios-disponibles .icon .line-3,
    .page-recursos-body .enlaces-interes .icon .line-3 {
        font-size: 0.82rem;
    }
}

@media (max-width: 480px) {
    .hero-description {
        width: 90%;
        padding: 12px 0;
        margin: 5px auto 12px;
    }
    .hero-description-content {
        font-size: 0.9rem;
        padding: 0 12px;
    }
    .hero-description-content p {
        margin-bottom: 10px;
    }
    
    .page-recursos-body .servicios-disponibles .icon,
    .page-recursos-body .enlaces-interes .icon {
        grid-template-columns: 50px 1fr;
        grid-template-rows: auto auto auto;
        gap: 4px 8px;
        padding: 10px;
        min-height: 130px;
        width: 100%;
    }
    .page-recursos-body .servicios-disponibles .icon img,
    .page-recursos-body .enlaces-interes .icon img {
        width: 50px;
        height: 50px;
    }
    .page-recursos-body .servicios-disponibles .icon .line-1,
    .page-recursos-body .enlaces-interes .icon .line-1 {
        font-size: 1.05rem;
    }
    .page-recursos-body .servicios-disponibles .icon .line-2,
    .page-recursos-body .enlaces-interes .icon .line-2 {
        font-size: 0.85rem;
    }
    .page-recursos-body .servicios-disponibles .icon .line-3,
    .page-recursos-body .enlaces-interes .icon .line-3 {
        font-size: 0.8rem;
        line-height: 1.3;
    }
}

.page-recursos-body .servicios-disponibles .icons-section,
.page-recursos-body .enlaces-interes .icons-section {
    align-items: stretch;
    justify-items: stretch;
}