/* =========================================================
   COLABORAWEB | HEADER PREMIUM TECNOLÓGICO
   Escritorio · Tablet · Móvil
========================================================= */

.cw-header {
    --cw-bg: #09152a;
    --cw-bg-light: #102440;
    --cw-bg-card: #112744;
    --cw-ink: #f4f8ff;
    --cw-muted: #a9bbd4;
    --cw-blue: #4597ff;
    --cw-blue-bright: #66b4ff;
    --cw-green: #25e0a0;
    --cw-border: rgba(160, 190, 230, .15);
    --cw-container: 1440px;
    --cw-gutter: clamp(18px, 3.6vw, 48px);
    --cw-height: 88px;

    position: relative;
    z-index: 1000;
    isolation: isolate;
    width: 100%;
    color: var(--cw-ink);
    background:
        radial-gradient(
            ellipse at 48% -100%,
            rgba(44, 115, 210, .23),
            transparent 65%
        ),
        linear-gradient(110deg, #09152a 0%, #0b1b32 55%, #0c203a 100%);
    border-bottom: 1px solid var(--cw-border);
    box-shadow: 0 8px 30px rgba(0, 0, 0, .12);
    font-family: inherit;
}

.cw-header *,
.cw-header *::before,
.cw-header *::after {
    box-sizing: border-box;
}

.cw-header a {
    color: inherit;
    text-decoration: none;
}

/* LUZ AMBIENTAL */

.cw-header__glow {
    position: absolute;
    z-index: -1;
    top: 0;
    left: 42%;
    width: 260px;
    height: 100%;
    pointer-events: none;
    background: radial-gradient(
        ellipse,
        rgba(35, 112, 222, .12),
        transparent 72%
    );
    filter: blur(12px);
}

/* CONTENEDOR PRINCIPAL */

.cw-header__container {
    position: relative;
    width: 100%;
    max-width: var(--cw-container);
    min-height: var(--cw-height);
    margin-inline: auto;
    padding-inline: var(--cw-gutter);

    display: grid;
    grid-template-columns: minmax(165px, 230px) minmax(0, 1fr) 0;
    align-items: center;
    column-gap: clamp(22px, 3vw, 46px);
}

/* LOGO TRANSPARENTE */

.cw-header__brand {
    position: relative;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    line-height: 0;
    border-radius: 8px;
}

.cw-header__brand img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 57px;
    object-fit: contain;
    object-position: left center;
    filter: drop-shadow(0 0 12px rgba(63, 146, 255, .08));
    transition:
        filter .25s ease,
        transform .25s ease;
}

.cw-header__brand:hover img {
    filter: drop-shadow(0 0 14px rgba(69, 151, 255, .25));
    transform: translateY(-1px);
}

/* NAVEGACIÓN */

.cw-nav {
    width: 100%;
    min-width: 0;
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cw-nav__list {
    width: 100%;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(4px, .8vw, 13px);

    padding: 0;
    margin: 0;
    list-style: none;
}

.cw-nav__item {
    position: relative;
    min-width: 0;
    display: flex;
    align-items: center;
}

.cw-nav__link {
    position: relative;
    isolation: isolate;
    min-height: 45px;
    padding: 11px clamp(10px, 1.15vw, 17px);

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    color: #dce8f8;
    border: 1px solid transparent;
    border-radius: 11px;
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: .005em;
    white-space: nowrap;

    transition:
        color .22s ease,
        background .22s ease,
        border-color .22s ease,
        box-shadow .22s ease,
        transform .22s ease;
}

.cw-nav__link::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(
        135deg,
        rgba(69, 151, 255, .13),
        rgba(37, 224, 160, .045)
    );
    opacity: 0;
    transition: opacity .22s ease;
}

.cw-nav__link::after {
    content: "";
    position: absolute;
    left: 17px;
    right: 17px;
    bottom: 3px;
    height: 2px;
    border-radius: 10px;
    background: linear-gradient(
        90deg,
        var(--cw-blue),
        var(--cw-green)
    );
    box-shadow: 0 0 10px rgba(69, 151, 255, .3);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .25s ease;
}

.cw-nav__link:hover,
.cw-nav__link:focus-visible {
    color: #fff;
    border-color: rgba(117, 173, 244, .18);
    box-shadow: 0 5px 20px rgba(0, 0, 0, .08);
    transform: translateY(-1px);
}

.cw-nav__link:hover::before,
.cw-nav__link:focus-visible::before {
    opacity: 1;
}

