/* ==========================================================================
   PORTAL WEB CDCE ESTADO SUCRE — CSS INSTITUCIONAL v3.1 (2026)
   Corregido: menú responsive funcional, sin duplicaciones
   ========================================================================== */

/* --- 0. DEFINICIÓN DE PROPIEDADES PERSONALIZADAS ANIMABLES --- */
@property --glow-opacity {
  syntax: '<number>';
  inherits: false;
  initial-value: 0;
}

/* --- 1. CAPAS DE CASCADA (orden de prioridad) --- */
@layer reset, tokens, base, layout, components, utilities, a11y;

/* ==========================================================================
   LAYER: RESET
   ========================================================================== */
@layer reset {
  *, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }

  html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    hanging-punctuation: first last;
  }

  body {
    min-height: 100dvh;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
  }

  input, button, textarea, select {
    font: inherit;
    color: inherit;
  }

  button {
    cursor: pointer;
    border: none;
    background: none;
  }

  a { color: inherit; }

  p, h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
  }

  #root, #__next { isolation: isolate; }
}

/* ==========================================================================
   LAYER: TOKENS (Design Tokens con color-mix y oklch)
   ========================================================================== */
@layer tokens {
  :root {
    --azul-mppe: #07539a;
    --azul-claro: #0b6fbd;
    --azul-profundo: #0b2f55;
    --cyan-mppe: #7dd3fc;
    --rojo-mppe: #c9212d;
    
    --gris-fondo: #f5f7fa;
    --blanco: #ffffff;
    --negro-footer: #102333;
    --color-surface: #ffffff;
    --color-surface-alt: #f8fafc;

    --azul-mppe-900: color-mix(in oklch, var(--azul-mppe) 85%, black);
    --azul-mppe-700: color-mix(in oklch, var(--azul-mppe) 70%, white);
    --azul-mppe-50:  color-mix(in oklch, var(--azul-mppe) 8%, white);
    --rojo-mppe-700: color-mix(in oklch, var(--rojo-mppe) 75%, black);
    --rojo-mppe-50:  color-mix(in oklch, var(--rojo-mppe) 8%, white);

    --color-text: #1d2a38;
    --color-text-muted: #536273;
    --color-text-subtle: #718096;
    
    --color-border: #dbe3ec;
    --color-border-hover: #a9bfd6;

    --border-subtle: 1px solid var(--color-border);
    --border-hover: 1px solid var(--color-border-hover);
    --border-accent: 2px solid var(--rojo-mppe);

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 2px 8px rgba(11, 47, 85, .06);
    --shadow: 0 8px 24px rgba(11, 47, 85, .08);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.10);
    --shadow-hover: 0 14px 30px rgba(11, 47, 85, .14);
    --shadow-inset: inset 0 1px 3px rgba(0, 0, 0, 0.05);
    --sombra-modal: 0 20px 60px rgba(0, 0, 0, 0.4);

    --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-fast: 180ms var(--ease-out-expo);
    --transition: 320ms var(--ease-out-expo);
    --transition-slow: 600ms var(--ease-out-expo);

    --focus-ring: 0 0 0 3px color-mix(in oklch, var(--azul-mppe) 35%, transparent);

    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-full: 9999px;

    --fs-xs: clamp(0.75rem, 0.7rem + 0.2vw, 0.85rem);
    --fs-sm: clamp(0.85rem, 0.8rem + 0.25vw, 0.95rem);
    --fs-base: clamp(0.95rem, 0.9rem + 0.3vw, 1.05rem);
    --fs-lg: clamp(1.1rem, 1rem + 0.4vw, 1.25rem);
    --fs-xl: clamp(1.35rem, 1.1rem + 0.8vw, 1.75rem);
    --fs-2xl: clamp(1.75rem, 1.3rem + 1.5vw, 2.5rem);
    --fs-3xl: clamp(2.25rem, 1.6rem + 2.2vw, 3.25rem);

    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2.5rem;
    --space-xl: 4rem;
    --space-2xl: 6rem;

    accent-color: var(--azul-mppe);
    color-scheme: light;
  }
}

