@media (max-width: 1366px) {
    .hero-wrapper {
        height: 250vh;
    }

    .hero-section {
        padding: 10px;
    }

    /* ---- Título (izquierda) ---- */
    .hero-title {
        gap: 40px;
        padding: 40px;
    }

    .logo {
        width: 100%;
        height: 50px;
    }

    .hero-title h1 {
        font-size: 4rem;
    }

    .hero-title span {
        font-size: 1.2rem;
    }

    .hero-title a {
        padding: 10px;
        font-size: 1rem;
    }

    /* ---- Fondo de video (centro) ---- */
    .hero-bkg {
        top: 15px;
    }

    /* Texto que invita al click, aparece al hacer hover sobre hero-bkg */
    .hero-bkg-hint {
        font-size: 0.8rem;
        padding: 10px;
    }

    .hero-text-tag {
        font-size: 0.9rem;
    }


    .hero-text-blocks h2 {
        font-size: 2.5rem;
    }

    .hero-text-blocks p {
        font-size: 1rem;
    }

    /* ---- Aside (derecha) ---- */
    .hero-aside {
        padding: 40px;
    }

    .header a {
        font-size: 0.8rem;
    }

    .hero-aside-bottom {
        gap: 10px;
        padding-right: 40%;
    }

    .hero-aside h2 {
        font-size: 1.5rem;
    }

    .trust-block__number {
        font-size: 1.5rem;
    }

    .trust-block__text {
        font-size: 1rem;
    }


    .trust-block__cta {
        font-size: 0.8rem;
    }

    .gestion-title-block h2 {
        font-size: 3rem;
    }

    .gestion-title-block h3 {
        font-size: 1.2rem;
    }

    .gestion-title-block p {
        font-size: 1rem;
    }

    .terciary-kpi-grid {
        display: flex;
        gap: 20px;
    }

    .terciary-kpi-card {
        padding: 20px 8px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: space-between;
        gap: 20px;
        text-align: center;
    }

    .terciary-kpi-card__body {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 20px;
    }

    .terciary-kpi-card__value {
        font-size: 1.5rem;
    }

    .g-card-title {
        gap: 10px;
    }

    .g-card-title h4 {
        font-size: 1.2rem;
    }

    .g-card-title i {
        font-size: 2rem;
    }


    .g-card-content {
        width: 50%;
        padding: 40px 40px;
    }

    .g-card-content p {
        font-size: 1rem;
    }

    .g-card-button {
        width: 20%;
        height: 80%;
    }

    .g-card-button a,
    .g-card-button button {
        font-size: 0.8rem;
    }

    .gob-abierto-video-wrapper {
        height: 100vh;
    }

    /* Primer contenedor: presentación del bloque, se superpone al video fijo */
    .gob-abierto-hero {
        height: 100vh;
    }



    .gob-abierto-title h2 {
        font-size: 3rem;
        margin-bottom: 20px;
    }


    .gob-abierto-title h3 {
        font-size: 1.5rem;
        margin-bottom: 20px;
        color: #21b57a;
    }

    .gob-abierto-title p {
        font-size: 1rem;
    }

    .gob-abierto-title {
        padding: 20%;
    }

    .gob-abierto-btn a {
        font-weight: 500;
        font-size: 1rem;
        padding: 10px 0;
    }

    .gob-links a {
        font-size: 0.8rem;
        letter-spacing: .01em;
        gap: .4rem;
    }

    .gob-links .finanzas-trigger {
        font-size: 0.8rem;
    }

    .gob-links .seguridad-trigger {
        font-size: 0.8rem;
    }

    .gob-card h3 {
        font-weight: 400;
        font-size: 2rem;
        color: aliceblue;
        margin: 0 0 .9rem 0;
        line-height: 1.25;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .gob-card p {
        font-size: 1rem;
    }


    .agenda-top h2 {
        font-size: 6rem;
        bottom: -30px;
    }

    .agenda-bottom {
        height: 20vh;
    }

    .agenda-bottom h2 {
        font-size: 6rem;
        top: -22px;
        left: 80px;
    }

    .agenda-kpi .agenda-kpi__label {
        font-size: 1.8rem;
        margin: 0 0 8px;
    }

    .agenda-kpi .agenda-kpi__value {
        font-size: 2rem;
    }

    :root {
        --gap: 25px;
        --tile-w: 650px;
        --tile-h: 260px;
    }

    .news-title h2 {
        font-size: 2rem;
    }

    .news-title p {
        font-size: 1rem;
    }

    .news-title a {
        font-weight: 800;
        font-size: 1rem;
        padding: 10px 20px;
        border-radius: 24px;
    }

    .seguridad-btn {
        font-weight: 500;
        font-size: 0.8rem;
    }

    .finanzas-btn {
        font-weight: 500;
        font-size: 0.8rem;
    }

    .g-expanded-body h2 {
        font-size: 1.8rem;
    }

    .g-expanded-body p {
        font-size: 0.9rem;
    }

    .g-expanded-body li {
        font-size: 0.8rem;
    }

    .g-expanded-body span {
        font-size: 0.9rem;
    }

    .g-expanded-body a {
        font-size: 0.8rem;
    }
}

@media (max-width: 992px) {

    .hero-wrapper {
        display: none;
    }

    .sticky-nav-header {
        display: none;
    }

    .hero {
        display: block;
    }


    .gob-abierto{
        padding: 0;
    }


    :root {
        --ink: #031a15;
        --deep: #052a22;
        --mint: #ffaf03;
        --mint-pale: #ffaf03;
        --paper: #ffffff;
        --text: #e6fbf3;
        --muted: #93c4b4;
        --line: rgba(123, 232, 194, 0.2);
        --gutter: clamp(16px, 3vw, 40px);
        --ease: cubic-bezier(0.76, 0, 0.24, 1);
        --dur: 0.9s;
        color-scheme: dark;
    }



    /* ---------- Hero ---------- */
    .hero {
        position: relative;
        width: 100%;
        height: 100vh;
        height: 100svh;
        min-height: 30rem;
        overflow: hidden;
    }

    .hero__video {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: 68% 40%;
    }

    .hero__shade {
        position: absolute;
        inset: 0;
        pointer-events: none;
    }

    .tag {
        position: relative;
        z-index: 2;
        display: inline-flex;
        border-radius: 4px;
        margin-bottom: 20px;
    }

    .tag img {
        width: 100px;
        height: auto;
    }

    /* ---------- Tarjeta ---------- */
    .card {
        position: absolute;
        z-index: 3;
        left: var(--gutter);
        bottom: var(--gutter);
        width: min(32rem, calc(100% - var(--gutter) * 2));
        background: var(--paper);
        color: #08110e;
        border-radius: 1.75rem;
        overflow: hidden;
        box-shadow: 0 30px 80px -24px rgba(0, 0, 0, 0.55);
        transition:
            left var(--dur) var(--ease),
            top var(--dur) var(--ease),
            width var(--dur) var(--ease),
            height var(--dur) var(--ease),
            border-radius var(--dur) var(--ease),
            background-color var(--dur) var(--ease);
        animation: rise 0.8s 0.1s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
    }

    .card.is-open {
        left: 0;
        top: 0;
        bottom: auto;
        width: 100%;
        height: 100%;
        border-radius: 0;
        background: var(--deep);
        box-shadow: none;
    }

    .card__intro {
        padding: clamp(1.25rem, 2.6vw, 2rem);
        transition: opacity 0.35s 0.6s, transform 0.35s 0.6s, visibility 0s 0.6s;
    }

    .card.is-open .card__intro {
        opacity: 0;
        transform: translateY(-10px);
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.3s, transform 0.3s, visibility 0s 0.3s;
    }

    .card__title {
        font-size: clamp(2.6rem, 3.2vw + 5.4rem, 4.25rem);
        line-height: 0.92;
        letter-spacing: -0.045em;
        margin-bottom: 1rem;
    }

    /* "Ciudad": sobre el video, justo encima de la tarjeta cerrada.
       Posición (--word-left / --card-top) y tipografía las fija hero_responsive.js.
       z-index menor que la tarjeta: al abrirse, la tarjeta la cubre. */
    .hero__word {
        position: absolute;
        z-index: 2;
        left: var(--word-left, var(--gutter));
        top: var(--card-top, 50%);
        transform: translateY(-100%);
        margin: 0 0 -0.04em;
        color: #fff;
        text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
        white-space: nowrap;
        pointer-events: none;
        user-select: none;
        animation: wordRise 0.8s 0.1s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
    }

    @keyframes wordRise {
        from {
            transform: translateY(calc(-100% + 28px));
        }

        to {
            transform: translateY(-100%);
        }
    }

    .sr-only {
        position: absolute;
        width: 1px;
        height: 1px;
        margin: -1px;
        padding: 0;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .card__text {
        color: #2c3a35;
        max-width: 30ch;
        margin-bottom: 1.5rem;
    }

    .cta {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 1.15rem 1rem;
        border: 0;
        border-radius: 8px;
        background: #242424;
        color: #fff;
        font-weight: 700;
        cursor: pointer;
        transition: background-color 0.2s;
    }

    .cta:hover {
        background: #12302a;
    }

    .cta__chevrons {
        display: inline-flex;
        color: var(--mint);
    }

    .cta__chevrons svg {
        width: 0.9rem;
        height: 0.9rem;
        animation: nudge 1.4s ease-in-out infinite;
    }

    .cta__chevrons svg:nth-child(2) {
        animation-delay: 0.15s;
    }

    .cta__chevrons svg:nth-child(3) {
        animation-delay: 0.3s;
    }

    /* ---------- Contenido revelado ---------- */
    .reveal {
        position: absolute;
        inset: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 1.25rem;
        padding: calc(var(--gutter) * 2.5) var(--gutter);
        text-align: center;
        visibility: hidden;
        opacity: 0;
        background-color: #242424;
        /* Cierre: se desvanece rápido y recién después se oculta */
        transition: opacity 0.25s ease, visibility 0s 0.25s;
    }

    .card.is-open .reveal {
        visibility: visible;
        opacity: 1;
        /* Apertura: el fondo se funde mientras la tarjeta crece (sin corte brusco) */
        transition: opacity 0.6s ease 0.2s, visibility 0s;
    }


    /* El título recibe el foco por JS al terminar: sin recuadro que aparezca de golpe */
    .reveal__title:focus {
        outline: none;
    }

    .reveal__eyebrow {
        width: 100%;
        font-size: 0.8125rem;
        font-weight: 700;
        letter-spacing: 0.16em;
        text-transform: uppercase;
        color: var(--mint);
        text-align: start;
    }

    .reveal__title {
        max-width: 18ch;
        font-size: 3.2rem;
        line-height: 0.95;
        letter-spacing: -0.04em;
        color: #fff;
        text-align: start;
    }

    .reveal__text {
        max-width: 52ch;
        font-size: clamp(1rem, 0.8vw + 0.85rem, 1.25rem);
        color: var(--mint-pale);
        text-align: justify;
        text-justify: inter-word;
    }

    .reveal__close {
        position: absolute !important;
        top: var(--gutter);
        right: var(--gutter);
        padding: 0.55rem 1.1rem;
        border: 1px solid var(--line);
        border-radius: 999px;
        background: rgba(3, 26, 21, 0.4);
        color: var(--text);
        font-size: 0.875rem;
        font-weight: 700;
        cursor: pointer;
    }

    .reveal__close:hover {
        background: rgba(123, 232, 194, 0.15);
    }

    .reveal__cue {
        position: absolute !important;
        bottom: calc(var(--gutter) + env(safe-area-inset-bottom, 0px));
        left: 50%;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.35rem;
        margin-left: -4rem;
        width: 8rem;
        font-size: 0.8125rem;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: var(--mint);
    }

    .reveal__cue svg {
        width: 1.25rem;
        height: 1.25rem;
        animation: bob 1.6s ease-in-out infinite;
    }


    /* ---------- Animaciones ---------- */
    @keyframes rise {
        from {
            transform: translateY(28px);
        }

        to {
            transform: none;
        }
    }

    @keyframes nudge {

        0%,
        100% {
            opacity: 0.35;
            transform: translateX(0);
        }

        50% {
            opacity: 1;
            transform: translateX(3px);
        }
    }

    @keyframes bob {

        0%,
        100% {
            transform: translateY(0);
        }

        50% {
            transform: translateY(5px);
        }
    }

    @media (max-width: 52rem) {
        .split {
            grid-template-columns: minmax(0, 1fr);
        }

        .hero__video {
            object-position: 70% 40%;
        }
    }

    @media (max-width: 30rem) {
        .row {
            grid-template-columns: minmax(0, 1fr);
        }

        .row__tag {
            grid-row: auto;
            grid-column: 1;
            justify-self: start;
            order: -1;
        }

        .final .cta {
            width: 100%;
            justify-content: space-between;
        }
    }

    @media (prefers-reduced-motion: reduce) {
        :root {
            --dur: 0.01s;
        }

        .card,
        .hero__word,
        .card__intro,
        .reveal,
        .reveal>* {
            animation: none !important;
            transition-duration: 0.01s !important;
            transition-delay: 0s !important;
        }

        .cta__chevrons svg,
        .reveal__cue svg {
            animation: none;
        }
    }


















    .agenda-top {
        height: 20vh;
    }

    .agenda-top,
    .agenda-bottom {
        height: 10vh;
        padding-left: 24px;
    }

    .agenda-top {
        height: 20vh;
    }

    .agenda-top h2 {
        font-size: 3rem;
        bottom: -15px;
        transform: translateY(120%);
    }

    .agenda-bottom h2 {
        font-size: 3rem;
        top: -12px;
        left: 20px;
        transform: translateY(-120%);
    }


    .agenda-kpi {
        width: 100%;
        flex-wrap: wrap;
        padding: 20px 24px;
        gap: 10px;
    }

    .agenda-kpi .agenda-kpi__card {
        width: 50%;
        flex: 1 1 calc(50% - 10px);
        padding: 1.6rem .8rem;
        text-align: center;
    }

    .agenda-kpi .agenda-kpi__label {
        font-size: 1.15rem;
        margin: 0 0 6px;
    }

    .agenda-kpi .agenda-kpi__value {
        font-size: 2.1rem;
    }

    :root {
        --tile-w: 260px;
        --tile-h: 230px;
        --gap: 14px;
    }

    .card-inner {
        padding: 16px;
    }

    .card-title {
        font-size: 15px;
        margin-bottom: 8px;
    }

    .card-text {
        font-size: 12px;
    }

    .card-logo {
        max-height: 56px;
    }

    .carrusel-item {
        flex: 0 0 auto;
        width: var(--tile-w);
        height: auto;
    }

    .news-title {
        padding: 40px 20px;
        gap: 40px;
    }

    .news-title h2 {
        font-size: 1.5rem;
    }

    .news-title p {
        font-size: 0.9rem;
    }

    .news-title a {
        font-size: var(--fs-a);
        padding: 10px 15px;
    }

    .expanded-hero-title {
        text-align: center;
        padding: 20px;
    }

    .datos-row-reverse {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .datos-row-title {
        width: 100%;
        height: auto;
        display: flex;
        flex-direction: column;
        gap: 20px;

    }

    .g-expanded-body {
        padding: 20px;
    }

    .datos-row-chart {
        display: none;
    }

    .cards-container {
        width: 100%;
        height: auto;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        gap: 24px;
        margin: 0 auto;
        margin-top: 40px;
    }

    .chat-card {
        display: none;
    }

    .chatbot-main {
        width: 100%;
    }

    .lista-servicios {
        width: 100%;
        list-style: none;
        padding: 0;
        display: flex;
        flex-wrap: wrap;
        margin-bottom: 40px;
    }

    .lista-servicios li {
        position: relative;
        padding: 10px 20px;
        margin-bottom: 10px;
        background: #f0f4f8;
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.3s ease;
        font-weight: 500;
        color: #2c3e50;
        border-left: 4px solid #3498db;
        z-index: 0;
    }

    .lista-servicios li:hover {
        background: #e1e9f0;
        transform: translateX(5px);
        border-left-color: #039494;
        z-index: 100;
    }

    .gestion-kpi-block {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 10px;
    }

    .terciary-kpi-grid {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
        padding: 0;
    }

    .terciary-kpi-card {
        padding: 22px 10px;
        width: 220px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-height: 100px;
        position: relative;
        overflow: hidden;
        opacity: 0;
    }

    .terciary-kpi-card__body {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-around;
        gap: 10px;
        flex: 1;
    }

    .terciary-kpi-chart {
        width: 52px;
        height: 52px;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .hamburger-btn {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        max-height: 0;
        overflow: hidden;
        background: #ffffff;
        box-shadow: 0 18px 30px -10px rgba(0, 0, 0, 0.12);
        border-top: 1px solid rgba(0, 0, 0, 0.05);
        transition: max-height 0.35s ease;
    }

    .nav-menu.active {
        max-height: calc(100vh - 100%);
        overflow-y: auto;
    }

    .nav-list {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 0.2rem;
        padding: 0.6rem 1rem 1.4rem;
    }

    .nav-item {
        width: 100%;
    }

    .nav-btn-row {
        width: 100%;
    }

    .nav-btn {
        flex: 1;
        border-radius: 10px;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-item--simple .nav-btn--simple {
        width: 100%;
        justify-content: flex-start;
        border-radius: 10px;
    }

    .nav-btn--primary {
        justify-content: center;
    }

    /* Dropdowns pasan a ser acordeones dentro del menú */
    .dropdown {
        position: static;
        opacity: 1;
        pointer-events: auto;
        transform: none;
        box-shadow: none;
        border: none;
        min-width: 0;
        max-height: 0;
        overflow: hidden;
        padding: 0;
        transition: max-height 0.3s ease, padding 0.3s ease;
    }

    .nav-item.open>.dropdown {
        max-height: 800px;
        padding: 0.3rem 0 0.6rem;
    }

    .dropdown li a {
        padding: 0.55rem 1.4rem;
    }

    .dropdown-item.open>.submenu {
        max-height: 400px;
    }

    .submenu {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .site-footer {
        height: auto;
        position: relative;
        overflow: hidden;
        background-image: url(../assets/images/footer.png);
        background-size: cover;
        background-position: center;
        color: aliceblue;
        padding: 20px 20px;
    }

}

/* Ajustes finos para pantallas muy chicas */
@media (max-width: 480px) {
    .hero-title {
        padding: 30px 18px !important;
        gap: 18px;
    }

    .hero-title .logo {
        height: 56px;
    }

    .trust-block__number {
        font-size: 1.5rem;
    }

    .sticky-nav-header {
        position: fixed;
    }

    .nav-wrapper {
        flex-wrap: nowrap;
        justify-content: center;
        align-items: center;
    }

    .nav-logo {
        height: 40px;
        display: none;
    }

    .nav-btn i {
        display: none;
    }

    .nav-menu {
        justify-content: center;
        gap: 0.1rem;
    }

    .nav-btn {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }

    .dropdown {
        min-width: 180px;
    }

}

/* ==========================================================
   GESTIÓN · RESPONSIVE MÓVIL
   Va al final de responsive.css (se carga después de styles.css,
   así pisa las reglas de escritorio con la misma especificidad).
   ========================================================== */

/* ---------- Móvil / tablet chica (≤ 768px) ---------- */
@media (max-width: 768px) {

    /* ===== 1. Grilla de título + KPIs con máscara de video ===== */

    /* Mosaico de 2 columnas. Las filas de los KPIs tienen alto fijo
       para que la máscara de video siempre tenga rectángulos estables. */
    .gestion-main {
        height: auto;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: auto auto repeat(3, clamp(140px, 30vw, 220px)) auto;
        gap: 10px;
        padding: 16px;
    }

    /* Reubicación explícita (pisa grid-column-start / grid-row-start del escritorio) */
    .g-box1 {
        grid-column: 1 / -1;
        grid-row: 1;
        margin-top: 40px;
    }

    .g-box2 {
        grid-column: 1 / -1;
        grid-row: 2;
        margin-bottom: 40px;
    }

    .g-box3 {
        grid-column: 1 / -1;
        grid-row: 3;
    }

    .g-box5 {
        grid-column: 1;
        grid-row: 4 / span 2;
    }

    .g-box4 {
        grid-column: 2;
        grid-row: 4;
    }

    .g-box7 {
        grid-column: 2;
        grid-row: 5;
    }

    .g-box6 {
        grid-column: 1 / -1;
        grid-row: 6;
    }

    .g-box-title {
        padding-top: 12px;
    }

    .g-box-title h2 {
        font-size: clamp(3.6rem, 8vw, 3rem);
        line-height: 1.05;
    }

    .g-box-subtitle {
        padding-right: 0;
    }

    .g-box-subtitle p {
        font-size: 1.5rem;
        line-height: 1.5;
        color: #242424;
    }

    .g-box-content {
        padding: 6px 0 0;
        font-size: 1rem;
        line-height: 1.5;
        color: #242424;
        margin: 20px 0;
    }

    .g-box-bkg {
        border-radius: 18px;
    }

    .g-content {
        padding: 14px;
        gap: 4px;
    }

    .g-kpi {
        font-size: clamp(2.25rem, 9vw, 3.5rem);
    }

    .g-label {
        font-size: 0.8rem;
        line-height: 1.25;
    }


    /* ===== 2. Slider (IA / Ciencia de Datos / Productos Digitales) ===== */

    .gestion-content {
        padding: 0px;
        margin: 16px 0 0px;
    }

    /* El alto lo define el contenido, ya no 100vh */
    .g-slider {
        height: auto;
        min-height: 0;
    }

    .g-slider-stage {
        position: relative;
        inset: auto;
        border-radius: 24px;
    }

    /* Degradado vertical: el texto ocupa todo el ancho */
    .g-slider-overlay {
        background: linear-gradient(180deg, rgba(36, 36, 36, 0.55) 0%, rgba(36, 36, 36, 0.75) 100%);
    }

    /* Nav: 3 pestañas del mismo ancho, con el texto en dos líneas si hace falta */
    .g-slider-nav {
        top: 14px;
        left: 12px;
        right: 12px;
        transform: none;
        max-width: none;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 2px;
        padding: 5px;
        overflow: visible;
    }

    .g-slider-indicator {
        top: 5px;
        bottom: 5px;
    }

    .g-slider-tab {
        padding: 9px 6px;
        font-size: 0.74rem;
        line-height: 1.15;
        white-space: normal;
        text-align: center;
    }

    .g-slide {
        height: auto;
    }

    /* Texto en una columna. Arriba deja lugar para el nav,
       abajo el espacio que tapa la card al solaparse (28px) */
    .g-slide-inner {
        height: auto;
        grid-template-columns: minmax(0, 1fr);
        align-content: start;
        gap: 0;
        padding: 96px 20px 60px;
    }

    .g-slide-title {
        font-size: clamp(2rem, 9vw, 2.75rem);
        margin-bottom: 14px;
    }

    .g-slide-text p {
        max-width: none;
        font-size: 1rem;
        line-height: 1.55;
    }

    .g-slide-cta {
        margin-top: 20px;
        padding: 13px 22px;
        font-size: 0.95rem;
    }


    /* ===== 3. Card blanca con las apps ===== */

    /* Pasa de absoluta a flujo normal, solapando la base del slider */
    .g-card {
        --g-r: 24px;
        --g-overhang: 0px;
        position: relative;
        top: auto;
        right: auto;
        bottom: auto;
        left: auto;
        width: 100%;
        height: auto;
        margin-top: -28px;
        padding: 12px 12px 4px;
        border-radius: var(--g-r) var(--g-r) 0 0;
    }

    /* Las curvas cóncavas de los costados no entran en una card a todo el ancho */
    .g-card::before,
    .g-card::after {
        display: none;
    }

    .g-card-frame {
        height: auto;
    }

    .g-card-track {
        height: auto;
    }

    .g-card-item {
        height: auto;
    }

    .g-card-item--apps {
        padding: 0;
        overflow: hidden;
    }

    /* Las tarjetas se agrupan de a dos (una arriba de la otra) y cada par
       se desliza en horizontal, con el siguiente par asomando */
    .g-apps,
    .g-apps--2,
    .g-apps--4 {
        display: grid;
        grid-auto-flow: column;
        grid-template-columns: none;
        grid-template-rows: repeat(2, auto);
        grid-auto-columns: calc(100% - 28px);
        gap: 10px;
        min-height: 0;
        padding: 4px 4px 14px;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        scroll-padding-inline: 4px;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .g-apps::-webkit-scrollbar {
        display: none;
    }

    .g-apps .g-app {
        min-width: 0;
        scroll-snap-align: start;
        grid-template-columns: 48px minmax(0, 1fr);
        grid-template-rows: auto auto 1fr auto;
        align-content: stretch;
        gap: 6px 12px;
        padding: 16px;
        border-radius: 18px;
    }

    .g-apps .g-app-icon {
        width: 48px;
        height: 48px;
        border-radius: 14px;
        font-size: 1.3rem;
    }

    .g-apps .g-app-title {
        font-size: 1rem;
    }

    .g-apps .g-app-desc {
        margin-top: 4px;
        font-size: 0.85rem;
        -webkit-line-clamp: 3;
    }

    /* La fila de etiquetas absorbe el alto sobrante: el botón queda siempre abajo */
    .g-apps .g-app-tags {
        align-items: flex-start;
        align-content: flex-start;
    }

    .g-apps .g-app-tags span {
        padding: 3px 10px;
        font-size: 0.72rem;
    }

    /* Botones con alto táctil de 44px */
    .g-apps .g-app-btn {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
        margin-top: 8px;
        padding: 0 20px;
        font-size: 0.85rem;
    }
}


/* ---------- Teléfonos chicos (≤ 380px) ---------- */
@media (max-width: 380px) {

    .gestion-main {
        padding: 12px;
        gap: 8px;
        grid-template-rows: auto auto repeat(3, 132px) auto;
    }

    .gestion-content {
        padding: 12px;
    }

    .g-content {
        padding: 12px;
    }

    .g-kpi {
        font-size: 2rem;
    }

    .g-label {
        font-size: 0.75rem;
    }

    .g-slide-inner {
        padding-inline: 16px;
    }

    .g-slider-tab {
        font-size: 0.7rem;
        padding-inline: 4px;
    }

    .g-apps .g-app {
        padding: 14px;
    }
}

@media (max-width: 900px) {
    .gob-grid {
        height: auto;
        min-height: 0;
        grid-template-rows: auto auto auto;
    }
 
    .gob-box1 {
        grid-column: 1 / -1;
        grid-row: 1;
        padding: 20px 16px 28px;
    }
 .gob-box1 p{
    font-size: 1.5rem;
 }
    /* El bloque 3 ocupa todo el ancho: sin pestaña ni curva cóncava */
    .gob-box3 {
        grid-column: 1 / -1;
        grid-row: 2;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 12px 20px;
        padding: 20px 16px;
    }
 
    .gob-icon {
        width: 56px;
        height: 56px;
        font-size: 1.3rem;
    }
 
    .gob-box2 {
        grid-column: 1 / -1;
        grid-row: 3;
    }
 
    .gob-viewport,
    .gob-track {
        height: auto;
    }
 
    .gob-slide {
        height: auto;
        padding: 32px 24px;
    }
 
    .gob-cards {
        grid-template-columns: 1fr;
    }
}
 
@media (prefers-reduced-motion: reduce) {
 
    .gob-track,
    .gob-icon,
    .gob-nav-label,
    .gob-slide-title,
    .gob-slide-lead,
    .gob-card {
        transition-duration: 0.01ms !important;
        transition-delay: 0s !important;
    }
}
 

/* ================= HERO MOBILE: video arriba + panel con texto abajo =================
   Misma estética del hero de escritorio: marco con degradé, panel claro y
   muescas semicirculares. La tarjeta sigue abriéndose a pantalla completa.
   Variables: --frame (marco), --panel (color), --notch (tamaño muescas).      */
@media (max-width: 992px) {

    .hero {
        --frame: 12px;
        --panel: #eef4f2;
        --notch: clamp(64px, 20vw, 96px);
        /* alto del video = hasta donde empieza la tarjeta (--card-top lo fija hero.responsive.js) */
        --vid-h: calc(var(--card-top, 56%) - var(--frame));
background: linear-gradient(to bottom, rgba(255,255,255,0.15) 0%, rgba(0,0,0,0.15) 100%), radial-gradient(at top center, rgba(255,255,255,0.40) 0%, rgba(0,0,0,0.40) 120%) #989898;
 background-blend-mode: multiply,multiply;
    }

    /* Video arriba, dentro del marco */
    .hero__video {
        inset: var(--frame) var(--frame) auto var(--frame);
        width: calc(100% - var(--frame) * 2);
        height: var(--vid-h);
        border-radius: 4px 4px 0 0;
    }

    /* Capa del tamaño del video: recorta las muescas (mitad visible) */
    .hero__shade {
        inset: var(--frame) var(--frame) auto var(--frame);
        height: var(--vid-h);
        overflow: hidden;
        border-radius: 4px 4px 0 0;
    }

    .hero__shade::before,
    .hero__shade::after {
        content: "";
        position: absolute;
        left: 50%;
        width: var(--notch);
        height: var(--notch);
        margin-left: calc(var(--notch) / -2);
        border-radius: 50%;
        background: var(--panel);
    }

    .hero__shade::before { top: calc(var(--notch) / -2); }
    .hero__shade::after { bottom: calc(var(--notch) / -2); }

    /* Tarjeta cerrada = panel claro pegado al video, ancho completo */
    .card {
        left: var(--frame);
        bottom: var(--frame);
        width: calc(100% - var(--frame) * 2);
        background: var(--panel);
        border-radius: 0 0 4px 4px;
        box-shadow: none;
    }

    .card__intro {
        padding: 28px 24px 24px;
    }

    .tag { margin-bottom: 28px; }
    .tag img { width: 64px; }

    .card__title {
        font-size: clamp(2.4rem, 11vw, 4rem);
        font-weight: 500;
        line-height: 0.95;
        letter-spacing: -0.04em;
        color: #1d2422;
        margin-bottom: 14px;
    }

    .card__text {
        color: #3b4543;
        max-width: 36ch;
        margin-bottom: 20px;
    }

    /* El título completo vive en el panel: se oculta la palabra flotante
       sobre el video y se muestra la parte "sr-only" del título */
    .hero__word { display: none; }

    .card__title .sr-only {
        position: static;
        width: auto;
        height: auto;
        margin: 0;
        overflow: visible;
        clip: auto;
        white-space: normal;
    }

    .card__title .sr-only::after { content: " "; }
}


/* ==========================================================================
   RESPONSIVE FIXES
   Cargar DESPUÉS de styles.css, gob-grid.css y responsive.css.
   Breakpoint "mobile/tablet" del proyecto: 992px (el mismo que ya usa
   .showcase para pasar a una sola columna).
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. Paddings de Gestión y Gobierno abierto: iguales y lo más chicos posible
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {

    /* Aire vertical entre secciones: se cambia en un solo lugar */
    :root {
        --section-air: 40px;
    }

    /* Sección (marco exterior): 6px a los lados, aire arriba y abajo */
    .gestion .gestion-main {
        padding: var(--section-air) 6px;
    }

    .gobierno-abierto {
        --ga-inset-x: 6px;
        --ga-inset-y: var(--section-air);
        padding: var(--section-air) 6px;
    }

    .gobierno-abierto .gobierno-main {
        padding: 0;
    }

    /* Tarjeta interna */
    .gestion-showcase .showcase__card,
    .gobierno-showcase .showcase__card {
        padding: 12px;
        border-radius: 20px;
    }

    .gestion-showcase .showcase__top,
    .gobierno-showcase .showcase__top {
        gap: 16px;
    }

    /* Separación entre el bloque superior y el slider / selector */
    .gestion-showcase .showcase__extra,
    .gobierno-showcase .showcase__extra {
        margin-top: 16px;
        padding-top: 16px;
    }
}

/* --------------------------------------------------------------------------
   1. HERO · mobile / tablet
   Estructura: marco claro con aire a los lados; dentro, una tarjeta redondeada
   con el video de fondo y todo el contenido encima (logo arriba, titular, texto
   y dos botones). Abajo a la izquierda, una "muesca" del color de la página
   se mete en la tarjeta (borde inverso curvo).
   Variables editables en .hero: --hero-gap, --hero-radius, --hero-accent,
   --hero-notch-w, --hero-notch-h.
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
    .hero {
        --hero-gap: 12px;
        --hero-radius: 24px;
        --hero-accent: #ffaf03;
        --hero-on-accent: #242424;
        --hero-bg: aliceblue;
        --hero-notch-w: 52%;
        --hero-notch-h: 52px;
        --hero-curve: 24px;
        position: relative;
        display: block;
        width: 100%;
        height: auto;
        min-height: 100svh;
        padding: var(--hero-gap);
        overflow: hidden;
        background: var(--hero-bg);
        box-sizing: border-box;
    }

    /* Video: es el fondo de la tarjeta */
    .hero__video {
        position: absolute;
        top: var(--hero-gap);
        left: var(--hero-gap);
        width: calc(100% - var(--hero-gap) * 2);
        height: calc(100% - var(--hero-gap) * 2);
        min-height: 0;
        order: 0;
        display: block;
        object-fit: cover;
        object-position: center;
        border-radius: var(--hero-radius);
        z-index: 0;
    }

    /* Velo verde/oscuro para que el texto se lea sobre el video */
    .hero__shade {
        position: absolute;
        top: var(--hero-gap);
        left: var(--hero-gap);
        width: calc(100% - var(--hero-gap) * 2);
        height: calc(100% - var(--hero-gap) * 2);
        min-height: 0;
        border-radius: var(--hero-radius);
        background: linear-gradient(180deg, rgba(20, 60, 55, 0.55) 0%, rgba(20, 60, 55, 0.35) 55%, rgba(20, 40, 40, 0.65) 100%);
        pointer-events: none;
        z-index: 1;
    }

    /* Tarjeta: transparente, solo ordena el contenido sobre el video */
    .hero .card {
        position: relative;
        inset: auto;
        z-index: 2;
        display: flex;
        flex-direction: column;
        width: 100%;
        max-width: none;
        min-height: calc(100svh - var(--hero-gap) * 2);
        margin: 0;
        padding: 0;
        background: transparent;
        box-shadow: none;
        border-radius: var(--hero-radius);
        color: aliceblue;
        box-sizing: border-box;
    }

    .hero .card__intro {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding: 22px 20px calc(var(--hero-notch-h) + 26px);
    }

    /* Logo arriba a la izquierda */
    .hero .tag {
        display: flex;
        align-items: center;
        height: 34px;
        margin-bottom: auto;
        padding: 0;
        background: transparent;
    }

    .hero .tag img {
        height: 100%;
        width: auto;
        object-fit: contain;
        display: none;
    }

    .hero .card__title {
        margin: 40px 0 18px;
        color: aliceblue;
        font-size: clamp(2.3rem, 11vw, 3.6rem);
        font-weight: 500;
        line-height: 1.04;
        letter-spacing: -0.03em;
    }

    .hero .card__text {
        max-width: 34ch;
        margin: 0 0 24px;
        color: rgba(240, 248, 255, 0.9);
        font-size: 0.95rem;
        line-height: 1.5;
    }

    /* Botones: uno lleno (acento) y otro con borde */
    .hero .card__actions {
        display: flex;
        flex-wrap: nowrap;
        gap: 8px;
    }

    .hero .cta,
    .hero .cta--ghost {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 14px 18px;
        border-radius: 999px;
        font-family: inherit;
        font-size: 0.86rem;
        font-weight: 600;
        line-height: 1;
        text-decoration: none;
        cursor: pointer;
        box-sizing: border-box;
    }

    .hero .cta {
        border: 1.5px solid var(--hero-accent);
        background: var(--hero-accent);
        color: var(--hero-on-accent);
    }

    .hero .cta--ghost {
        border: 1.5px solid rgba(240, 248, 255, 0.7);
        background: transparent;
        color: aliceblue;
    }

    .hero .cta:focus-visible,
    .hero .cta--ghost:focus-visible {
        outline: 3px solid aliceblue;
        outline-offset: 3px;
    }

    /* Sin círculos decorativos heredados de responsive.css */
    .hero .card::before,
    .hero .card::after,
    .hero__shade::before,
    .hero__shade::after,
    .hero .tag::before,
    .hero .tag::after,
    .hero .card__intro::before,
    .hero .card__intro::after,
    .hero .reveal::before,
    .hero .reveal::after {
        content: none;
        display: none;
    }

    /* Muesca inferior izquierda: el color de la página entra en la tarjeta */
    .hero::after {
        content: "";
        position: absolute;
        z-index: 3;
        top: auto;
        right: auto;
        left: 0;
        bottom: 0;
        transform: none;
        box-shadow: none;
        width: calc(var(--hero-notch-w) + var(--hero-gap));
        height: calc(var(--hero-notch-h) + var(--hero-gap));
        background: var(--hero-bg);
        border-radius: 0 var(--hero-curve) 0 0;
        pointer-events: none;
    }

    /* Curva cóncava a la derecha de la muesca (borde inverso) */
    .hero::before {
        content: "";
        position: absolute;
        z-index: 3;
        top: auto;
        right: auto;
        border-radius: 0;
        transform: none;
        box-shadow: none;
        left: calc(var(--hero-notch-w) + var(--hero-gap));
        bottom: var(--hero-gap);
        width: var(--hero-curve);
        height: var(--hero-curve);
        background: radial-gradient(circle at 100% 0, transparent calc(var(--hero-curve) - 0.5px), var(--hero-bg) var(--hero-curve));
        pointer-events: none;
    }
}

/* --------------------------------------------------------------------------
   2. KPIs de Gestión y Gobierno abierto: mismo comportamiento
   Ambos se apilan en una sola columna (número + descripción) y la etiqueta
   queda debajo, alineada a la izquierda. Antes Gobierno se quedaba en fila
   y la etiqueta lo empujaba hacia la derecha.
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {

    .gestion-showcase .showcase__right,
    .gobierno-showcase .showcase__right {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 18px;
        text-align: left;
    }

    .gestion-showcase .showcase__stats,
    .gobierno-showcase .showcase__stats {
        flex-direction: column;
        flex-wrap: nowrap;
        gap: 0;
        width: 100%;
    }

    .gestion-showcase .showcase__stats li,
    .gobierno-showcase .showcase__stats li {
        display: grid;
        grid-template-columns: minmax(96px, 0.4fr) 1fr;
        align-items: center;
        gap: 16px;
        padding: 14px 0;
        border-top: 1px solid rgba(36, 36, 36, 0.14);
    }

    .gobierno-showcase .showcase__stats li {
        border-top-color: rgba(240, 248, 255, 0.14);
    }

    .gestion-showcase .showcase__stats li:last-child {
        border-bottom: 1px solid rgba(36, 36, 36, 0.14);
    }

    .gobierno-showcase .showcase__stats li:last-child {
        border-bottom: 1px solid rgba(240, 248, 255, 0.14);
    }

    .gestion-showcase .showcase__stats strong,
    .gobierno-showcase .showcase__stats strong {
        font-size: clamp(1.8rem, 8vw, 2.6rem);
    }

    .gestion-showcase .showcase__stats span,
    .gobierno-showcase .showcase__stats span {
        max-width: none;
        margin: 0;
        font-size: 0.85rem;
    }

    .gestion-showcase .showcase__tag,
    .gobierno-showcase .showcase__tag {
        align-self: flex-start;
        text-align: left;
    }
}

/* --------------------------------------------------------------------------
   3. Canvas animados de Gestión y Gobierno abierto: fuera en mobile / tablet
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
    .gestion-showcase #g-chart,
    .gobierno-showcase .win-scene {
        display: none;
    }
}

/* --------------------------------------------------------------------------
   3b. Aire arriba y abajo en Gobernanza algorítmica y Agenda
   (Agenda: el aire superior se suma a la altura del bloque claro del título,
   porque el fondo de la sección es oscuro y una franja arriba se vería mal)
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
    .g-algoritmica {
        padding-top: var(--section-air);
        padding-bottom: var(--section-air);
    }

    .agenda {
        padding-bottom: var(--section-air);
    }
}

/* --------------------------------------------------------------------------
   4. Tarjetas del selector (.gsel): una debajo de la otra, a todo el ancho
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {

    .gsel__grid {
        grid-template-columns: 1fr;
        grid-template-rows: none;
        grid-auto-rows: auto;
        width: 100%;
    }

    .gsel__card {
        width: 100%;
    }

    .gsel__face {
        min-height: 190px;
    }

    /* Las tarjetas expandibles ya no necesitan ocupar "dos columnas" */
    .gsel__card--exp.is-open {
        grid-column: auto;
    }

    .gsel__card--exp.is-open .gsel__face {
        width: 100%;
    }

    /* El resaltado no debe empujar fuera del ancho disponible */
    .gsel__card.is-active {
        transform: none;
    }
}

/* --------------------------------------------------------------------------
   5. Agenda · títulos centrados y KPIs
   Títulos: centrados, una sola línea y sin recortes. "AGENDA" (6 letras) va
   mucho más grande; "INTERNACIONAL" (13 letras) se ajusta al ancho de pantalla.
   KPIs: grilla 2x2 en todos los celulares. Cada tarjeta lleva un fondo
   suave, borde fino, una marca de color y el número grande arriba con la
   etiqueta debajo, para que las 4 se vean parejas.
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {

    .agenda .agenda-top,
    .agenda .agenda-bottom {
        padding-left: 0;
        padding-right: 0;
        text-align: center;
    }

    .agenda .agenda-top {
        height: calc(30vh + var(--section-air));
        min-height: calc(150px + var(--section-air));
    }

    .agenda .agenda-bottom {
        height: 14vw;
        min-height: 56px;
    }

    .agenda .agenda-top h2,
    .agenda .agenda-bottom h2 {
        left: 0;
        right: 0;
        width: 100%;
        margin: 0;
        line-height: 1;
        text-align: center;
        white-space: nowrap;
    }

    /* AGENDA: el título protagonista */
    .agenda .agenda-top h2 {
        font-size: clamp(3rem, 20vw, 9rem);
        bottom: -0.08em;
    }

    /* INTERNACIONAL: la palabra más larga, ajustada al ancho */
    .agenda .agenda-bottom h2 {
        font-size: clamp(1.5rem, 10.6vw, 5.5rem);
        top: -0.06em;
    }

    .agenda .agenda-main {
        padding: 28px 0 20px;
    }

    .agenda .agenda-kpi {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        width: 100%;
        max-width: 640px;
        margin: 0 auto;
        padding: 0 20px;
        box-sizing: border-box;
    }

    .agenda .agenda-kpi .agenda-kpi__card {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 100%;
        min-width: 0;
        margin: 0;
        padding: 26px 8px 20px;
        box-sizing: border-box;
        text-align: center;
        background: rgba(240, 248, 255, 0.06);
        border: 1px solid rgba(240, 248, 255, 0.14);
        border-radius: 16px;
    }

    /* Marca de color arriba de cada tarjeta */
    .agenda .agenda-kpi .agenda-kpi__card::before {
        content: "";
        position: absolute;
        top: 0;
        left: 50%;
        width: 32px;
        height: 3px;
        border-radius: 0 0 3px 3px;
        background: #2f5fd6;
        transform: translateX(-50%);
    }

    /* Número arriba (grande), etiqueta debajo (chica) */
    .agenda .agenda-kpi .agenda-kpi__value {
        order: 1;
        margin: 0;
        font-size: clamp(2.6rem, 13vw, 4.5rem);
        font-weight: 600;
        line-height: 1;
    }

    .agenda .agenda-kpi .agenda-kpi__label {
        order: 2;
        margin: 0;
        font-size: clamp(0.62rem, 3.1vw, 0.95rem);
        font-weight: 700;
        letter-spacing: 0.04em;
        line-height: 1.2;
        overflow-wrap: normal;
        word-break: normal;
        opacity: 0.85;
    }
}

/* --------------------------------------------------------------------------
   6. Slider de Gestión (.g-slider) en mobile / tablet
   La altura ya no es fija: el slide define su alto y las tarjetas pasan a
   un bloque debajo del slide (una por fila), en vez de quedar tapadas.
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
    .showcase .g-slider {
        height: auto;
        min-height: 0;
    }

    .showcase .g-slider-stage {
        position: relative;
        inset: auto;
        border-radius: 20px;
    }

    .showcase .g-slider-track {
        height: auto;
        align-items: stretch;
    }

    .showcase .g-slide {
        height: auto;
    }

    /* Pestañas: centradas arriba. Se anclan a ambos lados (10px) y se reparten
       el ancho por igual, así quedan centradas sin depender de left/transform */
    .showcase .g-slider-nav {
        top: 14px;
        left: 10px;
        right: 10px;
        width: auto;
        max-width: none;
        margin: 0;
        transform: none;
    }

    .showcase .g-slider-tab {
        flex: 1 1 0;
        padding: 10px 6px;
        font-size: 0.74rem;
        white-space: normal;
        line-height: 1.1;
        text-align: center;
    }

    /* Texto: sin el padding lateral de 80px y con tamaños de celular */
    .showcase .g-slide-inner {
        display: block;
        height: auto;
        padding: 100px 20px 28px;
    }

    .showcase .g-slide-title {
        font-size: clamp(1.7rem, 8vw, 2.4rem);
        margin-bottom: 14px;
    }

    .showcase .g-slide-text p {
        height: auto;
        padding-right: 0;
        font-size: 0.92rem;
        line-height: 1.5;
        margin-bottom: 12px;
    }

    .showcase .ia-logo {
        gap: 14px 24px;
        padding: 8px 0;
    }

    .showcase .ia-logo img {
        height: 38px;
    }

    .showcase .bit-logo img {
        width: 70px;
        height: auto;
    }

    .showcase .banco-logo img {
        width: 130px;
        height: auto;
    }

    .showcase .g-slide-cta {
        width: 100%;
        justify-content: space-between;
        margin-top: 12px;
        padding: 12px 18px;
        font-size: 0.88rem;
        text-align: left;
    }

    /* Card de tarjetas: bloque normal debajo del slide, ancho completo */
    .showcase .g-card {
        position: relative;
        inset: auto;
        left: auto;
        right: auto;
        bottom: auto;
        width: 100%;
        height: auto;
        margin-top: 12px;
        padding: 0;
        background: transparent;
        border-radius: 0;
    }

    .showcase .g-card::before,
    .showcase .g-card::after {
        display: none;
    }

    .showcase .g-card-frame {
        height: auto;
        border-radius: 20px;
        border-top: 5px solid var(--g-accent);
    }

    .showcase .g-card-track {
        height: auto;
        align-items: flex-start;
    }

    /* Solo la lista activa ocupa alto; así no queda espacio en blanco */
    .showcase .g-card-item {
        height: auto;
        min-width: 0;
    }

    .showcase .g-card-item[aria-hidden="true"] {
        height: 0;
        overflow: hidden;
    }

    .showcase .g-card-item--apps {
        overflow: visible;
        padding: 10px;
    }

    /* Tarjetas: una sola fila con scroll horizontal (se asoma la siguiente) */
    .showcase .g-apps,
    .showcase .g-apps--4,
    .showcase .g-apps--lg {
        display: flex;
        grid-template-columns: none;
        grid-template-rows: none;
        grid-auto-rows: auto;
        gap: 10px;
        min-height: 0;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        scrollbar-width: none;
        padding: 2px 2px 6px;
    }

    .showcase .g-apps::-webkit-scrollbar {
        display: none;
    }

    .showcase .g-apps > .g-app {
        flex: 0 0 82%;
        min-width: 0;
        scroll-snap-align: start;
    }

    .showcase .g-app {
        background: #fff;
    }

    .showcase .g-apps--lg .g-app {
        grid-template-columns: 48px minmax(0, 1fr);
        padding: 14px 16px;
    }

    .showcase .g-apps--lg .g-app-icon {
        width: 48px;
        height: 48px;
        font-size: 1.3rem;
    }

    .showcase .g-apps--lg .g-app-title {
        font-size: 1rem;
        overflow-wrap: anywhere;
    }

    .showcase .g-apps--lg .g-app-desc {
        font-size: 0.82rem;
    }

    /* "Ver más": el texto bajo el título se esconde y se despliega con el botón.
       Logos y botones de la sección quedan siempre visibles. */
    .showcase .g-slide-more {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        margin: 0 0 12px;
        padding: 8px 16px;
        border: 1.5px solid aliceblue;
        border-radius: 999px;
        background: transparent;
        color: aliceblue;
        font-family: inherit;
        font-size: 0.82rem;
        font-weight: 700;
        cursor: pointer;
    }

    .showcase .g-slide-more i {
        font-size: 0.7rem;
        transition: transform 0.25s ease;
    }

    .showcase .g-slide-more[aria-expanded="true"] i {
        transform: rotate(180deg);
    }

    .showcase .g-slide-more:focus-visible {
        outline: 3px solid aliceblue;
        outline-offset: 3px;
    }

    .showcase .g-slide-text.is-collapsed > p:not(.is-lead) {
        display: none;
    }
}

@media (min-width: 901px) {
    .g-slide-more {
        display: none;
    }
}

/* --------------------------------------------------------------------------
   7. Objetivos (.objetivo-card): cerradas por defecto, se abren al tocar
   Funciona junto con scripts/objetivos-accordion.js (agrega .is-open).
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
    .objetivo-card {
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    /* Cerrada: solo número + título */
    .objetivo-card p {
        display: none;
    }

    .objetivo-card.is-open p {
        display: block;
        margin-top: 4px;
        animation: objetivo-reveal 0.25s ease;
    }

    /* Indicador (chevron) a la derecha del título */
    .objetivo-card h4 {
        position: relative;
        margin-bottom: 0;
        padding-right: 30px;
    }

    .objetivo-card.is-open h4 {
        margin-bottom: 10px;
    }

    .objetivo-card h4::after {
        content: "";
        position: absolute;
        right: 6px;
        top: 50%;
        width: 9px;
        height: 9px;
        border-right: 2px solid currentColor;
        border-bottom: 2px solid currentColor;
        transform: translateY(-75%) rotate(45deg);
        transition: transform 0.25s ease;
    }

    .objetivo-card.is-open h4::after {
        transform: translateY(-25%) rotate(-135deg);
    }

    /* Tarjeta abierta resaltada (en touch el :hover queda pegado, así que
       el resaltado depende solo del estado abierto) */
    .objetivo-card:hover {
        background: #242424;
        color: #f0f8ff;
    }

    .objetivo-card:hover .objetivo-num {
        color: #2f5fd6;
    }

    .objetivo-card.is-open,
    .objetivo-card.is-open:hover {
        background: #2f5fd6;
        color: #111;
    }

    .objetivo-card.is-open .objetivo-num,
    .objetivo-card.is-open:hover .objetivo-num {
        color: #111;
    }

    .objetivo-card:focus-visible {
        outline: 3px solid #2f5fd6;
        outline-offset: 3px;
    }
}

@keyframes objetivo-reveal {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   LAPTOP / NOTEBOOK · ajustes para pantallas chicas de escritorio
   Cubre 993px–1440px de ancho (1280×720, 1366×768, 1440×900) y, dentro de eso,
   un bloque extra para pantallas BAJAS (alto <= 800px).

   IMPORTANTE: enlazar este archivo ÚLTIMO en el <head>, después de
   styles.css, gob-grid.css, responsive.css y responsive-fixes.css:

   <link rel="stylesheet" href="styles/laptop.css">
   ========================================================================== */

/* ==========================================================================
   1. LAPTOP  ·  993px – 1440px
   ========================================================================== */
@media (min-width: 993px) and (max-width: 1440px) {

    /* ---------- Variables globales (carrusel de agenda) ---------- */
    :root {
        --gap: 14px;
        --tile-w: 300px;
        --tile-h: 270px;
    }

    /* ---------- HERO ---------- */
    .hero-section {
        --notch: clamp(70px, 9vw, 130px);
    }

    .hero-title {
        padding: calc(var(--frame) + 28px) 40px calc(var(--frame) + 32px) calc(var(--frame) + 28px);
        gap: 18px;
    }

    .hero-title .logo {
        height: 36px;
    }

    .hero-title h1 {
        font-size: clamp(2.8rem, 5.2vw, 5rem);
    }

    .hero-title span {
        font-size: 0.85rem;
        max-width: 380px;
    }

    .hero-title .hero-direct-links {
        flex-wrap: wrap;
        gap: 6px;
    }

    .hero-title .hero-direct-links a {
        padding: 10px 14px;
        font-size: 0.78rem;
        gap: 10px;
    }

    .hero-aside {
        padding: 40px 40px 40px calc(var(--notch) / 2 + 32px);
    }

    .hero-aside-bottom {
        gap: 14px;
        padding-right: 14%;
    }

    .hero-aside h2 {
        font-size: 1.6rem;
    }

    .hero-aside p {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .hero-bkg-hint {
        padding: 10px 18px;
        font-size: 0.9rem;
    }

    .hero-aside-logos img {
        width: 64px;
    }

    .hero-text-tag {
        padding: 6px 14px;
        font-size: 0.8rem;
        margin-bottom: 14px;
    }

    .hero-text-blocks h2 {
        font-size: 2.2rem;
        max-width: 640px;
        margin-bottom: 14px;
    }

    .hero-text-blocks p {
        font-size: 1.05rem;
        max-width: 480px;
    }

    /* ---------- NAV PÍLDORA ---------- */
    .sticky-nav-header.hero-nav {
        padding: 4px 8px 4px 12px;
        gap: 4px;
    }

    .nav-logo {
        height: 38px;
    }

    .hero-nav__item {
        padding: 6px 2px 6px 16px;
        gap: 3px;
    }

    .hero-nav__row--plain .hero-nav__item {
        padding-right: 16px;
    }

    .hero-nav__label,
    .hero-nav__value {
        font-size: 0.78rem;
    }

    .hero-nav__chevron {
        padding: 10px 12px 10px 4px;
        font-size: 0.62rem;
    }

    .hero-nav__cta {
        width: 42px;
        height: 42px;
        margin-left: 4px;
        font-size: 0.9rem;
    }

    .hero-nav__dropdown {
        min-width: 210px;
    }

    .hero-nav__dropdown--nested {
        min-width: 250px;
    }

    .hero-nav__dropdown a {
        padding: 0.4rem 1rem;
        font-size: 0.82rem;
    }

    /* ---------- SHOWCASE (Gestión / Gobierno / Algorítmica) ---------- */
    .showcase__card {
        padding: 24px;
        border-radius: 24px;
    }

    .showcase__top {
        height: min(calc(100vh - 120px), 620px);
        min-height: 460px;
        gap: 24px;
        grid-template-columns: minmax(250px, 0.9fr) minmax(0, 1.3fr) minmax(130px, 0.3fr);
    }

    .showcase__extra {
        margin-top: 24px;
        padding-top: 24px;
    }

    .showcase__left {
        gap: 20px;
    }

    .showcase__title {
        font-size: clamp(2.2rem, 3.8vw, 3.6rem);
        margin-bottom: 16px;
    }

    .algoritmica-showcase__title {
        font-size: clamp(1.9rem, 3vw, 3rem);
    }

    .showcase__text {
        font-size: 0.85rem;
        line-height: 1.5;
        max-width: 340px;
    }

    .algoritmica-showcase__text {
        max-width: 360px;
    }

    .showcase__cta {
        padding: 11px 18px;
        font-size: 0.8rem;
        gap: 10px;
    }

    .showcase__trust {
        font-size: 0.7rem;
        max-width: 280px;
    }

    .showcase__stats {
        gap: 14px;
    }

    .showcase__stats strong {
        font-size: clamp(1.7rem, 2.4vw, 2.3rem);
    }

    .showcase__stats span {
        font-size: 0.68rem;
        max-width: 130px;
    }

    .showcase__tag {
        font-size: 0.7rem;
    }

    .showcase {
        --sc-cut: clamp(28px, 4vw, 48px);
    }

    /* Gráfico y escena de ventanas dentro de la columna izquierda */
    #g-chart {
        max-width: 100%;
        min-height: 0;
    }

    .win-scene {
        height: clamp(220px, 34vh, 300px);
    }

    .gestion .gestion-main {
        padding: 80px 14px 14px;
    }

    /* ---------- SLIDER DE GESTIÓN ---------- */
    .showcase .g-slider {
        height: min(calc(100vh - 60px), 680px);
        min-height: 520px;
    }

    .g-slider-nav {
        top: 6%;
        padding: 4px;
    }

    .g-slider-tab {
        padding: 9px 16px;
        font-size: 0.8rem;
    }

    .g-slider-indicator {
        top: 4px;
        bottom: 4px;
    }

    .showcase .g-slide-inner {
        padding: 100px 36px 28px;
        gap: 32px;
    }

    .g-slide-title {
        font-size: clamp(2rem, 3.6vw, 3.2rem);
        margin-bottom: 14px;
    }

    .showcase .g-slide-text p {
        font-size: 0.92rem;
        line-height: 1.5;
        padding-right: 24px;
    }

    .ia-logo {
        gap: 16px 28px;
        padding: 12px 0;
    }

    .ia-logo img {
        height: 40px;
    }

    .bit-logo img {
        width: 70px;
    }

    .banco-logo img {
        width: 140px;
    }

    .g-slide-cta {
        margin-top: 14px;
        padding: 10px 18px;
        font-size: 0.85rem;
        gap: 8px;
    }

    /* Card blanca con apps */
    .showcase .g-card {
        --g-r: 22px;
        --card-right: 28px;
        --card-width: min(44vw, 640px);
        --card-height: min(64vh, 470px);
        padding: 12px;
    }

    .g-card-item--apps {
        padding: 8px;
    }

    .g-apps {
        gap: 8px;
    }

    .g-apps--lg .g-app {
        grid-template-columns: 44px 1fr;
        gap: 6px 12px;
        padding: 14px 16px;
        border-radius: 14px;
    }

    .g-apps--lg .g-app-icon {
        width: 44px;
        height: 44px;
        border-radius: 12px;
        font-size: 1.2rem;
    }

    .g-apps--lg .g-app-title {
        font-size: 0.98rem;
    }

    .g-apps--lg .g-app-desc {
        margin-top: 2px;
        font-size: 0.78rem;
        -webkit-line-clamp: 2;
    }

    .g-apps--lg .g-app-tags span {
        padding: 2px 8px;
        font-size: 0.66rem;
    }

    .g-apps--lg .g-app-btn {
        margin-top: 4px;
        padding: 7px 14px;
        font-size: 0.76rem;
    }

    /* ---------- MODALES ---------- */
    .ia-modal {
        width: min(1200px, calc(100vw - 32px));
        max-height: calc(100vh - 32px);
        border-radius: 22px;
    }

    .ia-modal-inner {
        gap: 36px;
        padding: 60px 44px 36px;
        min-height: min(400px, calc(100vh - 32px));
        max-height: calc(100vh - 32px);
    }

    .ia-modal-title {
        font-size: clamp(2rem, 4vw, 3.4rem);
    }

    .ia-modal-right p {
        font-size: 0.98rem;
        line-height: 1.55;
    }

    .ia-modal-right span {
        font-size: 1.05rem;
    }

    .ia-modal-status {
        padding: 5px 12px;
        font-size: 0.72rem;
    }

    .ia-modal-close {
        top: 16px;
        right: 16px;
        width: 40px;
        height: 40px;
    }

    /* ---------- GOBIERNO ABIERTO · selector ---------- */
    .gobierno-abierto {
        --ga-inset-y: 70px;
        --ga-inset-x: 14px;
    }

    .gsel {
        grid-template-columns: 220px minmax(0, 1fr);
        gap: 28px;
    }

    .gsel__menu {
        gap: 8px;
    }

    .gsel__btn {
        padding: 11px 14px;
        font-size: 1rem;
    }

    .gsel__grid {
        grid-template-rows: repeat(2, minmax(190px, 1fr));
        --gsel-gap: 10px;
        gap: var(--gsel-gap);
    }

    .gsel__face {
        padding: 14px;
        gap: 10px;
        border-radius: 18px;
    }

    .gsel__top {
        font-size: 10px;
    }

    .gsel__title {
        font-size: 1rem;
    }

    .gsel__text {
        font-size: 0.78rem;
        line-height: 1.35;
    }

    .gsel__link,
    .gsel__toggle {
        padding: 8px 12px;
        font-size: 0.74rem;
    }

    /* ---------- GOBERNANZA ALGORÍTMICA ---------- */
    .g-algoritmica-title {
        padding: 28px 0 48px;
    }

    .g-algoritmica-title h2 {
        font-size: 3.4rem;
    }

    .g-algoritmica-title p {
        padding-top: 22px;
        font-size: 1.8rem;
    }

    .network {
        width: 200px;
        height: 200px;
    }

    .g-algoritmica-main>.algoritmica-showcase {
        margin: 0 14px;
    }

    .objetivos {
        padding: 40px 28px 32px;
    }

    .objetivos-intro {
        margin-bottom: 26px;
        max-width: 700px;
    }

    .objetivos-intro h3 {
        font-size: 2.2rem;
        margin-bottom: 10px;
    }

    .objetivos-intro p {
        font-size: 1rem;
        line-height: 1.5;
    }

    .objetivos-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 14px;
    }

    .objetivo-card {
        --sc-cut: 22px;
        padding: 22px 18px 26px;
    }

    .objetivo-num {
        font-size: 1.9rem;
        margin-bottom: 8px;
    }

    .objetivo-card h4 {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }

    .objetivo-card p {
        font-size: 0.9rem;
        line-height: 1.45;
    }

    .g-algoritmica .objetivos-img {
        --img-up: -20px;
        width: min(24%, 280px);
    }

    /* ---------- AGENDA ---------- */
    .agenda-top {
        height: 32vh;
        padding-left: 40px;
    }

    .agenda-top h2 {
        font-size: 5rem;
        bottom: -18px;
    }

    .agenda-bottom {
        height: 16vh;
        padding-left: 34px;
    }

    .agenda-bottom h2 {
        font-size: 5rem;
        top: -16px;
    }

    .agenda-kpi {
        padding: 0 40px;
        gap: 10px;
        flex-wrap: wrap;
    }

    .agenda-kpi .agenda-kpi__card {
        padding: 3rem 0.8rem;
    }

    .agenda-kpi .agenda-kpi__label {
        font-size: 1.7rem;
    }

    .agenda-kpi .agenda-kpi__value {
        font-size: 2.6rem;
    }

    .carrusel-doble {
        padding-bottom: 28px;
    }

    .carrusel-card {
        border-radius: 18px;
        border-right-width: 6px;
    }

    .card-inner {
        padding: 16px 18px;
    }

    .card-title {
        font-size: 15px;
        margin-bottom: 8px;
    }

    .card-text {
        font-size: 12.5px;
        line-height: 1.45;
    }

    .card-tag {
        font-size: 10px;
        padding: 3px 8px;
        margin-bottom: 10px;
    }

    .card-logo {
        max-height: 60px;
    }

    /* ---------- NEWSLETTER ---------- */
    .newsletter {
        padding: 14px;
    }

    .news-title {
        padding: 40px 14%;
        gap: 22px;
        border-radius: 20px;
    }

    .news-title h2 {
        font-size: 2.6rem;
    }

    .news-title p {
        font-size: 1.1rem;
        line-height: 1.5;
    }

    .news-title a {
        padding: 14px 24px;
        font-size: 1rem;
    }

    /* ---------- FOOTER ---------- */
    .site-footer {
        padding: 16px 20px;
    }

    .footer-inner {
        gap: 24px;
    }

    .brand-logo {
        font-size: 1.5rem;
        margin-bottom: 10px;
    }

    .brand-tagline {
        font-size: 13px;
        margin-bottom: 16px;
    }

    .footer-col h4 {
        margin-bottom: 12px;
    }

    .footer-col li {
        margin-bottom: 8px;
    }

    .footer-col a {
        font-size: 13px;
    }

    .footer-bottom {
        margin-top: 28px;
        padding: 14px 0 18px;
        font-size: 12px;
    }

    /* ---------- Anclas: compensar la píldora ---------- */
    #gestion,
    #agenda {
        scroll-margin-top: 90px;
    }
}

