/* --- 1. ベースリセットと基本設定 --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
    line-height: 1.6;
}

/* 共通ヘッダーを最前面に固定 */
header:first-of-type,
nav,
#header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 9999 !important;
}

/* --- 2. コンテンツ全体のラッパー設定 --- */
.page-wrapper {
    font-family: 'Zen Kaku Gothic Antique', sans-serif;
    background-color: #f4f7f9;
    color: #333333;
    position: relative;
    min-height: 100vh;
}

/* 背景のオーブ装飾 */
.bg-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    z-index: 0;
    animation: float 10s infinite alternate ease-in-out;
}

.shape1 {
    width: 40vw;
    height: 40vw;
    background: rgba(0, 150, 255, 0.12);
    top: -10%;
    left: -10%;
}

.shape2 {
    width: 30vw;
    height: 30vw;
    background: rgba(0, 212, 170, 0.12);
    bottom: -10%;
    right: -10%;
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translate(0, 0); }
    100% { transform: translate(30px, 50px); }
}

/* --- 3. ヒーローエリア（タイトル部分） --- */
.hero {
    position: relative;
    text-align: center;
    /* ヘッダーに被らないよう上部を確保しつつ、波が見えやすいよう下部余白を調整 */
    padding: 180px 20px 150px;
    /* 波（#f4f7f9）が際立つよう、背景を少し濃い水色のグラデーションに変更 */
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    overflow: hidden;
    z-index: 1;
}

.hero h1 {
    font-size: 3.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #0052d4, #4364f7, #6fb1fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 25px;
    letter-spacing: 0.05em;
    display: inline-block;
    position: relative;
}

.hero p {
    font-size: 1.4rem;
    color: #555555;
    font-weight: 500;
}

/* 波のアニメーション */
.hero-waves {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    margin-bottom: -1px;
    z-index: 1;
}

.waves {
    position: relative;
    width: 100%;
    height: 100%;
}

.parallax > use {
    animation: move-forever 25s cubic-bezier(.55,.5,.45,.5) infinite;
}
.parallax > use:nth-child(1) { animation-delay: -2s; animation-duration: 7s; }
.parallax > use:nth-child(2) { animation-delay: -3s; animation-duration: 10s; }
.parallax > use:nth-child(3) { animation-delay: -4s; animation-duration: 13s; }
.parallax > use:nth-child(4) { animation-delay: -5s; animation-duration: 20s; }

@keyframes move-forever {
    0% { transform: translate3d(-90px, 0, 0); }
    100% { transform: translate3d(85px, 0, 0); }
}

/* --- 4. カードレイアウト設定 --- */
.container {
    max-width: 1400px;
    margin: 40px auto 0;
    padding: 0 40px 120px;
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 40px;
    position: relative;
    z-index: 10;
}

/* カードデザイン */
.card {
    position: relative;
    /* 透過をなくし、背景色との境界をはっきりさせるため白一色に変更 */
    background: #ffffff;
    /* ボーダーを消し、代わりに影を強調して浮かび上がらせる */
    border: none;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
    border-radius: 24px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    /* 【修正】各カードの高さを揃え、ボタンを下部に固定するために 100% に変更 */
    height: 100%;
    min-height: 0;
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    /* ホバー時の影をより強調 */
    box-shadow: 0 20px 45px rgba(0, 82, 212, 0.15);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    gap: 15px;
}

.header-banner {
    height: 80px; 
    width: auto;
    max-width: 60%;
    object-fit: contain;
    border-radius: 10px;
}

.badge {
    font-weight: 700;
    padding: 8px 18px;
    /* 【修正】丸枠(30px)から角丸の四角枠(8px)に変更 */
    border-radius: 8px;
    white-space: nowrap;
}

