/* ================================================================
   お知らせのタブ（全て / お知らせ / 建築ニュース / ブログ）

   トップページの News 欄と /news/ の一覧で同じものを使う。
   テーマ本体（wp_root/.../style.css）より後に読み込むこと。
   .newsUL li time / a の幅を上書きしているため、読み込み順が逆だと崩れる。
   ================================================================ */

/* ---- タブ */
.newsTabs_nav {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    border-bottom: 1px solid #ddd;
    margin-bottom: 44px;
}

.newsTab {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    border: 0;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    padding: 14px 30px;
    font-family: inherit;
    font-size: 17px;
    line-height: 1.7;
    letter-spacing: 0.1em;
    white-space: nowrap;
    color: #9a9a9a;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}

.newsTab:hover {
    color: #333;
}

.newsTab[aria-selected="true"] {
    color: #111;
    border-bottom-color: #111;
    font-weight: 600;
}

.newsTab:focus-visible {
    outline: 2px solid #111;
    outline-offset: 2px;
}

.newsTabs_panel[hidden] {
    display: none;
}

/* JS が動いていればタブ名がボタン側に出るので、パネル内の見出しは伏せておく */
.newsTabs_heading {
    display: none;
}

.newsTabs_empty {
    color: #9a9a9a;
}

/* ---- 一覧の行（日付 → 種類 → タイトル）

   幅は px で指定する。テーマが html{font-size:62.5%} を敷いており、
   .newsCat のように font-size を持つ要素へ em で幅を書くと
   その要素自身の文字サイズ基準になってタグとほぼ同じ幅に潰れる。 */
.newsUL li time {
    width: 140px;
}

.newsUL li .newsCat {
    display: inline-block;
    width: 150px;
    font-size: 12px;
    line-height: 1.9;
    letter-spacing: 0.06em;
    color: #666;
}

.newsUL li .newsCat span {
    display: inline-block;
    padding: 1px 12px;
    border: 1px solid #d8d8d8;
    border-radius: 999px;
    white-space: nowrap;
}

.newsUL li a {
    width: calc(100% - 290px);
}

/* トップページの News 欄。一覧のすぐ下に「News List」ボタンが来るので離す
   （テーマが .newsUL>li:last-child の margin-bottom を !important で0にしている） */
.newsTabs + .btnBox {
    margin-top: 56px;
}

/* ページ送りで表示範囲外になった行。
   テーマ側の .newsUL li{display:flex} が hidden 属性より強いので、明示的に消す */
.newsUL li[hidden] {
    display: none;
}

/* ---- ページ送り */
.newsPager {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 64px;
}

/* JS が動くまでは出さない（無効な環境では全件並ぶので、押せないボタンを見せない） */
.newsPager[hidden] {
    display: none;
}

.newsPager_btn {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 3px;
    min-width: 46px;
    padding: 10px 16px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.6;
    letter-spacing: 0.06em;
    color: #555;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s, background-color 0.2s;
}

.newsPager_btn:hover:not(:disabled) {
    border-color: #111;
    color: #111;
}

.newsPager_btn:focus-visible {
    outline: 2px solid #111;
    outline-offset: 2px;
}

.newsPager_num[aria-current="page"] {
    background: #111;
    border-color: #111;
    color: #fff;
    cursor: default;
}

.newsPager_btn:disabled {
    opacity: 0.35;
    cursor: default;
}

@media screen and (max-width: 765px) {
    .newsTabs_nav {
        margin-bottom: 28px;
    }

    .newsTab {
        flex: 1 1 auto;
        padding: 12px 6px;
        font-size: 13px;
        letter-spacing: 0;
        text-align: center;
    }

    /* SP は「日付＋種類」で1行、タイトルで1行に折り返す */
    .newsUL li time {
        width: auto;
    }

    .newsUL li .newsCat {
        width: auto;
        margin-left: 14px;
    }

    .newsUL li a {
        width: 100%;
    }

    .newsTabs + .btnBox {
        margin-top: 40px;
    }

    .newsPager {
        margin-top: 48px;
        gap: 6px;
    }

    .newsPager_btn {
        min-width: 40px;
        padding: 9px 12px;
        font-size: 13px;
        letter-spacing: 0;
    }
}
