/* Navegación editorial compartida por las cinco portadas de sección. */
.section-page .section-nav {
    --section-nav-bg: #101a2c;
    --section-nav-bg-deep: #0b1322;
    --section-nav-text: #dce5f3;
    --section-nav-line: rgba(148, 163, 184, 0.18);
    --section-nav-hover: rgba(37, 99, 235, 0.16);
    --section-nav-active: rgba(37, 99, 235, 0.24);
    display: flex;
    min-height: 52px;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    flex-wrap: nowrap;
    overflow: visible;
    padding-inline: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid #24344f;
    background: linear-gradient(180deg, var(--section-nav-bg), var(--section-nav-bg-deep));
    box-shadow: 0 5px 14px rgba(11, 17, 32, 0.14);
    isolation: isolate;
}

.section-page .section-nav a {
    position: relative;
    display: inline-flex;
    width: auto;
    min-height: 52px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    padding: 0 1.4rem;
    border-right: 1px solid var(--section-nav-line);
    background: transparent;
    color: var(--section-nav-text);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.075em;
    line-height: 1;
    text-transform: uppercase;
    transition: color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.section-page .section-nav a:first-child {
    border-left: 1px solid var(--section-nav-line);
}

.section-page .section-nav a::after {
    content: "";
    position: absolute;
    right: 1rem;
    bottom: 0;
    left: 1rem;
    width: auto;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: #ef3340;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 180ms ease;
}

.section-page .section-nav a:hover {
    background: var(--section-nav-hover);
    color: #fff;
}

.section-page .section-nav a:hover::after {
    width: auto;
    transform: scaleX(0.45);
}

.section-page .section-nav a[aria-current="page"] {
    background: linear-gradient(180deg, var(--section-nav-active), rgba(37, 99, 235, 0.1));
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(96, 165, 250, 0.24);
}

.section-page .section-nav a[aria-current="page"]::after {
    transform: scaleX(1);
}

.section-page .section-nav a:focus-visible {
    z-index: 1;
    outline: 2px solid #f8fafc;
    outline-offset: -4px;
    background: var(--section-nav-hover);
    color: #fff;
}

.section-page .section-nav a:active {
    background: rgba(37, 99, 235, 0.32);
}

@media (max-width: 900px) {
    .section-page .section-nav {
        display: flex;
        min-height: 48px;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 0;
        overflow-x: auto;
        overflow-y: hidden;
        padding-inline: 0.75rem;
        scroll-padding-inline: 0.75rem;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-inline: contain;
        touch-action: pan-x;
    }

    .section-page .section-nav::-webkit-scrollbar {
        display: none;
    }

    .section-page .section-nav a {
        width: auto;
        min-height: 48px;
        padding: 0 1rem;
        border-bottom: 0;
        font-size: 0.73rem;
        scroll-snap-align: start;
        white-space: nowrap;
    }

    .section-page .section-nav a::after {
        right: 0.72rem;
        left: 0.72rem;
    }
}

@media (max-width: 480px) {
    .section-page .section-nav {
        padding-inline: 0.5rem;
        scroll-padding-inline: 0.5rem;
    }

    .section-page .section-nav a {
        padding-inline: 0.85rem;
        font-size: 0.7rem;
        letter-spacing: 0.065em;
    }
}

@media (prefers-reduced-motion: reduce) {
    .section-page .section-nav a,
    .section-page .section-nav a::after {
        transition: none;
    }
}
