:root {
    --black: #000000;
    --graphite: #2C2C2C;
    --white: #FFFFFF;
    --neutral: #EFEFEA;
    --line: #dddddd;
    --muted: #666666;
    --soft: #f7f7f4;
    --radius: 28px;
    --max: 1180px;
    --ink: #06080F;
    --gold: #0055A4;
    --gold-light: #3378C2;
}

* {
    box-sizing: border-box
}

html {
    scroll-behavior: smooth
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    color: var(--black);
    background: var(--white);
    line-height: 1.45
}

a {
    text-decoration: none;
    color: inherit
}

#cursor {
    position: fixed;
    width: 10px;
    height: 10px;
    background: var(--gold);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.08s ease, background 0.3s;
    mix-blend-mode: difference
}

#cursor-ring {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(0, 85, 164, 0.5);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: transform 0.18s ease, width 0.3s, height 0.3s, border-color 0.3s
}

body:has(a:hover) #cursor-ring,
body:has(button:hover) #cursor-ring {
    width: 60px;
    height: 60px;
    border-color: var(--gold)
}

.container {
    width: min(var(--max), calc(100% - 40px));
    margin: 0 auto
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.466);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line)
}

.nav {
    height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 26px
}

.brand {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 190px
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--black);
    color: white;
    display: grid;
    place-items: center;
    font-weight: 800;
    letter-spacing: -.06em;
    font-size: 20px
}

.brand-name {
    font-size: 25px;
    font-weight: 800;
    letter-spacing: -.05em;
    line-height: .95
}

.brand-tag {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: .24em;
    color: #777;
    margin-top: 5px
}

.navlinks {
    display: flex;
    align-items: center;
    gap: 28px;
    font-size: 14px;
    font-weight: 600;
    color: #333
}

.navlinks a {
    transition: .2s
}

.navlinks a:hover {
    color: #777
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px
}

.search {
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #333;
    background: white
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border-radius: 50px;
    padding: 18px 46px;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
    border: 1px solid transparent;
    transition: all 0.35s ease;
    cursor: pointer;
    white-space: nowrap
}

.btn.dark {
    background: var(--black);
    color: white
}

.btn.dark:hover {
    background: #222
}

.btn.light {
    background: var(--gold);
    color: var(--ink);
    font-weight: 700
}

.btn.light:hover {
    background: var(--gold-light);
    transform: translateY(-3px);
    box-shadow: 0 20px 50px rgba(0, 85, 164, 0.35)
}

/* Botones secundarios estilo btn-ghost */
.btn.outline {
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.8);
    background: transparent
}

.btn.outline:hover {
    border-color: var(--gold);
    color: var(--gold)
}

.btn.ghost {
    border-color: #cfcfc9;
    background: white;
    color: #111;
    padding: 12px 30px;
    font-size: 13px;
    letter-spacing: 1.5px
}

.btn.ghost:hover {
    background: #111;
    color: white;
    border-color: #111
}

/* EFECTO SPOTLIGHT (LINTERNA) DE index.html */
.btn-spotlight {
    position: relative;
    overflow: hidden;
    isolation: isolate
}

.btn-spotlight::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle 100px at var(--x, -100%) var(--y, -100%), rgba(255, 255, 255, 0.4), transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 1
}

.btn-spotlight:hover::before {
    opacity: 1
}

.btn-spotlight>* {
    position: relative;
    z-index: 2
}

.arrow {
    font-size: 17px;
    line-height: 1
}

.mobile-menu {
    display: none;
    border: 0;
    background: transparent;
    font-size: 27px
}

/* boton cambiante */
.mi-boton {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border-radius: 50px;
    padding: 18px 46px;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
    border: 1px solid transparent;
    transition: all 0.5s ease;

}

/* Ocultamos el texto original al hacer hover dándole tamaño 0 */
.mi-boton:hover {
    font-size: 0px;
}

/* Insertamos el texto del data-hover al hacer hover */
.mi-boton:hover::before {
    content: attr(data-hover);
    font-size: 16px;
    /* Restauramos el tamaño de la fuente para el nuevo texto */
    color: Black;
}


/* ── HERO ADAPTADO AL FONDO DE index.html ── */
.hero {
    position: relative;
    overflow: hidden;
    background: var(--ink);
    color: white
}

canvas#particles {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    object-fit: cover;
    z-index: 1 !important;
}

.hero-img {

    filter: blur(4px);
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    height: 100%;
    width: 100%;
    object-fit: cover;
    z-index: 1 !important;
}

