/*
Theme Name:   令和の虎 Gifts（Astra Child）
Template:     astra
Version:      1.0.0
Description:  令和の虎 公式LINE登録限定特典サイト用Astra子テーマ
Text Domain:  rnt-gifts
*/

/* ===================================================
   Google Fonts
=================================================== */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&family=Noto+Serif+JP:wght@400;600;700&display=swap');

/* ===================================================
   CSS変数
=================================================== */
:root {
    --color-red:         #cc0000;
    --color-red-dark:    #aa0000;
    --color-orange:      #f57c00;
    --color-black:       #222222;
    --color-white:       #ffffff;
    --color-gray-light:  #f5f5f5;
    --color-gray:        #888888;
    --color-border:      #e0e0e0;

    --font-mincho: 'Noto Serif JP', '游明朝', YuMincho, serif;
    --font-gothic: 'Noto Sans JP', 'ヒラギノ角ゴ Pro', 'Hiragino Kaku Gothic Pro', sans-serif;

    --max-width:    1200px;
    --header-height: 72px;
}

/* ===================================================
   ベース
=================================================== */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: var(--font-gothic);
    color: var(--color-black);
    background: var(--color-white);
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    margin: 0;
    padding: 0;
}

a {
    color: var(--color-red);
    text-decoration: none;
    transition: opacity 0.2s;
}
a:hover { opacity: 0.75; }

img { max-width: 100%; height: auto; display: block; }

/* ===================================================
   見出し（赤・明朝）
=================================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-mincho);
    color: var(--color-red);
    line-height: 1.4;
    margin-top: 0;
}

/* 下線強調：オレンジのみ */
u, .orange-underline {
    text-decoration: underline;
    text-decoration-color: var(--color-orange);
    text-underline-offset: 3px;
    font-style: normal;
}

/* ===================================================
   コンテナ
=================================================== */
.rnt-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* ===================================================
   Astra デフォルト要素を非表示
=================================================== */
#masthead,
.ast-site-header-wrap,
.ast-main-header-wrap,
.site-footer,
.ast-page-title-wrap,
.ast-breadcrumbs-wrap {
    display: none !important;
}

/* Astra コンテンツ余白リセット */
.ast-separate-container .ast-article-single,
.ast-separate-container #primary,
.ast-container {
    padding-top: 0 !important;
}
.entry-content {
    padding: 0 !important;
}
#primary,
#content {
    padding: 0 !important;
}
.ast-page-builder-template #primary,
.elementor-page #primary {
    padding: 0 !important;
}
/* サイト全体の余白リセット */
.site-content {
    padding: 0 !important;
}

/* ===================================================
   ヘッダー
=================================================== */
#rnt-header {
    background: var(--color-white);
    border-bottom: 3px solid var(--color-red);
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 9999;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.rnt-header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.rnt-header-left a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
}
.rnt-header-left a:hover { opacity: 0.85; }

.rnt-header-logo-img {
    height: 52px;
    width: auto;
}

.rnt-header-tagline {
    font-family: var(--font-mincho);
    font-size: 14px;
    color: var(--color-red);
    font-weight: 600;
    white-space: nowrap;
}

.rnt-header-sitename {
    font-family: var(--font-mincho);
    font-size: 22px;
    font-weight: 700;
    color: var(--color-red);
    white-space: nowrap;
}

/* ===================================================
   フッター
=================================================== */
#rnt-footer {
    background: #1a1a1a;
    color: #ccc;
    padding: 40px 0 24px;
    margin-top: 80px;
}

.rnt-footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    text-align: center;
}

.rnt-footer-notice {
    color: #aaa;
    line-height: 1.9;
    margin-bottom: 28px;
    font-size: 12px;
}

.rnt-footer-links {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.rnt-footer-links a {
    color: #ccc;
    text-decoration: underline;
    font-size: 13px;
}
.rnt-footer-links a:hover { color: #fff; opacity: 1; }

.rnt-footer-credit {
    color: #555;
    font-size: 12px;
    border-top: 1px solid #333;
    padding-top: 16px;
    margin-top: 8px;
}

/* ===================================================
   セクション共通
=================================================== */
.rnt-section {
    padding: 64px 0;
}
.rnt-section-title {
    font-family: var(--font-mincho);
    font-size: clamp(22px, 3vw, 30px);
    color: var(--color-red);
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 16px;
    position: relative;
}
.rnt-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 56px;
    height: 3px;
    background: var(--color-red);
}

/* ===================================================
   ヒーローセクション（ショートコード or Elementor）
=================================================== */
.rnt-hero {
    background: linear-gradient(135deg, #1a0000 0%, #3d0000 100%);
    color: #fff;
    padding: 72px 24px;
    text-align: center;
}
.rnt-hero h1 {
    font-family: var(--font-mincho);
    color: #fff;
    font-size: clamp(18px, 3vw, 28px);
    margin-bottom: 28px;
}
.rnt-hero p {
    font-size: 16px;
    line-height: 2.1;
    max-width: 720px;
    margin: 0 auto;
    color: #ddd;
}

/* ===================================================
   投稿グリッド
   --grid-cols で列数を動的に変更（shortcode の columns 引数）
=================================================== */
.rnt-posts-grid {
    display: grid;
    grid-template-columns: repeat(var(--grid-cols, 3), 1fr);
    gap: 28px;
    margin-bottom: 16px;
}

.rnt-oidoi-grid {
    display: grid;
    grid-template-columns: repeat(var(--grid-cols, 2), 1fr);
    gap: 28px;
}

/* ===================================================
   記事カード（最新記事・アーカイブ用）
=================================================== */
.rnt-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: transform 0.25s, box-shadow 0.25s;
    display: flex;
    flex-direction: column;
}
.rnt-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 28px rgba(0,0,0,0.14);
}

