/* --- 基本設定 & 変数 --- */
:root {
    --base-font-family: 'Noto Sans JP', sans-serif;
    --bg-color: #f8f9fa;
    --text-color: #212529;
    --accent-color: #0d6efd;
    --card-bg-color: #ffffff;
    --header-height: 70px;
}

body {
    font-family: var(--base-font-family);
    margin: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.8;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- ヘッダー --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: transparent;
    z-index: 100;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, height 0.3s ease;
}

.site-header.scrolled {
    height: 60px;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.site-logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-color);
    text-decoration: none;
}

/* --- ナビゲーションメニュー --- */
.main-nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
}

.main-nav a {
    display: block;
    padding: 0 16px;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: color 0.2s;
}

.main-nav a:hover {
    color: var(--accent-color);
}

/* --- ヒーローセクション（トップのタイトル部分） --- */
.hero {
    background-color: #e9ecef;
    padding: 160px 0 80px;
    text-align: center;
}
.hero-title { margin: 0 0 10px; font-size: 48px; }
.hero-subtitle { margin: 0; font-size: 18px; color: #6c757d; }

/* --- メインコンテンツ --- */
main {
    padding: 60px 0;
}
.section-title {
    text-align: center;
    margin-bottom: 50px;
    font-size: 36px;
}

/* --- 記事カード --- */
.article-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.article-card {
    display: flex;
    flex-direction: column;
    background-color: var(--card-bg-color);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.07);
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover; /* 画像の比率を保ったままトリミング */
}

.card-content {
    padding: 24px;
    flex-grow: 1;
}

.card-title {
    margin: 0 0 12px;
    font-size: 20px;
}

.card-excerpt {
    margin: 0;
    font-size: 15px;
    color: #6c757d;
}

.card-meta {
    padding: 16px 24px;
    border-top: 1px solid #e9ecef;
}

.card-date {
    font-size: 13px;
    color: #6c757d;
    font-weight: 500;
}

/* --- ハンバーガーメニュー（スマホ用）--- */
.hamburger {
    display: none; /* PCでは非表示 */
    z-index: 110;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
}
.hamburger span {
    display: block;
    width: 28px;
    height: 3px;
    background-color: var(--text-color);
    margin: 6px 0;
    transition: transform 0.3s, opacity 0.3s;
}

/* --- アニメーション --- */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- トップへ戻るボタン（前回のまま） --- */
#back-to-top {
    position: fixed; bottom: 20px; right: 20px; width: 50px; height: 50px;
    background-color: var(--accent-color); color: white; border: none; border-radius: 50%;
    font-size: 24px; cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    opacity: 0; visibility: hidden; transform: translateY(20px);
    transition: all 0.3s; z-index: 50;
}
#back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }

/* --- レスポンシブ対応 --- */
@media (max-width: 768px) {
    .site-logo { font-size: 20px; }
    .hamburger { display: block; }

    .main-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        display: flex;
        justify-content: center;
        align-items: center;
        text-align: center;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.4s, visibility 0.4s;
    }
    .main-nav.is-open {
        opacity: 1;
        visibility: visible;
    }
    .main-nav ul {
        flex-direction: column;
    }
    .main-nav a {
        font-size: 24px;
        padding: 16px 0;
    }

    /* ハンバーガーメニューが開いた時のボタンの形（×印） */
    .hamburger.is-open span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
    .hamburger.is-open span:nth-child(2) { opacity: 0; }
    .hamburger.is-open span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

    .hero { padding: 120px 0 60px; }
    .hero-title { font-size: 36px; }
}