/* Navegación por secciones — portada */
.td-home-sections {
    position: sticky;
    top: var(--td-home-sticky-top, 112px);
    z-index: 9000;
    margin: 0 -4px 4px;
    padding: 0 0 6px;
    background: linear-gradient(
        180deg,
        var(--td-page-bg, #d8e2ee) 0%,
        var(--td-page-bg, #d8e2ee) 72%,
        transparent 100%
    );
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 12px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 12px), transparent 100%);
}

.td-home-sections__track {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    padding: 4px 4px 2px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.td-home-sections__track::-webkit-scrollbar {
    display: none;
}

.td-home-sections__pill {
    flex: 0 0 auto;
    scroll-snap-align: start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 7px 13px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    text-decoration: none !important;
    color: var(--td-muted, #475569);
    background: var(--td-surface, #f8fafc);
    border: 1px solid var(--td-line, #cbd5e1);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.07);
    transition:
        color 0.18s ease,
        background 0.18s ease,
        border-color 0.18s ease,
        transform 0.12s ease;
    -webkit-tap-highlight-color: transparent;
}

.td-home-sections__pill .bi {
    font-size: 0.9rem;
    line-height: 1;
    opacity: 0.88;
}

.td-home-sections__pill:focus-visible {
    outline: 3px solid #38bdf8;
    outline-offset: 2px;
}

.td-home-sections__hint {
    margin: 0 4px 2px;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--td-muted, #64748b);
    opacity: 0.85;
}

.td-home-sections__pill--active,
.td-home-sections__pill[aria-current="true"] {
    color: #0369a1;
    background: linear-gradient(155deg, #e0f2fe 0%, #bae6fd 55%, #7dd3fc 100%);
    border-color: #38bdf8;
    box-shadow:
        0 2px 10px rgba(14, 165, 233, 0.22),
        0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    transform: translateY(-1px);
}

.td-home-sections__pill:active {
    transform: scale(0.97);
}

html[data-theme="dark"] .td-home-sections {
    background: linear-gradient(
        180deg,
        var(--td-page-bg, #090f1a) 0%,
        var(--td-page-bg, #090f1a) 72%,
        transparent 100%
    );
}

html[data-theme="dark"] .td-home-sections__pill {
    color: #94a3b8;
    background: #1a2438;
    border-color: #334155;
    box-shadow: none;
}

html[data-theme="dark"] .td-home-sections__pill--active,
html[data-theme="dark"] .td-home-sections__pill[aria-current="true"] {
    color: #e0f2fe;
    background: linear-gradient(155deg, #1e3a5f 0%, #1d4ed8 100%);
    border-color: #38bdf8;
}

@media (min-width: 900px) {
    .td-home-sections {
        margin-left: 0;
        margin-right: 0;
    }

    .td-home-sections__track {
        flex-wrap: wrap;
        overflow: visible;
        justify-content: flex-start;
    }
}
