@charset "UTF-8";

/* =============================================== */
/* 0. 変数 & 基本設定 */
/* =============================================== */
:root {
    --primary-color: #FF6B6Bcc;
    --secondary-color: #4ECDC4cc;
    --text-dark: #333;
    --text-gray: #555;
}

/* ★横幅はみ出し防止の要：カスタムエリア内の要素はすべてborder-boxにする */
.home-page-wrapper *,
.home-page-wrapper *::before,
.home-page-wrapper *::after {
    box-sizing: border-box;
}

#content {
    margin-top: 0 !important;
    padding-top: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

.home-page-wrapper {
    width: 100%;
    overflow-x: hidden;
    background-color: #f9fbfb;
}

.content-container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* 2カラムラッパー */
.two-column-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    padding: 40px 20px 60px;
    align-items: flex-start;
}

/* メインカラム (左) */
.main-column {
    flex: 1;
    min-width: 0;
}

/* サイドバーカラム (右) */
.sidebar-column {
    width: 300px;
    flex-shrink: 0;
}

/* =============================================== */
/* 1. ヒーローセクション (FV) */
/* =============================================== */
.hero-section {
    position: relative;
    height: 40vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0;
    padding: 0;
    background-color: #111; 
}
.hero-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: url('../images/top-hero.jpg');
    background-size: cover;
    background-position: center 20%;
    background-repeat: no-repeat;
    opacity: 0.5; 
    z-index: 1;
}
.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 40px;
}
.hero-text {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding: 0;
}
.hero-title {
    font-size: 2.8rem;
    line-height: 1.2;
    color: #fff;
    margin: 0 0 20px 0;
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    font-weight: 600;
    text-shadow: 0 0 10px #f9706f;
}
.hero-subtitle {
    font-size: 1.1rem;
    color: #fff;
    line-height: 1.8;
    margin-bottom: 20px;
    font-weight: 600;
    text-shadow: 0 2px 6px rgba(0,0,0,0.8);
}

/* =============================================== */
/* 新着記事スライダー (はみ出し防止処理) */
/* =============================================== */
.horizontal-new-articles {
    width: 100%;
    max-width: 100%;
    margin-bottom: 40px;
    /* ★重要：Cocoonの横スクロールが画面全体を押し広げないようにブロック内に封じ込める */
    overflow: hidden; 
}

/* =============================================== */
/* メインカラム内 セクション共通 */
/* =============================================== */
section {
    padding: 0 0 80px 0;
}
.section-header {
    text-align: left;
    margin-bottom: 30px;
    border-bottom: 2px solid #eee;
    padding-bottom: 15px;
}
.section-title {
    font-size: 1.6rem;
    color: var(--text-dark);
    margin-bottom: 10px;
    background: none;
    border: none;
    padding: 0;
    font-weight: 700;
    position: relative;
    display: inline-block;
}
.section-title::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 1.6rem;
    background-color: var(--primary-color);
    margin-right: 12px;
    vertical-align: middle;
    border-radius: 3px;
}
.section-title::after {
    display: none;
}
.section-desc {
    color: var(--text-gray);
    font-size: 0.9rem;
    margin: 0 0 0 20px;
}

/* =============================================== */
/* 2. エリアから探す */
/* =============================================== */
.area-card-grid-top8 {
    display: grid;
    /* Gridの突き破り防止のため minmax(0, 1fr) を使用 */
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 40px;
    width: 100%;
}
.area-pic-card {
    position: relative;
    display: block;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 3 / 2; 
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.area-pic-img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    vertical-align: bottom;
}
.area-pic-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0,0,0,0.25); 
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.4s ease;
}
.area-pic-title {
    color: #fff;
    font-size: 1.1rem;
    font-weight: bold;
    letter-spacing: 1px;
    text-shadow: 0 2px 5px rgba(0,0,0,0.7);
    transition: transform 0.4s ease;
}
.area-pic-card:hover .area-pic-img { transform: scale(1.08); }
.area-pic-card:hover .area-pic-overlay { background-color: rgba(0,0,0,0.1); }
.area-pic-card:hover .area-pic-title { transform: scale(1.05); }

/* エリアリスト */
.area-list-container {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #f0f0f0;
}
.area-group {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #eee;
}
.area-group:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}
.area-group-title {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin: 0 0 12px 0;
    border: none;
    padding: 0;
    background: none;
    font-weight: bold;
    display: flex;
    align-items: center;
}
.area-group-title::before {
    content: '';
    display: inline-block;
    width: 5px;
    height: 1rem;
    background-color: var(--primary-color);
    margin-right: 8px;
    border-radius: 3px;
}
.area-button-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.area-btn {
    display: inline-block;
    padding: 8px 14px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    color: var(--text-dark);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}
