/* ==========================================================================
   Página de Servicios
   Hero con dos salidas, las seis capacidades en una rejilla editorial,
   tres capturas reales, el puente a Soluciones y el cierre.
   Reutiliza los tokens de site.css; aquí sólo vive lo propio de la página.
   ========================================================================== */

/* ---------- 01 · Hero ---------- */

/* Hero fotográfico. La imagen cubre el bloque completo y un velo navy la
   apaga sobre la columna de texto, dejando a la vista el portátil y los
   iconos de la derecha. El color plano de debajo está muestreado del borde
   izquierdo de la foto: en pantallas muy anchas la unión no se nota. */
.svchero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: #001736;
    padding-block: clamp(42px, 5vw, 80px);
}

@media (min-width: 960px) {
    .svchero {
        display: grid;
        align-items: center;
        min-height: clamp(440px, 34vw, 540px);
    }
}

.svchero__bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: url("../img/software/bgServicios.webp");
    background-size: cover;
    background-position: center right;
    background-repeat: no-repeat;
}

.svchero__bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(96deg, rgba(0, 14, 34, .94) 0%, rgba(0, 18, 44, .9) 28%, rgba(0, 22, 54, .64) 50%, rgba(0, 24, 60, .22) 72%, rgba(0, 24, 60, 0) 100%);
}

/* Sin dos columnas el texto se apoya sobre la foto entera: el velo pasa a
   ser vertical para que el contraste no dependa del recorte. */
@media (max-width: 959px) {
    .svchero__bg {
        background-position: 70% center;
    }

    .svchero__bg::after {
        background: linear-gradient(180deg, rgba(0, 14, 34, .8) 0%, rgba(0, 18, 44, .89) 55%, rgba(0, 20, 48, .95) 100%);
    }
}

.svchero__inner {
    position: relative;
}

.svchero__copy {
    display: grid;
    justify-items: start;
    gap: 14px;
    min-width: 0;
    max-width: 640px;
}

.svchero__copy .breadcrumbs,
.svchero__copy .breadcrumbs a {
    color: rgba(202, 226, 240, .6);
}

.svchero__copy .breadcrumbs a:hover {
    color: #fff;
}

.svchero__copy .breadcrumbs [aria-current] {
    color: rgba(236, 248, 252, .9);
}

.svchero__eyebrow {
    margin: 0;
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--hb-cyan);
}

.svchero__title {
    margin: 0;
    display: grid;
    gap: 2px;
    font-family: var(--font-display);
    font-size: clamp(2rem, 3.4vw, 3rem);
    line-height: 1.09;
    letter-spacing: -.035em;
    font-weight: 700;
    color: #fff;
    text-wrap: balance;
}

.svchero__title span {
    display: block;
}

/* Del cian de marca al violeta, el mismo recorrido del degradado del inicio
   llevado un paso más al morado. */
.svchero__accent {
    background-image: linear-gradient(100deg, #24D3EC 0%, #3FA8F0 40%, #7B6BF0 74%, #9E6DF2 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    padding-bottom: .08em;
}

.svchero__lead {
    margin: 0;
    font-size: clamp(1rem, 1.15vw, 1.125rem);
    line-height: 1.62;
    color: rgba(214, 231, 243, .82);
    max-width: 50ch;
}

.svchero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}

.svchero__actions .btn--outline {
    border-color: rgba(255, 255, 255, .34);
    color: #fff;
    background: rgba(255, 255, 255, .06);
}

.svchero__actions .btn--outline:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, .14);
    color: #fff;
}

/* ---------- 02 · Banda «¿Qué necesitas resolver?» ---------- */

/* Índice de entrada, no un segundo menú: cada frase baja a su categoría
   dentro de esta misma página. Los destinos externos siguen viviendo una
   sola vez, en el enlace de cada celda. */
.svcneed {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding-block: clamp(34px, 3.6vw, 52px);
}

.svcneed__inner {
    display: grid;
    gap: clamp(20px, 2.6vw, 40px);
    align-items: start;
}

@media (min-width: 900px) {
    .svcneed__inner {
        grid-template-columns: 34fr 66fr;
    }
}

.svcneed__copy {
    min-width: 0;
}