.hero-overlay_img {
    position: absolute;
    inset: 0;
    z-index: 3;
    background: linear-gradient(160deg, rgba(0, 0, 0, 0.411) 0%, rgba(11, 17, 32, 0.103) 45%, rgba(6, 8, 15, 0.88) 100%);
}

/* Capa de overlay gradiente oscuro */
.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    background: linear-gradient(160deg, rgba(17, 23, 44, 0.105) 0%, rgba(11, 17, 32, 0.103) 45%, rgba(6, 8, 15, 0.88) 100%)
}

/* Línea decorativa dorada del Hero */
.hero-line {
    position: absolute;
    top: 0;
    left: 14%;
    width: 1px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(0, 85, 164, 0.4) 30%, rgba(0, 85, 164, 0.4) 70%, transparent);
    z-index: 4;
    animation: lineReveal 2s 0.5s both
}

@keyframes lineReveal {
    from {
        transform: scaleY(0);
        transform-origin: top
    }

    to {
        transform: scaleY(1);
        transform-origin: top
    }
}

.hero-grid {
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: 1.12fr .88fr;
    gap: 60px;
    align-items: center;
    padding: 94px 0 102px
}

.eyebrow {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .28em;
    color: #878787;
    font-weight: 800;
    margin: 0 0 22px
}

h1 {
    font-size: clamp(44px, 7vw, 82px);
    letter-spacing: -.075em;
    line-height: .92;
    margin: 0;
    max-width: 870px
}

.hero p.lead {
    max-width: 640px;
    color: #d0d0d0;
    font-size: 19px;
    line-height: 1.75;
    margin: 30px 0 0
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 36px
}

.dashboard-wrap {
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .06);
    backdrop-filter: blur(12px);
    border-radius: 36px;
    padding: 18px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .35)
}

.dashboard {
    background: white;
    color: black;
    border-radius: 26px;
    padding: 24px
}

.dash-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px
}

.dash-kicker {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .23em;
    color: #666;
    font-weight: 800
}

.dash-title {
    font-size: 24px;
    font-weight: 800;
    margin-top: 6px;
    letter-spacing: -.04em
}

.metric {
    border: 1px solid #e5e5e0;
    border-radius: 22px;
    padding: 15px;
    margin-bottom: 12px
}

.metric-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: 10px
}

.bar {
    height: 8px;
    background: #efefea;
    border-radius: 999px;
    overflow: hidden
}

.fill {
    height: 100%;
    background: #000;
    border-radius: 999px
}

.highlights {
    background: var(--soft);
    border-bottom: 1px solid var(--line);
    padding: 42px 0
}

.cards-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px
}

.card {
    background: white;
    border: 1px solid #e4e4de;
    border-radius: 30px;
    padding: 28px;
    transition: .22s;
    box-shadow: 0 1px 0 rgba(0, 0, 0, .02)
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 38px rgba(0, 0, 0, .09)
}

.card-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .22em;
    color: #777;
    font-weight: 850;
    margin-bottom: 18px
}

.card h3 {
    font-size: 27px;
    letter-spacing: -.055em;
    line-height: 1.08;
    margin: 0
}

.card p {
    color: #666;
    line-height: 1.7;
    margin: 14px 0 0
}

.card-link {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    margin-top: 24px;
    font-size: 14px;
    font-weight: 850
}

/* ===== FLIP CARDS (tarjetas destacadas) ===== */
.flip-card {
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
    cursor: pointer;
    perspective: 1800px;
    outline: none
}

.flip-card:focus-visible {
    box-shadow: 0 0 0 3px rgba(0, 85, 164, .4);
    border-radius: 30px
}

.card-inner {
    position: relative;
    width: 100%;
    height: 290px;
    transition: transform .7s cubic-bezier(.45, .05, .15, 1);
    transform-style: preserve-3d
}

.flip-card.flipped .card-inner {
    transform: rotateY(180deg)
}

.card-face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 30px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    justify-content: space-between
}

.card-front {
    background: white;
    border: 1px solid #e4e4de;
    box-shadow: 0 1px 0 rgba(0, 0, 0, .02)
}

.card-back {
    background: var(--black);
    color: white;
    transform: rotateY(180deg);
    border: 1px solid var(--black)
}

.card-flip-hint {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: #999;
    margin-top: 18px
}

.flip-icon {
    display: inline-block;
    transition: transform .5s
}

.flip-card:hover .flip-icon {
    transform: rotate(180deg)
}

.card-label-dark {
    color: rgba(255, 255, 255, .55)
}

.card-back-list {
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 9px
}

