@charset "UTF-8";
/* ============================================================
   techblog.css - 株式会社ヨクト TechBlog 専用スタイル
   ============================================================
   依存: common.css（CSS変数 --yokuto-blue / --yokuto-green,
        .container, .new-section, .contact-section 等）
   使用ページ: techblog.html / techblog/posts/*.html
   サーバー処理（PHP/DB）は使用せず、一覧描画・タグ絞り込み・
   ページングは js/techblog.js（クライアントサイド）で行う。
   ============================================================ */

/* ------------------------------------------------------------
   1. ヒーロー（トップビジュアル）
   ------------------------------------------------------------ */
.tb-hero {
    background: linear-gradient(135deg, #001f3f 0%, var(--yokuto-blue) 55%, #00506b 100%);
    color: #fff;
    text-align: center;
    padding: 130px 20px 70px;
    position: relative;
    overflow: hidden;
}
.tb-hero::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 4px;
    background: var(--yokuto-green);
}
.tb-hero__badge {
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50px;
    padding: 5px 18px;
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    margin-bottom: 18px;
}
.tb-hero__title {
    font-size: 2.4rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    margin: 0 0 10px;
    line-height: 1.2;
}
.tb-hero__lead {
    font-size: 1rem;
    line-height: 1.7;
    opacity: 0.9;
    max-width: 720px;
    margin: 0 auto;
}

/* ------------------------------------------------------------
   2. 一覧セクション
   ------------------------------------------------------------ */
.tb-section {
    padding: 60px 20px 90px;
}
.tb-section .container {
    max-width: 1100px;
}

/* 絞り込み状態の表示 */
.tb-result-info {
    color: #666;
    font-size: 0.9rem;
    margin: 0 0 20px;
    text-align: center;
}
.tb-result-info strong {
    color: var(--yokuto-blue);
}

/* ------------------------------------------------------------
   3. タグ絞り込みバー
   ------------------------------------------------------------ */
.tb-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 0 auto 45px;
    max-width: 880px;
}
.tb-filter__btn {
    border: 1px solid #cfd8dc;
    background: #fff;
    color: var(--yokuto-blue);
    border-radius: 50px;
    padding: 7px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1.4;
}
.tb-filter__btn:hover {
    border-color: var(--yokuto-green);
    color: var(--yokuto-green);
}
.tb-filter__btn.is-active {
    background: var(--yokuto-blue);
    border-color: var(--yokuto-blue);
    color: #fff;
}
.tb-filter__btn.is-active:hover {
    color: #fff;
}
.tb-filter__count {
    opacity: 0.7;
    font-size: 0.78em;
    margin-left: 4px;
}

/* ------------------------------------------------------------
   4. 記事カードグリッド
   ------------------------------------------------------------ */
