/* ═══════════════════════════════════════════════
   GAZHAL — gzl_site.css
   Identidad visual oficial: #002856 + #0093C9
   Tipografía: Nexa (via CDN) + fallback Nunito
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@300;400;600;700;800;900&family=Nunito+Sans:wght@300;400;600;700&display=swap');

:root {
    --navy:      #002856;
    --navy-dark: #001a3e;
    --navy-mid:  #003880;
    --cyan:      #0093C9;
    --cyan-light:#33aed6;
    --cyan-pale: #e0f4ff;
    --white:     #ffffff;
    --gray-50:   #f8fafc;
    --gray-100:  #f1f5f9;
    --gray-200:  #e2e8f0;
    --gray-400:  #94a3b8;
    --gray-600:  #475569;
    --gray-800:  #1e293b;
    --text:      #1e293b;
    --text-muted:#64748b;

    --font-display: 'Nunito', sans-serif;
    --font-body:    'Nunito Sans', sans-serif;

    --shadow-sm:  0 1px 3px rgba(0,40,86,0.08);
    --shadow-md:  0 4px 16px rgba(0,40,86,0.10);
    --shadow-lg:  0 8px 32px rgba(0,40,86,0.14);
    --shadow-xl:  0 20px 60px rgba(0,40,86,0.18);

    --radius-sm:  6px;
    --radius:     12px;
    --radius-lg:  20px;
    --radius-xl:  32px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    color: var(--text);
    background: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ── Utilidades ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.text-navy  { color: var(--navy); }
.text-cyan  { color: var(--cyan); }
.text-muted { color: var(--text-muted); }
.fw-900     { font-weight: 900; }

/* ── Botones ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 50px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all .2s ease;
    white-space: nowrap;
}
.btn-primary {
    background: var(--cyan);
    color: var(--white);
    border-color: var(--cyan);
}
.btn-primary:hover {
    background: var(--cyan-light);
    border-color: var(--cyan-light);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,147,201,0.35);
}
.btn-outline {
    background: transparent;
    color: var(--navy);
    border-color: var(--navy);
}
.btn-outline:hover {
    background: var(--navy);
    color: var(--white);
    transform: translateY(-2px);
}
.btn-white {
    background: var(--white);
    color: var(--navy);
    border-color: var(--white);
}
.btn-white:hover {
    background: var(--cyan-pale);
    transform: translateY(-2px);
}
.btn-lg { padding: 16px 40px; font-size: 17px; }
.btn-sm { padding: 8px 20px; font-size: 13px; }

/* ═══════════════════════════════════════════════
   NAVBAR
   ═══════════════════════════════════════════════ */
.gzl-navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
}
.gzl-navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}
.navbar-logo img { height: 40px; }
.navbar-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}
.navbar-nav a {
    padding: 8px 16px;
    color: var(--gray-600);
    text-decoration: none;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 14px;
    border-radius: 8px;
    transition: all .15s;
}
.navbar-nav a:hover { color: var(--navy); background: var(--gray-100); }
.navbar-actions { display: flex; align-items: center; gap: 12px; }
.navbar-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }

/* ═══════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════ */
.gzl-hero {
    background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 50%, var(--navy-mid) 100%);
    position: relative;
    overflow: hidden;
    padding: 100px 0 80px;
    min-height: 600px;
    display: flex;
    align-items: center;
}

/* Círculos decorativos del manual de marca */
.hero-circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.12;
}
.hero-circle-1 {
    width: 600px; height: 600px;
    background: var(--cyan);
    top: -200px; right: -100px;
}
.hero-circle-2 {
    width: 400px; height: 400px;
    background: var(--cyan);
    bottom: -150px; right: 200px;
    opacity: 0.08;
}
.hero-circle-3 {
    width: 300px; height: 300px;
    background: var(--white);
    top: 50px; left: -100px;
    opacity: 0.04;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 680px;
}
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0,147,201,0.2);
    border: 1px solid rgba(0,147,201,0.4);
    color: var(--cyan-light);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 24px;
}
.hero-title {
    font-family: var(--font-display);
    font-size: clamp(36px, 5vw, 58px);
    font-weight: 900;
    color: var(--white);
    line-height: 1.15;
    margin-bottom: 20px;
}
.hero-title span { color: var(--cyan); }
.hero-subtitle {
    font-size: 18px;
    color: rgba(255,255,255,0.75);
    max-width: 520px;
    margin-bottom: 40px;
    line-height: 1.7;
}
.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 48px;
}
.hero-stats {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}
.hero-stat-num {
    display: block;
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 900;
    color: var(--cyan);
    line-height: 1;
}
.hero-stat-label {
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    margin-top: 4px;
}

