/*
Theme Name:   ReiwaNoToraLine
Template:     astra
Version:      1.4.17
Description:  令和の虎 公式LINE登録限定特典サイト用Astra子テーマ
Text Domain:  reiwa-no-tora-line
*/

/* ===================================================
   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変数（Astraグローバルパレット未対応のもののみ）
   色はAstraパレット変数を直接参照:
     赤:       var(--ast-global-color-0)  #DD183B
     赤dark:   var(--ast-global-color-1)  #CC1939
     黒:       var(--ast-global-color-8)  #222222
     白:       var(--ast-global-color-4)  #FFFFFF

=================================================== */
:root {
    --color-orange:      #f57c00;
    --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;
}

/* ===================================================
   ベース（Astra担当分は省略）
=================================================== */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    /* Astraはinterを指定 → 日本語フォントに上書き */
    font-family: var(--font-gothic);
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
}

/* a色・hover色はAstraがast-global-color-0/1で設定済み */
a { text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.75; }

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

/* ===================================================
   見出し（Astraがフォント・サイズ設定済み → 色・行間のみ）
=================================================== */
h1, h2, h3, h4, h5, h6 {
    color: var(--ast-global-color-0);
    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;
}
.yellow-underline {
    text-decoration: underline;
    text-decoration-color: #f5c518;
    text-underline-offset: 3px;
    text-decoration-thickness: 8px;
}

/* ===================================================
   コンテナ
=================================================== */

.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(--ast-global-color-4);
    border-bottom: 3px solid var(--ast-global-color-0);
    height: var(--header-height);
    position: relative;
    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: var(--header-height);
    width: auto;
    display: block;
}

.rnt-header-tagline {
    font-family: var(--font-mincho);
    font-size: 24px;
    color: var(--ast-global-color-0);
    font-weight: 700;
    white-space: nowrap;
}

/* 右：令和の虎 ― 赤ボックス */
.rnt-header-sitename {
    font-family: var(--font-mincho);
    font-size: 18px;
    font-weight: 700;
    background: var(--ast-global-color-0);
    color: #fff;
    padding: 8px 20px;
    white-space: nowrap;
    line-height: 1.3;
}

/* ===================================================
   フッター
=================================================== */
.elementor.elementor-27 {
    padding-bottom: 0;
}

#rnt-footer {
    background: #1a1a1a;
    color: #ccc;
    padding: 40px 0 24px;
    margin-top: 0;
}

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

.rnt-footer-logo {
    width: 300px;
    height: auto;
    margin: 0 auto 28px;
}

.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: #aaa;
    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(--ast-global-color-0);
    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(--ast-global-color-0);
}

/* ===================================================
   ヒーローセクション（ショートコード 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(--ast-global-color-8);
    font-weight: 600;
    line-height: 1.55;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -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(--ast-global-color-8);
    font-weight: 600;
    line-height: 1.55;
    margin: 0;
}

/* ===================================================
   ボタン
=================================================== */
.rnt-btn-primary {
    display: inline-block;
    background: var(--ast-global-color-0);
    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(--ast-global-color-1);
    opacity: 1;
}

.rnt-btn-download {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--ast-global-color-0);
    color: #fff !important;
    border: 2px solid var(--ast-global-color-0);
    font-family: var(--font-gothic);
    font-weight: 700;
    font-size: 16px;
    padding: 11px 12px;
    border-radius: 4px;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s;
    line-height: 1.4;
}
.rnt-btn-download:hover {
    background: #fff;
    color: var(--ast-global-color-0) !important;
    opacity: 1;
}

.rnt-btn-download-large {
    display: inline-block;
    background: var(--ast-global-color-0);
    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(--ast-global-color-1);
    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: 0;
    z-index: 500;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

/* おすすめ・カテゴリ・タグは非表示（機能は保持） */
#rnt-btn-recommend,
#rnt-dropdown-cat,
#rnt-dropdown-tag {
    display: none !important;
}

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

.rnt-nav-home {
    font-weight: 700;
    color: var(--ast-global-color-0);
    font-size: 13px;
    padding: 7px 14px;
    text-decoration: none;
    border: 1px solid var(--ast-global-color-0);
    border-radius: 20px;
    transition: all 0.2s;
}
.rnt-nav-home:hover {
    background: var(--ast-global-color-0);
    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(--ast-global-color-8);
    transition: all 0.2s;
    white-space: nowrap;
}
.rnt-nav-btn:hover,
.rnt-nav-btn.active {
    background: var(--ast-global-color-0);
    color: #fff;
    border-color: var(--ast-global-color-0);
}

/* ドロップダウン */
.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(--ast-global-color-0); }

/* キーワード検索 */
.rnt-search-wrap {
    display: flex;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

/* PC：検索エリアを右寄せ・幅固定 */
@media (min-width: 641px) {
    .rnt-search-wrap {
        flex: 0 0 400px;
        margin-left: auto;
    }
}
.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(--ast-global-color-0); }