/* ==========================================================================
   LAYER: BASE
   ========================================================================== */
@layer base {
  body {
    font-family: 'Inter', 'Helvetica Neue', system-ui, -apple-system, sans-serif;
    font-size: var(--fs-base);
    background-color: var(--gris-fondo);
    color: var(--color-text);
    line-height: 1.65;
    font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1;
  }

  h1, h2, h3, h4 {
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
    text-wrap: balance;
  }

  p { text-wrap: pretty; }

  ::selection {
    background: var(--azul-mppe);
    color: var(--blanco);
  }
}

/* ==========================================================================
   LAYER: LAYOUT
   ========================================================================== */
@layer layout {
  .container {
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: clamp(1rem, 3vw, 1.5rem);
    container-type: inline-size;
    container-name: page;
  }

  .stack > * + * { margin-block-start: var(--space-md); }
}

/* ==========================================================================
   LAYER: COMPONENTS (TODO UNIFICADO)
   ========================================================================== */
@layer components {

/* ============================================
   HEADER Y NAVEGACIÓN
   ============================================ */

.main-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.top-bar {
    background: var(--azul-profundo);
    color: var(--blanco);
    text-align: center;
    padding: 0.55rem 1rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar {
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    padding: 0.8rem 0;
    box-shadow: 0 2px 10px rgba(11, 47, 85, .07);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

.logo img {
    height: 68px;
    width: auto;
    transition: transform var(--transition);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.08));
}

.logo:hover img { transform: scale(1.03); }

/* ============================================
   MENÚ DE ESCRITORIO (VISIBLE POR DEFECTO)
   ============================================ */

.desktop-menu {
    display: flex;
    list-style: none;
    gap: 1.35rem;
    align-items: center;
    margin: 0;
    padding: 0;
}

.desktop-menu a {
    text-decoration: none;
    color: var(--azul-profundo);
    font-weight: 700;
    font-size: 0.9rem;
    position: relative;
    padding: 0.375rem 0;
    transition: color var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 6px;
}

.desktop-menu a.active { color: var(--azul-mppe); }
.desktop-menu a i { margin-right: .25rem; font-size: .85em; }

.desktop-menu a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--rojo-mppe);
    border-radius: 2px;
    transition: width var(--transition);
}

.desktop-menu a:hover, .desktop-menu a:focus-visible { color: var(--rojo-mppe); }
.desktop-menu a:hover::after, .desktop-menu a:focus-visible::after { width: 100%; }

.menu-report a {
    background: var(--azul-mppe);
    color: var(--blanco) !important;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius-sm);
}

.menu-report a:hover {
    background: var(--azul-mppe-900);
}

/* ============================================
   BOTÓN HAMBURGUESA (OCULTO EN DESKTOP)
   ============================================ */

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 42px;
    height: 42px;
    background: transparent;
    border: 2px solid var(--azul-mppe);
    border-radius: 6px;
    cursor: pointer;
    padding: 8px;
    z-index: 1002;
    position: relative;
    transition: all var(--transition-fast);
}

.hamburger:hover {
    background: var(--azul-mppe-50);
}

.hamburger-line {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--azul-mppe);
    border-radius: 2px;
    transition: all 0.3s ease;
    margin: 2px 0;
}

.hamburger.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   MENÚ MÓVIL (OCULTO POR DEFECTO)
   ============================================ */

.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 20px rgba(0,0,0,0.15);
    transition: right 0.3s ease-in-out;
    z-index: 1001;
    overflow-y: auto;
    padding: 20px;
}

.mobile-nav.active {
    right: 0;
    display: block;
}

.nav-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu-list li {
    width: 100%;
    margin-bottom: 5px;
}