.tb-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.tb-card {
    background: #fff;
    border: 1px solid #eceff1;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 31, 63, 0.05);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
}
.tb-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 24px rgba(0, 31, 63, 0.12);
}
.tb-card__link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}
/* サムネイル（画像 or グラデーションのプレースホルダ） */
.tb-card__thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, var(--yokuto-blue), #00506b);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.tb-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.tb-card__thumb-label {
    color: rgba(255, 255, 255, 0.92);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 0 16px;
    text-align: center;
}
.tb-card__body {
    padding: 20px 20px 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.tb-card__date {
    font-size: 0.78rem;
    color: #90a4ae;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
}
.tb-card__title {
    font-size: 1.05rem;
    line-height: 1.5;
    color: var(--yokuto-blue);
    margin: 0 0 10px;
    font-weight: 700;
}
.tb-card__excerpt {
    font-size: 0.88rem;
    line-height: 1.7;
    color: #607d8b;
    margin: 0 0 16px;
    flex: 1;
}
.tb-card__tags {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.tb-card__tags li {
    font-size: 0.72rem;
    color: var(--yokuto-green);
    background: rgba(0, 191, 165, 0.1);
    border-radius: 4px;
    padding: 3px 8px;
    line-height: 1.4;
}
.tb-card__tags li::before {
    content: '#';
    opacity: 0.7;
    margin-right: 1px;
}

/* 該当なし / 読み込み中 / エラー */
.tb-state {
    text-align: center;
    color: #607d8b;
    padding: 60px 0;
    font-size: 0.95rem;
    grid-column: 1 / -1;
}

/* ------------------------------------------------------------
   5. ページング
   ------------------------------------------------------------ */
.tb-pager {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 50px;
}
.tb-pager__btn {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #cfd8dc;
    background: #fff;
    color: var(--yokuto-blue);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.tb-pager__btn:hover:not(:disabled):not(.is-current) {
    border-color: var(--yokuto-green);
    color: var(--yokuto-green);
}
.tb-pager__btn.is-current {
    background: var(--yokuto-blue);
    border-color: var(--yokuto-blue);
    color: #fff;
    cursor: default;
}
.tb-pager__btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.tb-pager__ellipsis {
    color: #b0bec5;
    padding: 0 4px;
}

/* ------------------------------------------------------------
   6. 個別記事ページ
   ------------------------------------------------------------ */
.tb-article {    padding: 50px 20px 80px;
}
.tb-article .container {
    max-width: 820px;
}
.tb-article__breadcrumb {
    font-size: 0.8rem;
    color: #90a4ae;
    margin-bottom: 24px;
}
.tb-article__breadcrumb a {
    color: var(--yokuto-blue);
    text-decoration: none;
}
.tb-article__breadcrumb a:hover {
    text-decoration: underline;
}
.tb-article__header {
    /* header+.css の bare な header{position:fixed} を打ち消す
       （記事内タイトル枠が画面上部に固定されるのを防ぐ） */
    position: static;
    width: auto;
    border-bottom: 1px solid #eceff1;
    padding-bottom: 26px;
    margin-bottom: 36px;
}
.tb-article__date {
    font-size: 0.82rem;
    color: #90a4ae;
    letter-spacing: 0.04em;
}
.tb-article__title {
    font-size: 1.9rem;
    line-height: 1.4;
    color: var(--yokuto-blue);
    font-weight: 700;
    margin: 10px 0 18px;
}
.tb-article__tags {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.tb-article__tags a {
    font-size: 0.78rem;
    color: var(--yokuto-green);
    background: rgba(0, 191, 165, 0.1);
    border-radius: 4px;
    padding: 4px 10px;
    text-decoration: none;
    transition: background 0.2s ease;
}
.tb-article__tags a:hover {
    background: rgba(0, 191, 165, 0.2);
}
.tb-article__tags a::before {
    content: '#';
    opacity: 0.7;
    margin-right: 1px;
}

/* 本文 */
.tb-body {
    color: var(--text-dark);
    line-height: 1.9;
    font-size: 1rem;
}
.tb-body > * {
    margin: 0 0 1.3em;
}
.tb-body h2 {
    font-size: 1.4rem;
    color: var(--yokuto-blue);
    font-weight: 700;
    border-left: 5px solid var(--yokuto-green);
    padding-left: 14px;
    margin: 2em 0 0.9em;
    line-height: 1.4;
}
.tb-body h3 {
    font-size: 1.15rem;
    color: var(--yokuto-blue);
    font-weight: 700;
    margin: 1.8em 0 0.7em;
}
.tb-body strong {
    color: var(--yokuto-blue);
    font-weight: 700;
    background: linear-gradient(transparent 70%, #b2ebf2 70%);
}
.tb-body a {
    color: var(--yokuto-green);
    text-decoration: underline;
}
.tb-body ul,
.tb-body ol {
    padding-left: 1.5em;
}
.tb-body li {
    margin-bottom: 0.5em;
}
.tb-body blockquote {
    border-left: 4px solid #cfd8dc;
    background: var(--bg-light);
    padding: 14px 20px;
    color: #546e7a;
    border-radius: 0 8px 8px 0;
}
.tb-body pre {
    background: #1b2733;
    color: #e0f2f1;
    padding: 18px 20px;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.85rem;
    line-height: 1.6;
}
.tb-body code {
    font-family: "SFMono-Regular", Consolas, Menlo, monospace;
    font-size: 0.88em;
    background: rgba(0, 31, 63, 0.07);
    padding: 2px 6px;
    border-radius: 4px;
}
.tb-body pre code {
    background: none;
    padding: 0;
    color: inherit;
}
.tb-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* 記事フッター（一覧へ戻る） */
.tb-article__footer {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #eceff1;
    text-align: center;
}
.tb-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--yokuto-blue);
    color: var(--yokuto-blue);
    background: #fff;
    border-radius: 50px;
    padding: 11px 28px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}
.tb-back-btn:hover {
    background: var(--yokuto-blue);
    color: #fff;
}

/* ------------------------------------------------------------
   7. レスポンシブ
   ------------------------------------------------------------ */
@media screen and (max-width: 960px) {
    .tb-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 22px;
    }
    .tb-hero__title {
        font-size: 1.9rem;
    }
}
@media screen and (max-width: 600px) {
    .tb-grid {
        grid-template-columns: 1fr;
    }
    .tb-hero {
        padding: 110px 16px 50px;
    }
    .tb-hero__title {
        font-size: 1.6rem;
    }
    .tb-article__title {
        font-size: 1.45rem;
    }
    .tb-body h2 {
        font-size: 1.2rem;
    }
}
