/**
 * Financial section nav — full-bleed bar + aligned inner container (matches page column).
 * Order: docs/FINANCIAL_NAV_SPEC.md
 */

/* Break out of parent .container to viewport width (background spans edge-to-edge) */
.financial-section-nav-shell {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    position: sticky;
    top: 0;
    z-index: 1020;
    box-sizing: border-box;
    overflow-x: clip;
    background: linear-gradient(180deg, #f8f9fb 0%, #ffffff 100%);
    border-bottom: 1px solid #dee2e6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    margin-bottom: 1.35rem;
}

.financial-section-nav {
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
    overflow: visible;
    max-width: none;
}

.financial-section-nav-inner {
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
    box-sizing: border-box;
}

.financial-section-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0.45rem;
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.financial-section-nav-list > li {
    flex: 0 0 auto;
    min-width: 0;
    display: flex;
}

.financial-section-nav-link {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #495057;
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid transparent;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
    flex: 1 1 auto;
    min-height: 2.65rem;
}

.financial-section-nav-link:hover {
    background: rgba(13, 110, 253, 0.08);
    color: #0d6efd;
    border-color: rgba(13, 110, 253, 0.15);
}

.financial-section-nav-link:focus-visible {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

.financial-section-nav-link.is-active {
    background: #fff;
    color: #0d6efd;
    border-color: #b6d4fe;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(13, 110, 253, 0.12);
}

.financial-section-nav-link i {
    opacity: 0.9;
    font-size: 1rem;
    flex-shrink: 0;
}

.financial-section-nav-text {
    display: inline;
}

/* Tablet / desktop: even columns, no cramped bunching */
@media (min-width: 992px) {
    .financial-section-nav-list {
        display: grid;
        grid-template-columns: repeat(7, minmax(0, 1fr));
        gap: 0.5rem;
        overflow-x: visible;
    }

    .financial-section-nav-list > li {
        flex: unset;
        min-width: 0;
    }

    .financial-section-nav-link {
        flex-direction: column;
        gap: 0.2rem;
        padding: 0.55rem 0.35rem;
        min-height: 3.35rem;
        font-size: 0.75rem;
        line-height: 1.2;
        white-space: normal;
        text-align: center;
        hyphens: auto;
    }

    .financial-section-nav-link i {
        font-size: 1.15rem;
    }
}

@media (min-width: 1200px) {
    .financial-section-nav-link {
        font-size: 0.8125rem;
        padding: 0.6rem 0.5rem;
    }
}

/* Shared by all /finances/* pages — same content width as the section nav inner row */
.financial-page-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 768px) {
    .financial-page-container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}