/* ═══════════════════════════════════════════════
   SECCIONES GENERALES
   ═══════════════════════════════════════════════ */
section { padding: 80px 0; }
.section-eyebrow {
    font-size: 12px;
    font-weight: 800;
    color: var(--cyan);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 12px;
}
.section-title {
    font-family: var(--font-display);
    font-size: clamp(28px, 3.5vw, 42px);
    font-weight: 900;
    color: var(--navy);
    line-height: 1.2;
    margin-bottom: 16px;
}
.section-subtitle {
    font-size: 17px;
    color: var(--text-muted);
    max-width: 580px;
    line-height: 1.7;
}
.text-center .section-subtitle { margin: 0 auto; }

/* ═══════════════════════════════════════════════
   CARACTERÍSTICAS / FEATURES
   ═══════════════════════════════════════════════ */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 56px;
}
.feature-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    transition: all .25s;
    position: relative;
    overflow: hidden;
}
.feature-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--navy), var(--cyan));
    transform: scaleX(0);
    transition: transform .25s;
    transform-origin: left;
}
.feature-card:hover {
    border-color: var(--cyan);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}
.feature-card:hover::before { transform: scaleX(1); }
.feature-icon {
    width: 52px; height: 52px;
    border-radius: var(--radius);
    background: var(--cyan-pale);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    margin-bottom: 20px;
    color: var(--navy);
}
.feature-title {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 10px;
}
.feature-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.65;
}

/* ═══════════════════════════════════════════════
   PRECIOS
   ═══════════════════════════════════════════════ */
.pricing-section { background: var(--gray-50); }
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-top: 56px;
    align-items: start;
}
.pricing-card {
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    transition: all .25s;
    position: relative;
}
.pricing-card.destacado {
    border-color: var(--navy);
    box-shadow: var(--shadow-xl);
    transform: scale(1.03);
}
.pricing-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--navy);
    color: var(--white);
    padding: 4px 20px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    letter-spacing: .5px;
}
.pricing-name {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 900;
    color: var(--navy);
    margin-bottom: 8px;
}
.pricing-price {
    font-family: var(--font-display);
    font-size: 42px;
    font-weight: 900;
    color: var(--navy);
    line-height: 1;
    margin: 16px 0 4px;
}
.pricing-price sup { font-size: 22px; vertical-align: top; margin-top: 8px; }
.pricing-period { font-size: 13px; color: var(--text-muted); margin-bottom: 24px; }
.pricing-features {
    list-style: none;
    margin-bottom: 28px;
}
.pricing-features li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: var(--gray-600);
    margin-bottom: 10px;
    line-height: 1.5;
}
.pricing-features li i { color: var(--cyan); font-size: 14px; margin-top: 2px; flex-shrink: 0; }
.pricing-features li.no i { color: var(--gray-400); }
.pricing-features li.no { color: var(--gray-400); }

/* ═══════════════════════════════════════════════
   CTA BANNER
   ═══════════════════════════════════════════════ */
.cta-section {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
    position: relative;
    overflow: hidden;
    text-align: center;
    padding: 80px 0;
}
.cta-section .hero-circle-1 { opacity: 0.08; width: 400px; height: 400px; top: -150px; right: -50px; }
.cta-section .hero-circle-2 { opacity: 0.05; bottom: -100px; left: 50px; }
.cta-title {
    font-family: var(--font-display);
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 900;
    color: var(--white);
    margin-bottom: 16px;
}
.cta-sub {
    font-size: 17px;
    color: rgba(255,255,255,0.7);
    max-width: 500px;
    margin: 0 auto 36px;
}

/* ═══════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════ */
.gzl-footer {
    background: var(--navy-dark);
    color: rgba(255,255,255,0.7);
    padding: 60px 0 24px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 48px;
}
.footer-logo img { height: 36px; margin-bottom: 16px; }
.footer-tagline { font-size: 14px; line-height: 1.6; max-width: 260px; }
.footer-col h4 {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 800;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 14px;
    transition: color .15s;
}
.footer-col ul li a:hover { color: var(--cyan); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
}
.footer-social { display: flex; gap: 12px; }
.footer-social a {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    transition: all .15s;
    font-size: 14px;
}
.footer-social a:hover { background: var(--cyan); color: var(--white); }

