/* =========================================================
   GRUPO SEINTO · HEADER
   Transparente sobre el hero + blur al hacer scroll
   ========================================================= */

:root {
    --gs-header-height: 78px;
    --gs-header-container: 1440px;

    --gs-header-text: #111827;
    --gs-header-muted: #667085;
    --gs-header-border: rgba(17, 24, 39, 0.10);
    --gs-header-border-strong: rgba(17, 24, 39, 0.16);

    --gs-header-scrolled-bg: #ffffff;
    --gs-header-dash: rgba(17, 24, 39, 0.12);
}

/* El header se superpone al hero */
.gs-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;

    width: 100%;
    color: var(--gs-header-text);
    background: transparent;
    border-bottom: 1px solid transparent;
    isolation: isolate;

    transition:
        background-color 0.28s ease,
        border-color 0.28s ease,
        box-shadow 0.28s ease,
        backdrop-filter 0.28s ease,
        -webkit-backdrop-filter 0.28s ease;
}

.gs-header::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: min(var(--gs-header-container), calc(100% - 48px));
    height: 1px;
    opacity: 0;
    pointer-events: none;
    background-image: repeating-linear-gradient(
        90deg,
        var(--gs-header-dash) 0 9px,
        transparent 9px 16px
    );
    transition: opacity .2s ease;
}

/* Estado tras empezar a hacer scroll */
.gs-header.is-scrolled {
    background: #ffffff !important;
    background-color: #ffffff !important;
    border-bottom-color: transparent !important;
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.055);

    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

.gs-header.is-scrolled::after {
    opacity: 1 !important;
}

/* Misma retícula discontinua que el resto de la home */
.gs-header.is-scrolled .gs-header__inner {
    border-left: 1px dashed rgba(17, 24, 39, 0.12);
    border-right: 1px dashed rgba(17, 24, 39, 0.12);
    padding-left: 18px;
    padding-right: 18px;
}

.admin-bar .gs-header {
    top: 32px;
}

.gs-header__inner {
    position: relative;

    display: grid;
    grid-template-columns: minmax(190px, 1fr) auto minmax(190px, 1fr);
    align-items: center;
    gap: 28px;

    width: min(var(--gs-header-container), calc(100% - 48px));
    min-height: var(--gs-header-height);
    margin: 0 auto;

    border-left: 1px dashed transparent;
    border-right: 1px dashed transparent;

    font-family: var(--gs-font);

    transition:
        border-color .22s ease,
        padding .22s ease;
}

.gs-header__brand {
    justify-self: start;

    display: flex;
    align-items: center;
    min-width: 0;
}

.gs-header__brand .custom-logo-link {
    display: inline-flex;
    align-items: center;
    line-height: 0;
}

.gs-header__brand .custom-logo {
    display: block;

    width: auto;
    max-width: 215px;
    max-height: 46px;

    object-fit: contain;
}

.gs-header__brand-text {
    color: var(--gs-header-text);
    text-decoration: none;
    font-size: 1.16rem;
    font-weight: 750;
    letter-spacing: -0.025em;
}

.gs-header__nav {
    justify-self: center;
}

.gs-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;

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

.gs-nav__item {
    position: static;
}

.gs-nav__link {
    position: relative;

    display: inline-flex;
    align-items: center;
    gap: 6px;

    min-height: 42px;
    padding: 0 12px;

    border: 1px solid transparent;
    border-radius: 9px;

    color: #111827;
    text-decoration: none;
    white-space: nowrap;

    font-family: var(--gs-font);
    font-size: 14px;
    font-weight: 620;
    line-height: 1;
    letter-spacing: -0.012em;

    transition:
        color 0.18s ease,
        background-color 0.18s ease,
        border-color 0.18s ease;
}

/* pequeño acento corporativo sin recargar */
.gs-nav__link::after {
    content: "";

    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 4px;

    height: 2px;
    border-radius: 999px;

    background: linear-gradient(
        90deg,
        var(--gs-blue),
        var(--gs-orange)
    );

    opacity: 0;
    transform: scaleX(0.55);
    transform-origin: center;

    transition:
        opacity 0.18s ease,
        transform 0.18s ease;
}

.gs-nav__link:hover,
.gs-nav__link:focus-visible,
.gs-nav__item.is-open > .gs-nav__link,
.gs-nav__item.current-menu-item > .gs-nav__link,
.gs-nav__item.current-menu-ancestor > .gs-nav__link,
.gs-nav__item.is-current > .gs-nav__link {
    color: var(--gs-blue);
    background: rgba(8, 114, 190, 0.055);
    border-color: rgba(8, 114, 190, 0.18);
    outline: none;
}