.rnt-search-btn {
    padding: 7px 16px;
    background: var(--ast-global-color-0);
    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(--ast-global-color-1); }

.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: #fff; }

/* フィルター結果ステータス */
.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(--ast-global-color-0);
    color: var(--ast-global-color-0);
    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(--ast-global-color-0);
    color: #fff;
}
.rnt-no-posts {
    text-align: center;
    color: var(--color-gray);
    font-size: 16px;
    padding: 80px 24px;
    grid-column: 1 / -1;
}
.rnt-coming-soon {
    color: var(--ast-global-color-0);
    font-size: 24px;
    font-weight: 700;
}

/* ===================================================
   投稿単体ページ
=================================================== */
.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(--ast-global-color-0); opacity: 1; }
.rnt-back-link::before { content: '←'; }

.rnt-single-category { margin-bottom: 12px; }
.rnt-category-label {
    display: inline-block;
    background: var(--ast-global-color-0);
    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(--ast-global-color-8);
    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(--ast-global-color-0);
    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(--ast-global-color-0);
    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%;
}

/* ===================================================
   ショートコードラッパー：左右余白を統一
   （ヒーローセクションと後追い動画セクションを揃える）
   ※ Elementor HTML ウィジェットは elementor-widget-html クラスを使う
=================================================== */
.elementor-widget-html .rnt-shortcode-wrap {
    padding: 0 24px;
}

/* 後追い動画コンテナ（e6a1e6b9）のデフォルト左右余白を除去 */
.elementor-element-6a1e6b9 {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

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

@media (max-width: 921px) {
    /* タブレット・スマホ：Astraが body(.ast-page-builder-template) に
       background-color:#FFEDE6 を適用するのを白に上書き */
    body.ast-page-builder-template,
    body.ast-plain-container {
        background-color: #fff !important;
    }
}

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

    .rnt-header-right { display: none; }
    .rnt-header-tagline { font-size: 20px; }
    .yellow-underline { text-decoration-thickness: 6px; }

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

    .rnt-archive-nav-inner {
        gap: 6px;
        padding: 0 12px;
    }

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

    /* ショートコードラッパー左右余白：スマホは少し狭く */
    .elementor-widget-html .rnt-shortcode-wrap {
        padding: 0 16px;
    }

}


/* ===================================================
   タッチデバイス：ホバー残留をリセット
   (hover: none) = マウスのないタッチ端末
=================================================== */
@media (hover: none) {
    a:hover { opacity: 1; }
    .rnt-nav-home:hover { background: transparent; color: var(--ast-global-color-0); }
    .rnt-nav-btn:hover { background: #fff; color: var(--ast-global-color-8); border-color: var(--color-border); }
    .rnt-search-btn:hover { background: var(--ast-global-color-0); }
    .rnt-btn-clear:hover { border-color: #ccc; color: #888; }
    .rnt-btn-download:hover { background: var(--ast-global-color-0); color: #fff !important; opacity: 1; }
    .rnt-btn-load-more:hover { background: #fff; color: var(--ast-global-color-0); border-color: var(--ast-global-color-0); }
    .rnt-btn-primary:hover { background: var(--ast-global-color-0); }
    .rnt-card:hover { transform: none; box-shadow: 0 2px 12px rgba(0,0,0,0.08); }
    .rnt-oidoi-card:hover { transform: none; box-shadow: 0 2px 12px rgba(0,0,0,0.08); }
    .rnt-card-thumb-wrap:hover img { opacity: 1; }
    .rnt-card-thumb-wrap:hover .rnt-play-icon { background: rgba(204, 0, 0, 0.88); }
    .rnt-header-left a:hover { opacity: 1; }
    .rnt-footer-links a:hover { color: #ccc; opacity: 1; }
}

/* ===================================================
   訪問済みリンク：色を統一（紫変色を防ぐ）
=================================================== */
a:visited {
    color: inherit;
}

/* ===================================================
   タッチデバイス：タップ中（:active）フィードバック
   (hover: none) = マウスのないタッチ端末
=================================================== */
@media (hover: none) {
    .rnt-btn-download:active { background: #fff; color: var(--ast-global-color-0) !important; }
    .rnt-btn-load-more:active { background: var(--ast-global-color-0); color: #fff; }
    .rnt-btn-clear:active { border-color: var(--ast-global-color-0); color: var(--ast-global-color-0); }
    .rnt-search-btn:active { background: #a00; }
    .rnt-nav-home:active { background: rgba(204,0,0,0.08); }
    .rnt-nav-btn:active { background: #f5f5f5; }
}

/* ===================================================
   改行ユーティリティ
   pc_only : PCで改行、スマホ（640px以下）では非表示
   sp_only : スマホで改行、PC（641px以上）では非表示
=================================================== */
br.pc_only { display: block; }
br.sp_only { display: none; }

@media (max-width: 640px) {
    br.pc_only { display: none; }
    br.sp_only { display: block; }
}