/* ═══════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════ */
@media (max-width: 768px) {
    .navbar-nav, .navbar-actions .btn:not(.btn-primary) { display: none; }
    .navbar-toggle { display: flex; }
    .hero-stats { gap: 24px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .pricing-card.destacado { transform: scale(1); }
}
@media (max-width: 480px) {
    .footer-grid { grid-template-columns: 1fr; }
    .hero-actions { flex-direction: column; }
    .hero-actions .btn { width: 100%; justify-content: center; }
}

/* ═══════════════════════════════════════════════
   HAMBURGER — ícono puro CSS (3 líneas)
   Uso: <i class="hamburger"></i>
   Color heredado del padre via currentColor
   ═══════════════════════════════════════════════ */
.hamburger {
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    position: relative;
    flex-shrink: 0;
    transition: background .2s;
    margin: 7px 0; /* centra visualmente el area total de 16px */
}
.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    width: 22px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform .2s, top .2s;
}
.hamburger::before { top: -7px; }
.hamburger::after  { top:  7px; }

/* Estado X cuando sidebar está abierto en móvil */
.hamburger.is-open              { background: transparent; }
.hamburger.is-open::before      { top: 0; transform: rotate(45deg); }
.hamburger.is-open::after       { top: 0; transform: rotate(-45deg); }

