/* ==========================================================================
   1. 変数定義 (Variables)
   ========================================================================== */
:root {
    /* カラーパレット */
    --primary:   #1a252f;
    --accent:    #d35400;
    --bg-light:  #f4f6f8;
    --bg-body:   #f4f4f4;
    --text-main: #2c3e50;
    --text-sub:  #546e7a;
    --text-body: #333333;
    
    /* 共通設定 */
    --radius: 8px;
    --font-base: "Helvetica Neue", Arial, sans-serif;
}

/* ==========================================================================
   2. リセット & 基本設定 (Base)
   ========================================================================== */
* {
    box-sizing: border-box;
}
body {
    font-family: var(--font-base);
    line-height: 1.8;
    color: var(--text-body);
    background-color: var(--bg-body);
    margin: 0;
    padding: 0;
}
a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}
ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* ==========================================================================
   3. レイアウト共通 (Layout)
   ========================================================================== */
/* コンテナ */
.container {
    max-width: 1200px;
    margin: 0 auto 80px;
    padding: 0 20px;
}

/* ヘッダー */
header {
    background: var(--primary);
    border-bottom: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ロゴ */
.logo {
    color: #fff;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
}
.logo span { margin-right: 5px; }
.logo img {
    max-height: 70px;
    width: auto;
    display: block;
}

/* PCナビゲーション */
.pc-nav { display: flex; gap: 25px; }
.nav-item {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    display: flex;
    align-items: center;
    transition: 0.3s;
}
.nav-item:hover { color: #ff9f43; }
.nav-icon { margin-right: 5px; font-size: 18px; }

/* モバイルメニューアイコン */
.mobile-menu-icon {
    display: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}

.mobile-bottom-nav {
    display: none;
}

/* フッター */
footer {
    background: var(--primary);
    color: #fff;
    text-align: center;
    padding: 50px 20px;
    margin-top: 60px;
}
.footer-nav a {
    color: #ccc;
    margin: 0 15px;
    font-size: 14px;
    display: inline-block;
    padding: 5px 0;
}
.footer-nav a:hover {
    color: #fff;
    text-decoration: underline;
}

/* ==========================================================================
   4. セクション別スタイル (Sections)
   ========================================================================== */

/* ヒーローエリア */
.hero {
    /* 画像を背景に設定 */
    background-image: url('../images/haikei.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    
    position: relative;
    color: #ffffff;
    
    padding: 60px 20px;
    text-align: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.hero > * {
    position: relative;
    z-index: 2;
}
.hero h1 {
    font-size: 32px;
    margin-bottom: 15px;
    text-shadow: 0 4px 10px rgba(0,0,0,0.5);
    font-weight: 900;
}
.total-badge {
    background: var(--accent);
    padding: 5px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 15px;
    box-shadow: 0 4px 10px rgba(211, 84, 0, 0.4);
}
.hero p {
    max-width: 800px;
    margin: 0 auto;
    opacity: 0.9;
}

/* SOSボタンエリア */
.sos-area {
    max-width: 1100px;
    margin: -40px auto 50px;
    padding: 0 20px;
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}
.sos-btn {
    background: #f9fcff;
    padding: 25px;
    border-radius: var(--radius);
    border-left: 6px solid #3498db;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    transition: 0.3s;
}
.sos-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}
.sos-icon {
    font-size: 32px;
    margin-right: 20px;
    min-width: 40px;
    text-align: center;
}
.sos-info h3 { margin: 0 0 5px; font-size: 18px; font-weight: 700; color: #0077b6; }
.sos-info p { margin: 0; font-size: 13px; color: #555; font-weight: 500; }

/* カテゴリ見出し */
.cat-head {
    margin: 70px 0 10px;
    border-bottom: 3px solid #ddd;
    padding-bottom: 10px;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
}
.cat-head h2 {
    font-size: 24px;
    font-weight: 900;
    margin: 0 20px 0 0;
    color: var(--primary);
}
.cat-desc { font-size: 14px; color: #7f8c8d; font-weight: 500; }
.cat-intro {
    font-size: 14px;
    color: #546e7a;
    margin-bottom: 25px;
    line-height: 1.6;
    background: #fff;
    padding: 15px;
    border-radius: var(--radius);
    border: 1px solid #e0e0e0;
}

/* FAQセクション */
.faq-section {
    background: #fff;
    padding: 40px;
    margin-top: 60px;
    border-radius: var(--radius);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
.faq-title {
    text-align: center;
    font-size: 24px;
    font-weight: 900;
    margin-bottom: 30px;
    color: var(--primary);
}
.faq-item { border-bottom: 1px solid #eee; padding: 15px 0; }
.faq-q {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 5px;
    display: block;
    font-size: 16px;
}
.faq-q::before {
    content: "Q.";
    color: var(--accent);
    margin-right: 10px;
    font-weight: 900;
}
.faq-a {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    padding-left: 28px;
}

/* ==========================================================================
   5. 記事カードコンポーネント (Card Component)
   ========================================================================== */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}
.post-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid #eee;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
}
.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-color: transparent;
}
.post-tag {
    font-size: 11px;
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 12px;
    align-self: flex-start;
    font-weight: bold;
}
.post-title {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 10px;
    line-height: 1.5;
    color: var(--primary);
}
.post-text {
    font-size: 13px;
    color: #666;
    margin: 0;
    flex-grow: 1;
    line-height: 1.6;
}
.post-arrow {
    text-align: right;
    font-size: 12px;
    font-weight: bold;
    color: var(--accent);
    margin-top: 15px;
}

/* ==========================================================================
   6. ユーティリティ・色定義 (Utilities)
   ========================================================================== */
/* カテゴリカラー */
.t-main   { background: #1a252f; }
.t-green  { background: #27ae60; }
.t-orange { background: #f39c12; }
.t-red    { background: #c0392b; }
.t-purple { background: #8e44ad; }
.t-blue   { background: #2980b9; }
.t-brown  { background: #795548; }
.t-teal   { background: #00897b; }
.t-cyan   { background: #00bcd4; }
.t-lime   { background: #afb42b; }
.t-indigo { background: #283593; }
.t-gray   { background: #7f8c8d; }

/* ==========================================================================
   7. レスポンシブ対応 (Responsive / Media Queries)
   ========================================================================== */
@media (max-width: 768px) {
    /* ヘッダー周り */
    .header-inner { height: 70px; }
    .logo img {
        max-height: 45px;
        width: auto;
        display: block;
    }
    .pc-nav { display: none; }
    .mobile-menu-icon { display: block; }

    /* ハンバーガーメニュー展開時 */
    .pc-nav.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background: #1a252f;
        padding: 20px 0;
        box-shadow: 0 5px 10px rgba(0,0,0,0.2);
        animation: slideDown 0.3s ease;
    }
    .pc-nav.active .nav-item {
        justify-content: center;
        padding: 15px 0;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        font-size: 16px;
    }

    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: #fff;
        border-top: 1px solid #ddd;
        z-index: 9999;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
        padding-bottom: env(safe-area-inset-bottom);
    }

    .mobile-bottom-nav a {
        flex: 1;
        text-align: center;
        padding: 8px 0;
        color: #546e7a;
        font-size: 10px;
        font-weight: bold;
        text-decoration: none;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .mobile-bottom-nav a:active {
        background: #f5f5f5;
        color: #ff9f43;
    }

    .mb-icon {
        font-size: 20px;
        margin-bottom: 2px;
    }

    /* コンテンツ周り */
    .cat-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    .cat-desc { margin: 0; }
    
    /* ヒーローエリアの文字サイズ調整などをここに追加可能 */
}

/* アニメーション定義 */
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   8. 追加コンポーネント (Add-ons)
   ========================================================================== */
/* 「もっと見る」ボタン */
.view-more-container {
    text-align: center;
    margin-top: 30px;
    margin-bottom: 60px; /* 次のセクションとの余白 */
}
.view-more-btn {
    display: inline-block;
    padding: 15px 60px;
    background-color: #fff;
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 50px;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.view-more-btn:hover {
    background-color: var(--primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    text-decoration: none;
}

.promo-banner {
    display: block;
    padding: 30px;
    border-radius: 12px;
    text-decoration: none;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
    color: #fff;
}

.promo-banner:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.banner-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

/* ハコメモ専用カラー（アプリと同じ紫グラデーション） */
.banner-hako {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 10px 20px rgba(118, 75, 162, 0.3);
}

.banner-badge {
    background: #fff;
    color: #764ba2;
    font-size: 12px;
    font-weight: bold;
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.banner-hako h2 {
    margin: 10px 0 15px;
    font-size: 24px;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.banner-hako p {
    margin: 0 0 20px;
    font-size: 15px;
    opacity: 0.95;
    line-height: 1.6;
}

.banner-btn {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    border: 1px solid #fff;
    color: #fff;
    padding: 10px 30px;
    border-radius: 50px;
    font-weight: bold;
    transition: background 0.3s;
}

.promo-banner:hover .banner-btn {
    background: #fff;
    color: #764ba2;
}

.banner-icon {
    position: absolute;
    bottom: -20px;
    right: 20px;
    font-size: 120px;
    opacity: 0.15;
    z-index: 1;
    transform: rotate(-15deg);
    pointer-events: none;
}

@media (max-width: 768px) {
    .banner-hako h2 { font-size: 20px; }
    .banner-icon { font-size: 80px; bottom: -10px; right: 10px; }
}

/* --- 家具配置シミュレーター専用カラー --- */
.banner-layout {
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    box-shadow: 0 10px 20px rgba(253, 160, 133, 0.4);
}

.banner-layout h2 {
    margin: 10px 0 15px;
    font-size: 24px;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.banner-layout p {
    margin: 0 0 20px;
    font-size: 15px;
    opacity: 0.95;
    line-height: 1.6;
    color: #fff;
}

.banner-layout .banner-badge {
    color: #e67e22;
}

.banner-layout:hover .banner-btn {
    color: #e67e22;
}

@media (max-width: 768px) {
    .banner-layout h2 { font-size: 20px; }
}

/* --- スケジュール作成ツール専用カラー --- */
.banner-schedule {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    box-shadow: 0 10px 20px rgba(56, 239, 125, 0.3);
}

.banner-schedule h2 {
    margin: 10px 0 15px;
    font-size: 24px;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.banner-schedule p {
    margin: 0 0 20px;
    font-size: 15px;
    opacity: 0.95;
    line-height: 1.6;
    color: #fff;
}

.banner-schedule .banner-badge {
    color: #00796b;
}

.banner-schedule:hover .banner-btn {
    color: #00796b;
}

@media (max-width: 768px) {
    .banner-schedule h2 { font-size: 20px; }
}

/* --- 引越し総額シミュレーター専用カラー --- */
.banner-simulator {
    background: linear-gradient(135deg, #005bea 0%, #00c6fb 100%);
    box-shadow: 0 10px 20px rgba(0, 91, 234, 0.3);
}

.banner-simulator h2 {
    margin: 10px 0 15px;
    font-size: 24px;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.banner-simulator p {
    margin: 0 0 20px;
    font-size: 15px;
    opacity: 0.95;
    line-height: 1.6;
    color: #fff;
}

.banner-simulator .banner-badge {
    color: #005bea;
}

.banner-simulator:hover .banner-btn {
    color: #005bea;
}

@media (max-width: 768px) {
    .banner-simulator h2 { font-size: 20px; }
}

/* ジョブ診断バナーのキャラクター配置 */
.job-banner-char {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 90px;
    width: 160px;
    height: auto;
    z-index: 1;
    pointer-events: none;
    filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.3));
}

@media (max-width: 768px) {
    .job-banner-char {
        top: 3%;
        transform: none;
        width: 70px;
        left: 30px;
        bottom: 28px;
        opacity: 0.9;
    }
}

/* --- 引越しナビゲーター専用カラー --- */
.banner-navigator {
    /* 視線を引く鮮やかなコーラルレッド?ピンクのグラデーション */
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    box-shadow: 0 10px 20px rgba(255, 65, 108, 0.3);
}

.banner-navigator h2 {
    margin: 10px 0 15px;
    font-size: 24px;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.banner-navigator p {
    margin: 0 0 20px;
    font-size: 15px;
    opacity: 0.95;
    line-height: 1.6;
    color: #fff;
}

.banner-navigator .banner-badge {
    color: #ff416c; /* バッジの文字色を背景の赤に合わせる */
}

.banner-navigator:hover .banner-btn {
    color: #ff416c;
}

@media (max-width: 768px) {
    .banner-navigator h2 { font-size: 20px; }
}

/* --- 引越し総額シミュレーター専用カラー --- */
.banner-simulator {
    background: linear-gradient(135deg, #005bea 0%, #00c6fb 100%);
    box-shadow: 0 10px 20px rgba(0, 91, 234, 0.3);
}
.banner-simulator h2 { margin: 10px 0 15px; font-size: 24px; font-weight: 900; color: #fff; text-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.banner-simulator p { margin: 0 0 20px; font-size: 15px; opacity: 0.95; line-height: 1.6; color: #fff; }
.banner-simulator .banner-badge { color: #005bea; }
.banner-simulator:hover .banner-btn { color: #005bea; }

/* --- 引越しナビゲーター専用カラー --- */
.banner-navigator {
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    box-shadow: 0 10px 20px rgba(255, 65, 108, 0.3);
}
.banner-navigator h2 { margin: 10px 0 15px; font-size: 24px; font-weight: 900; color: #fff; text-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.banner-navigator p { margin: 0 0 20px; font-size: 15px; opacity: 0.95; line-height: 1.6; color: #fff; }
.banner-navigator .banner-badge { color: #ff416c; }
.banner-navigator:hover .banner-btn { color: #ff416c; }

/* ==========================================================================
   ツールカルーセル
   ========================================================================== */

.tools-carousel-section {
    margin-bottom: 60px;
    width: 100%;
}

.tools-carousel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 15px;
}

.tools-carousel-header h2 {
    font-size: 22px;
    color: var(--primary);
    margin: 0;
    font-weight: 900;
}

.swipe-hint {
    font-size: 12px;
    color: #fff;
    background: var(--accent);
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: bold;
    animation: bounceX 2s infinite;
}
@keyframes bounceX {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-5px); }
}

.tools-carousel-wrapper {
    position: relative;
    width: 100%;
    padding: 0 50px; 
    box-sizing: border-box;
}

/* カルーセル本体 */
.tools-carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 20px;
    padding: 10px 5px 20px 5px;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.tools-carousel::-webkit-scrollbar {
    display: none;
}

.tools-carousel .promo-banner {
    box-shadow: none !important;
}

.tools-carousel .promo-banner:hover {
    box-shadow: none !important;
    transform: translateY(-2px) !important;
}

.tools-carousel {
    padding-top: 5px !important;
    padding-bottom: 10px !important;
}

.carousel-slide {
    scroll-snap-align: start;
    flex: 0 0 335px;
    display: flex;
    box-sizing: border-box;
}

.carousel-slide .promo-banner {
    width: 100%;
    height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
}
.carousel-slide .banner-content { flex-grow: 1; display: flex; flex-direction: column; }
.carousel-slide .banner-btn { margin-top: auto; align-self: center; }

/* 左右ボタンのデザイン */
.carousel-prev-btn, .carousel-next-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background-color: #2c3e50 !important;
    border: 2px solid #fff !important;
    border-radius: 50% !important;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 0.3s;
    padding: 0;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
}
.carousel-prev-btn:hover, .carousel-next-btn:hover {
    background-color: var(--accent) !important;
}
.carousel-btn-disabled { 
    opacity: 0; 
    pointer-events: none; 
}

/* 矢印を描く（文字化け防止） */
.carousel-prev-btn::before, .carousel-next-btn::before {
    content: '';
    display: block;
    width: 10px;
    height: 10px;
    border-top: 3px solid #fff;
    border-right: 3px solid #fff;
}
.carousel-prev-btn::before {
    transform: rotate(-135deg);
    margin-left: 4px;
}
.carousel-next-btn::before {
    transform: rotate(45deg);
    margin-right: 4px;
}

.carousel-prev-btn { left: 0; }
.carousel-next-btn { right: 0; }

/* ==========================================================================
   スマホ表示
   ========================================================================== */
@media (min-width: 769px) {
    .swipe-hint { display: none; }
}

@media (max-width: 768px) {
    .tools-carousel-wrapper {
        padding: 0;
    }
    
    .tools-carousel {
        gap: 15px;
        padding: 20px 0;
    }
    
    .carousel-slide {
        flex: 0 0 85%;
        scroll-snap-align: center;
    }
    
    .carousel-slide:first-child {
        margin-left: 7.5%;
    }
    .carousel-slide:last-child {
        margin-right: 7.5%;
    }

    .carousel-prev-btn, .carousel-next-btn { 
        display: flex;
        width: 36px;
        height: 36px;
        background-color: rgba(44, 62, 80, 0.9) !important;
    }
    
    .carousel-prev-btn::before, .carousel-next-btn::before {
        width: 8px;
        height: 8px;
        border-width: 2px;
    }
    
    .carousel-prev-btn { left: -5px; }
    .carousel-next-btn { right: -5px; }
}

/* ==========================================================================
   スマホ表示時の微調整
   ========================================================================== */
@media (max-width: 768px) {
    .tools-carousel-wrapper,
    .tools-carousel {
        box-shadow: none !important;
        padding-bottom: 15px !important;
    }
}