/* --------------------------------------------------------- */
/* --- 設定変数 (CSS Custom Properties) --- */
/* --------------------------------------------------------- */
:root {
    /* Colors */
    --color-primary: #2e69b0;
    --color-secondary: #4a90e2;
    --color-accent: #b3d9ff;
    --color-text-main: #333333;
    --color-text-sub: #666666;
    --color-white: #ffffff;
    
    /* Overlay */
    --overlay-dark: rgba(0, 0, 0, 0.2); /* 動画が暗くなりすぎないよう調整 */
    
    /* Fonts */
    --font-base: 'Zen Kaku Gothic New', 'BIZ UDPGothic', sans-serif;
    
    /* Spacing */
    --grid-gap: 30px;
    --card-radius: 12px;
}

/* --------------------------------------------------------- */
/* --- ベーススタイル --- */
/* --------------------------------------------------------- */
body {
    font-family: var(--font-base);
    margin: 0;
    color: var(--color-text-main);
    -webkit-font-smoothing: antialiased;
}

#container.landing-page #main-content {
    width: 100%;
    padding: 0;
    border: none;
}

/* --------------------------------------------------------- */
/* --- テーマセクション（動画背景エリア） --- */
/* --------------------------------------------------------- */
.theme-section {
    position: relative;
    width: 100%;
    min-height: 100vh; /* 画面いっぱいに表示 */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: var(--color-white);
    text-align: center;
    padding: 60px 20px;
    box-sizing: border-box;
}

/* 背景動画設定 */
.background-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

/* 動画上の黒い網掛け（HTML側でdivを追加しCSSで制御） */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--overlay-dark);
    z-index: -1;
}

/* コンテンツラッパー */
.theme-content-wrapper {
    position: relative;
    z-index: 10;
    max-width: 800px;
    width: 100%;
}

/* タイトルまわり */
.theme-title {
    /* clamp(最小値, 推奨値, 最大値) でレスポンシブ対応 */
    font-size: clamp(32px, 5vw, 64px); 
    font-weight: 900;
    color: var(--color-white);
    margin: 0 0 10px;
    text-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.theme-subtitle {
    font-size: clamp(18px, 3vw, 32px);
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: 50px;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

/* ステートメント（引用文） */
.theme-statement {
    margin: 0 auto 40px;
}

.theme-quote {
    font-size: clamp(15px, 2vw, 18px);
    line-height: 2.4;
    font-weight: 500;
    color: #585858;
    opacity: 0; /* アニメーション前は隠す */
    /* アニメーション定義は下部へ */
}

.theme-quote.lead-in {
    font-size: clamp(18px, 2.5vw, 22px);
    font-weight: 700;
    color: var(--color-white);
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px dashed rgba(255, 255, 255, 0.4);
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* アクションエリア */
.theme-action {
    opacity: 0;
    animation: simple-fade-in 1s ease forwards;
}

.theme-action p {
    font-size: 20px;
    color: #585858;
    margin-bottom: 15px;
}

/* 強調テキストスタイル */
.action-text-style {
    display: inline-block;
    padding: 15px 40px;
    background-color: rgba(255, 255, 255, 0.9); /* 若干透過させる */
    color: var(--color-primary) !important; /* 親のp色指定を上書き */
    font-size: clamp(18px, 3vw, 24px) !important;
    font-weight: 900;
    border-radius: 100px;
    border: 3px solid var(--color-accent);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px); /* すりガラス効果（対応ブラウザのみ） */
}

/* --------------------------------------------------------- */
/* --- 記事グリッドセクション --- */
/* --------------------------------------------------------- */
.article-grid-section {
    padding: 60px 5%;
    background-color: #f9f9f9;
}

.section-heading {
    text-align: center;
    font-size: 28px;
    color: var(--color-primary);
    margin-bottom: 40px;
}

.article-grid {
    display: grid;
    /* repeat(auto-fill) を使って列数を自動計算させる方法もありますが、
       ここでは明示的な指定を維持しつつレスポンシブにします */
    grid-template-columns: repeat(4, 1fr);
    gap: var(--grid-gap);
    max-width: 1200px;
    margin: 0 auto;
}

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

.article-panel:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
}

/* 画像周りの最適化（aspect-ratio使用） */
.image-wrapper {
    width: 100%;
    aspect-ratio: 4 / 3; /* 最新CSS: padding-topハックは不要 */
    overflow: hidden;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-panel:hover .image-wrapper img {
    transform: scale(1.08);
}

/* 記事テキスト */
.article-info {
    padding: 15px;
    flex-grow: 1; /* 高さを揃える */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.article-panel .article-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
    color: var(--color-primary);
    margin: 0 0 10px;
    /* 3行以上は...にする処理 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-panel .article-meta {
    font-size: 12px;
    color: #999;
    margin: 0;
    text-align: right;
}

/* --------------------------------------------------------- */
/* --- アニメーション定義 --- */
/* --------------------------------------------------------- */

@keyframes simple-fade-in {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes slide-up-in {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

.word-fadein {
    display: inline-block;
    opacity: 0;
    animation: simple-fade-in 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.word-slideup {
    display: inline-block;
    opacity: 0;
    animation: slide-up-in 0.8s ease forwards;
}

/* 汎用アニメーションクラス（引用文などで使用） */
.theme-quote {
    animation: slide-up-in 0.8s ease forwards;
}

/* --------------------------------------------------------- */
/* --- レスポンシブ (モバイル・タブレット) --- */
/* --------------------------------------------------------- */

@media (max-width: 960px) {
    .article-grid {
        grid-template-columns: repeat(3, 1fr); /* 3列 */
    }
}

@media (max-width: 768px) {
    .article-grid {
        grid-template-columns: repeat(2, 1fr); /* 2列 */
        gap: 20px;
    }
    
    .theme-section {
        padding: 40px 20px;
        min-height: auto; /* モバイルでは高さを強制しない */
        height: auto;
        padding-bottom: 80px;
    }
}

@media (max-width: 480px) {
    .article-grid {
        grid-template-columns: 1fr; /* 1列（スマホ縦） */
    }
    
    .article-panel {
        flex-direction: row; /* スマホでは横長カードにするアレンジも可 */
    }
    .image-wrapper {
        width: 35%;
        aspect-ratio: 1/1; /* 正方形に */
    }
    .article-info {
        width: 65%;
    }
    /* もし1列で縦積みのままが良ければ上記のflex-direction等は削除してください */
}

/* フッター */
footer {
    text-align: center;
    padding: 30px;
    color: #888;
    font-size: 12px;
}