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

@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: #ffffff;
    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; /* 他のどの要素よりも前面に配置してクリックを確実に */
}

/* 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 - 30px); 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; }