.cw-nav__link:hover::after,
.cw-nav__link:focus-visible::after,
.cw-nav__link--active::after {
    transform: scaleX(1);
}

.cw-nav__link--active {
    color: #fff;
    background: rgba(69, 151, 255, .09);
    border-color: rgba(69, 151, 255, .13);
}

.cw-nav__link--active::before {
    opacity: 1;
}

.cw-nav__link:focus-visible,
.cw-header a:focus-visible,
.cw-menu-toggle:focus-visible {
    outline: 3px solid rgba(102, 180, 255, .7);
    outline-offset: 3px;
}

/* FLECHA DE SERVICIOS */

.cw-nav__link--services {
    cursor: pointer;
}

.cw-nav__chevron {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform .25s ease;
}

/* =========================================================
   SUBMENÚ PREMIUM
========================================================= */

.cw-mega {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    z-index: 1002;

    width: min(770px, calc(100vw - 36px));
    padding: 10px;

    display: grid;
    grid-template-columns: minmax(215px, .8fr) minmax(0, 1.4fr);
    gap: 10px;

    color: var(--cw-ink);
    background: #0c1c33;
    border: 1px solid rgba(125, 170, 230, .22);
    border-radius: 18px;
    box-shadow:
        0 28px 75px rgba(0, 0, 0, .4),
        0 0 0 1px rgba(255, 255, 255, .018) inset,
        0 0 30px rgba(33, 105, 203, .08);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-50%, 12px) scale(.985);
    transform-origin: top center;

    transition:
        opacity .22s ease,
        transform .22s ease,
        visibility .22s ease;
}

/* PUENTE INVISIBLE: evita que el menú se cierre al mover el cursor */
.cw-mega::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -14px;
    height: 14px;
    background: transparent;
}

