/*
* archive-news.css
* ニュースアーカイブページのcss
*/

.news-tabs {
    margin-bottom: 20px;
}

.news-tabs button {
    color: var(--site-text-color);
    background-color: transparent;
    border: none;
    font-size: var(--fs-tab);
    cursor: pointer;
    padding: 10px 0px;
    margin-right: 10px;
}

.news-tabs button.active {
    border-bottom: 2px solid var(--site-text-color);
    font-weight: bold;
}

/* 日付のみ大きく */
.news-date-only {
    font-size: var(--fs-date-front);
    display: inline-block;
    line-height: 1;
}

.news-archive-wrapper {
    width: var(--section-width);
    margin: 0 auto;
}

.news-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0px;
}

#news-table-body tr {
    display: flex;
    flex-direction: column;
    padding: 20px 0;
}

.news-table th {
    text-align: left;
}

/* ニューステーブル内リンクの下線を消す */
.news-table a {
    text-decoration: none;
}

/* 一番左の列の幅を12%に指定（日付列） */
.news-table th:first-child,
.news-table td:first-child {
    display: flex;

    align-items: flex-end;
    width: 12%;
    padding: 0px;
}

.news-table th:nth-child(2),
.news-table td:nth-child(2) {
    width: 8%;
}

.news-table th:nth-child(3),
.news-table td:nth-child(3) {
    width: 100%;
    font-size: var(--fs-front-link-title);
}

.news-weekday {
    display: none;
}

/* PC画面：日付とコンテンツを横並び */
.news-item {
    /* border-bottom: 1px solid var(--site-border-color); */
}

.news-item td {
    padding: 0;
}

.news-title {
    font-weight: bold;
}

/* ホバー効果: ニュース行にマウスを乗せると背景色が変わる */
.news-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
    transition: background-color 0.3s ease;
}

.news-category-label {
    font-size: var(--fs-label);
}

/* デスクトップではカテゴリ列を表示 */
.news-category {
    /* display: none; */
}

/* スマートフォン向けメディアクエリ */
@media screen and (max-width: 768px) {

    .news-archive-wrapper {
        width: var(--section-width-mobile);
        margin: 0 auto;
    }

    .news-tabs {
        margin-bottom: 15px;
    }

    .news-tabs button {
        padding: 8px 0;
        margin-right: 8px;
    }

    .news-table {
        margin-top: 15px;
        display: block;
        width: 100%;
    }

    .news-table thead {
        display: none;
    }

    .news-table tbody {
        display: block;
    }

    .news-item {
        display: flex;
        flex-wrap: wrap;
        padding: 10px;
        gap: 0;
    }

    .news-table td {
        padding: 0;
        border: none;
        box-sizing: border-box;
    }

    .news-table td:nth-child(1) {
        width: 30%;
        /* margin-bottom: 10px; */
    }

    .news-table td:nth-child(2) {
        width: 70%;
        /* margin-bottom: 10px; */
    }

    .news-table td:nth-child(3) {
        width: 100%;
    }

    .news-category {
        display: table-cell;
    }

    .news-category-pc {
        display: none;
    }
}

/* さらに小さいスマートフォン向け */
@media screen and (max-width: 480px) {
    .news-tabs button {
        padding: 6px 0;
        margin-right: 6px;
    }

    .news-item {
        padding: 8px;
    }

    .news-table td:nth-child(1) {
        width: 30%;
        /* margin-bottom: 8px; */
    }

    .news-table td:nth-child(2) {
        width: 60%;
        /* margin-bottom: 8px; */
    }

    .news-table td:nth-child(3) {
        width: 100%;
    }

    td {
        display: flex;
        gap: 0.5rem;
        padding: 0;
    }

    .news-category {
        display: table-cell;
    }
}

/* =====================================
   SWIPE ANIMATION - スワイプアニメーション
   ===================================== */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

.news-item.slide-in {
    animation: slideIn 0.4s ease-in-out forwards;
}

.news-item.slide-out {
    animation: slideOut 0.4s ease-in-out forwards;
}

/* =====================================
   FADE IN ANIMATION - 項目読み込み時のフェードイン
   ===================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.news-item.fade-in {
    animation: fadeIn 0.6s ease-in-out forwards;
}

/* =====================================
   LOAD MORE BUTTON - さらに読み込むボタン
   ===================================== */

.news-load-more-container {
    display: flex !important;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: 20px;
    margin-bottom: 20px;
}

.news-load-more-btn {
    background-color: transparent;
    border: none;
    cursor: pointer;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    transition: opacity 0.3s ease;
}

.news-load-more-btn:active:not(:disabled) {
    opacity: 0.6;
}

.news-load-more-btn:hover:not(:disabled) {
    opacity: 0.7;
}

.news-load-more-btn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.load-more-text {
    color: var(--site-text-color);
    font-size: 1rem;
    font-weight: bold;
    letter-spacing: 0.05em;
}

.load-more-arrow {
    color: var(--site-text-color);
    font-size: 1.2rem;
    font-weight: bold;
    display: block;
}

/* レスポンシブ対応 */
@media screen and (max-width: 768px) {
    .news-load-more-container {
        margin-top: 30px;
        margin-bottom: 30px;
    }

    .news-load-more-btn {
        padding: 15px 0;
        gap: 8px;
    }

    .load-more-text {
        font-size: 0.95rem;
    }

    .load-more-arrow {
        font-size: 1rem;
    }
}

@media screen and (max-width: 480px) {
    .news-load-more-container {
        margin-top: 25px;
        margin-bottom: 25px;
    }

    .news-load-more-btn {
        padding: 12px 0;
        gap: 6px;
    }

    .load-more-text {
        font-size: 0.9rem;
    }

    .load-more-arrow {
        font-size: 0.9rem;
    }
}