.card-back-list li {
    font-size: 13.5px;
    line-height: 1.5;
    color: rgba(255, 255, 255, .88);
    padding-left: 20px;
    position: relative
}

.card-back-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--gold-light);
    font-weight: 800
}

.card-link-dark {
    color: white
}

section.block {
    padding: 92px 0
}

.section-head {
    max-width: 780px;
    margin-bottom: 46px
}

.section-head.center {
    text-align: center;
    margin-left: auto;
    margin-right: auto
}

h2 {
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1;
    letter-spacing: -.075em;
    margin: 0
}

.section-head p {
    font-size: 18px;
    line-height: 1.75;
    color: #666;
    margin: 22px 0 0
}

.about-grid {
    display: grid;
    grid-template-columns: .85fr 1.15fr;
    gap: 26px;
    align-items: stretch
}

.black-panel {
    background: #000;
    color: white;
    border-radius: 36px;
    padding: 42px
}

.black-panel h2 {
    font-size: clamp(38px, 5vw, 58px)
}

.black-panel p {
    color: #cfcfcf;
    line-height: 1.8;
    font-size: 17px;
    margin: 24px 0 32px
}

.mission-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px
}

.icon {
    width: 42px;
    height: 42px;
    border-radius: 16px;
    border: 1px solid #deded8;
    display: grid;
    place-items: center;
    font-size: 20px;
    margin-bottom: 20px
}

.services {
    background: var(--soft)
}

/* .grid-3 {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 18px
    }

    .service-card .icon {
      background: #000;
      color: #fff;
      border-color: #000
    }*/

.services-slider {
    display: flex;
    gap: 18px;
    overflow: auto;
    /*scroll-snap-type: x mandatory;*/
    -webkit-overflow-scrolling: touch;
    padding-bottom: 20px;
    scrollbar-width: no;
}

.services-slider::-webkit-scrollbar {
    display: none;
}

.service-card {
    flex: 0 0 360px;
    min-height: 480px;
    /*scroll-snap-align: start;*/
    border-radius: 28px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 32px;
    background-size: cover;
    background-position: center;
    border: none;
    padding-top: 200px;
}

.service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.52) 40%, rgba(0, 0, 0, 0.007) 100%);
    z-index: 0;
}

.service-card>* {
    position: relative;
    z-index: 1;
}

.service-card .icon {
    background: rgba(255, 255, 255, .15);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(6px);
}

.service-card h3 {
    color: #fff;
    font-size: 24px;
    letter-spacing: -.04em;
    margin: 16px 0 8px;
}

.service-card p {
    color: rgba(255, 255, 255, .75);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

.service-card .card-link {
    color: #fff;
    margin-top: 20px;
    font-size: 14px;
    font-weight: 700;
}

.service-card .card-content {
    min-width: 180px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.sectors-slider {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 20px;
    scrollbar-width: none;
}

.sectors-slider::-webkit-scrollbar {
    display: none;
}

.insights-slider {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 20px;
    scrollbar-width: none;
}

.insights-slider::-webkit-scrollbar {
    display: none;
}

.insights-slider .article {
    flex: 0 0 360px;
}

.clients-slider {
    display: flex;
    gap: 48px;
    overflow-x: auto;
    scroll-behavior: auto;
    scrollbar-width: none;
}

.clients-slider::-webkit-scrollbar {
    display: none;
}

.client-logo {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 80px;

}

.client-logo img {
    max-height: 80px;
    width: 100px;
    filter: grayscale(100%);
    opacity: .6;
    transition: filter .3s, opacity .3s;
}

.client-logo img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

.sector-card {
    flex: 0 0 280px;
    background: white;
    border: 1px solid #e4e4de;
    border-radius: 30px;
    padding: 28px;
    transition: .22s
}

.sector-card:hover {
    background: #000;
    color: white;
    transform: translateY(-4px)
}

.sector-card:hover p {
    color: #ddd
}

.sector-card p {
    color: #666;
    line-height: 1.7
}

.method {
    background: #000;
    color: white;
    padding: 42px;
}

.method-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    margin-top: 44px
}

.step {
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 28px;
    padding: 24px;
    min-height: 170px
}

.step span {
    color: #8f8f8f;
    font-size: 13px;
    font-weight: 800
}

.step h3 {
    font-size: 22px;
    letter-spacing: -.04em;
    margin: 28px 0 0
}

.step .check {
    margin-top: 36px;
    color: #999
}

.insights {
    background: var(--soft)
}

.insights-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 30px;
    margin-bottom: 44px
}

.insights-head .section-head {
    margin: 0
}

.article {
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: space-between
}

.pillars-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px
}