.cw-mega__intro {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 100%;
    padding: 25px 22px;

    display: flex;
    flex-direction: column;
    align-items: flex-start;

    background:
        radial-gradient(
            circle at 100% 0,
            rgba(58, 139, 255, .25),
            transparent 50%
        ),
        linear-gradient(145deg, #122c4d, #0c1c33);
    border: 1px solid rgba(115, 167, 238, .14);
    border-radius: 13px;
}

.cw-mega__eyebrow {
    color: var(--cw-green);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .14em;
    line-height: 1.6;
}

.cw-mega__intro .cw-mega__title {
    margin: 18px 0 11px;
    color: #fff;
    font-size: 24px;
    font-weight: 750;
    letter-spacing: -.045em;
    line-height: 1.18;
}

.cw-mega__intro p {
    margin: 0;
    color: #afc1d9;
    font-size: 12px;
    line-height: 1.8;
}
.cw-mega__all {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-top: auto;
    padding-top: 24px;

    color: #7db7ff !important;
    font-size: 12px;
    font-weight: 750;
    line-height: 1.5;

    transition: color .2s ease;
}

.cw-mega__all:hover {
    color: var(--cw-green) !important;
}

.cw-mega__all-arrow {
    font-size: 17px;
    transition: transform .2s ease;
}

.cw-mega__all:hover .cw-mega__all-arrow {
    transform: translate(3px, -3px);
}

.cw-mega__decoration {
    position: absolute;
    right: -20px;
    bottom: 20px;
    z-index: -1;
    width: 115px;
    height: 115px;
    border: 1px solid rgba(88, 156, 255, .14);
    border-radius: 50%;
    pointer-events: none;
}

.cw-mega__decoration span {
    position: absolute;
    inset: 12px;
    border: 1px solid rgba(88, 156, 255, .14);
    border-radius: 50%;
}

.cw-mega__decoration span:nth-child(2) {
    inset: 25px;
    border-color: rgba(37, 224, 160, .17);
}

.cw-mega__decoration span:nth-child(3) {
    inset: 39px;
    background: rgba(69, 151, 255, .06);
}

/* LISTA DE SERVICIOS */

.cw-mega__services {
    min-width: 0;
    padding: 4px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: center;
    gap: 6px;
}

.cw-service {
    position: relative;
    min-width: 0;
    min-height: 128px;
    padding: 16px 12px;

    display: flex;
    align-items: flex-start;
    gap: 11px;

    background: transparent;
    border: 1px solid transparent;
    border-radius: 12px;

    transition:
        background .22s ease,
        border-color .22s ease,
        transform .22s ease,
        box-shadow .22s ease;
}

.cw-service:hover {
    background: linear-gradient(
        145deg,
        rgba(49, 104, 173, .18),
        rgba(22, 53, 83, .2)
    );
    border-color: rgba(98, 157, 237, .2);
    box-shadow: 0 8px 22px rgba(0, 0, 0, .12);
    transform: translateY(-2px);
}

.cw-service__icon {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;

    display: grid;
    place-items: center;

    color: #76b5ff;
    background: rgba(52, 119, 206, .16);
    border: 1px solid rgba(92, 158, 244, .18);
    border-radius: 11px;

    transition:
        color .22s ease,
        background .22s ease,
        box-shadow .22s ease;
}

.cw-service:nth-child(even) .cw-service__icon {
    color: var(--cw-green);
    background: rgba(28, 190, 135, .1);
    border-color: rgba(37, 224, 160, .15);
}

.cw-service:hover .cw-service__icon {
    box-shadow: 0 0 18px rgba(69, 151, 255, .12);
}

.cw-service__icon svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.65;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cw-service__content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.cw-service__content strong {
    padding-right: 8px;
    color: #f3f7ff;
    font-size: 12px;
    font-weight: 750;
    line-height: 1.5;
}

.cw-service__content small {
    color: #a9bbd3;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.7;
}

.cw-service__arrow {
    position: absolute;
    top: 12px;
    right: 11px;
    color: var(--cw-green);
    font-size: 13px;
    opacity: 0;
    transform: translate(-3px, 3px);
    transition:
        opacity .2s ease,
        transform .2s ease;
}

.cw-service:hover .cw-service__arrow {
    opacity: 1;
    transform: translate(0, 0);
}

/* SUBMENÚ ABIERTO EN ESCRITORIO */

@media (min-width: 901px) {
    .cw-nav__item--dropdown:hover > .cw-mega,
    .cw-nav__item--dropdown:focus-within > .cw-mega,
    .cw-nav__item--dropdown.is-open > .cw-mega {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translate(-50%, 0) scale(1);
    }

    .cw-nav__item--dropdown:hover .cw-nav__chevron,
    .cw-nav__item--dropdown:focus-within .cw-nav__chevron,
    .cw-nav__item--dropdown.is-open .cw-nav__chevron {
        transform: rotate(180deg);
    }
}

/* =========================================================
   BOTÓN MÓVIL
========================================================= */

.cw-menu-toggle {
    width: 44px;
    height: 44px;
    padding: 0;

    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;

    color: #eaf3ff;
    background: linear-gradient(145deg, #142d4b, #0e2038);
    border: 1px solid rgba(132, 176, 234, .23);
    border-radius: 12px;
    cursor: pointer;

    transition:
        color .2s ease,
        border-color .2s ease,
        box-shadow .2s ease,
        background .2s ease;
}

.cw-menu-toggle:hover {
    color: var(--cw-green);
    border-color: rgba(37, 224, 160, .4);
    box-shadow: 0 0 20px rgba(37, 224, 160, .08);
}

.cw-menu-toggle span {
    display: block;
    width: 19px;
    height: 2px;
    border-radius: 3px;
    background: currentColor;
    transition:
        transform .22s ease,
        opacity .22s ease;
}

.cw-menu-toggle[aria-expanded="true"] span:first-child {
    transform: translateY(7px) rotate(45deg);
}

.cw-menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.cw-menu-toggle[aria-expanded="true"] span:last-child {
    transform: translateY(-7px) rotate(-45deg);
}

/* =========================================================
   TABLETAS Y ESCRITORIOS COMPACTOS
========================================================= */

@media (max-width: 1100px) and (min-width: 901px) {
    .cw-header {
        --cw-height: 78px;
        --cw-gutter: 22px;
    }

    .cw-header__container {
        grid-template-columns: minmax(135px, 180px) minmax(0, 1fr) 0;
        column-gap: 19px;
    }

    .cw-header__brand img {
        max-height: 49px;
    }

    .cw-nav__list {
        gap: 0;
    }

    .cw-nav__link {
        padding-inline: 9px;
        font-size: 12.5px;
    }

    .cw-mega {
        width: min(740px, calc(100vw - 30px));
    }
}

/* =========================================================
   MÓVIL Y TABLETA
========================================================= */

@media (max-width: 900px) {
    .cw-header {
        --cw-height: 74px;
        --cw-gutter: clamp(15px, 4vw, 28px);
    }

    .cw-header__container {
        grid-template-columns: minmax(0, 1fr) 44px;
        column-gap: 15px;
    }

    .cw-header__brand {
        max-width: 235px;
    }

    .cw-header__brand img {
        max-height: 48px;
    }

    .cw-menu-toggle {
        display: inline-flex;
        grid-column: 2;
    }

    .cw-nav {
        position: absolute;
        top: calc(100% + 1px);
        left: 0;
        right: 0;
        z-index: 1001;

        display: block;
        max-height: calc(100vh - var(--cw-height) - 12px);
        max-height: calc(100dvh - var(--cw-height) - 12px);
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;

        padding: 14px var(--cw-gutter) 22px;
        background:
            radial-gradient(
                ellipse at 85% 0,
                rgba(42, 105, 185, .16),
                transparent 55%
            ),
            #09172b;
        border-top: 1px solid rgba(132, 176, 234, .16);
        box-shadow: 0 24px 40px rgba(0, 0, 0, .35);

        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-8px);

        transition:
            opacity .22s ease,
            transform .22s ease,
            visibility .22s ease;
    }

    .cw-nav.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }

    .cw-nav__list {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 5px;
    }

    .cw-nav__item {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .cw-nav__link {
        width: 100%;
        min-height: 48px;
        justify-content: space-between;
        padding: 12px 14px;

        color: #e3edfb;
        background: transparent;
        border: 1px solid transparent;
        border-radius: 10px;
        font-size: 14px;
        white-space: normal;
    }

    .cw-nav__link::before {
        background: linear-gradient(
            100deg,
            rgba(69, 151, 255, .14),
            rgba(37, 224, 160, .045)
        );
    }

    .cw-nav__link::after {
        display: none;
    }

    .cw-nav__link:hover,
    .cw-nav__link:focus-visible,
    .cw-nav__link--active {
        color: #fff;
        background: rgba(69, 151, 255, .09);
        border-color: rgba(101, 163, 242, .15);
        transform: none;
    }

    .cw-nav__item--dropdown {
        position: static;
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .cw-nav__item--dropdown > .cw-nav__link--services {
        width: 100%;
        flex: 0 0 auto;
        touch-action: manipulation;
    }

    /* SUBMENÚ DENTRO DEL PANEL MÓVIL */

    .cw-nav__item--dropdown > .cw-mega {
        position: static;
        inset: auto;
        width: 100%;
        max-width: 100%;
        margin: 5px 0 9px;
        padding: 0;

        display: none;
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;

        background: transparent;
        border: 0;
        border-radius: 0;
        box-shadow: none;

        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: none;
        transition: none;
    }

    .cw-nav__item--dropdown.is-open > .cw-mega {
        display: grid;
    }

    .cw-mega__intro {
        min-height: auto;
        padding: 19px;
        margin: 0;
    }

    .cw-mega__intro h2 {
        margin: 12px 0 9px;
        font-size: 22px;
    }

    .cw-mega__intro p {
        font-size: 12px;
    }

    .cw-mega__all {
        margin-top: 17px;
        padding-top: 0;
    }

    .cw-mega__services {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }

    .cw-service {
        min-height: 115px;
        padding: 13px 10px;
        gap: 9px;
    }

    .cw-service__icon {
        flex-basis: 33px;
        width: 33px;
        height: 33px;
    }

    .cw-service__icon svg {
        width: 19px;
        height: 19px;
    }

    .cw-service__content strong {
        font-size: 12px;
    }

    .cw-service__content small {
        font-size: 11px;
    }

    .cw-service__arrow {
        display: none;
    }

    .cw-nav__item--dropdown.is-open .cw-nav__chevron {
        transform: rotate(180deg);
    }


	
}

/* MÓVILES ESTRECHOS */

@media (max-width: 480px) {
    .cw-header {
        --cw-height: 68px;
        --cw-gutter: 14px;
    }

    .cw-header__container {
        column-gap: 12px;
    }

    .cw-header__brand img {
        max-height: 43px;
    }

    .cw-menu-toggle {
        width: 42px;
        height: 42px;
    }

    .cw-nav {
        max-height: calc(100vh - var(--cw-height) - 8px);
        max-height: calc(100dvh - var(--cw-height) - 8px);
    }

    .cw-mega__services {
        grid-template-columns: minmax(0, 1fr);
    }

    .cw-service {
        min-height: auto;
        padding: 13px;
    }

    .cw-service__content small {
        font-size: 12px;
    }
}

/* MOVIMIENTO REDUCIDO */

@media (prefers-reduced-motion: reduce) {
    .cw-header *,
    .cw-header *::before,
    .cw-header *::after {
        scroll-behavior: auto !important;
        animation: none !important;
        transition-duration: .01ms !important;
    }
}