/* サムネイル */
.rnt-card-thumb-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #111;
    flex-shrink: 0;
}
.rnt-card-thumb-wrap a {
    display: block;
    width: 100%;
    height: 100%;
}
.rnt-card-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.2s;
}
.rnt-card-thumb-wrap:hover img { opacity: 0.82; }

/* 再生ボタン */
.rnt-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    background: rgba(204, 0, 0, 0.88);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: background 0.2s;
}
.rnt-card-thumb-wrap:hover .rnt-play-icon {
    background: rgba(170, 0, 0, 0.95);
}
.rnt-play-icon::after {
    content: '';
    border-style: solid;
    border-width: 9px 0 9px 16px;
    border-color: transparent transparent transparent #fff;
    margin-left: 4px;
}

/* カード本文 */
.rnt-card-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.rnt-card-title {
    font-family: var(--font-mincho);
    font-size: 15px;
    color: var(--color-black);
    font-weight: 600;
    line-height: 1.55;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0 0 12px;
}

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

/* ===================================================
   後追い動画カード
=================================================== */
.rnt-oidoi-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: transform 0.25s, box-shadow 0.25s;
}
.rnt-oidoi-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(0,0,0,0.14);
}
.rnt-oidoi-video-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
}
.rnt-oidoi-video-wrap iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
}
.rnt-oidoi-title {
    padding: 12px 16px 16px;
    font-family: var(--font-mincho);
    font-size: 14px;
    color: var(--color-black);
    font-weight: 600;
    line-height: 1.55;
    margin: 0;
}

/* ===================================================
   ボタン
=================================================== */
.rnt-btn-primary {
    display: inline-block;
    background: var(--color-red);
    color: #fff !important;
    font-family: var(--font-gothic);
    font-weight: 700;
    font-size: 15px;
    padding: 13px 36px;
    border-radius: 4px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    line-height: 1.4;
}
.rnt-btn-primary:hover {
    background: var(--color-red-dark);
    opacity: 1;
}

.rnt-btn-download {
    display: block;
    background: #fff;
    color: var(--color-red) !important;
    border: 2px solid var(--color-red);
    font-family: var(--font-gothic);
    font-weight: 700;
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 4px;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s;
    line-height: 1.4;
}
.rnt-btn-download:hover {
    background: var(--color-red);
    color: #fff !important;
    opacity: 1;
}

.rnt-btn-download-large {
    display: inline-block;
    background: var(--color-red);
    color: #fff !important;
    font-family: var(--font-gothic);
    font-weight: 700;
    font-size: 18px;
    padding: 18px 48px;
    border-radius: 4px;
    text-decoration: none;
    width: 100%;
    max-width: 480px;
    text-align: center;
    transition: background 0.2s;
    line-height: 1.4;
}
.rnt-btn-download-large:hover {
    background: var(--color-red-dark);
    opacity: 1;
}

.rnt-more-wrap {
    text-align: center;
    margin-top: 28px;
}

/* ===================================================
   アーカイブナビ（検索・フィルター）
=================================================== */
.rnt-archive-nav {
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    padding: 14px 0;
    position: sticky;
    top: var(--header-height);
    z-index: 500;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

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

.rnt-nav-home {
    font-weight: 700;
    color: var(--color-red);
    font-size: 13px;
    padding: 7px 14px;
    text-decoration: none;
    border: 1px solid var(--color-red);
    border-radius: 20px;
    transition: all 0.2s;
}
.rnt-nav-home:hover {
    background: var(--color-red);
    color: #fff;
    opacity: 1;
}

.rnt-nav-btn {
    padding: 7px 16px;
    border: 1px solid var(--color-border);
    background: #fff;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-family: var(--font-gothic);
    color: var(--color-black);
    transition: all 0.2s;
    white-space: nowrap;
}
.rnt-nav-btn:hover,
.rnt-nav-btn.active {
    background: var(--color-red);
    color: #fff;
    border-color: var(--color-red);
}

/* ドロップダウン */
.rnt-filter-dropdown {
    position: relative;
}
.rnt-filter-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.13);
    padding: 8px;
    min-width: 200px;
    max-height: 260px;
    overflow-y: auto;
    z-index: 600;
}
.rnt-filter-menu.open { display: block; }