.cta {
    background: #000;
    color: white;
    padding: 92px 0
}

.cta-box {
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 36px;
    padding: 48px;
    display: grid;
    grid-template-columns: 1fr .36fr;
    gap: 30px;
    align-items: center
}

.cta h2 {
    max-width: 820px
}

.cta p {
    color: #d0d0d0;
    font-size: 18px;
    line-height: 1.75;
    max-width: 680px
}

.cta-actions {
    display: flex;
    flex-direction: column;
    gap: 13px;
    align-items: flex-start
}

footer {
    background: #080808;
    color: white;
    padding: 58px 0 28px
}

.footer-map {
    margin-top: 18px;
    width: 100%;
    max-width: 290px;
    border-radius: 50px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .15)
}

.footer-map iframe {
    display: block
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 35px
}

.footer-brand {
    font-size: 30px;
    font-weight: 850;
    letter-spacing: -.06em
}

footer p,
footer li {
    color: #aaa;
    font-size: 14px;
    line-height: 1.7
}

footer ul {
    list-style: none;
    margin: 16px 0 0;
    padding: 0;
    display: grid;
    gap: 10px
}

footer h4 {
    margin: 0;
    font-size: 15px
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .1);
    margin-top: 40px;
    padding-top: 22px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    color: #777;
    font-size: 13px
}

@media (max-width: 980px) {

    .navlinks,
    .nav-actions {
        display: none
    }

    .mobile-menu {
        display: block
    }

    .hero-grid,
    .about-grid,
    .cta-box {
        grid-template-columns: 1fr
    }

    .hero-grid {
        padding: 78px 0
    }

    .dashboard-wrap {
        max-width: 560px
    }

    .cards-3,
    .grid-3,
    .mission-grid {
        grid-template-columns: 1fr 1fr
    }

    .card-inner {
        height: 310px
    }

    .method-grid {
        grid-template-columns: 1fr 1fr
    }

    .pillars-grid {
        grid-template-columns: 1fr 1fr
    }

    .insights-head {
        display: block
    }

    .insights-head .btn {
        margin-top: 24px
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr
    }
}

@media (max-width: 620px) {
    .container {
        width: min(100% - 28px, var(--max))
    }

    .nav {
        height: 70px
    }

    .brand-name {
        font-size: 22px
    }

    .hero-grid {
        padding: 62px 0
    }

    .hero p.lead {
        font-size: 16px
    }

    .hero-actions,
    .cta-actions {
        flex-direction: column;
        align-items: stretch
    }

    .btn {
        justify-content: center
    }

    .cards-3,
    /*.grid-3*/
    .service-card,
    .mission-grid,
    .method-grid,
    .pillars-grid,
    .footer-grid {
        grid-template-columns: 1fr
    }

    section.block,
    .cta {
        padding: 68px 0
    }

    .black-panel,
    .cta-box {
        padding: 30px;
        border-radius: 28px
    }

    .footer-bottom {
        flex-direction: column
    }

    .card h3 {
        font-size: 24px
    }

    .card-inner {
        height: 330px
    }
}

.sector-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.sector-modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.sector-modal-box {
    background: white;
    border-radius: 28px;
    padding: 42px;
    max-width: 480px;
    width: calc(100% - 40px);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.sector-modal-overlay.active .sector-modal-box {
    transform: translateY(0);
}

.sector-modal-close {
    float: right;
    background: #f0f0eb;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: grid;
    place-items: center;
}

.sector-modal-icon {
    font-size: 28px;
    margin-bottom: 16px;
    margin-top: 8px;
}

.sector-modal-box h3 {
    font-size: 26px;
    letter-spacing: -.05em;
    margin: 0 0 14px;
}

/* ===== Form Modal (Propuesta / Llamada) ===== */
.form-modal-box .form-group {
    margin-bottom: 18px;
}

.form-modal-box label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--ink);
}

.form-modal-box input,
.form-modal-box textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d8d8d3;
    border-radius: 12px;
    font-size: 14px;
    font-family: inherit;
    color: #111;
    background: #faf9f6;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.form-modal-box input:focus,
.form-modal-box textarea:focus {
    outline: none;
    border-color: var(--ink);
}

.form-modal-box textarea {
    resize: vertical;
    min-height: 90px;
}

.form-modal-box .form-submit-btn {
    width: 100%;
    margin-top: 6px;
    border: none;
    cursor: pointer;
    text-align: center;
    display: block;
}

.form-modal-success {
    display: none;
    text-align: center;
    padding: 10px 0 0;
}

.form-modal-success.active {
    display: block;
}

