/* ============================================================
   Ebilar Gifts - メインスタイルシート
   カラー変数: --orange: #ff9800 / --navy: #1a237e / --bg: #f8f9fa
   ============================================================ */

:root {
    --orange:      #ff9800;
    --orange-dark: #e68900;
    --navy:        #1a237e;
    --navy-light:  #283593;
    --bg:          #f8f9fa;
    --white:       #ffffff;
    --text:        #333333;
    --text-light:  #666666;
    --border:      #e0e0e0;
    --shadow:      0 4px 15px rgba(0, 0, 0, 0.1);
    --radius:      8px;
    --container:   1200px;
}

/* ============================================================
   リセット・ベース
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Hiragino Kaku Gothic ProN',
                 'Noto Sans JP', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.7;
    font-size: 16px;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================================
   ヘッダー
   ============================================================ */
.site-header {
    background: var(--white);
    border-bottom: 3px solid var(--orange);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.header-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}

.site-logo { display: inline-block; }

.logo-img {
    height: 50px;
    width: auto;
    /* ロゴ変更時はここのheightを調整 */
}

/* ============================================================
   フッター
   ============================================================ */
.site-footer {
    background: var(--navy);
    color: rgba(255,255,255,0.8);
    padding: 30px 20px;
    margin-top: 60px;
    text-align: center;
}

.footer-notice {
    font-size: 13px;
    line-height: 1.8;
    margin-bottom: 12px;
}

.footer-copy {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
}

/* ============================================================
   カードグリッド（アーカイブ共通）
   ============================================================ */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    padding: 30px 0;
}

/* ============================================================
   記事カード
   ============================================================ */
.post-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* おすすめバッジ */
.card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--orange);
    color: var(--white);
    font-size: 12px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    z-index: 2;
}

/* サムネイル */
.card-thumbnail {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    display: block;
    cursor: pointer;
}

.card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card-thumbnail:hover img {
    transform: scale(1.04);
}

.card-thumbnail-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.card-thumbnail:hover .card-thumbnail-overlay {
    opacity: 1;
}