/* ==========================================================================
   2. LAPTOP ANGOSTA  ·  993px – 1200px  (1024×768, 1152×864, etc.)
   ========================================================================== */
@media (min-width: 993px) and (max-width: 1200px) {

    .hero-title h1 {
        font-size: clamp(2.6rem, 5vw, 3.8rem);
    }

    .hero-nav__value {
        display: none;
    }

    .showcase__top {
        grid-template-columns: minmax(230px, 1fr) minmax(0, 1.1fr) minmax(110px, 0.25fr);
    }

    .showcase .g-card {
        --card-width: min(48vw, 520px);
        --card-right: 16px;
    }

    .gsel {
        grid-template-columns: 180px minmax(0, 1fr);
        gap: 20px;
    }

    .gsel__grid {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: none;
        grid-auto-rows: minmax(180px, auto);
    }

    .news-title {
        padding: 36px 8%;
    }
}

/* ==========================================================================
   3. PANTALLAS BAJAS  ·  alto <= 800px  (1366×768, 1280×720, 1440×760 con barras)
   ========================================================================== */
@media (min-width: 993px) and (max-width: 1440px) and (max-height: 800px) {

    .hero-section {
        --frame: 10px;
    }

    .hero-title {
        padding-top: calc(var(--frame) + 22px);
        padding-bottom: calc(var(--frame) + 24px);
        gap: 14px;
    }

    .hero-title h1 {
        font-size: clamp(2.6rem, 4.8vw, 4.4rem);
    }

    .hero-aside {
        padding-top: 28px;
        padding-bottom: 28px;
    }

    .hero-aside h2 {
        font-size: 1.45rem;
    }

    /* Píldora más cerca del borde inferior */
    .sticky-nav-header.hero-nav {
        transform: translate(-50%, calc(100vh - 80px - 50% + 20px));
    }

    .sticky-nav-header.hero-nav.is-visible {
        transform: translate(-50%, calc(100vh - 80px - 50%));
    }

    .sticky-nav-header.hero-nav.is-visible.is-top {
        transform: translate(-50%, 14px);
    }

    .showcase__top {
        height: min(calc(100vh - 100px), 560px);
        min-height: 430px;
    }

    .win-scene {
        height: clamp(190px, 30vh, 250px);
    }

    .showcase .g-slider {
        min-height: 480px;
        height: min(calc(100vh - 50px), 620px);
    }

    .showcase .g-slide-inner {
        padding-top: 88px;
    }

    .g-slide-title {
        font-size: clamp(1.9rem, 3.2vw, 2.8rem);
    }

    .showcase .g-card {
        --card-height: min(62vh, 430px);
    }

    .gsel__grid {
        grid-template-rows: repeat(2, minmax(170px, 1fr));
    }

    .agenda-top {
        height: 28vh;
    }

    .agenda-bottom {
        height: 14vh;
    }

    .agenda-kpi .agenda-kpi__card {
        padding: 2.2rem 0.8rem;
    }
}

