/**
 * News Navigation Styles
 * Adapted from About page (.deabout) for consistency.
 */

/* Main Container Override/Adjustment if needed */
.information__wrapper .news-nav__tabs {
    background: #fff;
    border-radius: 14px;
    padding: 8px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .06);
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    scroll-behavior: smooth;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-bottom: 24px;
    /* Space between tabs and content */
}

.information__wrapper .news-nav__tabs::-webkit-scrollbar {
    display: none;
}

.information__wrapper .news-nav__tabs.is-even {
    overflow-x: hidden;
    scroll-snap-type: none;
}

.information__wrapper .news-nav__tabs.is-even {
    justify-content: space-between;
    gap: 12px;
}

.information__wrapper .news-nav__tabs.is-even .news-nav__tab {
    flex: 1 1 0;
    min-width: 0;
}

/* Tab Item */
.news-nav__tab {
    appearance: none;
    border: none;
    /* Reset button styles */
    border-radius: 10px;
    padding: 10px 18px;
    background: transparent;
    color: #173750;
    font-size: 16px;
    /* Explicit font size */
    font-weight: 600;
    cursor: pointer;
    flex: 0 0 auto;
    text-align: center;
    text-decoration: none;
    transition: background .2s ease, color .2s ease, box-shadow .2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
    white-space: nowrap;
    position: relative;
    scroll-snap-align: center;
}

.news-nav__tab:hover {
    color: #173750;
    text-decoration: none;
}

.news-nav__tab.is-active {
    background: #173750;
    color: #fff;
    box-shadow: 0 8px 20px rgba(23, 55, 80, 0.2);
}

.news-nav__tab::after {
    content: '';
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 6px;
    height: 2px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.2s ease;
    opacity: 0.8;
}

.news-nav__tab:hover::after,
.news-nav__tab:focus-visible::after {
    transform: scaleX(1);
}

.news-nav__tab.is-active::after {
    transform: scaleX(0);
}

/* Panels */
.news-nav__panel {
    display: none;
    animation: fadeIn 0.55s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}

.news-nav__panel.is-visible {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .news-nav__panel {
        animation: none;
    }
}

/* Mobile Responsiveness */
@media (max-width: 767.98px) {
    .information__wrapper .news-nav__tabs {
        gap: 10px;
        padding: 8px 4px;
        /* Scrollbar styling for better UX */
        scrollbar-width: none;
        /* Firefox */
        -ms-overflow-style: none;
        /* IE/Edge */
    }

    .information__wrapper .news-nav__tabs::-webkit-scrollbar {
        display: none;
        /* Chrome/Safari/Webkit */
    }

    .news-nav__tab {
        flex: 0 0 auto;
        /* Min width for touch targets */
        white-space: nowrap;
        /* Keep tabs single-line for smooth scrolling */
        font-size: 14px;
    }
}