.play-icon {
    width: 56px;
    height: 56px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-icon::after {
    content: '';
    border-style: solid;
    border-width: 10px 0 10px 20px;
    border-color: transparent transparent transparent var(--navy);
    margin-left: 4px;
}

/* カード本体 */
.card-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-excerpt {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* タグ */
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
}

.card-tag {
    font-size: 11px;
    background: var(--bg);
    color: var(--navy);
    border: 1px solid var(--border);
    padding: 2px 8px;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.card-tag:hover {
    background: var(--navy);
    color: var(--white);
}

/* ダウンロードボタン */
.card-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
}

.btn-download {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px;
    background: var(--navy);
    color: var(--white);
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s ease;
}

.btn-download:hover {
    background: var(--navy-light);
}

.btn-download::before {
    content: '↓';
    font-size: 16px;
}

/* ============================================================
   アーカイブページ ナビゲーション
   ============================================================ */
.archive-nav {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
    position: sticky;
    top: 75px;  /* ヘッダー高さに合わせて調整 */
    z-index: 90;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.archive-nav-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.archive-nav-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.archive-nav-btn:hover,
.archive-nav-btn.active {
    background: var(--navy);
    color: var(--white);
    border-color: var(--navy);
}

.archive-nav-home {
    font-weight: 700;
    color: var(--navy);
    padding: 8px 16px;
    border-radius: 20px;
    border: 2px solid var(--navy);
    transition: all 0.2s;
}

.archive-nav-home:hover {
    background: var(--navy);
    color: var(--white);
}

/* 検索ボックス */
.archive-search {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.archive-search input {
    padding: 7px 14px;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    width: 200px;
}

.archive-search input:focus {
    border-color: var(--orange);
}

.archive-search button {
    background: var(--orange);
    color: var(--white);
    border: none;
    padding: 7px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
}

.archive-search button:hover {
    background: var(--orange-dark);
}

/* クリアボタン */
.btn-clear-filter {
    background: none;
    border: 1px solid #ccc;
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-clear-filter:hover {
    background: #eee;
}

/* ドロップダウン */
.filter-dropdown {
    position: relative;
}

.filter-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px;
    min-width: 220px;
    box-shadow: var(--shadow);
    z-index: 200;
    max-height: 300px;
    overflow-y: auto;
}

.filter-dropdown-menu.open {
    display: block;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.15s;
}

.filter-item:hover {
    background: var(--bg);
}

.filter-item input[type="radio"] {
    accent-color: var(--navy);
}

/* ============================================================
   アーカイブ：現在のフィルター表示
   ============================================================ */
.filter-status {
    padding: 8px 20px;
    font-size: 13px;
    color: var(--text-light);
    max-width: var(--container);
    margin: 0 auto;
    display: none;
}

.filter-status.visible {
    display: block;
}

.filter-status strong {
    color: var(--navy);
}

/* ============================================================
   もっと見るボタン
   ============================================================ */
.load-more-wrap {
    text-align: center;
    padding: 20px 0 40px;
}

.btn-load-more {
    background: var(--white);
    color: var(--navy);
    border: 2px solid var(--navy);
    padding: 12px 40px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-load-more:hover {
    background: var(--navy);
    color: var(--white);
}

.btn-load-more:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================================
   個別記事ページ
   ============================================================ */
.single-post-wrap {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

.single-post-header {
    margin-bottom: 24px;
}

.single-post-categories {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.category-label {
    background: var(--navy);
    color: var(--white);
    font-size: 12px;
    padding: 3px 12px;
    border-radius: 20px;
}

.single-post-title {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.5;
    color: var(--text);
    margin-bottom: 16px;
}

/* YouTube動画埋め込み */
.video-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    margin-bottom: 30px;
    border-radius: var(--radius);
    overflow: hidden;
    background: #000;
}

.video-wrap iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ダウンロードボタン（大） */
.download-section {
    background: var(--white);
    border: 2px solid var(--orange);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    margin-bottom: 30px;
}

.download-section h3 {
    color: var(--navy);
    font-size: 16px;
    margin-bottom: 16px;
}

.btn-download-large {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--orange);
    color: var(--white);
    padding: 14px 36px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 700;
    transition: background 0.2s;
}

.btn-download-large:hover {
    background: var(--orange-dark);
}

.btn-download-large::before {
    content: '↓';
    font-size: 18px;
}

/* 記事本文 */
.single-post-content {
    background: var(--white);
    border-radius: var(--radius);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.single-post-content h2 {
    font-size: 20px;
    color: var(--navy);
    border-left: 4px solid var(--orange);
    padding-left: 12px;
    margin: 24px 0 12px;
}

.single-post-content h3 {
    font-size: 17px;
    color: var(--text);
    margin: 20px 0 8px;
}

.single-post-content p {
    margin-bottom: 16px;
    line-height: 1.8;
}

/* 記事タグ */
.single-post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.single-post-tags .card-tag {
    font-size: 13px;
}

/* 戻るリンク */
.back-to-archive {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--navy);
    font-size: 14px;
    padding: 8px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.back-to-archive:hover {
    border-bottom-color: var(--navy);
}

.back-to-archive::before {
    content: '←';
}

/* ============================================================
   トップページ（特典一覧）
   ============================================================ */
.front-hero {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    color: var(--white);
    text-align: center;
    padding: 50px 20px 40px;
}

.front-hero .site-logo-hero {
    margin: 0 auto 20px;
    max-width: 400px;
}

.front-hero h1 {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.6;
}

.front-hero p {
    font-size: 15px;
    margin-top: 10px;
    opacity: 0.85;
}

.front-section {
    max-width: var(--container);
    margin: 0 auto;
    padding: 40px 20px;
}

.front-section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--navy);
    border-bottom: 3px solid var(--orange);
    padding-bottom: 10px;
    margin-bottom: 24px;
}

/* 特典カードグリッド */
.bonus-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.bonus-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.bonus-card-header {
    background: var(--navy);
    color: var(--white);
    padding: 14px 18px;
    font-weight: 700;
    font-size: 15px;
}

.bonus-card-body {
    padding: 18px;
}

.bonus-card-body p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 16px;
}

.btn-bonus {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--orange);
    color: var(--white);
    padding: 10px 22px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-bonus:hover {
    background: var(--orange-dark);
}

.btn-bonus::before {
    content: '↓';
}

/* 動画セクション */
.video-bonus-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.video-bonus-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.video-bonus-card .video-wrap {
    margin: 0;
    border-radius: 0;
}

.video-bonus-card-body {
    padding: 14px 16px;
}

.video-bonus-card-body h3 {
    font-size: 15px;
    color: var(--navy);
    font-weight: 700;
}

/* ============================================================
   汎用ボタン・パーツ
   ============================================================ */
.btn-primary {
    display: inline-block;
    background: var(--navy);
    color: var(--white);
    padding: 12px 30px;
    border-radius: var(--radius);
    font-weight: 600;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: var(--navy-light);
}

.no-posts {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
    font-size: 16px;
}

.not-found {
    text-align: center;
    padding: 80px 20px;
}

.not-found h1 {
    font-size: 28px;
    color: var(--navy);
    margin-bottom: 16px;
}

.not-found p {
    color: var(--text-light);
    margin-bottom: 24px;
}

/* ============================================================
   レスポンシブ
   ============================================================ */
@media (max-width: 768px) {
    .logo-img { height: 36px; }

    .archive-nav-inner {
        gap: 8px;
    }

    .archive-search { margin-left: 0; width: 100%; }
    .archive-search input { width: 100%; flex: 1; }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .single-post-title { font-size: 20px; }
    .single-post-content { padding: 20px; }

    .front-hero h1 { font-size: 18px; }

    .bonus-grid,
    .video-bonus-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .archive-nav-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-dropdown-menu {
        left: 0;
        right: 0;
        min-width: unset;
    }
}