.gs-nav__link:hover::after,
.gs-nav__link:focus-visible::after,
.gs-nav__item.is-open > .gs-nav__link::after,
.gs-nav__item.current-menu-item > .gs-nav__link::after,
.gs-nav__item.current-menu-ancestor > .gs-nav__link::after,
.gs-nav__item.is-current > .gs-nav__link::after {
    opacity: 1;
    transform: scaleX(1);
}

.gs-nav__chevron {
    flex: 0 0 auto;
    color: rgba(17, 24, 39, 0.48);

    transition:
        transform 0.18s ease,
        color 0.18s ease;
}

.gs-nav__item.is-open .gs-nav__chevron {
    color: var(--gs-orange);
    transform: rotate(180deg);
}

/* CTA si en WordPress el elemento se llama Hablemos o Contacto */
.gs-nav__item.is-cta {
    margin-left: 8px;
}

.gs-nav__item.is-cta > .gs-nav__link {
    padding-inline: 17px;

    border-color: rgba(17, 24, 39, 0.16);
    border-radius: 999px;

    background: rgba(255, 255, 255, 0.12);
}

.gs-nav__item.is-cta > .gs-nav__link::after {
    display: none;
}

.gs-nav__item.is-cta > .gs-nav__link:hover,
.gs-nav__item.is-cta > .gs-nav__link:focus-visible {
    color: #ffffff;
    border-color: var(--gs-blue);
    background: var(--gs-blue);
}

/* =========================================================
   MEGA MENÚ · COMPACTO / FONDO BLANCO
   ========================================================= */

.gs-mega {
    position: absolute;
    top: calc(100% - 2px);
    left: 50%;

    width: min(820px, calc(100vw - 64px));
    padding: 6px;

    border: 1px dashed rgba(17, 24, 39, 0.14);
    border-radius: 12px;

    color: #111827;
    background: #ffffff;

    box-shadow: 0 18px 46px rgba(17, 24, 39, 0.12);

    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 8px);
    pointer-events: none;

    transition:
        opacity 0.16s ease,
        visibility 0.16s ease,
        transform 0.16s ease;
}

.gs-nav__item.is-open > .gs-mega {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
    pointer-events: auto;
}

.gs-mega__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: hidden;
    border: 1px dashed rgba(17, 24, 39, 0.10);
    border-radius: 8px;
    background: #ffffff;
}

.gs-mega--items-1 {
    width: min(460px, calc(100vw - 64px));
}

.gs-mega--items-1 .gs-mega__grid {
    grid-template-columns: 1fr;
}

.gs-mega--items-2,
.gs-mega--items-3,
.gs-mega--items-4 {
    width: min(820px, calc(100vw - 64px));
}

.gs-mega--items-5,
.gs-mega--items-6,
.gs-mega--items-7,
.gs-mega--items-8 {
    width: min(900px, calc(100vw - 64px));
}

.gs-mega--items-5 .gs-mega__grid,
.gs-mega--items-6 .gs-mega__grid,
.gs-mega--items-7 .gs-mega__grid,
.gs-mega--items-8 .gs-mega__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gs-mega__card {
    position: relative;

    display: grid;
    grid-template-columns: 25px minmax(0, 1fr) auto;
    gap: 11px;
    align-items: center;

    min-height: 76px;
    padding: 13px 15px;

    border-right: 1px dashed rgba(17, 24, 39, 0.10);
    border-bottom: 1px dashed rgba(17, 24, 39, 0.10);

    color: #111827;
    text-decoration: none;
    background: #ffffff;

    transition:
        background-color 0.16s ease,
        color 0.16s ease;
}

.gs-mega--items-1 .gs-mega__card,
.gs-mega--items-2 .gs-mega__card,
.gs-mega--items-3 .gs-mega__card,
.gs-mega--items-4 .gs-mega__card {
    border-right: 1px dashed rgba(17, 24, 39, 0.10);
}

.gs-mega--items-1 .gs-mega__card {
    border-right: 0;
    border-bottom: 0;
}

.gs-mega--items-2 .gs-mega__card:nth-child(2n),
.gs-mega--items-3 .gs-mega__card:nth-child(2n),
.gs-mega--items-4 .gs-mega__card:nth-child(2n) {
    border-right: 0;
}

.gs-mega--items-2 .gs-mega__card:nth-last-child(-n + 2),
.gs-mega--items-3 .gs-mega__card:nth-last-child(-n + 1),
.gs-mega--items-4 .gs-mega__card:nth-last-child(-n + 2) {
    border-bottom: 0;
}

