/*
Theme Name:     ワタシホーム (Watashi Home)
Theme URI:      https://sc-takatsukikammaki.jp/
Template:       swell
Description:    埼玉・千葉の地域密着型 住宅・住まい情報ポータル「ワタシホーム」のSWELL子テーマ。地域ニュース・リフォーム・住宅ローン・補助金・不動産・求人・地域企業情報を横断的に扱うメディアサイト向け。
Author:         Watashi Home Editorial
Author URI:     https://sc-takatsukikammaki.jp/
Version:        1.7.0
Requires at least: 6.4
Requires PHP:   7.4
License:        GNU General Public License v2 or later
License URI:    http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:    watashi-home
Tags:           blog, news, portal, real-estate, custom-post-types
*/

/* ===== ブランドカラー変数 ===== */
:root {
    --wh-primary: #1E5EAE;
    --wh-primary-dark: #0F2E5C;
    --wh-primary-light: #E8F0FA;
    --wh-accent: #3BA55C;
    --wh-accent-dark: #2A7A44;
    --wh-accent-light: #E9F6EE;
    --wh-text: #1a2333;
    --wh-text-sub: #5A6472;
    --wh-border: #E4E8EF;
    --wh-bg: #F7F9FC;
    --wh-card-bg: #FFFFFF;
    --wh-shadow: 0 2px 8px rgba(30, 94, 174, 0.06);
    --wh-shadow-hover: 0 6px 20px rgba(30, 94, 174, 0.12);
    --wh-radius: 12px;
    --wh-radius-sm: 8px;
}

/* ===== 基本タイポグラフィ ===== */
body {
    font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', 'Meiryo', sans-serif;
    color: var(--wh-text);
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
}

/* ===== ヘッダー ===== */
.wh-header {
    background: #fff;
    border-bottom: 1px solid var(--wh-border);
}
.wh-header__top {
    background: #f4f7fb;
    font-size: 12px;
    padding: 6px 0;
    color: var(--wh-text-sub);
}
.wh-header__utility a {
    color: var(--wh-text-sub);
    margin-left: 16px;
    text-decoration: none;
}
.wh-header__utility a:hover { color: var(--wh-primary); }
.wh-header__logo img { height: 44px; width: auto; }
.wh-header__logo-text { font-weight: 800; color: var(--wh-primary); font-size: 20px; }
.wh-header__search {
    display: flex;
    align-items: center;
    background: #f4f7fb;
    border-radius: 999px;
    padding: 6px 12px;
    max-width: 320px;
    width: 100%;
}
.wh-header__search input {
    border: none;
    background: transparent;
    outline: none;
    flex: 1;
    padding: 4px 8px;
    font-size: 14px;
}
.wh-header__cta {
    background: var(--wh-accent);
    color: #fff;
    padding: 8px 18px;
    border-radius: 999px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}
.wh-header__cta:hover { background: var(--wh-accent-dark); color: #fff; }

/* ===== メインナビ ===== */
.wh-nav {
    background: #fff;
    border-top: 1px solid var(--wh-border);
    border-bottom: 1px solid var(--wh-border);
}
.wh-nav__list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    justify-content: center;
    gap: 4px;
}
.wh-nav__list > li > a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 14px 20px;
    color: var(--wh-text);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    border-bottom: 3px solid transparent;
    transition: all .2s;
}
.wh-nav__list > li > a:hover,
.wh-nav__list > li.current-menu-item > a {
    color: var(--wh-primary);
    border-bottom-color: var(--wh-primary);
    background: var(--wh-primary-light);
}

/* ===== ヒーロー ===== */
.wh-hero {
    position: relative;
    background: linear-gradient(90deg, rgba(232,240,250,.95), rgba(232,240,250,.6) 60%, transparent), url('assets/img/hero-default.jpg') center/cover no-repeat;
    padding: 60px 24px;
    border-radius: var(--wh-radius);
    margin: 24px auto;
    max-width: 1200px;
}
.wh-hero__title {
    font-size: 32px;
    font-weight: 800;
    color: var(--wh-primary-dark);
    line-height: 1.4;
    margin-bottom: 12px;
}
.wh-hero__subtitle {
    font-size: 15px;
    color: var(--wh-text-sub);
    max-width: 560px;
    margin-bottom: 24px;
}
.wh-hero__area-badge {
    display: inline-block;
    background: #fff;
    border-left: 4px solid var(--wh-primary);
    padding: 12px 20px;
    border-radius: var(--wh-radius-sm);
    font-size: 13px;
    box-shadow: var(--wh-shadow);
}
.wh-hero__area-badge strong { color: var(--wh-primary); }