.svcneed__eyebrow {
    margin: 0 0 8px;
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--hb-blue-deep);
}

.svcneed__title {
    margin: 0 0 8px;
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 2vw, 1.75rem);
    line-height: 1.16;
    letter-spacing: -.03em;
    font-weight: 700;
    color: var(--hb-navy);
}

.svcneed__lead {
    margin: 0;
    font-size: .9375rem;
    line-height: 1.58;
    color: var(--text-muted);
    max-width: 40ch;
}

.svcneed__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 2px clamp(18px, 2.4vw, 40px);
    min-width: 0;
}

@media (min-width: 620px) {
    .svcneed__list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.svcneed__item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 12px 11px 4px;
    border-radius: 10px;
    font-size: .9688rem;
    font-weight: 540;
    line-height: 1.34;
    color: var(--hb-navy);
    min-height: 46px;
    transition: background-color .18s var(--ease), color .18s var(--ease);
}

.svcneed__mark {
    flex: none;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--hb-cyan);
    transition: transform .18s var(--ease);
}

.svcneed__item:hover,
.svcneed__item:focus-visible {
    background: var(--brand-tint);
    color: var(--hb-blue-deep);
}

.svcneed__item:hover .svcneed__mark {
    transform: scale(1.5);
}

/* ---------- 03 · Las cinco categorías ---------- */

.svcgrid {
    background: #fff;
    padding-block: clamp(44px, 4.4vw, 66px);
}

.svcgrid__head {
    display: grid;
    justify-items: start;
    gap: 10px;
    margin-bottom: clamp(26px, 2.8vw, 40px);
}

.svcgrid__title {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 2.3vw, 2rem);
    line-height: 1.14;
    letter-spacing: -.03em;
    font-weight: 700;
    color: var(--hb-navy);
}

.svcgrid__lead {
    margin: 0;
    font-size: clamp(.9375rem, 1.1vw, 1.0625rem);
    line-height: 1.6;
    color: var(--text-muted);
    max-width: 54ch;
}

/* Cinco filas declaradas en la rejilla exterior y heredadas con subgrid:
   titular, situación y tecnologías arrancan a la misma altura en las dos
   columnas aunque el texto de una sea más largo. */
.svcgrid__list {
    display: grid;
    gap: 0;
}

@media (min-width: 900px) {
    .svcgrid__list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: auto;
        grid-template-rows: repeat(3, auto);
        column-gap: clamp(44px, 5vw, 96px);
    }

    .svcitem {
        grid-row: span 5;
        grid-template-rows: subgrid;
    }

    /* Un solo trazo entre columnas y entre filas. Sin cajas. */
    .svcitem:nth-child(even) {
        border-left: 1px solid var(--border);
        padding-left: clamp(44px, 5vw, 96px);
    }

    .svcitem:nth-child(n+3) {
        border-top: 1px solid var(--border);
        padding-top: clamp(26px, 2.6vw, 36px);
    }

    .svcitem:nth-child(-n+4) {
        padding-bottom: clamp(26px, 2.6vw, 36px);
    }

    /* Cinco categorías en dos columnas dejarían un hueco en la última fila.
       La quinta la ocupa entera, con el texto medido para que no se estire
       a lo ancho del contenedor. */
    .svcitem:nth-child(5):last-child {
        grid-column: 1 / -1;
    }

    .svcitem:nth-child(5):last-child .svcitem__title,
    .svcitem:nth-child(5):last-child .svcitem__when {
        max-width: 54ch;
    }
}

@supports not (grid-template-rows: subgrid) {
    @media (min-width: 900px) {
        .svcitem__title {
            min-height: 2.4em;
        }

        .svcitem__when {
            min-height: 4.6em;
        }
    }
}

@media (max-width: 899px) {
    .svcitem + .svcitem {
        border-top: 1px solid var(--border);
        margin-top: clamp(26px, 4vw, 34px);
        padding-top: clamp(24px, 3.4vw, 32px);
    }
}

.svcitem {
    display: grid;
    align-content: start;
    min-width: 0;
    /* El header es pegajoso: sin este margen el ancla deja el título debajo. */
    scroll-margin-top: 104px;
}

