@charset "utf-8";
/* ==========================================================================
   glossary.css
   用語集（archive-glossary.php / single-glossary.php）用スタイル
   ========================================================================== */

/* ------------------------------------------
   用語集アーカイブ：外側（ベージュ背景・画面幅いっぱい）
------------------------------------------ */
.glossary-archive {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-top:-100px;
    padding: 150px 20px;
    background-color: #faf7f1;
    background-image: radial-gradient(#e8e1d3 0.8px, transparent 0.8px);
    background-size: 16px 16px;
    box-sizing: border-box;
}

/* 中身をまとめる白い1枚パネル */
.glossary-panel {
    max-width: 1200px;
    margin: 0 auto;
    background-color: #ffffff;
    outline-offset: 6px;
    padding: 40px;
    box-sizing: border-box;
}

@media screen and (max-width: 780px) {
    .glossary-panel {
        padding: 24px 16px;
        outline-offset: 4px;
    }
}

/* ------------------------------------------
   タイトルセクション（額縁の中なので枠線のみ）
------------------------------------------ */
.glossary-hero {
    padding: 20px 0 40px;
    text-align: center;
}

.glossary-hero__frame {
    position: relative;
    max-width: 640px;
    margin: 0 auto;
    padding: 44px 30px;
    border: 1px solid #0056b3;
    background-color: transparent;
    border-radius: 16px;
}

.glossary-hero__frame::before,
.glossary-hero__frame::after {
    content: "";
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e8912d;
}
.glossary-hero__frame::before {
    top: -5px;
    left: -5px;
}
.glossary-hero__frame::after {
    bottom: -5px;
    right: -5px;
}

.glossary-hero__en {
    font-size: 12px;
    letter-spacing: 0.15em;
    color: #e8912d;
    margin: 0 0 10px;
    font-weight: bold;
}

.glossary-hero__title {
    font-size: 34px;
    font-weight: bold;
    letter-spacing: 0.2em;
    color: #1a1a1a;
    margin: 0 0 16px;
}

.glossary-hero__desc {
    font-size: 14px;
    color: #555;
    margin: 0;
    line-height: 1.8;
}

.glossary-hero__scroll {
    margin-top: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.glossary-hero__scroll span:first-child {
    font-size: 11px;
    letter-spacing: 0.15em;
    color: #8a97a8;
    font-weight: bold;
}

.glossary-hero__scroll-line {
    width: 1px;
    height: 36px;
    background: #0056b3;
    animation: glossaryScrollMove 1.6s ease-in-out infinite;
}

@keyframes glossaryScrollMove {
    0%   { transform: scaleY(0); transform-origin: top; opacity: 0; }
    50%  { transform: scaleY(1); transform-origin: top; opacity: 1; }
    100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

@media screen and (max-width: 600px) {
    .glossary-hero__frame {
        padding: 32px 20px;
    }
    .glossary-hero__title {
        font-size: 26px;
    }
}

/* ------------------------------------------
   統計バー
------------------------------------------ */
.glossary-stats {
    background: transparent;
    border: 1px dashed #c9bfa5;
    border-radius: 6px;
    padding: 14px 22px;
    font-size: 14px;
    color: #5a5040;
    margin-bottom: 28px;
    letter-spacing: 0.02em;
}

/* ------------------------------------------
   2カラムレイアウト
------------------------------------------ */
.glossary-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.glossary-main {
    flex: 1;
    min-width: 0;
}

.glossary-sidebar {
    width: 280px;
    flex-shrink: 0;
}

/* ------------------------------------------
   カテゴリー絞り込みボタン
------------------------------------------ */
.glossary-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 28px;
}

.glossary-filter-btn {
    background: #faf7f1;
    border: 1px solid #d8cfb8;
    border-radius: 24px;
    padding: 10px 22px;
    font-size: 14px;
    color: #5a5040;
    cursor: pointer;
    box-shadow: 0 2px 0 #d8cfb8;
    transition: all 0.15s ease;
}

.glossary-filter-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 0 #b8ab85;
    border-color: #b8ab85;
    color: #3a3020;
}

.glossary-filter-btn.is-active {
    background: #0056b3;
    border-color: #0056b3;
    color: #fff;
    box-shadow: 0 2px 0 #003d80;
}

/* ------------------------------------------
   五十音インデックス
------------------------------------------ */
.glossary-kana-index {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 18px 0;
    margin-bottom: 28px;
    border-top: 2px dotted #d8cfb8;
    border-bottom: 2px dotted #d8cfb8;
}

.glossary-kana-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #faf7f1;
    border: 1px solid #d8cfb8;
    border-radius: 50%;
    color: #0056b3;
    font-weight: bold;
    font-size: 15px;
    text-decoration: none;
    box-shadow: 0 2px 0 #d8cfb8;
    transition: all 0.15s ease;
}

.glossary-kana-link:hover {
    background: #0056b3;
    color: #fff;
    border-color: #0056b3;
    transform: translateY(-1px);
}

/* ------------------------------------------
   五十音セクション・用語カード
------------------------------------------ */
.glossary-kana-section {
    margin-bottom: 36px;
    scroll-margin-top: 20px;
}

.glossary-kana-heading {
    font-size: 17px;
    font-weight: bold;
    color: #fff;
    background: #0056b3;
    padding: 8px 24px 8px 18px;
    border-radius: 4px 14px 14px 4px;
    margin-bottom: 16px;
    display: inline-block;
    box-shadow: 2px 2px 0 rgba(0,0,0,0.06);
}

.glossary-terms {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px 20px;
}

