/* =========================
   topicsページ専用CSS
========================= */

/* セクション全体（白背景カード） */
.text-section {
    background-color: rgba(255, 255, 255, 0.7);

    padding: 0;
    /* ←完全にゼロにする */
    margin: 40px auto;
    max-width: 900px;

    border-radius: 16px;
    overflow: hidden;
    /* ←これ超重要（角丸維持） */

    box-shadow: 0 0 20px rgba(0, 0, 0, 0.08);
    text-align: center;
}

/* セクションタイトル帯 */
.section-title {
    display: block;
    width: 100%;
    background: linear-gradient(90deg,
            rgba(0, 20, 60, 0.98) 0%,
            rgba(0, 20, 60, 0.85) 40%,
            rgba(0, 20, 60, 0.6) 100%);
    /* ここが左→右のグラデーション */
    color: #ffffff;
    text-align: center;
    padding: 14px 20px;
    /* 上下:14px, 左右:20px */
    font-size: 1.6em;
    font-weight: 600;
    margin: 0;
    border-radius: 16px 16px 0 0;
    /* 上だけ丸く */
    box-sizing: border-box;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* 本文内テキスト */
.text-inner {
    max-width: 760px;
    margin: 0 auto;
    text-align: left;

    padding: 30px;
    /* ←ここにまとめる */
}

.text-inner p {
    margin: 0;
    padding: 28px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
    line-height: 1.9;
    color: #444;
    font-size: 0.98rem;
}

.text-inner p:first-of-type {
    border-top: 1px solid rgba(0, 0, 0, 0.12);
}

.text-inner strong {
    display: block;
    margin-bottom: 10px;
    font-size: 1.08rem;
    color: #1f3c5a;
    font-weight: 600;
}

.text-inner a {
    display: inline-block;
    margin-top: 12px;
    color: #2d6aa6;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
}

.text-inner a:hover {
    color: #17436b;
    transform: translateX(4px);
}

/* フェード無効化 */
body.fade-background .text-inner {
    opacity: 1;
    transform: none;
}

/* 背景固定 */
body.fade-background {
    background-image: url("../img/background/topics_bg.jpg");
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* 暗幕 */
body.fade-background::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: -1;
}

/* スマホ対応 */
@media (max-width: 600px) {
    .hero {
        height: 45vh;
    }

    .center-logo {
        max-width: 80vw;
    }

    .text-section {
        padding: 40px 20px 30px 20px;
        /* 上:40px, 左右:20px, 下:30px */
        margin: 24px 16px;
    }

    .section-title {
        font-size: 1.4em;
        padding: 12px 15px;
        margin: 0 0 20px 0;
    }

    .text-inner {
        max-width: 100%;
    }

    .text-inner p {
        padding: 22px 0;
        font-size: 0.95rem;
        line-height: 1.8;
    }

    .text-inner strong {
        font-size: 1rem;
        line-height: 1.6;
    }
}

/* hero */
.hero {
    position: relative;
    height: 60vh;
    margin: 0;
    padding: 0;
}

/* 中央ロゴ */
.center-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 60vw;
    height: auto;
}

/* 年タイトル */
.archive-year h3 {
    font-size: 1.3em;
    margin: 30px 0 15px;
    color: #002060;
}

/* ===== PDF一覧 ===== */
.pdf-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

/* カード全体 */
.pdf-card {
    width: 100%;
    text-align: center;
    transition: 0.3s;
    padding-bottom: 5px;
}
}

.pdf-card:hover {
    transform: translateY(-5px);
}

/* サムネ */
.pdf-card img {
    width: 100%;
    aspect-ratio: 1 / 1.414;
    /* A4比率 */
    object-fit: cover;

    border: 1px solid #ddd;
    border-radius: 10px;

    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: 0.3s;
    cursor: pointer;
}

/* ホバー（統一） */
.pdf-card a img:hover {
    transform: scale(1.05);
}

/* タイトル */
.pdf-card p {
    margin: 8px 0 4px;
    padding: 0;
    border: none;
}

/* リンク */
.pdf-card a {
    text-decoration: none;
}

/* ボタン */
.pdf-card a:last-child {
    display: inline-block;
    margin-top: 5px;
    padding: 6px 12px;
    background: #002060;
    color: #fff;
    border-radius: 4px;
    font-size: 0.9em;
    transition: 0.3s;
}

.pdf-card a:last-child:hover {
    background: #0040a0;
}

/* ===== レスポンシブ ===== */
@media (max-width: 768px) {
    .pdf-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .pdf-list {
        grid-template-columns: 1fr;
    }
}

/* バッジ配置のため */
.pdf-card a {
    position: relative;
    display: block;
}

/* NEWバッジ */
.badge-new {
    position: absolute;
    top: 0px;
    right: 0px;
    transform: translate(30%, -30%) rotate(8deg);

    background: #e60023;
    color: #fff;

    font-size: 0.7rem;
    font-weight: bold;
    padding: 5px 8px;

    border-radius: 2px 2px 2px 8px;
    /* リボン感 */

    letter-spacing: 0.05em;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);

    transform: rotate(8deg);
    /* ちょい傾け */
}

/* ちょい浮かせる */
.badge-new::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(230, 0, 35, 0.5);
    opacity: 0.6;
}

.pdf-meta {
  margin-top: 10px;

  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.12em;

  color: #002060;

  display: inline-block;
  padding-bottom: 2px;

  border-bottom: 1px solid rgba(0, 32, 96, 0.3); /* ←うっすら線 */
}

.text-inner p.pdf-meta {
  color: #002060;
}