.gs-mega--items-5 .gs-mega__card,
.gs-mega--items-6 .gs-mega__card,
.gs-mega--items-7 .gs-mega__card,
.gs-mega--items-8 .gs-mega__card {
    border-right: 1px dashed rgba(17, 24, 39, 0.10);
    border-bottom: 1px dashed rgba(17, 24, 39, 0.10);
}

.gs-mega--items-5 .gs-mega__card:nth-child(3n),
.gs-mega--items-6 .gs-mega__card:nth-child(3n),
.gs-mega--items-7 .gs-mega__card:nth-child(3n),
.gs-mega--items-8 .gs-mega__card:nth-child(3n) {
    border-right: 0;
}

.gs-mega--items-5 .gs-mega__card:nth-last-child(-n + 2),
.gs-mega--items-6 .gs-mega__card:nth-last-child(-n + 3),
.gs-mega--items-7 .gs-mega__card:nth-last-child(-n + 1),
.gs-mega--items-8 .gs-mega__card:nth-last-child(-n + 2) {
    border-bottom: 0;
}

.gs-mega__card:hover,
.gs-mega__card:focus-visible {
    color: #111827;
    background: rgba(8, 114, 190, 0.045);
    outline: none;
}

.gs-mega__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 24px;
    height: 24px;

    color: var(--gs-blue);
}

.gs-mega__icon i {
    display: block;

    color: currentColor;

    font-size: 18px;
    line-height: 1;
}

.gs-mega__content {
    display: block;
    min-width: 0;
}

.gs-mega__content strong {
    display: block;
    margin: 0;

    color: #111827;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.012em;
}

.gs-mega__content small {
    display: block;
    max-width: 34ch;
    margin-top: 3px;

    color: #667085;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.35;
}

.gs-mega__arrow {
    color: #98a2b3;
    font-size: 13px;

    transition:
        color 0.16s ease,
        transform 0.16s ease;
}

.gs-mega__card:hover .gs-mega__arrow,
.gs-mega__card:focus-visible .gs-mega__arrow {
    color: var(--gs-orange);
    transform: translate(2px, -2px);
}

.gs-mega__footer {
    display: flex;
    align-items: center;
    min-height: 38px;
    padding: 5px 8px 0;
}

.gs-mega__footer a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 7px;

    color: var(--gs-blue);
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
}

.gs-mega__footer a:hover,
.gs-mega__footer a:focus-visible {
    color: var(--gs-orange);
    outline: none;
}

.gs-header__menu-empty {
    color: rgba(17, 24, 39, 0.56);
    font-size: 13px;
}

.gs-header__actions {
    justify-self: end;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.gs-header__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    min-height: 42px;
    padding: 0 18px;

    border: 1px solid var(--gs-blue);
    border-radius: 999px;

    color: #ffffff;
    background: var(--gs-blue);

    text-decoration: none;
    white-space: nowrap;

    font-family: var(--gs-font);
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.012em;

    box-shadow: 0 8px 24px rgba(8, 114, 190, 0.18);

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

.gs-header__cta:hover,
.gs-header__cta:focus-visible {
    color: #111827;
    background: var(--gs-orange);
    border-color: var(--gs-orange);
    box-shadow: 0 10px 28px rgba(255, 148, 24, 0.22);
    transform: translateY(-1px);
    outline: none;
}

.gs-header__cta svg {
    flex: 0 0 auto;
    transition: transform 0.18s ease;
}

.gs-header__cta:hover svg,
.gs-header__cta:focus-visible svg {
    transform: translate(2px, -2px);
}

.gs-header__burger,
.gs-mobile-nav {
    display: none;
}


/* Header scrolled: contraste estable sobre cualquier sección */
.gs-header.is-scrolled,
.gs-header.is-scrolled .gs-header__brand-text,
.gs-header.is-scrolled .gs-nav__link,
.gs-header.is-scrolled .gs-header__burger {
    color: #111827 !important;
}

.gs-header.is-scrolled .gs-nav__link:hover,
.gs-header.is-scrolled .gs-nav__link:focus-visible,
.gs-header.is-scrolled .gs-nav__item.is-current > .gs-nav__link,
.gs-header.is-scrolled .gs-nav__item.current-menu-item > .gs-nav__link {
    color: var(--gs-blue) !important;
}


@media (max-width: 767px) {
    .gs-header.is-scrolled .gs-header__inner {
        padding-left: 10px;
        padding-right: 10px;
    }
}
