/* Estilos del portal (antes escritos dentro de header.php). Extraídos sin cambios el 24-11-2026 para que el navegador los guarde. */
        /* Transparent Header with Glassmorphism */
        body {
            font-family: 'Outfit', sans-serif;
            --font-main: 'Outfit', sans-serif;
        }
        
        /* FORCE PORTAL DE PAGOS CARDS */
        .pagos-grid {
            display: grid !important;
            grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
            gap: 20px !important;
            margin-top: 30px !important;
        }
        .pago-card {
            display: flex !important;
            flex-direction: column !important;
            justify-content: center !important;
            align-items: center !important;
            padding: 40px 20px !important;
            background: white !important;
            border: 1px solid rgba(15, 17, 49, 0.1) !important;
            color: var(--mq-blue) !important;
            text-align: center !important;
            text-decoration: none !important;
            transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
            min-height: 200px !important;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05) !important;
            border-radius: 12px !important;
        }
        .pago-card i {
            font-size: 3rem !important;
            margin-bottom: 20px !important;
            display: block !important;
            color: #0F1131 !important;
        }
        .pago-card span {
            font-weight: 700 !important;
            font-size: 1.1rem !important;
            display: block !important;
        }
        .pago-card:hover {
            transform: translateY(-8px) !important;
            box-shadow: 0 20px 40px rgba(15, 17, 49, 0.08) !important;
            background: #F4F7F6 !important;
        }

        /* FORCE HERO KEN BURNS (NO JUMP) */
        @keyframes kenBurnsZoom {
            0% { transform: scale(1); }
            100% { transform: scale(1.3); }
        }
        .hero-slider .slide.active .slide-bg, 
        .hero-slider .slide.fading .slide-bg {
            animation: kenBurnsZoom 40s linear forwards !important;
            visibility: visible !important;
        }
        .hero-slider .slide {
            transition: opacity 3s ease-in-out !important;
        }

        /* === CABECERA INMERSIVA GLOBAL === */
        .main-header {
            position: relative;
            width: 100%;
            z-index: 1000;
            padding: 8px 0;
            background: transparent !important; /* Transparente por defecto */
            box-shadow: none !important;
            border-top: 3px solid var(--mq-green) !important;
            border-bottom: none !important;
            margin-bottom: -95px; /* Aspira el contenido de cualquier página hacia arriba */
            transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
        }

        /* Sombra protectora global para asegurar contraste en la lectura del menú blanco */
        .main-header::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 180px;
            background: linear-gradient(to bottom, rgba(15,17,49,0.95) 0%, rgba(15,17,49,0) 100%);
            z-index: -1;
            pointer-events: none;
            opacity: 1;
            transition: opacity 0.4s ease;
        }

        /* COMPENSACIÓN DE PADDING PARA LAYOUT INMERSIVO */
        /* Empuja el texto hacia abajo para que no choque con el logo transparente */
        .hero-content-layer { padding-top: 150px !important; }
        .noticia-header { padding-top: 160px !important; }
        .inner-hero { padding-top: 150px !important; }
        .page-header { padding-top: 150px !important; }
        .page-viewer-header { padding-top: 150px !important; }

        /* En movil se achica un poco */
        @media (max-width: 968px) {
            .main-header { margin-bottom: -80px; }
            .hero-content-layer { padding-top: 110px !important; }
            .noticia-header { padding-top: 120px !important; }
            .inner-hero { padding-top: 110px !important; }
            .page-header { padding-top: 110px !important; }
            .page-viewer-header { padding-top: 110px !important; }
        }

        .main-header.scrolled {
            position: fixed;
            top: 0;
            width: 100%;
            padding: 10px 0;
            background: rgba(15, 17, 49, 0.95) !important;
            backdrop-filter: blur(10px);
            box-shadow: 0 5px 20px rgba(0,0,0,0.2) !important;
            /* Importante para no perder el border de abajo en scroll */
            border-bottom: 3px solid var(--mq-green) !important;
            border-top: none !important;
        }

        /* Oculta la sombra extendida cuando se hace scroll */
        .main-header.scrolled::before {
            opacity: 0 !important;
        }

        /* Top Bar Styles */
        .top-bar {
            background-color: var(--mq-blue);
            color: white;
            padding: 0;
            border-bottom: 2px solid rgba(255, 255, 255, 0.1);
        }

        .top-bar-container {
            display: flex;
            justify-content: space-between;
            align-items: stretch;
            height: 50px;
        }

        .social-links {
            display: flex;
            align-items: center;
            gap: 15px;
            padding-left: 10px;
        }

        .social-links a {
            color: rgba(255, 255, 255, 0.7) !important;
            font-size: 0.9rem;
            transition: color 0.3s ease;
            width: 30px;
            height: 30px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 50%;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .social-links a:hover {
            color: white !important;
            background: var(--mq-green);
        }

        .top-links {
            display: flex;
        }

        .top-link {
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            padding: 0 15px;
            border-left: 1px solid rgba(255, 255, 255, 0.1);
            color: white !important;
            text-decoration: none !important;
            transition: background 0.3s;
        }

        .top-link:visited {
            color: white !important;
        }

        .top-link:last-child {
            border-right: 1px solid rgba(255, 255, 255, 0.1);
        }

        .top-link:hover {
            background: rgba(255, 255, 255, 0.05);
        }

        .top-link-title {
            color: #FFC107;
            /* Amarillo para el título superior */
            font-size: 0.65rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            line-height: 1.2;
        }

        .top-link-desc {
            font-size: 0.8rem;
            font-weight: 600;
            line-height: 1.2;
        }

        .header-container {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .logo img {
            height: 67px;
            /* Reducido un 10% desde los 75px anteriores */
            width: auto;
            transition: height 0.3s ease;
        }

        /* Y lo achicamos suavemente en mobile para que no robe espacio a la hamburguesa */
        @media (max-width: 968px) {
            .logo img {
                height: 55px;
            }
        }

        nav ul {
            display: flex;
            list-style: none;
            gap: 15px;
            align-items: center;
            margin: 0;
            padding: 0;
        }

        .nav-links > li > a {
            font-family: var(--font-main);
            color: #ffffff !important;
            font-weight: 700;
            font-size: 0.82rem;
            position: relative;
            text-decoration: none !important;
            display: flex;
            align-items: center;
            gap: 5px;
            letter-spacing: 0.2px;
        }

        .nav-links > li > a:visited {
            color: #ffffff !important;
        }

        nav ul li a:not(.phone-link):hover {
            color: #FFC107;
        }

        /* -------------------------------------
           SUBMENÚS (DROPDOWNS) CSS
           ------------------------------------- */
        .nav-links li {
            position: relative;
            /* Clave para el submenú absoluto */
        }

        .dropdown-menu {
            position: absolute;
            top: 100%;
            left: 50%;
            transform: translateX(-50%) translateY(10px);
            background: #fff;
            min-width: 260px;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
            border-radius: 0 0 8px 8px;
            border-top: 3px solid var(--mq-green);
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
            z-index: 1001;
            padding: 8px 0;
            display: flex;
            flex-direction: column;
            gap: 0 !important;
            list-style: none;
        }

        .has-dropdown:hover .dropdown-menu {
            opacity: 1;
            visibility: visible;
            transform: translateX(-50%) translateY(0);
        }

        .dropdown-menu li {
            width: 100%;
            list-style: none;
        }

        .dropdown-menu a,
        .dropdown-menu a:visited,
        nav .dropdown-menu li a,
        nav .dropdown-menu li a:visited {
            font-family: var(--font-main);
            font-weight: 600;
            color: var(--mq-blue) !important;
            padding: 12px 20px;
            font-size: 0.88rem;
            border-bottom: 1px solid #f0f0f0;
            transition: all 0.2s ease;
            text-decoration: none !important;
            display: block;
        }

        .dropdown-menu li:last-child a {
            border-bottom: none;
        }

        .dropdown-menu a:hover,
        nav .dropdown-menu li a:hover {
            background: #f8f9fa;
            color: var(--mq-green) !important;
            padding-left: 25px;
        }

        /* Indicador visual de menú con hijos (Flecha) */
        .has-dropdown>a::after {
            content: '\f107';
            /* Icono FontAwesome Angle Down */
            font-family: "Font Awesome 6 Free";
            font-weight: 900;
            font-size: 0.8rem;
            margin-left: 5px;
            transition: transform 0.3s ease;
        }

        .has-dropdown:hover>a::after {
            transform: rotate(180deg);
        }

        /* -------------------------------------
           MEGA MENÚ (.has-mega) — columnas por grupo, ancho al contenido.
           Se dibuja solo si el padre tiene mega_enabled = 1 y grupos (Menu.php).
           ------------------------------------- */
        .nav-links > li.has-mega {
            position: static;
        }

        .mega-menu {
            position: absolute;
            top: 100%;
            left: 50%;
            transform: translateX(-50%) translateY(10px);
            width: max-content;
            min-width: min(560px, calc(100vw - 48px));
            max-width: calc(100vw - 48px);
            background: #fff;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
            border-radius: 0 0 8px 8px;
            border-top: 3px solid var(--mq-green);
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
            z-index: 1001;
            padding: 24px 28px;
            box-sizing: border-box;
            text-align: left;
        }

        .has-mega:hover .mega-menu,
        .has-mega:focus-within .mega-menu {
            opacity: 1;
            visibility: visible;
            transform: translateX(-50%) translateY(0);
        }

        .mega-menu-grid {
            display: flex;
            flex-wrap: wrap;
            gap: 24px 32px;
        }

        .mega-col {
            flex: 1 1 200px;
            min-width: 0;
            max-width: 320px;
        }

        .mega-col-title {
            font-family: var(--font-main);
            font-size: 0.72rem;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            color: #475569;
            margin: 0 0 8px;
            padding-bottom: 8px;
            border-bottom: 1px solid #e2e8f0;
        }

        nav .mega-menu ul.mega-list {
            display: flex;
            flex-direction: column;
            align-items: stretch;
            text-align: left;
            position: static;
            gap: 0;
            padding: 0;
            margin: 0;
            background: none;
            box-shadow: none;
            width: auto;
            list-style: none;
        }

        nav .mega-menu .mega-list li a,
        nav .mega-menu .mega-list li a:visited {
            display: flex;
            align-items: flex-start;
            gap: 10px;
            padding: 8px 6px;
            border-radius: 6px;
            color: var(--mq-blue) !important;
            text-decoration: none !important;
            font-weight: 600;
            font-size: 0.88rem;
            line-height: 1.3;
            transition: background 0.2s ease;
        }

        nav .mega-menu .mega-list li a:hover,
        nav .mega-menu .mega-list li a:focus-visible {
            background: #f4f7f6;
            color: var(--mq-blue) !important;
        }

        .mega-item-icon {
            flex: 0 0 18px;
            color: #376a2c;
            font-size: 0.9rem;
            margin-top: 2px;
            text-align: center;
        }

        .mega-item-text {
            display: flex;
            flex-direction: column;
            min-width: 0;
        }

        .mega-item-desc {
            font-weight: 400;
            font-size: 0.78rem;
            color: #475569;
            margin-top: 2px;
        }

        .mega-list li.is-destacado .mega-item-name {
            font-weight: 800;
        }

        .has-mega>a::after {
            content: '\f107';
            font-family: "Font Awesome 6 Free";
            font-weight: 900;
            font-size: 0.8rem;
            margin-left: 5px;
            transition: transform 0.3s ease;
        }

        .has-mega:hover>a::after {
            transform: rotate(180deg);
        }

        /* Mega menú dentro del menú móvil: lista en flujo, sin ancho fijo ni desborde. */
        @media (max-width: 1024px) {
            .nav-links > li.has-mega {
                position: relative;
                width: 100%;
            }
            .mega-menu {
                position: static;
                transform: none;
                width: 100%;
                min-width: 0;
                max-width: 100%;
                display: none;
                opacity: 1;
                visibility: visible;
                padding: 8px 0 4px 12px;
                margin-top: 8px;
                background: transparent;
                box-shadow: none;
                border-top: none;
                border-left: 0;
                border-radius: 0;
            }
            .has-mega:hover .mega-menu,
            .has-mega:focus-within .mega-menu {
                display: block;
                transform: none;
            }
            .mega-menu-grid {
                flex-direction: column;
                gap: 12px;
            }
            .mega-col {
                max-width: 100%;
                flex: 0 0 auto;
            }
            .mega-col-title {
                color: rgba(255, 255, 255, 0.75);
                border-bottom-color: rgba(255, 255, 255, 0.2);
            }
            nav .mega-menu .mega-list li a,
            nav .mega-menu .mega-list li a:visited {
                color: #ffffff !important;
                padding: 8px 4px;
            }
            nav .mega-menu .mega-list li a:hover,
            nav .mega-menu .mega-list li a:focus-visible {
                background: rgba(255, 255, 255, 0.1);
                color: #ffffff !important;
            }
            .mega-item-icon {
                color: #a1d9f7;
            }
            .mega-item-desc {
                color: rgba(255, 255, 255, 0.75);
            }
        }

        /* Botón de Llamar 1528 */
        .phone-link {
            background: var(--mq-green);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 5px 15px;
            border-radius: 5px;
            color: white !important;
            transition: transform 0.3s, box-shadow 0.3s;
            text-align: center;
        }

        .phone-link:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 10px rgba(144, 185, 55, 0.4);
        }

        .phone-text {
            font-size: 0.7rem;
            font-weight: 800;
            line-height: 1;
        }

        .phone-number {
            font-size: 1.4rem;
            font-weight: 800;
            line-height: 1;
        }

        /* Responsive menu */
        .menu-toggle {
            display: none;
            color: white;
            font-size: 1.8rem;
            cursor: pointer;
        }

        @media (max-width: 1024px) {
            .header-container .logo {
                min-width: 0;
            }
            .header-container .logo img {
                max-width: 100%;
                object-fit: contain;
            }
            .menu-toggle {
                flex-shrink: 0;
            }
            .top-bar-container {
                flex-direction: column;
                height: auto;
            }
            .social-links {
                justify-content: center;
                padding: 8px 0;
            }
            .top-links {
                display: flex;
                overflow-x: auto;
                width: 100%;
                -webkit-overflow-scrolling: touch;
                border-top: 1px solid rgba(255, 255, 255, 0.1);
            }
            .top-links::-webkit-scrollbar {
                display: none;
            }
            .top-link {
                min-width: 140px;
                padding: 8px 15px;
                flex: 0 0 auto;
            }

            .menu-toggle {
                display: block;
            }

            nav ul {
                display: none;
                flex-direction: column;
                position: absolute;
                top: 100%;
                left: 0;
                width: 100%;
                background: linear-gradient(90deg, #1d4d76, #3296c8);
                padding: 20px;
                box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
                align-items: flex-start;
                gap: 15px;
            }

            nav ul.active {
                display: flex;
            }

            .phone-link {
                width: 100%;
            }
        }

        /* Admin Bar Styles */
        .admin-bar {
            background: #23282d;
            color: #eee;
            padding: 5px 0;
            font-size: 0.85rem;
            z-index: 2000;
        }

        .admin-bar-container {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .admin-bar-links {
            display: flex;
            gap: 20px;
            list-style: none;
            margin: 0;
            padding: 0;
        }

        .admin-bar-links a {
            color: #eee;
            text-decoration: none;
            font-weight: 500;
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .admin-bar-links a:hover {
            color: var(--mq-green);
        }

        /* Barra de administración en pantallas angostas (24-11-2026): en dos líneas, todo a la vista.
           Antes se deslizaba oculta y «Cerrar sesión» quedaba fuera de la pantalla. */
        @media (max-width: 991px) {
            .admin-bar-container { flex-wrap: wrap; gap: 4px 16px; }
            .admin-bar-links { flex-wrap: wrap; gap: 4px 16px; }
            .admin-bar-links a, .admin-bar-links span { white-space: nowrap; min-height: 32px; }
        }
        /* SMART SEARCH STYLES */
        .search-trigger-container { position: relative; }
        .search-trigger { font-size: 1.2rem !important; cursor: pointer; }
        
        .search-overlay-container {
            position: absolute;
            top: 100%;
            right: 0;
            width: 350px;
            background: white;
            box-shadow: 0 10px 30px rgba(0,0,0,0.15);
            border-radius: 10px;
            padding: 15px;
            margin-top: 15px;
            opacity: 0;
            visibility: hidden;
            transform: translateY(10px);
            transition: all 0.3s ease;
            z-index: 2000;
        }
        
        .search-overlay-container.active {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
        }
        
        .search-box-inner .input-group {
            display: flex;
            background: #f4f7f6;
            border-radius: 8px;
            overflow: hidden;
            border: 1px solid #eee;
        }
        
        .search-box-inner input {
            flex: 1;
            border: none;
            background: transparent;
            padding: 12px 15px;
            font-family: inherit;
            font-size: 0.95rem;
            outline: none;
        }
        
        .search-box-inner button {
            background: var(--mq-green);
            color: white;
            border: none;
            padding: 0 18px;
            cursor: pointer;
        }

        .search-suggestions-dropdown {
            margin-top: 10px;
            max-height: 300px;
            overflow-y: auto;
            display: none;
            border-top: 1px solid #f0f0f0;
        }

        .search-suggestion-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px;
            text-decoration: none;
            color: #444;
            border-bottom: 1px solid #f9f9f9;
            transition: background 0.2s;
        }

        .search-suggestion-item:hover {
            background: #f8f9fa;
            color: var(--mq-blue);
        }

        .search-suggestion-item i {
            font-size: 0.9rem;
            opacity: 0.5;
            width: 20px;
            text-align: center;
        }

        .suggestion-info { display: flex; flex-direction: column; }
        .suggestion-title { font-weight: 700; font-size: 0.9rem; line-height: 1.2; }
        .suggestion-type { font-size: 0.7rem; text-transform: uppercase; opacity: 0.6; font-weight: 800; }