.form-modal-success .icon-ok {
    font-size: 40px;
    margin-bottom: 12px;
}

.sector-modal-box p {
    color: #555;
    line-height: 1.75;
    font-size: 16px;
}

/* ======================================================
   SUBPÁGINAS DE SERVICIO — Responsive
   Estas reglas compensan los grids inline de las subpáginas
   y agregan clases utilitarias para evitar estilos inline
   en futuros archivos.
   ====================================================== */

/* Hero de subpágina: padding top para compensar el header sticky */
.hero[style*="min-height:auto"] .hero-grid,
.hero[style*="min-height: auto"] .hero-grid {
    padding: 94px 0 80px;
}

/* Grids de problema/entregables en subpáginas (3 columnas inline) */
.cards-3[style*="grid-template-columns: repeat(3"] {
    grid-template-columns: repeat(3, 1fr);
}

/* Grid de proceso (4 columnas inline) */
.method-grid[style*="grid-template-columns: repeat(4"] {
    grid-template-columns: repeat(4, 1fr);
}

/* Grid de proceso (5 columnas inline — el más problemático en móvil) */
.method-grid[style*="grid-template-columns: repeat(5"] {
    grid-template-columns: repeat(5, 1fr);
}

/* Sección .block con padding inline en subpáginas */
.block {
    padding: 80px 0;
}

@media (max-width: 980px) {

    /* Hero subpágina: una sola columna, sin el panel derecho */
    .hero[style*="min-height:auto"] .hero-grid,
    .hero[style*="min-height: auto"] .hero-grid {
        grid-template-columns: 1fr;
        padding: 78px 0 60px;
    }

    /* Ocultar el dashboard-wrap en tablet/móvil en subpáginas
       (no tiene sentido apilado debajo del texto en pantallas chicas) */
    .hero[style*="min-height:auto"] .dashboard-wrap,
    .hero[style*="min-height: auto"] .dashboard-wrap {
        display: none;
    }

    /* 3 columnas → 2 columnas */
    .cards-3[style*="grid-template-columns: repeat(3"] {
        grid-template-columns: 1fr 1fr !important;
    }

    /* 4 columnas → 2 columnas */
    .method-grid[style*="grid-template-columns: repeat(4"] {
        grid-template-columns: 1fr 1fr !important;
    }

    /* 5 columnas → 2 columnas */
    .method-grid[style*="grid-template-columns: repeat(5"] {
        grid-template-columns: 1fr 1fr !important;
    }

    /* CTA de subpáginas: botones al 100% en tablet */
    .cta-actions .btn[style*="width: 290px"],
    .cta-actions .btn[style*="width:290px"] {
        width: 100% !important;
    }
}

@media (max-width: 620px) {

    /* Hero subpágina móvil */
    .hero[style*="min-height:auto"] .hero-grid,
    .hero[style*="min-height: auto"] .hero-grid {
        padding: 62px 0 48px;
    }

    /* Todo a 1 columna en móvil */
    .cards-3[style*="grid-template-columns: repeat(3"],
    .method-grid[style*="grid-template-columns: repeat(4"],
    .method-grid[style*="grid-template-columns: repeat(5"] {
        grid-template-columns: 1fr !important;
    }

    /* Sección block más compacta en móvil */
    .block {
        padding: 52px 0;
    }

    /* Botones de hero en subpágina */
    .hero .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 980px) {
    .navlinks.mobile-open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 78px;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.97);
        backdrop-filter: blur(14px);
        border-bottom: 1px solid var(--line);
        padding: 24px 20px;
        gap: 20px;
        z-index: 49;
    }

    .nav-actions.mobile-open {
        display: flex;
        position: absolute;
        top: calc(78px + var(--menu-height, 220px));
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.97);
        padding: 0 20px 24px;
        z-index: 49;
    }
}

/* Modal Insight */
.insight-modal-box {
    max-height: 85vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    position: relative;
    scrollbar-width: none; 
}

.insight-modal-box .sector-modal-close {
    position: sticky;
    top: 16px;
    float: right;
    margin-bottom: -40px;
    /* evita que empuje el contenido */
    z-index: 10;
}

.insight-modal-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.insight-modal-body {
    padding: 32px;
}

.insight-modal-body h3 {
    font-size: 1.3rem;
    margin: 12px 0 20px;
    line-height: 1.3;
}

.insight-modal-body p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #444;
    margin-bottom: 16px;
}

/* Scroll interno del modal insight */
.insight-modal-box {
    max-height: 85vh;
    overflow-y: auto;
    overscroll-behavior: contain;
}