/* Botón hamburger en el topbar */
.topbar-hamburger {
    background: none; border: none; cursor: pointer;
    color: var(--navy, #002856);
    width: 36px; height: 36px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; padding: 0;
    transition: background .15s;
}
.topbar-hamburger:hover { background: var(--gray-50, #f5f7fa); }
}

/* ═══════════════════════════════════════════════
   HOME — GRIDSTACK ESCRITORIO PERSONALIZABLE
   ═══════════════════════════════════════════════ */
.grid-stack { min-height: 100px; }
.grid-stack-item-content { overflow: auto; height: 100%; border-radius: 0; }

/* Carousel a altura completa dentro del cell */
.grid-stack .dof-slider { height: 100%; margin-bottom: 0; border-radius: 14px; }
.grid-stack .dof-slider .carousel,
.grid-stack .dof-slider .carousel-inner,
.grid-stack .dof-slider .carousel-item { height: 100%; min-height: unset; }
.grid-stack .dof-slider .carousel-item img { height: 100%; min-height: unset; }

/* Iframe DOF a altura completa */
.grid-stack .dof-iframe-card { height: 100%; display: flex; flex-direction: column; margin-bottom: 0; }
.grid-stack .dof-iframe-card iframe { flex: 1; border: none; display: block; }

/* ── BARRA MODO EDICIÓN ── */
.gzl-editbar {
    display: none;
    background: var(--navy, #002856);
    color: white;
    border-radius: 10px;
    padding: 10px 16px;
    margin-bottom: 14px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}
.gzl-editbar.visible { display: flex; }
.gzl-editbar-label { font-size: 12px; font-weight: 700; display: flex; align-items: center; gap: 6px; opacity: .9; }
.gzl-editbar-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-edit-save {
    background: var(--cyan, #0093C9); color: white; border: none;
    padding: 6px 16px; border-radius: 7px; font-size: 12px; font-weight: 700;
    cursor: pointer; display: inline-flex; align-items: center; gap: 5px;
}
.btn-edit-save:hover { background: #007aad; }
.btn-edit-cancel {
    background: transparent; color: rgba(255,255,255,.75);
    border: 1px solid rgba(255,255,255,.25);
    padding: 6px 14px; border-radius: 7px; font-size: 12px; font-weight: 600; cursor: pointer;
}
.btn-edit-cancel:hover { background: rgba(255,255,255,.1); color: white; }
.btn-edit-widgets {
    background: rgba(255,255,255,.1); color: white;
    border: 1px solid rgba(255,255,255,.15);
    padding: 6px 14px; border-radius: 7px; font-size: 12px; font-weight: 600;
    cursor: pointer; display: inline-flex; align-items: center; gap: 5px;
}
.btn-edit-widgets:hover { background: rgba(255,255,255,.2); }
.grid-stack.gs-edit-mode { outline: 2px dashed var(--cyan, #0093C9); outline-offset: 4px; border-radius: 12px; }

/* ── ACCESOS PERSONALIZADOS — botón quitar y search ── */
.acceso-item-custom { position: relative; }
.acceso-custom-remove {
    position: absolute; top: 3px; right: 3px;
    width: 16px; height: 16px; border-radius: 50%;
    background: #ef4444; color: white; border: none;
    font-size: 9px; line-height: 1; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    padding: 0; z-index: 1;
    opacity: 0; transition: opacity .15s;
}
.acceso-item-custom:hover .acceso-custom-remove { opacity: 1; }

.accesos-buscar-input {
    width: 100%; padding: 7px 12px 7px 32px;
    border: 1px solid #d1d5db; border-radius: 8px;
    font-size: 12px; outline: none; color: #1a1a2e;
    transition: border-color .15s;
}
.accesos-buscar-input:focus { border-color: var(--cyan, #0093C9); }

.accesos-search-results {
    display: none;
    border: 1px solid #e5e7eb; border-radius: 8px;
    overflow: hidden; margin-top: 4px; max-height: 200px; overflow-y: auto;
}
.accesos-search-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 12px; cursor: pointer; font-size: 12px;
    border-bottom: 1px solid #f3f4f6; background: white;
    transition: background .1s;
}
.accesos-search-item:last-child { border-bottom: none; }
.accesos-search-item:hover { background: #f0f9ff; }
.accesos-search-item.ya-agregado { opacity: .55; cursor: default; }
.accesos-search-item > i { color: var(--navy, #002856); font-size: 15px; flex-shrink: 0; }
.accesos-search-item-txt { flex: 1; }
.accesos-search-item-txt strong { display: block; font-weight: 800; color: #1a1a2e; }
.accesos-search-item-txt span { display: block; color: #6b7280; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.accesos-add-tag { font-size: 11px; font-weight: 700; color: var(--cyan, #0093C9); white-space: nowrap; }
.accesos-ya-tag  { font-size: 11px; font-weight: 700; color: #22c55e; white-space: nowrap; }
.accesos-search-cargando,
.accesos-search-empty { padding: 10px 14px; font-size: 12px; color: #9ca3af; background: white; }

/* ── CTA VISITANTE ANÓNIMO ── */
.cta-visitante { background: linear-gradient(135deg, #001f4d 0%, #002856 60%, #003580 100%); color: white; border-radius: 14px; padding: 24px 20px; }
.cta-visitante h3 { color: white; font-size: 16px; margin-bottom: 6px; }
.cta-visitante p  { color: rgba(255,255,255,.75); font-size: 13px; margin-bottom: 16px; }
.cta-visitante-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--cyan, #0093C9); margin-bottom: 8px; }

/* ── BANNER BIENVENIDA VISITANTE ── */
.banner-visitante {
    background: linear-gradient(90deg, var(--navy, #002856) 0%, #003a8c 100%);
    color: white; border-radius: 12px;
    padding: 14px 20px;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    margin-bottom: 18px; flex-wrap: wrap;
}
.banner-visitante-txt { font-size: 13px; font-weight: 600; opacity: .9; }
.banner-visitante-txt strong { color: var(--cyan, #0093C9); }
.banner-visitante-btns { display: flex; gap: 10px; flex-shrink: 0; }
.banner-visitante-btns a {
    padding: 7px 18px; border-radius: 8px;
    font-size: 12px; font-weight: 800; text-decoration: none;
    display: inline-flex; align-items: center; gap: 5px;
}
.btn-bv-reg  { background: var(--cyan, #0093C9); color: white; }
.btn-bv-reg:hover  { background: #007aad; color: white; }
.btn-bv-login{ background: transparent; color: white; border: 1px solid rgba(255,255,255,.4); }
.btn-bv-login:hover{ background: rgba(255,255,255,.1); }

/* ── AVISO SIN PERMISO para personalizar ── */
.aviso-sin-permiso {
    display: none;
    align-items: center; gap: 8px;
    background: #fff7ed; border: 1px solid #fed7aa;
    color: #9a3412; border-radius: 8px;
    padding: 8px 14px; font-size: 12px; font-weight: 600;
    margin-top: 6px;
}
.aviso-sin-permiso i { color: #ea580c; }
.aviso-sin-permiso a { color: #0093C9; font-weight: 700; text-decoration: none; }
.aviso-sin-permiso a:hover { text-decoration: underline; }
.grid-stack.gs-edit-mode .grid-stack-item-content { cursor: grab; }
.grid-stack.gs-edit-mode .grid-stack-item-content:active { cursor: grabbing; }

/* ── Plan badge (perfil.php) ── */
.plan-badge { display:inline-flex; align-items:center; gap:6px; border-radius:50px; font-weight:700; font-size:12px; padding:3px 12px; }
.plan-badge--gratuito  { background:var(--gray-100); color:var(--gray-600); }
.plan-badge--activo    { background:var(--cyan-pale); color:var(--cyan); }
.plan-badge--admin     { background:var(--cyan-pale); color:var(--navy); }
.plan-badge--cortesia  { background:var(--cyan-pale); color:var(--navy); }
.plan-badge--demo      { background:var(--cyan-pale); color:var(--cyan); }

/* ═══════════════════════════════════════════════
   INDICADORES — control de acceso y paleta
   ═══════════════════════════════════════════════ */

/* Tendencia — variación de tasas (sin colores chillantes) */
.ind-var-up   { color: var(--navy);       font-weight: 700; }
.ind-var-down { color: var(--text-muted); font-weight: 700; }

/* Banner de acceso restringido */
.ind-lock-banner {
    display: flex; align-items: center; gap: 12px;
    background: var(--cyan-pale);
    border: 1px solid var(--cyan-light);
    border-radius: 10px; padding: 14px 18px;
    font-size: 13px; font-weight: 600; color: var(--navy);
}
.ind-lock-banner i { color: var(--cyan); font-size: 18px; flex-shrink: 0; }
.ind-lock-banner span { flex: 1; }
.ind-lock-btn {
    background: var(--navy); color: var(--white);
    padding: 6px 16px; border-radius: 6px; font-size: 12px; font-weight: 800;
    text-decoration: none; white-space: nowrap; flex-shrink: 0;
}
.ind-lock-btn:hover { background: var(--navy-mid); color: var(--white); }

/* Hero estándar para todos los módulos indicadores */
.ind-hero-std {
    background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 100%);
    padding: 40px 0; border-radius: 16px; margin-bottom: 24px; color: var(--white);
}
.ind-badge-std {
    display: inline-block;
    background: rgba(0,147,201,.25); color: var(--cyan-light);
    font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px;
    padding: 4px 12px; border-radius: 20px; margin-bottom: 12px;
}
.ind-valor-std {
    font-family: var(--font-display); font-size: 60px; font-weight: 900;
    color: var(--white); line-height: 1;
}

/* ══════════════════════════════════════════════════════════════════
   TEMAS — data-theme en <html>
   Llave de localStorage: gzl_site_theme ('light' | 'dark' | 'ocean' | 'slate')
   ══════════════════════════════════════════════════════════════════ */

/* ── Dark ─────────────────────────────────────────────────────── */
[data-theme="dark"] {
    --navy:      #38bdf8;
    --navy-dark: #0f172a;
    --cyan:      #38bdf8;
    --cyan-pale: #0c4a6e;
    --gray-50:   #0f172a;
    --gray-100:  #1e293b;
    --gray-200:  #334155;
    --white:     #1e293b;
    --text:      #e2e8f0;
    --text-muted:#94a3b8;
}
[data-theme="dark"] body { background: #0f172a; }

[data-theme="dark"] .ticker-wrap,
[data-theme="dark"] .acceso-card,
[data-theme="dark"] .ind-card,
[data-theme="dark"] .noticia-card,
[data-theme="dark"] .dof-iframe-card,
[data-theme="dark"] .modal-content {
    background: #1e293b !important;
    border-color: #334155 !important;
}
[data-theme="dark"] .ticker-inner a         { color: #cbd5e1; }
[data-theme="dark"] .ticker-inner a:hover   { color: #38bdf8; }
[data-theme="dark"] .sec-title              { color: #e2e8f0 !important; }
[data-theme="dark"] .sec-link               { color: #38bdf8 !important; }
[data-theme="dark"] .gzl-table th           { background: #0f172a !important; color: #64748b !important; border-color: #334155 !important; }
[data-theme="dark"] .gzl-table td           { border-color: #334155 !important; color: #cbd5e1 !important; }
[data-theme="dark"] .gzl-table tr:hover td  { background: #1e3a5f !important; }
[data-theme="dark"] .gzl-table td a         { color: #93c5fd !important; }
[data-theme="dark"] .dof-iframe-header      { border-color: #334155 !important; }
[data-theme="dark"] .dof-iframe-header h5   { color: #e2e8f0 !important; }
[data-theme="dark"] .ind-titulo             { color: #94a3b8 !important; }
[data-theme="dark"] .ind-valor              { color: #f1f5f9 !important; }
[data-theme="dark"] .ind-row span:last-child { color: #cbd5e1 !important; }
[data-theme="dark"] .ind-hist               { border-color: #334155 !important; }
[data-theme="dark"] .ind-icon               { background: #1e3a5f !important; color: #38bdf8 !important; }
[data-theme="dark"] .widget-info-text       { color: #e2e8f0 !important; }
[data-theme="dark"] .widget-info-desc       { color: #94a3b8 !important; }
[data-theme="dark"] .widget-info-icon       { background: #1e3a5f !important; color: #38bdf8 !important; }
[data-theme="dark"] .widget-toggle-row      { border-color: #334155 !important; }
[data-theme="dark"] .toggle-slider          { background: #334155; }
[data-theme="dark"] .modal-header,
[data-theme="dark"] .modal-footer           { border-color: #334155 !important; }
[data-theme="dark"] .modal-title            { color: #e2e8f0 !important; }
[data-theme="dark"] .acceso-check-item      { border-color: #334155 !important; background: #1e293b !important; }
[data-theme="dark"] .acceso-check-item span,
[data-theme="dark"] .acceso-check-item i    { color: #94a3b8 !important; }
[data-theme="dark"] .acceso-check-item.selected { border-color: #38bdf8 !important; background: #0c4a6e !important; }
[data-theme="dark"] .acceso-check-item.selected i,
[data-theme="dark"] .acceso-check-item.selected span { color: #38bdf8 !important; }
[data-theme="dark"] .accesos-search-results { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .accesos-search-item    { color: #cbd5e1 !important; border-color: #334155 !important; }
[data-theme="dark"] .accesos-search-item:hover { background: #1e3a5f !important; }
[data-theme="dark"] .acceso-label           { color: #e2e8f0 !important; }
[data-theme="dark"] .acceso-icon            { background: #1e3a5f !important; color: #38bdf8 !important; }
[data-theme="dark"] .modal-theme-section    { border-color: #334155 !important; }
[data-theme="dark"] .theme-opt              { border-color: #334155 !important; }
[data-theme="dark"] .theme-opt span         { color: #e2e8f0 !important; }
[data-theme="dark"] .theme-opt.active       { border-color: #38bdf8 !important; background: #0c4a6e !important; }
[data-theme="dark"] .leyes-widget-input     { background: #1e293b !important; border-color: #334155 !important; color: #e2e8f0 !important; }
[data-theme="dark"] .leyes-widget-item      { border-color: #334155 !important; }
[data-theme="dark"] .leyes-widget-item:hover { background: #1e3a5f !important; }
[data-theme="dark"] .leyes-widget-item-txt strong { color: #e2e8f0 !important; }
[data-theme="dark"] .leyes-widget-item-txt span   { color: #94a3b8 !important; }

/* ── Ocean ────────────────────────────────────────────────────── */
[data-theme="ocean"] {
    --navy:      #0052cc;
    --navy-dark: #003d99;
    --cyan:      #00a3d9;
    --cyan-pale: #bde3f2;
    --gray-50:   #eef7fd;
}
[data-theme="ocean"] body { background: #eef7fd; }

/* ── Slate ────────────────────────────────────────────────────── */
[data-theme="slate"] {
    --navy:      #1e293b;
    --navy-dark: #0f172a;
    --cyan:      #3b82f6;
    --cyan-pale: #dbeafe;
    --gray-50:   #f8fafc;
}

/* ── Hero Búsqueda — adaptación por tema ─────────────────────── */

/* Claro: gradiente navy sólido (ya definido en home.php) — no override needed */

/* Oscuro: el fondo de página es #0f172a — el hero debe ser más claro */
[data-theme="dark"] .hero-busqueda {
    background: linear-gradient(135deg, #1a3a5c 0%, #1e4f82 100%);
    border: 1px solid rgba(56, 189, 248, .15);
}
[data-theme="dark"] .hero-busqueda-input {
    background: rgba(255,255,255,.06);
    border-color: rgba(56,189,248,.2);
    color: #e2e8f0;
}
[data-theme="dark"] .hero-busqueda-input::placeholder { color: rgba(255,255,255,.3); }
[data-theme="dark"] .hero-busqueda-input:focus {
    background: rgba(255,255,255,.11);
    border-color: rgba(56,189,248,.5);
}
[data-theme="dark"] .hero-busqueda-btn { background: #38bdf8; color: #0f172a; }
[data-theme="dark"] .hero-busqueda-btn:hover { background: #7dd3fa; }
[data-theme="dark"] .hero-busqueda-chip {
    color: rgba(255,255,255,.6);
    background: rgba(56,189,248,.08);
    border-color: rgba(56,189,248,.15);
}
[data-theme="dark"] .hero-busqueda-chip:hover {
    background: rgba(56,189,248,.25);
    color: #e2e8f0;
    border-color: rgba(56,189,248,.4);
}

/* Ocean: navy→#0052cc ya lo toma vía var() — solo ajustar extremo del gradiente */
[data-theme="ocean"] .hero-busqueda {
    background: linear-gradient(135deg, #003d99 0%, #0066cc 100%);
}
[data-theme="ocean"] .hero-busqueda-btn { background: #00a3d9; }
[data-theme="ocean"] .hero-busqueda-btn:hover { background: #0087b5; }
[data-theme="ocean"] .hero-busqueda-chip:hover {
    background: rgba(0,163,217,.35);
    border-color: rgba(0,163,217,.5);
}

/* Slate: navy→#1e293b (gris oscuro) — hero queda muy sobrio, se añade acento azul */
[data-theme="slate"] .hero-busqueda {
    background: linear-gradient(135deg, #1e293b 0%, #2d3f5a 100%);
    border: 1px solid rgba(59,130,246,.2);
}
[data-theme="slate"] .hero-busqueda-btn { background: #3b82f6; }
[data-theme="slate"] .hero-busqueda-btn:hover { background: #2563eb; }
[data-theme="slate"] .hero-busqueda-chip:hover {
    background: rgba(59,130,246,.3);
    border-color: rgba(59,130,246,.5);
}

/* Panel Indicadores en modal — dark theme */
[data-theme="dark"] .ind-panel-item {
    border-color: #334155 !important;
    background: #1e293b !important;
}
[data-theme="dark"] .ind-panel-item i,
[data-theme="dark"] .ind-panel-item span { color: #94a3b8 !important; }
[data-theme="dark"] .ind-panel-item.active {
    border-color: #38bdf8 !important;
    background: #0c4a6e !important;
}
[data-theme="dark"] .ind-panel-item.active i,
[data-theme="dark"] .ind-panel-item.active span { color: #38bdf8 !important; }

/* ── Home: widget Leyes — panel azul claro ──────────────────── */
.leyes-buscador-panel {
    background: linear-gradient(135deg, #e0f4ff 0%, #c2e8f7 100%);
    border-radius: 14px;
    padding: 10px 16px 8px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    overflow: hidden;
}
.leyes-buscador-label {
    font-size: 11px;
    font-weight: 800;
    color: var(--navy, #002856);
    text-transform: uppercase;
    letter-spacing: .6px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.leyes-buscador-label i { color: var(--cyan, #0093C9); }
.leyes-buscador-label a {
    margin-left: auto;
    font-size: 11px;
    color: var(--navy, #002856);
    text-decoration: none;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    opacity: .55;
    transition: opacity .15s;
}
.leyes-buscador-label a:hover { opacity: 1; }
.leyes-buscador-form { position: relative; }
.leyes-buscador-ico {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--cyan, #0093C9);
    font-size: 16px;
    pointer-events: none;
}
.leyes-buscador-input {
    width: 100%;
    padding: 9px 12px 9px 40px;
    border-radius: 10px;
    border: 1.5px solid rgba(0, 147, 201, .3);
    background: white;
    color: var(--navy, #002856);
    font-size: 14px;
    font-weight: 500;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    font-family: inherit;
    box-sizing: border-box;
}
.leyes-buscador-input::placeholder { color: #94a3b8; }
.leyes-buscador-input:focus {
    border-color: var(--cyan, #0093C9);
    box-shadow: 0 0 0 3px rgba(0, 147, 201, .12);
}

/* Resultados del buscador Leyes (clases usadas también por el JS) */
.leyes-widget-results { flex: 1; overflow: hidden; }
.leyes-widget-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 10px;
    border-radius: 7px;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid rgba(0, 147, 201, .12);
    transition: background .12s;
}
.leyes-widget-item:hover { background: white; }
.leyes-widget-item i { font-size: 14px; color: var(--cyan, #0093C9); flex-shrink: 0; }
.leyes-widget-item-txt strong { font-size: 12px; font-weight: 800; color: var(--navy, #002856); display: block; }
.leyes-widget-item-txt span { font-size: 11px; color: #6b7280; }
.leyes-widget-hint { font-size: 11px; color: var(--navy, #002856); opacity: .45; text-align: center; padding: 10px 0; }
.leyes-widget-empty,
.leyes-widget-cargando { font-size: 12px; color: var(--navy, #002856); opacity: .6; padding: 8px 4px; display: flex; align-items: center; gap: 6px; }

/* ── Home: widget Comunicados — scrollbar fino y estético ─────── */
.grid-stack-item[gs-id="comunicados"] > .grid-stack-item-content {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.comunicados-tabla-wrap {
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,.1) transparent;
}
.comunicados-tabla-wrap::-webkit-scrollbar { width: 4px; }
.comunicados-tabla-wrap::-webkit-scrollbar-track { background: transparent; }
.comunicados-tabla-wrap::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,.12);
    border-radius: 4px;
}
.comunicados-tabla-wrap::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,.22); }

/* ── Home: widget Búsqueda Inteligente dentro del grid ─────── */
.gs-busqueda-content {
    padding-top: 10px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.hero-busqueda--widget {
    margin-bottom: 0;
    padding: 18px 24px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.hero-busqueda--widget .hero-busqueda-form { margin-bottom: 0; }
.hero-busqueda-desc {
    font-size: 11px;
    color: rgba(255,255,255,.38);
    margin: 4px 0 0;
    font-style: italic;
}

/* ── Home: widget Leyes — separación del borde de celda ──────── */
.gs-leyes-content { padding: 4px; }

/* ── Home: widget DOF Índice — iframe ocupa toda la celda ─── */
.dof-iframe-card--full {
    height: 100%;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
}
.dof-iframe-main {
    display: block;
    flex: 1;
    min-height: 0;
}

/* ── Home: widget Blog — último artículo ───────────────────── */
.blog-ultimo-wrap {
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: stretch;
    overflow: hidden;
    min-height: 120px;
}
.blog-ultimo-img-wrap { flex-shrink: 0; width: 160px; overflow: hidden; }
.blog-ultimo-img { width: 100%; height: 100%; object-fit: cover; }
.blog-ultimo-body {
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 0;
    justify-content: center;
}
.blog-ultimo-cat {
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: .4px;
}
.blog-ultimo-titulo {
    font-size: 14px;
    font-weight: 800;
    color: var(--navy, #002856);
    line-height: 1.4;
    text-decoration: none;
    display: block;
}
.blog-ultimo-titulo:hover { color: var(--cyan, #0093C9); }
.blog-ultimo-meta { display: flex; gap: 12px; font-size: 11px; color: #9ca3af; }
.blog-ultimo-meta i { margin-right: 3px; }
.blog-ultimo-leer {
    font-size: 12px;
    font-weight: 700;
    color: var(--cyan, #0093C9);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 4px;
}
.blog-ultimo-leer:hover { color: #007aad; }

/* Blog en columna lateral — imagen se expande, body al pie */
.grid-stack-item[gs-id="blog"] > .grid-stack-item-content {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.blog-ultimo-wrap--col {
    flex: 1;
    flex-direction: column;
    min-height: 0;
}
.blog-ultimo-wrap--col .blog-ultimo-img-wrap {
    width: 100%;
    flex: 1;
    min-height: 80px;
}
.blog-ultimo-img-placeholder {
    background: linear-gradient(150deg, #002856 0%, #0a4080 60%, #0d5299 100%);
}
.blog-ultimo-wrap--col .blog-ultimo-body {
    flex: none;
    justify-content: flex-start;
    padding: 12px 14px;
    gap: 6px;
}
.blog-ultimo-wrap--col .blog-ultimo-titulo {
    font-size: 14px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

/* Indicadores — sin scroll, cards compactas para caber en h=8 */
.grid-stack-item[gs-id="indicadores"] > .grid-stack-item-content {
    overflow: hidden;
}
.grid-stack-item[gs-id="indicadores"] .ind-card {
    padding: 10px 14px;
}
.grid-stack-item[gs-id="indicadores"] .ind-card:last-child {
    margin-bottom: 0;
}

/* Leyes — scrollbar sutil idéntico al de Comunicados */
.grid-stack-item[gs-id="leyes"] > .grid-stack-item-content {
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,.1) transparent;
}
.grid-stack-item[gs-id="leyes"] > .grid-stack-item-content::-webkit-scrollbar { width: 4px; }
.grid-stack-item[gs-id="leyes"] > .grid-stack-item-content::-webkit-scrollbar-track { background: transparent; }
.grid-stack-item[gs-id="leyes"] > .grid-stack-item-content::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,.12);
    border-radius: 4px;
}
.grid-stack-item[gs-id="leyes"] > .grid-stack-item-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,.22);
}

@media (max-width: 600px) {
    .blog-ultimo-img-wrap { display: none; }
    .blog-ultimo-body { padding: 12px 14px; }
}

/* ── Móvil — ajustes para widgets que pasan a columna única ─── */
@media (max-width: 767px) {
    /* Blog ocupa ancho completo — mantener layout horizontal compacto */
    .blog-ultimo-wrap--col {
        flex-direction: row;
        min-height: 110px;
    }
    .blog-ultimo-wrap--col .blog-ultimo-img-wrap {
        width: 110px;
        height: auto;
    }
    .blog-ultimo-wrap--col .blog-ultimo-body {
        justify-content: center;
    }
    /* Leyes buscador en móvil — padding reducido */
    .leyes-buscador-panel {
        padding: 14px 16px 12px;
    }
    /* Indicadores en móvil — cards más compactas */
    .ind-card { padding: 12px; margin-bottom: 8px; }
}