.svcitem__head {
    display: flex;
    align-items: center;
    gap: 11px;
    margin: 0;
}

.svcitem__num {
    font-family: var(--font-display);
    font-size: .8125rem;
    font-weight: 700;
    letter-spacing: 0;
    color: var(--hb-blue);
}

.svcitem__rule {
    width: 22px;
    height: 1px;
    background: var(--hb-line-strong);
}

.svcitem__name {
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.svcitem__title {
    margin: 12px 0 0;
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 1.75vw, 1.625rem);
    line-height: 1.2;
    letter-spacing: -.028em;
    font-weight: 700;
    color: var(--hb-navy);
    text-wrap: balance;
    transition: color .28s var(--ease);
}

/* «Si hoy» en cyan delante de la situación: el par problema-servicio del
   índice que eliminamos, ahora dentro de la celda. */
.svcitem__when {
    margin: 12px 0 0;
    font-size: .9375rem;
    line-height: 1.62;
    color: var(--text-muted);
    max-width: 54ch;
}

.svcitem__when-label {
    font-weight: 700;
    color: var(--hb-blue-deep);
}

.svcitem__when-label::after {
    content: ":";
}

.svcitem__stack {
    margin: 14px 0 0;
    font-size: .8125rem;
    line-height: 1.5;
    color: #7a8896;
}

/* Una sola fila del subgrid aunque la categoría tenga dos páginas: así las
   dos columnas siguen alineando su última línea. */
.svcitem__ctas {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    align-content: start;
    gap: 4px clamp(18px, 2vw, 30px);
    margin: 16px 0 0;
}

.svcitem__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-size: .9375rem;
    font-weight: 620;
    letter-spacing: -.01em;
    color: var(--hb-blue-deep);
    text-decoration: none;
}

.svcitem__cta .icon {
    transition: transform .28s var(--ease);
}

.svcitem__cta:hover {
    color: var(--brand-strong);
}

.svcitem__cta:hover .icon {
    transform: translateX(4px);
}

@media (hover: hover) and (min-width: 900px) {
    .svcitem:hover .svcitem__title {
        color: var(--hb-blue-deep);
    }
}

/* ---------- 04 · Tecnología en operación ---------- */

.svcreal {
    background: #F6F9FC;
    border-block: 1px solid #EAF0F5;
    padding-block: clamp(42px, 4.2vw, 62px);
}

.svcreal__head {
    display: grid;
    justify-items: start;
    gap: 10px;
    margin-bottom: clamp(22px, 2.4vw, 34px);
}

.svcreal__title {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 2.3vw, 2rem);
    line-height: 1.14;
    letter-spacing: -.03em;
    font-weight: 700;
    color: var(--hb-navy);
}

.svcreal__lead {
    margin: 0;
    font-size: clamp(.9375rem, 1.1vw, 1.0625rem);
    line-height: 1.6;
    color: var(--text-muted);
    max-width: 52ch;
}

/* La captura del ERP manda: ocupa la columna ancha y las otras dos se
   apilan a su derecha. */
/* El ERP ocupa el ancho completo y las otras dos se reparten la fila de
   abajo. Todas las capturas se ven a la misma escala: ninguna se recorta
   ni se amplía para cuadrar la rejilla. El ancho del escenario está
   limitado para que la captura grande no se coma la sección. */
.svcreal__stage {
    display: grid;
    gap: clamp(18px, 2.2vw, 28px);
}

/* Rejilla de seis columnas: el ERP ocupa cuatro y las otras dos se
   reparten la fila de abajo. La fila superior queda deliberadamente
   incompleta; es el único respiro asimétrico de la página. Todas las
   capturas se ven a la misma escala: ninguna se recorta ni se amplía. */