.area-btn:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* =============================================== */
/* 3. 編集部厳選スタジオ (縦型カード) */
/* =============================================== */
.ranking-rows-container {
    display: flex;
    flex-direction: column;
    gap: 50px; 
}
.ranking-row-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-dark);
    padding: 0 0 8px 0;
    background: none;
    display: flex;
    align-items: center;
}
.ranking-cards-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
}

/* 縦型カード (画像 + テキスト) */
.ranking-card-vertical {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 6px;
    text-decoration: none;
    border: 1px solid #eee;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
}
.ranking-card-vertical:hover {
    transform: translateY(-5px);
    border-color: var(--secondary-color);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

/* サムネイル部分 */
.ranking-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}
.ranking-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.ranking-card-vertical:hover .ranking-thumb img {
    transform: scale(1.05);
}

/* 順位バッジ */
.rank-badge-corner {
    position: absolute;
    top: 0;
    left: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 900;
    color: #fff;
    font-family: 'Helvetica', sans-serif;
    border-bottom-right-radius: 8px;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
    z-index: 2;
}
.rank-1 { background: linear-gradient(135deg, #FFD700, #FDB931); }
.rank-2 { background: linear-gradient(135deg, #E0E0E0, #9E9E9E); }
.rank-3 { background: linear-gradient(135deg, #FFB74D, #F57C00); }

/* コンテンツ部分 */
.ranking-card-info {
    padding: 12px 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.ranking-card-info h4 {
    font-size: 0.95rem;
    color: var(--text-dark);
    margin: 0 0 6px 0;
    font-weight: bold;
    border: none;
    padding: 0;
    background: none;
    line-height: 1.3;
}
.ranking-card-info p {
    font-size: 0.8rem;
    color: var(--text-gray);
    margin: 0;
    line-height: 1.5;
}

/* =============================================== */
/* 4. サイドバーウィジェット */
/* =============================================== */
.sidebar-widget {
    margin-bottom: 40px;
    padding: 0;
}
.widget-title:not(.footer-title) {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--primary-color);
    background: none;
    border: none;
    padding: 0 0 8px 0;
    margin: 0 0 15px 0;
    border-bottom: 2px dotted var(--primary-color);
}

/* サイト内検索 */
.sidebar-search-form {
    position: relative; /* 親要素の基準を明確化 */
    display: flex;
    align-items: stretch; /* 高さを強制的に揃える */
    height: 44px;
    width: 100%;
    margin: 0;
    box-sizing: border-box;
}

.search-field {
    flex: 1; /* 横幅の余りをすべて使う */
    height: 100% !important; /* 親テーマの指定を打ち消す */
    padding: 0 15px !important;
    margin: 0 !important;
    border: 1px solid #ddd !important;
    border-radius: 4px 0 0 4px !important;
    font-size: 0.9rem;
    outline: none;
    background: #fff;
    box-shadow: none !important;
    box-sizing: border-box;
    -webkit-appearance: none;
}

.search-submit {
    /* ★ここが修正のキモ：親テーマの absolute 配置を解除 */
    position: static !important; 
    top: auto !important;
    right: auto !important;
    margin: 0 !important;
    
    /* デザイン調整 */
    background-color: var(--secondary-color) !important;
    color: #fff !important;
    border: none !important;
    width: 50px !important; /* 横幅固定 */
    height: 100% !important; /* 高さ固定 */
    padding: 0 !important;
    border-radius: 0 4px 4px 0 !important;
    cursor: pointer;
    transition: background-color 0.3s;
    
    /* アイコンを中央に配置 */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.1rem !important; /* アイコンサイズ調整 */
}

.search-submit:hover {
    background-color: var(--primary-color) !important;
}

/* バナー */
.widget-banner {
    padding: 0; 
    text-align: center; /* スマホ等で画像が最大幅で止まった時に中央寄せにする */
}
.widget-banner a {
    display: inline-block; /* text-alignを効かせるために必要 */
    transition: transform 0.3s;
    width: 100%;
}
.widget-banner a:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}
.sidebar-banner-img {
    width: 100%;
    /* ★引き伸ばし防止：PC版のサイドバー幅＋α程度で上限を固定する */
    max-width: 300px; 
    height: auto;
    border-radius: 8px;
    vertical-align: bottom; /* 画像下の余計な隙間を消す */
    box-shadow: 0 4px 10px rgba(0,0,0,0.05); /* 少し影をつけるとバナー感が出ます（お好みで） */
}

/* カテゴリリスト */
.category-list {
    list-style: none !important;
    padding: 0;
    margin: 0;
}
.category-list li {
    border-bottom: 1px dotted #ddd;
    position: relative;
}
.category-list a {
    display: block;
    padding: 10px 0 10px 20px;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s;
}
.category-list a:hover {
    color: var(--secondary-color);
}
.category-list a:hover::before {
    background-color: var(--primary-color);
}

/* 人気記事ウィジェット */
.widget-popular ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.widget-popular .popular-entry-card-link {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    text-decoration: none;
    color: var(--text-dark);
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}
.widget-popular .popular-entry-card-thumb {
    width: 100px;
    flex-shrink: 0;
}
.widget-popular .popular-entry-card-thumb img {
    border-radius: 4px;
    width: 100%;
    height: auto;
}
.widget-popular .popular-entry-card-content {
    font-size: 0.85rem;
    line-height: 1.4;
}
.widget-entry-cards:not(.large-thumb-on) .card-title {
    -webkit-line-clamp: 3 !important;
}

/* プロフィール */
.profile-content {
    text-align: center;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #eee;
}
.profile-img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
}
.profile-name {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin: 0 0 10px 0;
    border: none;
    background: none;
    padding: 0;
}
.profile-text {
    font-size: 0.85rem;
    color: var(--text-gray);
    line-height: 1.6;
    margin: 0;
    text-align: left;
}

/* =============================================== */
/* 5. スマホ・タブレット対応 (メディアクエリ集約) */
/* =============================================== */

/* タブレットサイズ */
@media (max-width: 991px) {
    .horizontal-new-articles {
        display: none !important;
    }
    .two-column-wrapper {
        flex-direction: column;
        padding: 40px 15px;
    }
    .sidebar-column {
        width: 100%;
		max-width: 640px;
		margin: 0 auto;
        border-top: 1px solid #eee;
    }
}

/* スマホサイズ */
@media (max-width: 768px) {
    /* ヒーローセクション */
    .hero-section {
        height: auto;
        min-height: 300px; 
        padding: 60px 0; 
    }
    .hero-content {
        padding: 0 20px;
    }
    .hero-title {
        font-size: 1.5rem; /* ★縮小し抜け感を追加 */
        line-height: 1.5;
        letter-spacing: 0.05em;
    }
    .hero-subtitle {
        font-size: 0.8rem; /* ★縮小 */
        padding: 5px;
        letter-spacing: 0.02em;
    }
    
    .content-container {
        padding: 0 !important;
    }
    .two-column-wrapper {
        padding: 30px 20px 50px !important;
    }

    /* セクション見出しのスケールダウン */
    .section-title {
        font-size: 1.3rem; /* ★PC1.6remから縮小 */
    }
    .section-title::before {
        height: 1.3rem;
    }
    .section-desc {
        font-size: 0.8rem; /* ★PC0.9remから縮小 */
        margin: 0 0 0 16px;
    }

    /* エリアから探す */
    .area-card-grid-top8 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
    .area-pic-title {
        font-size: 0.95rem; /* ★少し小さく */
    }
    .area-button-wrap {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    .area-group-title {
        font-size: 1rem; /* ★縮小 */
    }
    .area-btn {
        text-align: center;
        padding: 10px;
        font-size: 0.85rem; /* ★縮小 */
    }
    .area-list-container {
        padding: 20px;
    }
    
    /* ランキング */
    .ranking-row-title {
        font-size: 1.05rem; /* ★縮小 */
    }
    .ranking-cards-row {
        grid-template-columns: 1fr;
    }
    .ranking-card-vertical {
        flex-direction: row;
        align-items: center;
        height: auto;
    }
    .ranking-thumb {
        width: 110px; /* ★画像を少し小さくしてテキストの窮屈さを緩和 */
        aspect-ratio: 4 / 3;
        flex-shrink: 0;
    }
    .rank-badge-corner {
        width: 24px;
        height: 24px;
        font-size: 0.9rem;
    }
    .ranking-card-info {
        padding: 12px;
        justify-content: center; /* ★横並び時にテキストを上下中央へ配置 */
    }
    .ranking-card-info h4 {
        font-size: 0.85rem; /* ★縮小 */
        margin-bottom: 4px;
    }
    .ranking-card-info p {
        font-size: 0.75rem; /* ★縮小 */
        line-height: 1.6; /* ★行間を広げて可読性向上 */
    }

    /* サイドバー・ウィジェット */
    .widget-title:not(.footer-title) {
        font-size: 1rem; /* ★縮小 */
    }
    .category-list a {
        font-size: 0.85rem; /* ★縮小 */
        padding: 10px 0 10px 15px;
    }
    .widget-popular .popular-entry-card-content {
        font-size: 0.8rem; /* ★縮小 */
    }
    
    /* プロフィール */
    .profile-content {
        padding: 15px; /* ★余白を少し縮小 */
    }
    .profile-name {
        font-size: 1rem; /* ★縮小 */
    }
    .profile-text {
        font-size: 0.75rem; /* ★縮小 */
        line-height: 1.7; /* ★行間を広げて圧迫感を排除 */
    }
}