/* styleop.css – v45 (2025-09-12)
   CAMBIOS v45:
   - Desktop (>=1201px): .hero-title-container ahora es absolutamente posicionada dentro de .hero
     y queda pegada al borde superior del hero (justo bajo el header sticky).
   - Se mantiene el comportamiento existente en tablets y móviles con .hero-title-movil.
*/

/* =========================
   1) Fuentes locales (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 y estilos generales
   ========================= */
:root {
    /*--blue-900: #0a2540;*/
    --blue-900: #1f3864;
    --blue-800: #173a63;
    --pill:     #465565;
    --text:     #333;
    --bg:       #ffffff;
    --white:    #fff;

    --header-h: 64px;
    --footer-h: 48px;
}

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;
    display: flex;
    flex-direction: column;
}

/* =========================
   4) Header (barra superior)
   ========================= */
.header-panel { position: sticky; top: 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); }
.title-logo { font-size: 1.8rem; font-weight: 800; letter-spacing: .3px; color: #fff; margin-right: 10px; }
.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
   ========================= */
.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 60px 2px 60px; }

/* ====== Botón de cierre para el menú móvil ====== */
.close-menu {
    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: 1000;
}

/* ====== 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; }
.hamburger-box { position: relative; display: block; width: 24px; height: 2px; margin: 0 auto; top: 0; background: transparent; }
.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: 0; }
.hamburger-inner::before { content: ""; top: -7px; }
.hamburger-inner::after  { content: ""; top: 7px; }
/* Estado abierto */
.hamburger.is-active .hamburger-inner { transform: rotate(45deg); }
.hamburger.is-active .hamburger-inner::before { transform: rotate(90deg) translateX(-7px); top: 0; }
.hamburger.is-active .hamburger-inner::after  { opacity: 0; }

/* =========================
   6) Hero (imagen de cabecera)
   ========================= */
.hero { position: relative; width: 100%; height: clamp(300px, 38vh, 460px); display: flex; align-items: center; justify-content: center; overflow: hidden; background: #0f2847; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; z-index: 0; pointer-events: none; }
.hero-overlay { position: absolute; inset: 0; z-index: 1; }

/* V44/V45: Título para versión de escritorio, visible por defecto */
.hero-title-container {
    width: 100%;
    text-align: center;
    background-color: rgba(135, 161, 177, 0.7);
    color: var(--blue-900);
    padding: 10px 20px;
    box-sizing: border-box;
    z-index: 2;
}

.main-title-hero-escritorio {
    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;
}

/* V44: Título para versión móvil, oculto por defecto */
.hero-title-movil {
    display: none;
    width: 100%;
    text-align: center;
    background-color: rgba(135, 161, 177, 0.7);
    color: var(--blue-900);
    padding: 10px 20px;
    box-sizing: border-box;
    z-index: 2;
}

.main-title-hero-movil {
    max-width: 66.67%;
    margin: auto;
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    font-weight: 700;
    white-space: nowrap;
    text-overflow: clip;
}

/* =========================
   7) Iconos / accesos
   ========================= */
.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: 34px 18px 20px; 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 14px; }
.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); }

/* =========================
   8) Pie de página
   ========================= */
.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; }

/* =========================
   9) Responsive
   ========================= */
/* Estilos para escritorios (>= 1201px) */
@media (min-width: 1201px) {
    /* v45: Ocultamos el título móvil */
    .hero-title-movil { display: none; }

    .header-inner { justify-content: space-between; flex-wrap: nowrap; }
    .nav-menu { margin-left: auto; }
    .nav-menu ul { gap: 20px; }

    /* v45: TÍTULO AL BORDE SUPERIOR DEL HERO */
    .hero-title-container {
        /* Mantiene el tamaño de v44 */
        font-size: clamp(1.5rem, 2.5vw, 2.2rem);
        /* NUEVO v45: anclaje al top del hero */
        position: absolute;             /* << añadido v45 */
        top: 0;                         /* << añadido v45: justo bajo el header */
        left: 0;                        /* << añadido v45 */
        right: 0;                       /* << añadido v45 */
    }
}

/* Estilos para tablets (993px - 1200px) */
@media (min-width: 993px) and (max-width: 1200px) {
    /* V46: Se muestra el título móvil en este rango de pantalla */
    .hero-title-movil {
        display: block;
        position: fixed;
        /* top calculado para quedar justo bajo el header fijo */
        top: 123px;
        left: 0;
        right: 0;
        z-index: 999;
        display: flex;
        justify-content: center;
        align-items: center;
        background-color: rgba(135, 161, 177, 0.7);
        color: var(--blue-900);
        padding: 10px 20px;
    }
    .hero-title-container { display: none; }

    .header-inner { flex-wrap: wrap; justify-content: center; gap: 10px; padding-top: 10px; }
    .logo-img-btn img { height: 55px; }
    .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: 1.0rem; padding: 8px 24px; }
    .nav-menu a.active { padding: 8px 30px; }

    .icons-section { grid-template-columns: repeat(2, 1fr); gap: 16px; padding: 100px 16px; }
    .icon { padding: 28px 16px 18px; }
    .icon img { width: min(220px, 82%); }

    .main-title-hero-escritorio { font-size: clamp(1.2rem, 3vw, 1.9rem); }
}