/* ===== カテゴリーショートカット ===== */
.wh-shortcut {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 24px;
}
.wh-shortcut__grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
}
.wh-shortcut__item {
    background: #fff;
    border: 1px solid var(--wh-border);
    border-radius: var(--wh-radius);
    padding: 20px 12px;
    text-align: center;
    text-decoration: none;
    color: var(--wh-text);
    transition: all .2s;
    box-shadow: var(--wh-shadow);
}
.wh-shortcut__item:hover {
    transform: translateY(-2px);
    box-shadow: var(--wh-shadow-hover);
    border-color: var(--wh-primary);
    color: var(--wh-primary);
}
.wh-shortcut__icon {
    display: block;
    width: 48px;
    height: 48px;
    margin: 0 auto 8px;
    color: var(--wh-primary);
}
.wh-shortcut__label {
    font-size: 13px;
    font-weight: 600;
}

/* ===== セクション共通 ===== */
.wh-section {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 24px;
}
.wh-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--wh-primary-light);
    border-radius: var(--wh-radius-sm);
    padding: 12px 20px;
    margin-bottom: 20px;
    border-left: 4px solid var(--wh-primary);
}
.wh-section__title {
    font-size: 18px;
    font-weight: 700;
    color: var(--wh-primary-dark);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.wh-section__more {
    font-size: 13px;
    color: var(--wh-primary);
    text-decoration: none;
    font-weight: 600;
}
.wh-section__more:hover { text-decoration: underline; }

/* ===== 対応エリア ===== */
.wh-area-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}
.wh-area-grid a {
    background: #fff;
    border: 1px solid var(--wh-border);
    padding: 12px 8px;
    text-align: center;
    border-radius: var(--wh-radius-sm);
    text-decoration: none;
    color: var(--wh-text);
    font-size: 13px;
    font-weight: 600;
    transition: all .2s;
}
.wh-area-grid a:hover {
    background: var(--wh-primary);
    color: #fff;
    border-color: var(--wh-primary);
}