@media (max-width: 992px) {

    /* La píldora de escritorio se reemplaza por la hamburguesa */
    .sticky-nav-header.hero-nav {
        display: none !important;
    }

    .m-nav {
        display: block;
        position: fixed;
        top: 12px;
        left: 12px;
        right: 12px;
        z-index: 1000;
        font-family: "Raleway", sans-serif;
    }

    .m-nav__bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        padding: 6px 8px 6px 16px;
        background: aliceblue;
    }

    .m-nav__logo {
        display: block;
        height: 38px;
    }

    .m-nav__logo img {
        display: block;
        height: 100%;
        width: auto;
        object-fit: contain;
    }

    .m-nav__actions {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .m-nav__contact,
    .m-nav__toggle {
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 0;
        border-radius: 50%;
        background: #242424;
        color: aliceblue;
        font-size: 1rem;
        text-decoration: none;
        cursor: pointer;
        transition: background 0.25s ease, color 0.25s ease;
    }

    .m-nav__contact:hover,
    .m-nav__toggle:hover,
    .m-nav.is-open .m-nav__toggle {
        background: #ffaf03;
        color: #242424;
    }

    .m-nav__contact:focus-visible,
    .m-nav__toggle:focus-visible {
        outline: 2px solid #2f5fd6;
        outline-offset: 3px;
    }

    /* Icono hamburguesa -> X */
    .m-nav__toggle {
        flex-direction: column;
        gap: 4px;
        padding: 0;
    }

    .m-nav__toggle span {
        display: block;
        width: 18px;
        height: 2px;
        border-radius: 2px;
        background: currentColor;
        transition: transform 0.3s ease, opacity 0.2s ease;
    }

    .m-nav.is-open .m-nav__toggle span:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    .m-nav.is-open .m-nav__toggle span:nth-child(2) {
        opacity: 0;
    }

    .m-nav.is-open .m-nav__toggle span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }

    /* Panel desplegable */
    .m-nav__panel {
        position: absolute;
        top: calc(100% + 8px);
        left: 0;
        right: 0;
        max-height: calc(100dvh - 96px);
        overflow-y: auto;
        overscroll-behavior: contain;
        background: aliceblue;
        border-radius: 24px;
        box-shadow: 0 16px 40px rgba(36, 36, 36, 0.18);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transform-origin: top center;
        transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    }

    .m-nav.is-open .m-nav__panel {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .m-nav__list,
    .m-nav__sublist {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .m-nav__list {
        padding: 8px;
    }

    .m-nav__list>li+li {
        border-top: 1px solid #e4dfdb;
    }

    .m-nav__link,
    .m-nav__group>summary {
        display: flex;
        flex-direction: column;
        gap: 2px;
        position: relative;
        padding: 14px 44px 14px 16px;
        border-radius: 16px;
        color: #242424;
        text-decoration: none;
        cursor: pointer;
        list-style: none;
        transition: background 0.2s ease;
    }

    .m-nav__group>summary::-webkit-details-marker {
        display: none;
    }

    .m-nav__link:hover,
    .m-nav__group>summary:hover {
        background: #f4efec;
    }

    .m-nav__label {
        font-size: 0.95rem;
        font-weight: 700;
        line-height: 1.1;
    }

    .m-nav__value {
        font-size: 0.8rem;
        font-weight: 500;
        color: #5b6563;
        line-height: 1.1;
    }

    /* Chevron de los grupos */
    .m-nav__group>summary::after {
        content: "";
        position: absolute;
        right: 20px;
        top: 50%;
        width: 8px;
        height: 8px;
        border-right: 2px solid #242424;
        border-bottom: 2px solid #242424;
        transform: translateY(-70%) rotate(45deg);
        transition: transform 0.25s ease;
    }

    .m-nav__group[open]>summary::after {
        transform: translateY(-30%) rotate(-135deg);
    }

    .m-nav__group[open]>summary {
        background: #f4efec;
    }

    .m-nav__sublist {
        padding: 4px 0 8px 12px;
    }

    .m-nav__sublist a {
        display: block;
        padding: 10px 16px;
        font-size: 0.9rem;
        font-weight: 500;
        color: #242424;
        text-decoration: none;
        border-left: 3px solid transparent;
        border-radius: 0 12px 12px 0;
        transition: background 0.15s ease, color 0.15s ease;
    }

    .m-nav__sublist a:hover,
    .m-nav__sublist a:focus-visible {
        background: #f4f9ff;
        color: #2f5fd6;
        border-left-color: #2f5fd6;
    }

    /* Subgrupos anidados (Gobierno abierto) */
    .m-nav__group--sub>summary {
        flex-direction: row;
        padding: 10px 44px 10px 16px;
        font-size: 0.9rem;
        font-weight: 600;
    }

    .m-nav__group--sub>summary::after {
        width: 7px;
        height: 7px;
    }

    .m-nav__group--sub .m-nav__sublist a {
        font-size: 0.85rem;
        padding-left: 24px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .back-to-top,
    .m-nav__panel,
    .m-nav__toggle span {
        transition: none;
    }
}


/* ==========================================================================
   NAV RESPONSIVE: integrado al hero (sin fondo) y con fondo al scrollear
   ========================================================================== */
@media (max-width: 992px) {

    /* Estado inicial: dentro del hero, transparente, scrollea con la página */
    .m-nav {
        position: absolute;
        top: 24px;          /* hero-gap (12px) + aire interno */
        left: 24px;         /* alineado con el contenido de la tarjeta */
        right: 24px;
        z-index: 1000;
    }

    .m-nav__bar {
        padding: 0;
        background: transparent;
        border-radius: 999px;
        box-shadow: none;
        transition: background 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease;
    }

    /* Estado al pasar el hero: fijo y con fondo */
    .m-nav.is-fixed {
        position: fixed;
        top: 12px;
        left: 12px;
        right: 12px;
        animation: m-nav-in 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .m-nav.is-fixed .m-nav__bar {
        padding: 6px 8px 6px 16px;
        background: aliceblue;
        box-shadow: 0 10px 30px rgba(36, 36, 36, 0.18);
    }

    /* Sobre el hero, el logo sin fondo necesita aire respecto del borde */
    .m-nav:not(.is-fixed) .m-nav__logo {
        height: 44px;
    }
}

@keyframes m-nav-in {
    from { transform: translateY(-100%); opacity: 0; }
    to   { transform: translateY(0);     opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .m-nav.is-fixed { animation: none; }
}