/* Teléfonos y tablets pequeñas (≤992px) */
@media (max-width: 992px) {
    /* V44: Mostramos el título móvil y ocultamos el de escritorio */
    .hero-title-movil {
        position: fixed;
        top: 67px;    /* V44: Calculado para estar justo debajo del header fijo */
        left: 0;
        right: 0;
        z-index: 999;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .hero-title-container { display: none; }

    body { padding-top: 132px; }

    .header-panel { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; padding: 0; }
    .header-inner { padding: 10px 12px; }

    .hero { margin-top: 0; }

    .main-title-hero-movil {
        font-size: clamp(0.8rem, 3.5vw, 1.4rem);
        padding: 0 10px;
        margin: 0;
        max-width: 100%;
    }

    .icons-section { grid-template-columns: 1fr; }
    .site-footer { height: auto; }
    .footer-container { flex-direction: column; justify-content: center; }
    .derechos { margin-top: 10px; }

    /* Oculta el menú normal y muestra la hamburguesa */
    .nav-menu { display: none; }
    .hamburger { display: inline-block; }
    .nav-menu.is-open {
        display: block;
        position: fixed; inset: 0; top: 0;
        padding-top: calc(var(--header-h) + env(safe-area-inset-top));
        background: rgba(10,37,64,.96);
        backdrop-filter: blur(2px);
        z-index: 999;
    }
    .nav-menu.is-open ul { flex-direction: column; gap: 18px; align-items: center; justify-content: flex-start; padding-top: 12px; }
    .nav-menu.is-open a { font-size: 1.05rem; padding: 10px 14px; border-radius: 999px; }
    .nav-menu.is-open a.active { padding: 10px 22px; }
    .close-menu { display: block; }

    /* Ajustes adicionales para móviles */
    @media (max-width:480px){
        .hero{height:260px}
        .icons-section{gap:12px;padding:0 10px}
        .icon img{width:min(180px,80%)}
    }
}

/* Oculta el botón de cierre y la hamburguesa en resoluciones de escritorio */
@media (min-width: 993px) {
    .close-menu, .hamburger { display: none !important; }
}


/* CSS PÁGINA RECURSOS */

/* =========================
   10) Estilos específicos para Recursos
   ========================= */

/*
  Esta nueva regla se aplica a los párrafos (<p>) que están dentro de un elemento con clase .icon, 
  el cual a su vez está dentro de un contenedor con nuestra nueva clase .page-recursos.
  Esto garantiza que el estilo solo se aplique en recursos.html y no en index.html.
*/
/*
.page-recursos .icon p {
    font-weight: 700;
    font-family: 'Overpass', 'League Spartan', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, 'Helvetica Neue', Arial, sans-serif;
    /* Modificamos esta línea para aumentar el tamaño del texto *
    font-size: 1.2rem; /* Antes era 1.06rem *
    line-height: 1.28;
    color: var(--blue-900);
    margin-top: 8px;
}*/

/* +++ NUEVO ESTILO PROPUESTO (para imitar un título) +++ *
.page-recursos .icon p {
    /* Usamos la fuente 'League Spartan' por su peso y carácter de titular. *
    font-family: 'League Spartan', sans-serif;

    /* Aumentamos ligeramente el tamaño para mayor impacto. *
    font-size: 1.25rem;
    
    /* El peso 'bold' (700) ya estaba, lo mantenemos. *
    font-weight: 700;

    /* Convertimos el texto a mayúsculas, un recurso común en títulos. *
    text-transform: uppercase;

    /* Añadimos un sutil espaciado entre letras para mejorar la legibilidad y estética. *
    letter-spacing: 0.5px;
    
    /* Mantenemos el color y el margen superior que ya tenías definidos. *
    color: var(--blue-900);
    margin-top: 8px;
    line-height: 1.3;
}*/
/* +++ NUEVO ESTILO CON EFECTO VERSALITAS (SMALL CAPS) +++ */
.page-recursos .icon p {
    /* Mantenemos la fuente 'League Spartan' por su claridad y peso. */
    font-family: 'League Spartan', sans-serif;

    /* Esta es la propiedad clave para el efecto versalitas. Convierte el texto a mayúsculas, 
    pero manteniendo las mayúsculas originales en un tamaño mayor. */
    font-variant: small-caps;

    /* Ajustamos el tamaño base del texto. Las mayúsculas iniciales serán más grandes. */
    font-size: 1.2rem;
    
    /* El peso 'bold' (700) es ideal para este estilo. */
    font-weight: 700;

    /* El espaciado entre letras es especialmente útil con versalitas para mejorar la legibilidad. */
    letter-spacing: 0.8px;
    
    /* Mantenemos el color y el margen superior que ya tenías definidos. */
    color: var(--blue-900);
    margin-top: 8px;
    line-height: 1.3;
}

/* REGLA ESPECÍFICA PARA LA PÁGINA DE RECURSOS CON 6 COLUMNAS */
/* Al usar .page-recursos, solo afectamos a la rejilla de recursos.html */
.page-recursos {
    grid-template-columns: repeat(6, 1fr);
}

/* FIN CSS PÁGINA RECURSOS */

/* Título iconos cuadros de mandos */
#servicios .icon p {
    font-family: 'League Spartan', sans-serif;
    font-variant: small-caps;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: var(--blue-900);
    margin-top: 8px;
    line-height: 1.3;
}