/* ===== カード（記事・企業・求人共通） ===== */
.wh-card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.wh-card {
    background: var(--wh-card-bg);
    border: 1px solid var(--wh-border);
    border-radius: var(--wh-radius);
    overflow: hidden;
    transition: all .2s;
    display: flex;
    flex-direction: column;
    box-shadow: var(--wh-shadow);
}
.wh-card:hover { box-shadow: var(--wh-shadow-hover); transform: translateY(-2px); }
.wh-card__thumb {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: var(--wh-bg);
}
.wh-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}
.wh-card:hover .wh-card__thumb img { transform: scale(1.04); }
.wh-card__cat {
    position: absolute;
    left: 8px;
    bottom: 8px;
    background: var(--wh-primary);
    color: #fff;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
}
.wh-card__cat--news { background: #DC3545; }
.wh-card__cat--renovation { background: #FD7E14; }
.wh-card__cat--subsidy { background: #6F42C1; }
.wh-card__cat--housing { background: var(--wh-primary); }
.wh-card__cat--job { background: var(--wh-accent); }
.wh-card__cat--company { background: #6C757D; }
.wh-card__date {
    position: absolute;
    right: 8px;
    bottom: 8px;
    background: rgba(0,0,0,.6);
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
}
.wh-card__body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.wh-card__title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.5;
    margin: 0 0 8px;
}
.wh-card__title a { color: var(--wh-text); text-decoration: none; }
.wh-card__title a:hover { color: var(--wh-primary); }
.wh-card__excerpt {
    font-size: 13px;
    color: var(--wh-text-sub);
    line-height: 1.6;
    margin: 0 0 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.wh-card__link {
    margin-top: auto;
    color: var(--wh-primary);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}
.wh-card__link:after { content: " ›"; }

/* ===== ランキング ===== */
.wh-ranking { display: flex; flex-direction: column; gap: 12px; }
.wh-ranking__item {
    display: flex;
    gap: 12px;
    background: #fff;
    border: 1px solid var(--wh-border);
    border-radius: var(--wh-radius-sm);
    padding: 10px;
    text-decoration: none;
    color: var(--wh-text);
    align-items: center;
    position: relative;
    box-shadow: var(--wh-shadow);
}
.wh-ranking__item:hover { border-color: var(--wh-primary); }
.wh-ranking__rank {
    background: var(--wh-primary);
    color: #fff;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-weight: 800;
    font-size: 12px;
    flex-shrink: 0;
}
.wh-ranking__item:nth-child(1) .wh-ranking__rank { background: #D4AF37; }
.wh-ranking__item:nth-child(2) .wh-ranking__rank { background: #B0B0B0; }
.wh-ranking__item:nth-child(3) .wh-ranking__rank { background: #CD7F32; }
.wh-ranking__thumb {
    width: 60px;
    height: 60px;
    border-radius: var(--wh-radius-sm);
    object-fit: cover;
    flex-shrink: 0;
}
.wh-ranking__body { flex: 1; min-width: 0; }
.wh-ranking__title {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.wh-ranking__date { font-size: 11px; color: var(--wh-text-sub); }

/* ===== 求人カード ===== */
.wh-job-card {
    background: #fff;
    border: 1px solid var(--wh-border);
    border-radius: var(--wh-radius);
    padding: 20px;
    box-shadow: var(--wh-shadow);
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.wh-job-card__company { font-size: 12px; color: var(--wh-text-sub); font-weight: 600; }
.wh-job-card__title { font-size: 16px; font-weight: 700; margin: 0; color: var(--wh-primary-dark); }
.wh-job-card__meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; }
.wh-job-card__badge {
    background: var(--wh-primary-light);
    color: var(--wh-primary);
    padding: 3px 10px;
    border-radius: 4px;
    font-weight: 600;
}
.wh-job-card__salary { font-weight: 700; color: var(--wh-accent-dark); }
.wh-job-card__btn {
    display: block;
    background: var(--wh-primary);
    color: #fff;
    text-align: center;
    padding: 10px;
    border-radius: var(--wh-radius-sm);
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    margin-top: auto;
}
.wh-job-card__btn:hover { background: var(--wh-primary-dark); color: #fff; }

/* ===== 人気タグ ===== */
.wh-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.wh-tags a {
    background: #fff;
    border: 1px solid var(--wh-border);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12px;
    color: var(--wh-text);
    text-decoration: none;
    transition: all .2s;
}
.wh-tags a:hover { background: var(--wh-primary); color: #fff; border-color: var(--wh-primary); }

/* ===== メールマガジン登録 ===== */
.wh-newsletter {
    background: #fff;
    border: 1px solid var(--wh-border);
    border-radius: var(--wh-radius);
    padding: 20px;
    box-shadow: var(--wh-shadow);
}
.wh-newsletter__title { font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.wh-newsletter input[type="email"] {
    width: 100%;
    border: 1px solid var(--wh-border);
    padding: 10px;
    border-radius: var(--wh-radius-sm);
    margin-bottom: 8px;
    font-size: 13px;
}
.wh-newsletter button {
    width: 100%;
    background: var(--wh-primary);
    color: #fff;
    border: none;
    padding: 10px;
    border-radius: var(--wh-radius-sm);
    font-weight: 700;
    cursor: pointer;
}

/* ===== LINE公式アカウント ===== */
.wh-line-box {
    background: linear-gradient(135deg, #06C755 0%, #00B900 100%);
    color: #fff;
    padding: 20px;
    border-radius: var(--wh-radius);
    text-align: center;
    box-shadow: var(--wh-shadow);
}
.wh-line-box__title { font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.wh-line-box__btn {
    display: inline-block;
    background: #fff;
    color: #00B900;
    padding: 10px 24px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    margin-top: 8px;
}

/* ===== フッター ===== */
.wh-footer {
    background: #fff;
    border-top: 1px solid var(--wh-border);
    padding: 40px 24px 20px;
    margin-top: 60px;
}
.wh-footer__grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
}
.wh-footer__col h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--wh-primary);
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--wh-primary-light);
}
.wh-footer__col ul { list-style: none; padding: 0; margin: 0; }
.wh-footer__col ul li { margin-bottom: 6px; }
.wh-footer__col a {
    color: var(--wh-text-sub);
    text-decoration: none;
    font-size: 12px;
}
.wh-footer__col a:hover { color: var(--wh-primary); }
.wh-footer__copy {
    text-align: center;
    padding-top: 20px;
    margin-top: 30px;
    border-top: 1px solid var(--wh-border);
    font-size: 12px;
    color: var(--wh-text-sub);
}

/* ===== レスポンシブ ===== */
@media (max-width: 960px) {
    .wh-shortcut__grid { grid-template-columns: repeat(4, 1fr); }
    .wh-area-grid { grid-template-columns: repeat(4, 1fr); }
    .wh-card-grid { grid-template-columns: repeat(2, 1fr); }
    .wh-footer__grid { grid-template-columns: repeat(2, 1fr); }
    .wh-hero__title { font-size: 24px; }
}
@media (max-width: 640px) {
    .wh-shortcut__grid { grid-template-columns: repeat(3, 1fr); }
    .wh-area-grid { grid-template-columns: repeat(3, 1fr); }
    .wh-card-grid { grid-template-columns: 1fr; }
    .wh-footer__grid { grid-template-columns: 1fr; }
    .wh-hero { padding: 32px 20px; margin: 12px; }
    .wh-hero__title { font-size: 20px; }
    .wh-nav__list { overflow-x: auto; justify-content: flex-start; }
    .wh-nav__list > li > a { padding: 12px 14px; font-size: 13px; white-space: nowrap; }
    .wh-section { margin: 24px auto; padding: 0 16px; }
}
