/* ========== NEWS PAGE STYLES ========== */
:root {
    /* Sweet Spot Tuning */
    --news-page-bg: #F8FAFC;
    --news-container-width: min(1000px, 92vw);
    
    --news-filter-bg: #01368a;
    --news-filter-width: min(1200px, 92vw); /* ← 1200px max width */
    --news-filter-padding: 32px 20px;
    --news-filter-gap: 48px;
    --news-filter-radius: 4px;
    
    --news-title-size: 22px;
    --news-date-size: 18px;
    --news-badge-size: 14px;
    
    /* Spacing Tuning */
    --news-section-pt: 80px;
    --news-section-pb: 120px;
    --news-filter-margin-bottom: 60px;
    
    /* SP Tuning (Sweet Spot Tuning) */
    --sp-news-container-width: 80vw;   /* Mobile list width */
    --sp-news-filter-width: 100vw;     /* Mobile filter bar width */
    --sp-news-filter-gap: 20px;
    --sp-news-title-size: 19px;
    --sp-news-date-size: 15px;
}

.news-page {
    background-color: var(--news-page-bg);
}

.news-page-content {
    position: relative;
    padding-top: var(--news-section-pt);
    padding-bottom: var(--news-section-pb);
}

.news-main-section {
    position: relative;
    z-index: 10;
    width: var(--container-w);
    margin: 0 auto;
    box-sizing: border-box;
}

.news-main-title {
    text-align: left;
    font-size: clamp(26px, 3.5vw, 42px);
    font-weight: 800;
    color: #1a233a;
    margin-bottom: 60px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ========== FILTER SECTION ========== */
.news-filter-section {
    width: var(--news-filter-width);
    margin: 0 auto var(--news-filter-margin-bottom);
    background-color: var(--news-filter-bg);
    padding: var(--news-filter-padding);
    border-radius: var(--news-filter-radius);
    display: flex;
    justify-content: center;
    align-items: center;
}

.news-filter-list {
    display: flex;
    gap: var(--news-filter-gap);
    list-style: none;
    margin: 0;
    padding: 0;
}

.news-filter-item {
    display: flex;
    align-items: center;
}

.news-filter-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ffffff;
    font-size: 18px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.news-filter-link:hover {
    opacity: 1;
    color: #ffffff;
}

.news-filter-link.active {
    font-weight: 700;
}

.news-filter-link.active .news-filter-square {
    background-color: transparent;
    border-color: #ffffff;
}

.news-filter-link.active .news-filter-square::after {
    /* --- TICK ADJUSTMENT PANEL (Change these only!) --- */
    --tick-width: 6px;
    --tick-height: 16px;
    --tick-top: -4px;
    --tick-left: 6px;
    /* -------------------------------------------------- */

    content: "";
    position: absolute;
    left: var(--tick-left);
    top: var(--tick-top);
    width: var(--tick-width);
    height: var(--tick-height);
    border: solid #ffffff;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
    animation: checkIn 0.3s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

@keyframes checkIn {
    0% {
        height: 0;
        width: 0;
        opacity: 0;
    }
    100% {
        height: var(--tick-height);
        width: var(--tick-width);
        opacity: 1;
    }
}

.news-row.hidden {
    display: none !important;
}

.news-filter-square {
    display: block;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-radius: 2px;
    position: relative;
    background-color: transparent;
    transition: all 0.2s ease;
}

/* ========== NEWS LISTING (Ported from top.css) ========== */
.news-listing-wrap {
    width: var(--news-container-width);
    margin: 0 auto;
}

.news-listing {
    border-top: 1px solid #2D3A3A;
}

.news-row {
    display: grid;
    grid-template-columns: 1fr 60px;
    grid-template-areas:
        "meta arrow"
        "title arrow";
    align-items: center;
    padding: 32px 0;
    border-bottom: 1px solid #2D3A3A;
    text-decoration: none;
    transition: background 0.2s;
    color: inherit;
}

.news-row:hover {
    background: rgba(0, 0, 0, 0.02);
}

.news-meta {
    grid-area: meta;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.news-date {
    font-size: var(--news-date-size);
    color: #2D3A3A;
    font-weight: 500;
}

.news-badge {
    background: #4ADE80;
    color: #2D3A3A;
    font-size: var(--news-badge-size);
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 999px;
    text-align: center;
}

/* Category-specific badge color if needed */
.news-badge.news-badge-other {
    background: #D1D5DB; /* Light gray for その他 as seen in some screenshots */
}

.news-title {
    grid-area: title;
    font-size: var(--news-title-size);
    color: #2D3A3A;
    font-weight: 500;
    line-height: 1.3;
}

.news-arrow {
    grid-area: arrow;
    font-size: 48px;
    color: #2D3A3A;
    font-weight: 200;
    text-align: right;
    transition: transform 0.3s;
}

.news-row:hover .news-arrow {
    transform: translateX(10px);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
    .news-page-content {
        padding-top: 50px;
        padding-bottom: 80px;
    }

    .news-main-title {
        font-size: 28px;
        margin-bottom: 40px;
    }

    .news-filter-section {
        border-radius: 0;
        width: var(--sp-news-filter-width);
        padding: 24px 20px;
    }

    .news-listing-wrap {
        width: var(--sp-news-container-width);
    }

    .news-filter-list {
        gap: var(--sp-news-filter-gap);
        flex-wrap: wrap;
        justify-content: center;
    }

    .news-row {
        padding: 24px 0;
    }

    .news-meta {
        flex-direction: row-reverse;
        justify-content: flex-end;
        margin-bottom: 8px;
        gap: 12px;
    }

    .news-date {
        font-size: var(--sp-news-date-size);
    }

    .news-badge {
        font-size: 11px;
        padding: 2px 10px;
    }

    .news-title {
        font-size: var(--sp-news-title-size);
        line-height: 1.4;
    }

    .news-arrow {
        font-size: 32px;
    }
}

@media (max-width: 560px) {
    .news-filter-list {
        flex-direction: row; /* Keep them horizontal but wrap if needed */
        justify-content: space-around;
        width: 100%;
    }
    
    .news-filter-link {
        font-size: 16px;
    }
}