.badge-general { font-size: 1.8rem; background: rgba(46, 204, 113, 0.15); color: #27ae60; border: 1px solid rgba(46, 204, 113, 0.3); }
.badge-expert { font-size: 1.2rem; background: rgba(231, 76, 60, 0.1); color: #c0392b; border: 1px solid rgba(231, 76, 60, 0.3); }
.badge-data { font-size: 1.8rem; background: rgba(155, 89, 182, 0.15); color: #8e44ad; border: 1px solid rgba(155, 89, 182, 0.3); }

.card h2 {
    font-size: 2.2rem;
    margin-bottom: 25px;
    color: #222222;
    line-height: 1.3;
}

.card p {
    font-size: 1.8rem;
    color: #444444;
    margin-bottom: 40px;
    flex-grow: 1;
    line-height: 1.6;
}

/* --- 5. ボタンとアニメーション --- */
.card-action {
    margin-top: auto;
    padding-top: 25px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 36px;
    background-color: #f0f4f8;
    color: #0052d4;
    font-size: 1.8rem;
    font-weight: 700;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn:hover {
    background: linear-gradient(135deg, #0052d4, #4364f7);
    color: #ffffff;
    box-shadow: 0 10px 25px rgba(0, 82, 212, 0.3);
    transform: translateY(-2px);
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s forwards ease-out;
}
.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.5s; }
.delay-4 { animation-delay: 0.6s; }

@keyframes fadeInUp {
    to { opacity: 1; transform: translateY(0); }
}

/* --- 6. レスポンシブ対応 --- */
@media (max-width: 1100px) {
    .container { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .hero { padding: 140px 20px 80px; }
    .hero h1 { font-size: 2.6rem; }
    .hero p { font-size: 1.1rem; }
    .container { grid-template-columns: 1fr; padding: 0 20px 80px; }
    .card { padding: 30px; }
    .card h2 { font-size: 1.8rem; }
    .card p { font-size: 1.1rem; }
    .badge { font-size: 0.9rem; }
}

/* --- 7. 感染症トピックセクション --- */
.topics-section {
    max-width: 1200px;
    margin: 0 auto 100px; /* 上のカードとフッターとの間隔 */
    padding: 0 40px;
    position: relative;
    z-index: 10;
}

.topics-container {
    /* 以前の角丸白四角背景を廃止し、フラットな構成に変更 */
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
}

.topics-heading {
    font-size: 2.6rem;
    color: #222222;
    margin-bottom: 30px;
    text-align: left;
    position: relative;
    padding-left: 20px;
}

/* 左端のグラデーションのアクセント線 */
.topics-heading::after {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 100%;
    background: linear-gradient(135deg, #0052d4, #4364f7);
    border-radius: 3px;
    margin: 0;
}

.topics-list {
    list-style: none;
    margin-bottom: 50px;
    border-top: 2px solid #0052d4; /* リスト全体の区切りを強調 */
}

.topics-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.topics-item a {
    display: flex;
    align-items: baseline;
    padding: 25px 15px; /* 余白を広めに */
    text-decoration: none;
    color: #333333;
    transition: all 0.3s ease;
}

/* ホバー時のアクション */
.topics-item a:hover {
    background-color: rgba(0, 82, 212, 0.04);
    padding-left: 25px;
    padding-right: 5px;
}

.topics-item a:hover .topics-title {
    color: #0052d4;
}

.topics-date {
    font-size: 2.0rem; /* 約2倍の大きさに変更 */
    color: #0052d4; /* 日付をアクセントカラーに */
    font-weight: 700;
    min-width: 200px; /* 幅を広げる */
    flex-shrink: 0;
}

.topics-title {
    font-size: 2.2rem; /* 約2倍の大きさに変更 */
    font-weight: 500;
    flex-grow: 1;
    line-height: 1.6;
    transition: color 0.3s ease;
}

/* ホバー時に現れる矢印 */
.topics-arrow {
    font-size: 2.2rem;
    color: #0052d4;
    opacity: 0;
    transform: translateX(-15px);
    transition: all 0.3s ease;
    font-weight: bold;
}

.topics-item a:hover .topics-arrow {
    opacity: 1;
    transform: translateX(0);
}

.topics-action {
    text-align: center;
}

/* スマホ表示向けのレスポンシブ対応 */
@media (max-width: 768px) {
    .topics-section {
        padding: 0 20px;
        margin-bottom: 80px;
    }
    .topics-heading {
        font-size: 2.0rem;
    }
    .topics-item a {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px 10px;
    }
    .topics-date {
        margin-bottom: 10px;
        font-size: 1.6rem; /* スマホでも大きく */
    }
    .topics-title {
        font-size: 1.8rem; /* スマホでも大きく */
    }
    .topics-arrow {
        display: none;
    }
    .topics-item a:hover {
        padding-left: 15px;
    }
}