.nav-menu-list li a {
    width: 100%;
    padding: 15px 20px;
    font-size: 1rem;
    border-radius: 6px;
    text-decoration: none;
    color: var(--azul-profundo);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.nav-menu-list li a:hover {
    background: #f0f4f8;
}

.nav-menu-list li a.active {
    background: var(--azul-mppe);
    color: white;
}

.nav-menu-list li a i {
    font-size: 1.2rem;
    width: 30px;
}

.menu-report {
    margin-top: 10px;
}

.menu-report a {
    background: var(--azul-mppe);
    color: white !important;
}

.menu-report a:hover {
    background: var(--azul-mppe-900);
}

/* Botón cerrar (X) */
.close-menu-item {
    text-align: right;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--color-border);
}

.close-menu-btn {
    background: var(--azul-mppe);
    color: white;
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease, transform 0.2s ease;
}

.close-menu-btn:hover {
    background: var(--azul-mppe-900);
    transform: scale(1.1);
}

/* Overlay */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.overlay.active {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

/* ============================================
   RESPONSIVE: MÓVIL (768px)
   ============================================ */

@media (max-width: 768px) {
    /* Ocultar menú desktop en móvil */
    .desktop-menu {
        display: none;
    }

    /* Mostrar botón hamburguesa en móvil */
    .hamburger {
        display: flex;
    }

    /* Top-bar más pequeño */
    .top-bar {
        font-size: 0.75rem;
        padding: 6px 0;
    }

    /* Logo más pequeño */
    .logo img {
        height: 58px;
    }

    /* Ajustes carrusel móvil */
    .carousel-container { height: 450px; }
    .card-row, .sector-row { grid-template-columns: 1fr; }
    .sector-card { height: 280px; }
    .carousel-nav { width: 44px; height: 44px; }
    .carousel-nav.prev { left: 12px; }
    .carousel-nav.next { right: 12px; }
    .footer-grid { padding-inline: 1rem; }
}

@media (max-width: 480px) {
    .top-bar {
        font-size: 0.7rem;
    }
    
    .logo img {
        height: 45px;
    }
    
    .mobile-nav {
        width: 85%;
    }
    
    .nav-menu-list li a {
        padding: 12px 15px;
        font-size: 0.95rem;
    }
    
    .carousel-nav { display: none; }
}
/* ============================================
   OVERLAY (FONDO OSCURO)
   ============================================ */

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.overlay.active {
    display: block;
    opacity: 1;
}

/* ============================================
   RESPONSIVE - MÓVIL (768px)
   ============================================ */

@media (max-width: 768px) {
    /* Mostrar hamburguesa */
    .hamburger {
      display: flex;
    }

    /* Ocultar menú desktop */
    .nav-menu {
      display: none;
    }

    /* Top-bar más pequeño */
    .top-bar {
      font-size: 0.75rem;
      padding: 6px 0;
    }

    /* Logo más pequeño */
    .logo img {
      height: 58px;
    }

    /* Ajustes carrusel móvil */
    .carousel-container { height: 450px; }
    .card-row, .sector-row { grid-template-columns: 1fr; }
    .sector-card { height: 280px; }
    .carousel-nav { width: 44px; height: 44px; }
    .carousel-nav.prev { left: 12px; }
    .carousel-nav.next { right: 12px; }
    .footer-grid { padding-inline: 1rem; }
  }

  /* ============================================
     RESPONSIVE - MÓVILES PEQUEÑOS (480px)
     ============================================ */
  @media (max-width: 480px) {
    .top-bar {
      font-size: 0.7rem;
    }
    
    .logo img {
      height: 45px;
    }
    
    .mobile-nav {
      width: 85%;
    }
    
    .nav-menu-list li a {
      padding: 12px 15px;
      font-size: 0.95rem;
    }
    
    .carousel-nav { display: none; }
  }
  /* ============================================
     OVERLAY (FONDO OSCURO)
     ============================================ */

  .overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .overlay.active {
    display: block;
    opacity: 1;
  }

  /* ============================================
     HOME SECTIONS
     ============================================ */

  .home-main-content {
    width: 100%;
    overflow-x: hidden;
  }

  .section-title-wrapper {
    text-align: center;
    margin-bottom: 2rem;
    margin-top: 1.5rem;
    position: relative;
    width: 100%;
  }

  .section-title-wrapper.space-top {
    margin-top: 4.5rem;
  }

  .home-section-title {
    font-size: clamp(1.45rem, 2vw, 1.85rem);
    font-weight: 700;
    color: var(--azul-profundo);
    letter-spacing: -0.01em;
    margin: 0;
    padding-top: 0.5rem;
  }

  /* --- CARRUSEL HERO --- */
  .carousel-container {
    position: relative;
    height: clamp(440px, 60vh, 580px);
    overflow: clip;
    background: #070b10;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  }

  .carousel-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease-in-out, visibility 0.6s ease-in-out;
  }

  .carousel-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
  }

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

  .hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 40, 90, 0.35) 0%, rgba(5, 12, 20, 0.75) 100%);
    z-index: 2;
  }

  .hero-content {
    position: absolute;
    inset-block-start: 52%;
    inset-inline-start: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    text-align: center;
    width: min(92%, 1000px);
    color: var(--blanco);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .hero-content h1 {
    font-size: var(--fs-3xl);
    margin-bottom: 0.25rem;
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
    letter-spacing: -0.02em;
  }

  .mision-wrapper {
    padding: 0;
    background: transparent;
    width: 100%;
  }

  .mision-texto {
    font-size: var(--fs-base);
    font-style: normal;
    font-weight: 500;
    max-width: 700px;
    margin-inline: auto;
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.15);
  }

  .carousel-nav {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 1.25rem;
    z-index: 10;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
  }

  .carousel-nav.next { right: 1.75rem; }
  .carousel-nav.prev { left: 1.75rem; }

  .carousel-nav:is(:hover, :focus-visible) {
    background: var(--azul-mppe);
    border-color: var(--blanco);
    transform: translateY(-50%) scale(1.1);
  }

  /* --- WELCOME SECTION --- */
  .welcome-section {
    background-color: #fff;
    padding-block: 4.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-bottom: var(--border-subtle);
  }

  .welcome-inner {
    max-width: 850px;
    margin-inline: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .welcome-tagline {
    display: inline-block;
    background: #eef5fb;
    color: var(--azul-mppe);
    padding: 0.6rem 1.8rem;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border: 1px solid #d5e5f3;
  }

  .welcome-section h2 {
    font-size: var(--fs-2xl);
    color: var(--azul-profundo);
    margin-bottom: 1rem;
    text-align: center;
  }

  .welcome-section p {
    font-size: var(--fs-base);
    color: var(--color-text-muted);
    line-height: 1.75;
    max-width: 850px;
    margin-inline: auto;
    text-align: center;
  }

  /* --- CARDS GRID --- */
  .regional-links {
    padding: 4rem 1rem 5rem;
    background-color: var(--gris-fondo);
  }

  .card-row, .sector-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    align-items: stretch;
    margin-bottom: 3.125rem;
  }

  .info-card {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    overflow: clip;
    box-shadow: var(--shadow-sm);
    border: var(--border-subtle);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
    isolation: isolate;
  }

  .info-card:is(:hover, :focus-within), .sector-card:is(:hover, :focus-within) {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--color-border-hover);
  }

  .card-img-wrapper {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: var(--color-surface-alt);
    position: relative;
  }

  .card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
  }

  .info-card:is(:hover, :focus-within) .card-img-wrapper img { transform: scale(1.05); }

  .card-body {
    padding: 1.35rem;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
    gap: 1rem;
  }

  .card-body h3 {
    color: var(--azul-mppe);
    font-size: 1.1rem;
    margin: 0 0 0.75rem 0;
  }

  .card-brief {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.5;
    margin: 0 0 1.5rem 0;
    flex-grow: 1;
  }

  .btn-read-more {
    display: inline-block;
    background: var(--azul-mppe);
    color: var(--blanco);
    padding: 0.65rem 1rem;
    text-decoration: none;
    border-radius: 5px;
    font-size: var(--fs-sm);
    font-weight: 600;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-xs);
    text-align: center;
    margin-top: auto;
  }

  .btn-read-more:is(:hover, :focus-visible) {
    background: var(--azul-claro);
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
  }

  /* --- SECTOR CARDS --- */
  .sector-card {
    position: relative;
    height: 260px;
    border-radius: var(--radius-md);
    overflow: clip;
    box-shadow: var(--shadow-sm);
    border: var(--border-subtle);
    transition: all var(--transition);
    display: block;
    text-decoration: none;
  }

  .sector-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow), filter var(--transition);
  }

  .sector-card:is(:hover, :focus-within) img {
    transform: scale(1.06);
    filter: brightness(0.85);
  }

  .sector-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 43, 70, 0.1) 0%, rgba(15, 43, 70, 0.85) 100%);
    z-index: 1;
  }

  .sector-label {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem;
    z-index: 2;
    color: var(--blanco);
    text-align: center;
    transition: background var(--transition);
  }

  .sector-label span {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    opacity: 0.85;
    margin-bottom: 0.25rem;
  }

  .sector-label h4 {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  }

  /* --- MODAL CALENDARIO ESCOLAR --- */
  .modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(6px);
  }

  .modal-overlay.active { display: flex; }

  .modal-content {
    max-width: 750px;
    width: 90%;
    position: relative;
    animation: modalPop 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .mppe-banner {
    background: var(--azul-mppe);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--sombra-modal);
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: block;
    text-decoration: none;
  }

  .mppe-banner:hover { transform: translateY(-4px); }

  .mppe-banner-header {
    padding: 1.5rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
  }

  .mppe-logo { width: 60px; height: auto; }

  .mppe-logo-text { color: var(--blanco); text-align: left; }
  .mppe-logo-text .mini { font-size: 0.75rem; opacity: 0.95; display: block; }
  .mppe-logo-text .edu { font-size: 1.3rem; font-weight: 800; letter-spacing: 1px; display: block; margin-top: 0.2rem; }

  .mppe-banner-body { padding: 3rem 2rem; text-align: center; }
  .mppe-banner-body h2 { font-size: clamp(2.2rem, 5vw, 3.5rem); font-weight: 800; color: var(--cyan-mppe); margin: 0; letter-spacing: 2px; text-transform: uppercase; }
  .mppe-banner-body .year { font-size: clamp(1.5rem, 2.5vw, 2rem); color: var(--blanco); font-style: italic; margin-top: 0.5rem; }

  .mppe-color-bar {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    width: 100%;
    height: 10px;
  }
  .mppe-color-bar span:nth-child(odd) { background: var(--azul-claro); }
  .mppe-color-bar span:nth-child(even) { background: var(--rojo-mppe); }

  .download-action { margin-top: 1.5rem; text-align: center; }

  .btn-download-mppe {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: var(--blanco);
    color: var(--azul-profundo);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  }

  .btn-download-mppe:hover { background: #f1f5f9; transform: translateY(-2px); }
  .btn-download-mppe svg { width: 22px; height: 22px; }

  .modal-close {
    position: absolute;
    top: -12px;
    right: -12px;
    background: var(--blanco);
    border: none;
    color: var(--azul-profundo);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 10;
    transition: transform 0.2s;
  }
  .modal-close:hover { transform: rotate(90deg); background: var(--azul-profundo); color: var(--blanco); }

  @keyframes modalPop {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
  }

  /* --- FOOTER --- */
  .main-footer {
    background: var(--negro-footer);
    color: #a0aec0;
    padding-block: 3.5rem 1.25rem;
    border-top: 3px solid var(--rojo-mppe);
  }

  .footer-grid {
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: 2.5rem;
  }

  .footer-section h4 {
    color: var(--blanco);
    margin-bottom: 1rem;
    border-inline-start: 3px solid var(--rojo-mppe);
    padding-inline-start: 0.95rem;
    text-transform: uppercase;
    font-size: var(--fs-base);
    letter-spacing: 0.04em;
  }

  .footer-section p { font-size: var(--fs-sm); line-height: 1.75; }
  .footer-section a { transition: color var(--transition-fast); }
  .footer-section a:hover { color: #8dccf5 !important; }

  .social-links { display: flex; gap: 0.85rem; margin-top: 0.95rem; flex-wrap: wrap; }

  .social-icon {
    width: 42px; height: 42px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-full);
    display: grid; place-items: center;
    color: var(--blanco); text-decoration: none;
    transition: all var(--transition); font-size: 1.1rem;
  }
  .social-icon:is(:hover, :focus-visible) {
    background: var(--azul-mppe); transform: translateY(-4px) scale(1.08);
  }

  .footer-bottom {
    text-align: center; margin-top: 2.5rem; padding-top: 1.5rem;
    border-top: 1px solid #2d3748; font-size: var(--fs-xs); color: #718096;
  }

  /* ============================================
     RESPONSIVE - TABLET (992px)
     ============================================ */
  @media (max-width: 992px) {
    .card-row, .sector-row {
      grid-template-columns: repeat(2, 1fr);
      gap: 1.5rem;
    }
  }

  /* ============================================
     RESPONSIVE - MÓVIL (768px)
     ============================================ */
  @media (max-width: 768px) {
    /* Mostrar hamburguesa */
    .hamburger {
      display: flex;
    }

    /* Top-bar más pequeño */
    .top-bar {
      font-size: 0.75rem;
      padding: 6px 0;
    }

    /* Logo más pequeño */
    .logo img {
      height: 58px;
    }

    /* Mostrar botón cerrar dentro del menú */
    .close-menu-item {
      display: block;
      text-align: right;
      margin-bottom: 10px;
      padding-bottom: 10px;
      border-bottom: 1px solid var(--color-border);
    }

    /* Menú móvil - DESLIZANTE DESDE LA DERECHA */
    .nav-menu {
      position: fixed;
      top: 0;
      right: -100%;
      width: 80%;
      max-width: 320px;
      height: 100vh;
      background: white;
      flex-direction: column;
      align-items: stretch;
      padding: 20px;
      box-shadow: -5px 0 20px rgba(0,0,0,0.15);
      transition: right 0.3s ease-in-out;
      z-index: 999;
      overflow-y: auto;
      gap: 0;
    }

    .nav-menu.active {
      right: 0;
    }

    .nav-menu li {
      width: 100%;
      margin-bottom: 5px;
    }

    .nav-menu li a {
      width: 100%;
      padding: 15px 20px;
      font-size: 1rem;
      border-radius: 6px;
      border-bottom: none;
    }

    .nav-menu li a:hover {
      background: #f0f4f8;
    }

    .nav-menu li a.active {
      background: var(--azul-mppe);
      color: white;
    }

    .nav-menu li a i {
      font-size: 1.2rem;
      width: 30px;
    }

    .nav-menu a::after {
      display: none;
    }

    .menu-report {
      margin-top: 10px;
    }

    .menu-report a {
      background: var(--azul-mppe);
      color: white !important;
    }

    .menu-report a:hover {
      background: var(--azul-mppe-900);
    }

    /* Ajustes carrusel móvil */
    .carousel-container { height: 450px; }
    .card-row, .sector-row { grid-template-columns: 1fr; }
    .sector-card { height: 280px; }
    .carousel-nav { width: 44px; height: 44px; }
    .carousel-nav.prev { left: 12px; }
    .carousel-nav.next { right: 12px; }
    .footer-grid { padding-inline: 1rem; }
  }

  /* ============================================
     RESPONSIVE - MÓVILES PEQUEÑOS (480px)
     ============================================ */
  @media (max-width: 480px) {
    .top-bar {
      font-size: 0.7rem;
    }
    
    .logo img {
      height: 45px;
    }
    
    .nav-menu {
      width: 85%;
    }
    
    .nav-menu li a {
      padding: 12px 15px;
      font-size: 0.95rem;
    }
    
    .carousel-nav { display: none; }
  }
}

/* ==========================================================================
   LAYER: UTILITIES & ACCESSIBILITY
   ========================================================================== */
@layer utilities {
  .visually-hidden {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
  }
}

@layer a11y {
  :focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--radius-xs); }
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
      scroll-behavior: auto !important;
    }
  }
}