@media (min-width: 900px) {
    .svcreal__stage {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .svcreal__shot--lead {
        grid-column: span 4;
    }

    .svcreal__shot:not(.svcreal__shot--lead) {
        grid-column: span 3;
    }
}

.svcreal__shot {
    display: grid;
    align-content: start;
    gap: 12px;
    margin: 0;
    min-width: 0;
}

.svcreal__frame {
    display: block;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: 0 10px 28px -20px rgba(10, 40, 70, .28);
    transition: box-shadow .3s var(--ease), border-color .3s var(--ease);
}

@media (hover: hover) {
    .svcreal__shot:hover .svcreal__frame {
        border-color: var(--hb-line-strong);
        box-shadow: 0 16px 38px -22px rgba(10, 40, 70, .34);
    }
}

.svcreal__bar {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 26px;
    padding-inline: 13px;
    border-bottom: 1px solid var(--border);
    background: #FAFCFD;
}

.svcreal__bar i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--border-strong);
}

.svcreal__frame img {
    display: block;
    width: 100%;
    height: auto;
}

.svcreal__shot figcaption {
    display: grid;
    gap: 3px;
}

.svcreal__shot b {
    font-family: var(--font-display);
    font-size: .9375rem;
    font-weight: 660;
    letter-spacing: -.015em;
    color: var(--text-strong);
}

.svcreal__shot em {
    font-style: normal;
    font-size: .8125rem;
    line-height: 1.5;
    color: var(--text-muted);
}

/* ---------- 05 · Puente a Soluciones ---------- */

.svcbridge {
    background: #fff;
    padding-block: clamp(40px, 4.2vw, 62px);
}

.svcbridge__inner {
    display: grid;
    gap: clamp(24px, 3vw, 54px);
    align-items: center;
}

@media (min-width: 900px) {
    .svcbridge__inner {
        grid-template-columns: 46fr 54fr;
    }
}

.svcbridge__copy {
    display: grid;
    justify-items: start;
    gap: 12px;
    min-width: 0;
}

.svcbridge__title {
    margin: 0;
    display: grid;
    gap: 1px;
    font-family: var(--font-display);
    font-size: clamp(1.4375rem, 2.1vw, 1.875rem);
    line-height: 1.16;
    letter-spacing: -.03em;
    font-weight: 700;
    color: var(--hb-navy);
}

.svcbridge__title span {
    display: block;
}

.svcbridge__text {
    margin: 0;
    font-size: .9375rem;
    line-height: 1.66;
    color: var(--text-muted);
    max-width: 44ch;
}

.svcbridge__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    font-family: var(--font-display);
    font-size: .9375rem;
    font-weight: 620;
    color: var(--hb-blue-deep);
    text-decoration: none;
}

.svcbridge__cta .icon {
    transition: transform .28s var(--ease);
}

.svcbridge__cta:hover {
    color: var(--brand-strong);
}

.svcbridge__cta:hover .icon {
    transform: translateX(4px);
}

/* Los nueve nombres como una sola línea de texto, no como pills. */
.svcbridge__suites {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 0;
    margin: 0;
    padding-left: clamp(0px, 2vw, 40px);
    font-family: var(--font-display);
    font-size: clamp(1rem, 1.35vw, 1.25rem);
    font-weight: 600;
    letter-spacing: -.02em;
    line-height: 1.5;
    color: var(--hb-navy);
}

@media (min-width: 900px) {
    .svcbridge__suites {
        border-left: 1px solid var(--border);
    }
}

/* El separador va al final del nombre, no al principio del siguiente: si
   la línea se parte, el punto se queda arriba y no abre la línea nueva. */
.svcbridge__suites span:not(:last-child)::after {
    content: "·";
    margin-inline: 11px;
    color: var(--hb-cyan);
    font-weight: 700;
}

/* ---------- 06 · Cierre ---------- */

.svcclose {
    background: linear-gradient(150deg, #062A38, #075E71);
    padding-block: clamp(46px, 5vw, 76px);
}

.svcclose__inner {
    display: grid;
    gap: 15px;
    justify-items: center;
    text-align: center;
    max-width: 660px;
}

.svcclose__title {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(1.625rem, 2.6vw, 2.25rem);
    line-height: 1.16;
    letter-spacing: -.03em;
    font-weight: 700;
    color: #fff;
    text-wrap: balance;
}

.svcclose__text {
    margin: 0;
    font-size: 1.0625rem;
    line-height: 1.6;
    color: rgba(226, 242, 247, .82);
    max-width: 48ch;
}

.svcclose .btn {
    margin-top: 8px;
}
