/* ===================================================================
CSS information
 file name  :  home.css
 style info :  home styles (Mobile Optimized & Header Fix)
 last update : 2026.06.01
=================================================================== */

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

:root {
    /* --disney-gold: #b0914f; */
    --disney-gold: #007A99;
    --disney-gold-light: #f4f0e6;
    --disney-black: #111111;
}

body { 
    font-family: 'Noto Sans JP', sans-serif; 
    background-color: #ffffff; 
    color: #333;
    scroll-behavior: smooth;
}

.text-disney-gold { color: var(--disney-gold); }
.border-disney-gold { border-left-color :var(--disney-gold); border-left-style: solid;}
.bg-disney-gold { background-color: var(--disney-gold); }
.btn-disney-gold { background-color: var(--disney-gold); color: white; }
.btn-disney-gold:hover { background-color: #947a42; color: white; }

/* Navbar (モバイルでの横並びと展開メニューの最適化)
=================================================================== */
.navbar { font-size: 1rem; padding-top: 0.6rem; padding-bottom: 0.6rem; }
.navbar-brand { 
    font-weight: bold; 
    letter-spacing: 0.1rem; 
    color: var(--disney-gold) !important; 
    font-size: 1.375rem; /* 22px相当 */
    transition: font-size 0.2s; 
}
.nav-link { font-size: 0.875rem; font-weight: bold; }
.dropdown-menu { border: none; box-shadow: 0 4px 12px rgba(0,0,0,0.1); border-radius: 0.5rem; font-size: 0.85rem; }

/* モバイル（スマホ）固有のヘッダー調整 */
@media (max-width: 991.98px) {
    .navbar > .container {
        flex-wrap: wrap !important; /* メニューが下に回り込めるようにする */
        justify-content: space-between;
        align-items: center;
    }
    .navbar-brand {
        flex: 1; /* ロゴエリアを広げてボタンを右に追いやる */
        margin-right: 0.5rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    /* 検索アイコンとメニューボタンを囲むエリア */
    .navbar > .container > .d-flex {
        flex-shrink: 0;
    }
    /* 展開されるメニューを強制的に全幅にしてロゴの下に配置 */
    .navbar-collapse {
        flex-basis: 100%;
        flex-grow: 1;
        margin-top: 0.5rem;
    }
    /* 検索アイコンとメニューアイコンのパディングを詰め、横幅を確保 */
    .navbar .btn, .navbar-toggler {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
}

/* 画面幅が特に狭い端末（iPhone 12 Pro 等）向けの最終調整 */
@media (max-width: 400px) {
    .navbar-brand {
        font-size: 1.125rem; /* ロゴを少し小さくして1行に収める */
    }
    .navbar .btn, .navbar-toggler {
        padding-left: 0.3rem !important;
        padding-right: 0.3rem !important;
    }
}


/* AdSense Placeholder */
.ad-label { font-size: 10px; color: #999; text-align: center; margin-bottom: 4px; display: block; }
.ad-area { background-color: #fcfcfc; border: 1px solid #eee; display: flex; align-items: center; justify-content: center; color: #ccc; font-size: 12px; margin-bottom: 20px; }

/* Hero Carousel */
.carousel-item { background-color: #fff; width: 100%; }
.hero-img-container {
    width: 100%;
    aspect-ratio: 1200 / 350;
    background-color: #333;
    overflow: hidden;
}
.carousel-item img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    object-position: right center; 
    filter: brightness(100%); 
}

/* 矢印ボタンの当たり判定がボタンに被らないよう幅を狭める (FIXED) */
.carousel-control-prev, .carousel-control-next {
    width: 8% !important; /* 標準の15%から縮小し、テキストエリアと物理的に離す */
    z-index: 10;
}

/* 重なり順とクリック判定の整理 */
.carousel-indicators {
    pointer-events: none; 
    z-index: 25; 
    margin-bottom: -1.5rem;
}
.carousel-indicators [data-bs-target] {
    pointer-events: auto; 
    background-color: #ccc;
    width: 30px;
    height: 3px;
    opacity: 0.5;
}
.carousel-indicators .active { opacity: 1; background-color: var(--disney-gold); }

.carousel-caption {
    z-index: 20; 
    pointer-events: none; 
}
.carousel-caption .container {
    pointer-events: none;
}
.carousel-caption .btn, .carousel-caption h2 {
    pointer-events: auto; 
}
.carousel-caption .btn {
    position: relative;
    z-index: 50; /* 他のどの要素よりも前面に配置してクリックを確実に */
}

/* 左右の矢印アイコン（span）に対して背景と形状を設定 */
.carousel-control-prev span,
.carousel-control-next span {
    background-color: rgba(0, 0, 0, 0.45) !important; /* 半透明の黒背景 */
    width: 44px;
    height: 44px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 50% !important; /* きれいな正円にする */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    text-shadow: none !important;
    transition: all 0.2s ease-in-out;
    
    /* 【超重要】親要素の幅が狭くても、絶対に横方向に潰れないようにガード */
    flex-shrink: 0 !important; 
}

/* ホバー時のインタラクション */
.carousel-control-prev:hover span,
.carousel-control-next:hover span {
    background-color: rgba(0, 0, 0, 0.7) !important;
    transform: scale(1.05);
}

/* モバイル（992px未満）環境でのサイズと親要素の幅の最適化 */
@media (max-width: 991.98px) {
    /* 親要素（ボタン自体）の横幅が 8% のままだと36pxの円が綺麗に収まらないため、
       スマホ表示時のみ干渉しない範囲（12%）までタップ領域を拡張します。
    */
    .carousel-control-prev, 
    .carousel-control-next {
        width: 12% !important; 
    }

    /* スマホ用の円座サイズ（歪みのない美しい1:1の正円を維持） */
    .carousel-control-prev span,
    .carousel-control-next span {
        width: 36px;
        height: 36px;
        font-size: 1rem !important;
    }
}

/* Tablet & Mobile Layout (< 992px) */
@media (max-width: 991.98px) {
    .hero-img-container { aspect-ratio: 16 / 9; }
    .carousel-caption {
        position: static;
        padding: 1.5rem 1rem !important;
        background: #ffffff !important;
        color: #333 !important;
        text-align: center !important;
        border-bottom: 1px solid #eee;
        pointer-events: auto;
    }
    .carousel-caption .container { pointer-events: auto; }
    .carousel-caption .h3 { color: #333 !important; font-size: 1.25rem !important; margin-bottom: 1rem; }
    .carousel-control-prev, .carousel-control-next { height: 56.25vw; top: 0; bottom: auto; }
    .carousel-indicators { top: calc(56.25vw - 0px); bottom: auto; }
}

/* Desktop Layout (>= 992px) */
@media (min-width: 992px) {
    .carousel-caption {
        /* background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.2) 40%, transparent 70%) !important; */
        left: 0; right: 0; bottom: 0;
        padding: 4rem 10% 3.5rem !important; /* 左側10%開始 */
        text-align: left;
    }
    .carousel-caption .container {
        max-width: 65% !important; /* テキスト幅65% */
        margin-left: 0 !important;
        padding-left: 0 !important;
    }
    .carousel-caption .h3 { text-shadow: 0 2px 4px rgba(0,0,0,0.5); }
}

/* Article Cards */
.article-card { border: none; transition: 0.3s; border-bottom: 1px dotted #ddd; text-decoration: none; color: inherit; }
.article-card:hover { background-color: #fafafa; }
.article-img-container {
    width: 100%; aspect-ratio: 1200 / 630;
    background-color: #f5f5f5; overflow: hidden; border-radius: 0.5rem; flex-shrink: 0; 
}
@media (min-width: 768px) { .article-img-container { width: 240px; } }

.line-clamp-title { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.5; }
.line-clamp-excerpt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.6; color: #666; }

/* Sidebar Elements */
.sidebar-card { border: 1px solid #f0f0f0; border-radius: 0.75rem; margin-bottom: 1.5rem; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.02); }
.sidebar-header { background-color: #fcfcfc; border-bottom: 1px solid #f0f0f0; padding: 0.85rem 1.25rem; }
.sidebar-header h6 { margin-bottom: 0; font-weight: bold; font-size: 0.95rem; display: flex; align-items: center; }
.sidebar-body { padding: 1.25rem; }
.rank-number { font-size: 1.5rem; font-weight: 700; color: var(--disney-gold); font-style: italic; width: 40px; flex-shrink: 0; }

/* Footer (PCデフォルト)
=================================================================== */
.footer-main { background-color: var(--disney-black); color: #ffffff; padding: 60px 0 30px; }
.footer-logo { font-weight: bold; color: var(--disney-gold); letter-spacing: 2px; font-size: 1.5rem; display: block; text-decoration: none; margin-bottom: 1.5rem; }
.footer-logo-svg { filter: brightness(0) saturate(100%) invert(100%) sepia(0%) saturate(2%) hue-rotate(128deg) brightness(102%) contrast(101%); }
.footer-title { font-size: 1rem; font-weight: bold; margin-bottom: 1.5rem; border-left: 3px solid var(--disney-gold); padding-left: 10px; }
.footer-bottom { background-color: #000000; color: #6c757d; padding: 20px 0; font-size: 0.75rem; }
.footer-link a { text-decoration: none !important; color: #fff !important;}

/* スマホでのフッター・コンパクト化および2カラム化調整 */
@media (max-width: 767.98px) {
    .footer-main { padding: 30px 0 15px; } 

    /* ロゴと説明文のブロックは100%幅でセンターを維持 */
    .footer-main .row > div:nth-child(1) {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        text-align: center !important;
        margin-bottom: 2rem;
    }
    
    /* サイト案内(2番目)とメディアアカウント(3番目)を横並び(50%)に変更 */
    .footer-main .row > div:nth-child(2),
    .footer-main .row > div:nth-child(3) {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        text-align: left !important;
    }

    /* 各カラムの内容が端に寄りすぎないよう調整 */
    .footer-main .row > div:nth-child(2) { padding-left: 20px; }
    .footer-main .row > div:nth-child(3) { padding-left: 10px; }

    .footer-title { 
        margin-bottom: 1rem; 
        font-size: 0.9rem; 
        text-align: left !important;
    }
    
    /* リストとメディアアイコンのパディング・位置調整 */
    .footer-main ul.list-unstyled { 
        padding-left: 10px !important; /* タイトルバーの開始位置に合わせる */
    }
    .footer-main .h3.d-flex {
        justify-content: flex-start !important; /* アイコンを左寄せ */
        padding-left: 10px !important;
        margin-top: 0.5rem !important;
    }

    .footer-logo img { width: 50% !important; margin: 0 auto; display: block; } 
    .footer-main p { margin-bottom: 1.5rem; font-size: 0.8rem; padding: 0 10%; } 
    .footer-main .row.gy-4 { --bs-gutter-y: 1.5rem; } 
    .footer-main .h3 { font-size: 1.5rem; } 
    .footer-bottom { padding: 15px 0; } 
}

/* Mobile Nav */
.mobile-nav { box-shadow: 0 -2px 10px rgba(0,0,0,0.1); height: 65px; z-index: 1050; }

/* 1. ラベル（スポンサーリンク）は、枠があるなら常に出しておいてもOK */
.ad-label {
    display: block;
    font-size: 10px;
    color: #999;ｄ
    text-align: center;
    margin-bottom: 4px;
}

/* 広告エリアの基本設定：高さを固定してCLSを防ぐ */
.kouko_index_side {
    min-height: 280px; /* 楽天バナーやAdSenseのサイズに合わせる */
    margin: 2rem 0;
    position: relative;
    overflow: hidden;
}

/* 楽天アフィリエイト用のコンテナ（初期状態は隠す） */
#rakuten-fallback {
    display: none;
    text-align: center;
    width: 100%;
}

/* ===================================================================
   インテリジェント・スティッキーヘッダー追加スタイル
=================================================================== */

/* 固定ヘッダーの共通ベース設定 */
.smart-header.pc-fixed,
.smart-header.sp-sticky {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1030;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

/* PC環境（992px以上）での潜り込み防止余白 */
@media (min-width: 992px) {
    body {
        padding-top: 60px; /* 76pxから、実際のヘッダー高（約60px）に合わせて縮小 */
    }
}

/* スマホ環境（992px未満）での潜|り込み防止余白 */
@media (max-width: 991.98px) {
    body {
        padding-top: 62px; /* スマホはロゴが回り込むため現状のままでOK */
    }
}

/* スマホ環境（992px未満）での制御 */
@media (max-width: 991.98px) {
    body {
        padding-top: 62px; /* スマホ環境でのヘッダー高さ目安 */
    }

    /* 下にスクロールした時：ヘッダーを画面外へ隠す */
    .smart-header.sp-sticky.scroll-down {
        transform: translateY(-100%);
    }

    /* 上にスクロールした時：ヘッダーを表示してシャドウを強調 */
    .smart-header.sp-sticky.scroll-up {
        transform: translateY(0);
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
    }
}

/* PC環境（992px以上）ではクラスによる出し入れを無効化し、常に固定 */
@media (min-width: 992px) {
    .smart-header.pc-fixed {
        transform: none !important;
    }
}

/* ナビゲーション内最新記事リンクのテキスト溢れ対策 */
.dropdown-menu .text-truncate {
    max-width: 280px;
    display: block;
}



/* ===================================================================
   TOP column
=================================================================== */
/* スマホ：中央配置のコンパクトな正方形（回り込みなし） */
.column-thumb-float {
    margin: 0 auto 1.5rem;
    width: 100%;
    max-width: 280px;
    text-align: center;
}
.column-thumb-float img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

/* PC（タブレット以上）：左側に正方形で回り込み */
@media (min-width: 768px) {
    .column-thumb-float {
        float: left;
        width: 240px;
        max-width: none;
        margin: 0 1.5rem 0.5rem 0;
    }
}

/* 本文テキストの基本調整 */
.column-body-text p {
    margin-bottom: 1.3rem;
}
.column-body-text p:last-child {
    margin-bottom: 0;
}

/* リンクの色を現在のサイトのテーマカラー（シアンブルー）に完全自動同期 */
.column-body-text a {
    color: var(--disney-gold); 
    text-decoration: underline;
    font-weight: bold;
}
.column-body-text a:hover {
    opacity: 0.8;
}