.rnt-filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 13px;
    font-family: var(--font-gothic);
}
.rnt-filter-item:hover { background: var(--color-gray-light); }
.rnt-filter-item input[type="radio"] { accent-color: var(--color-red); }

/* キーワード検索 */
.rnt-search-wrap {
    display: flex;
    gap: 4px;
    flex: 1;
    min-width: 180px;
}
.rnt-search-input {
    flex: 1;
    padding: 7px 14px;
    border: 1px solid var(--color-border);
    border-radius: 20px;
    font-size: 13px;
    font-family: var(--font-gothic);
    outline: none;
    transition: border-color 0.2s;
}
.rnt-search-input:focus { border-color: var(--color-red); }

.rnt-search-btn {
    padding: 7px 16px;
    background: var(--color-red);
    color: #fff;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-family: var(--font-gothic);
    transition: background 0.2s;
}
.rnt-search-btn:hover { background: var(--color-red-dark); }

.rnt-btn-clear {
    padding: 7px 14px;
    background: none;
    border: 1px solid #ccc;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    color: #888;
    font-family: var(--font-gothic);
    transition: all 0.2s;
    white-space: nowrap;
}
.rnt-btn-clear:hover { border-color: #888; color: #444; }

/* フィルター結果ステータス */
.rnt-filter-status {
    max-width: var(--max-width);
    margin: 8px auto 0;
    padding: 0 28px;
    font-size: 12px;
    color: var(--color-gray);
    min-height: 18px;
}

/* ===================================================
   アーカイブコンテンツ
=================================================== */
.rnt-archive-content {
    padding: 48px 0;
}

.rnt-load-more-wrap {
    text-align: center;
    margin-top: 48px;
}
.rnt-btn-load-more {
    padding: 13px 44px;
    background: #fff;
    border: 2px solid var(--color-red);
    color: var(--color-red);
    border-radius: 4px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    font-family: var(--font-gothic);
    transition: all 0.2s;
}
.rnt-btn-load-more:hover {
    background: var(--color-red);
    color: #fff;
}
.rnt-no-posts {
    text-align: center;
    color: var(--color-gray);
    font-size: 16px;
    padding: 80px 24px;
    grid-column: 1 / -1;
}

/* ===================================================
   投稿単体ページ
=================================================== */
.rnt-single-wrap {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 24px 80px;
}

.rnt-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--color-gray);
    font-size: 13px;
    text-decoration: none;
    margin-bottom: 28px;
    transition: color 0.2s;
}
.rnt-back-link:hover { color: var(--color-red); opacity: 1; }
.rnt-back-link::before { content: '←'; }

.rnt-single-category { margin-bottom: 12px; }
.rnt-category-label {
    display: inline-block;
    background: var(--color-red);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 3px;
    margin-right: 6px;
    font-family: var(--font-gothic);
}

.rnt-single-title {
    font-family: var(--font-mincho);
    font-size: clamp(20px, 3vw, 26px);
    color: var(--color-black);
    line-height: 1.5;
    margin-bottom: 28px;
}

/* サムネイル（クリック → YouTube別タブ） */
.rnt-single-thumb-wrap {
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 32px;
    position: relative;
}
.rnt-single-thumb-link {
    display: block;
    position: relative;
}
.rnt-single-thumb-wrap img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: opacity 0.2s;
}
.rnt-single-thumb-link:hover img { opacity: 0.82; }
.rnt-single-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 72px;
    height: 72px;
    background: rgba(204, 0, 0, 0.88);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.rnt-single-play-icon::after {
    content: '';
    border-style: solid;
    border-width: 12px 0 12px 20px;
    border-color: transparent transparent transparent #fff;
    margin-left: 5px;
}

/* PDFダウンロードセクション */
.rnt-download-section {
    background: var(--color-gray-light);
    border-left: 4px solid var(--color-red);
    padding: 28px 24px;
    border-radius: 0 8px 8px 0;
    text-align: center;
    margin-bottom: 32px;
}
.rnt-download-section h3 {
    font-family: var(--font-mincho);
    color: var(--color-red);
    margin-bottom: 16px;
    font-size: 17px;
}

/* ===================================================
   ショートコードラッパー（Elementor内での余白調整）
=================================================== */
.rnt-shortcode-wrap {
    width: 100%;
}
.rnt-shortcode-wrap .rnt-posts-grid,
.rnt-shortcode-wrap .rnt-oidoi-grid {
    width: 100%;
}

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

@media (max-width: 640px) {
    :root { --header-height: 60px; }

    .rnt-header-logo-img { height: 40px; }
    .rnt-header-tagline { font-size: 11px; }
    .rnt-header-sitename { display: none; }

    .rnt-posts-grid,
    .rnt-oidoi-grid {
        grid-template-columns: 1fr;
    }

    .rnt-archive-nav-inner {
        gap: 6px;
    }
    .rnt-search-wrap { min-width: 100%; order: 10; }

    .rnt-hero { padding: 48px 20px; }
    .rnt-section { padding: 40px 0; }
}