.glossary-term-item {
    background: #faf7f1;
    border: 1px solid #e5ddc8;
    border-radius: 8px;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.glossary-term-item:hover {
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}

.glossary-term-item a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    color: #3a3020;
    text-decoration: none;
    font-size: 14px;
}

.glossary-term-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.glossary-term-name {
    font-weight: 500;
}

.glossary-term-item a:hover .glossary-term-name {
    color: #0056b3;
    text-decoration: underline;
}

.glossary-empty {
    color: #888;
    text-align: center;
    padding: 40px 0;
}

/* ------------------------------------------
   サイドバー
------------------------------------------ */
.glossary-sidebar-block {
    background: #faf7f1;
    border: 1px solid #e5ddc8;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

.glossary-sidebar-title {
    font-size: 14px;
    font-weight: bold;
    color: #3a3020;
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px dotted #d8cfb8;
}

.glossary-sidebar-cats {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.glossary-sidebar-cats .glossary-filter-btn {
    width: 100%;
    text-align: left;
    border-radius: 6px;
}

.glossary-search-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d8cfb8;
    background: #faf7f1;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

/* スマホ：サイドバーは下に回り込む */
@media screen and (max-width: 780px) {
    .glossary-layout {
        flex-direction: column;
    }
    .glossary-sidebar {
        width: 100%;
    }
}

/* ------------------------------------------
   個別ページ（single-glossary.php）
------------------------------------------ */
/* single-glossary.php 用 */
.glossary-single {
    max-width: 920px;
    margin: 100px auto 0;
    padding: 72px 24px 96px;
    box-sizing: border-box;
}

.glossary-single__hero {
    position: relative;
    overflow: hidden;
    min-height: 240px;
    margin-bottom: 48px;
    padding: 52px 56px;
    box-sizing: border-box;
    color: #fff;
    background: linear-gradient(135deg, #063f7d 0%, #0056b3 58%, #1375c9 100%);
    border-radius: 20px;
    box-shadow: 0 14px 30px rgba(0, 63, 125, .18);
}

.glossary-single__hero::after {
    position: absolute;
    right: -64px;
    bottom: -92px;
    width: 250px;
    height: 250px;
    content: "";
    background: rgba(255, 255, 255, .1);
    border-radius: 50%;
}

.glossary-single__eyebrow {
    position: relative;
    z-index: 1;
    margin: 0 0 13px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .18em;
    color: #ffcc85;
}

.glossary-single__title {
    position: relative;
    z-index: 1;
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.35;
    letter-spacing: .04em;
}

.glossary-single__lead {
    position: relative;
    z-index: 1;
    max-width: 560px;
    margin: 18px 0 0;
    font-size: 15px;
    line-height: 1.8;
    color: rgba(255, 255, 255, .86);
}

/* テーマ側の見出し用スタイルでレイアウトが崩れないようにする */
.glossary-single__hero > .glossary-single__eyebrow,
.glossary-single__hero > .glossary-single__title,
.glossary-single__hero > .glossary-single__lead {
    float: none;
}

.glossary-content {
    font-size: 16px;
    line-height: 2;
    color: #283442;
}

.glossary-content > *:first-child { margin-top: 0; }
.glossary-content > *:last-child { margin-bottom: 0; }

.glossary-content h2,
.glossary-content h3 {
    position: relative;
    margin: 52px 0 20px;
    padding: 0 0 13px 18px;
    font-size: 24px;
    line-height: 1.5;
    color: #123a63;
    border-bottom: 1px solid #dbe7f2;
}

.glossary-content h2::before,
.glossary-content h3::before {
    position: absolute;
    top: 4px;
    bottom: 13px;
    left: 0;
    width: 5px;
    content: "";
    background: #ee922b;
    border-radius: 3px;
}

.glossary-content h3 { font-size: 20px; }
.glossary-content p { margin: 0 0 24px; }
.glossary-content a { color: #005eb8; font-weight: 700; text-underline-offset: 3px; }
.glossary-content ul,
.glossary-content ol { margin: 0 0 24px; padding-left: 1.5em; }
.glossary-content li + li { margin-top: 8px; }

.glossary-dl-area {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-top: 56px;
    padding: 28px 32px;
    background: #f2f8fd;
    border: 1px solid #cfe1f0;
    border-radius: 14px;
}

.glossary-dl-area__icon {
    display: grid;
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    place-items: center;
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    background: #e85d4a;
    border-radius: 10px;
}

.glossary-dl-area__body { flex: 1; }
.dl-title { margin: 0 0 6px; font-size: 17px; font-weight: 700; color: #123a63; }
.dl-desc { margin: 0; font-size: 14px; line-height: 1.75; color: #4b6175; }

.btn-dl {
    display: inline-flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    padding: 15px 22px;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    background: #0056b3;
    border-radius: 7px;
    box-shadow: 0 4px 0 #003f83;
    transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.btn-dl:hover { color: #fff; background: #06498d; box-shadow: 0 2px 0 #003f83; transform: translateY(2px); }
.btn-dl:focus-visible { outline: 3px solid #f0a449; outline-offset: 3px; }

@media (max-width: 640px) {
    .glossary-single { padding: 120px 18px 64px; }
    .glossary-single__hero { min-height: 210px; margin-bottom: 34px; padding: 38px 26px; border-radius: 14px; }
    .glossary-single__lead { font-size: 14px; }
    .glossary-content { font-size: 15px; }
    .glossary-content h2,
    .glossary-content h3 { margin-top: 40px; font-size: 21px; }
    .glossary-content h3 { font-size: 19px; }
    .glossary-dl-area { display: block; margin-top: 42px; padding: 24px; }
    .glossary-dl-area__icon { margin-bottom: 14px; }
    .btn-dl { width: 100%; margin-top: 20px; box-sizing: border-box; }
}
