/* =========================================
   style.css - 共通スタイル & ベースレイアウト
   ========================================= */

/* --- 基本設定 --- */
:root {
    /* カラーパレット */
    --primary-color: #8ab4f7;   /* 明るい青 */
    --secondary-color: #92c79b; /* やわらかい緑 */
    --accent-color: #f7a8b8;    /* やさしいピンク */
    --background-color: #f8f6f6;/* 全体の背景色（薄いグレー） */
    --white: #ffffff;
    --text-color: #5f6368;      /* 本文グレー */
    --text-color-dark: #3c4043; /* 見出し用濃いグレー */
    --light-gray: #e8eaed;
    --border-color: #dadce0;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.05);

    /* レイアウト設定（ここを変えればサイト全体の幅が変わります） */
    --content-max-width: 1780px; 
    --content-padding-side: 24px; /* スマホ・タブレット時の左右の最低余白 */
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    margin: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    font-size: 16px; /* 基準サイズ */
    line-height: 1.7;
    overflow-x: hidden; /* 横スクロール防止 */
}

/* PCでは文字サイズを少し大きく */
@media screen and (min-width: 1024px) {
    body { font-size: 18px; }
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: opacity 0.3s;
}
a:hover { opacity: 0.8; }

img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

/* 汎用ボタンスタイル */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}
.btn:hover {
    opacity: 1;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* =========================================
   レイアウト構造（コンテナ制御）
   ========================================= */

/* アプリケーション全体を包む箱（背景・装飾用） */
.app-container {
    width: 100%;
    margin: 0;
    padding: 0; /* 以前の余白設定を削除 */
    box-sizing: border-box;
    background-color: var(--white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* コンテンツ幅を制御する汎用クラス（下層ページ等で使用） */
.content-wrapper {
    width: 100%;
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 0 var(--content-padding-side);
    box-sizing: border-box;
}

/* =========================================
   ヘッダー
   ========================================= */
.site-header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;

    /* コンテンツ幅の制御 */
    width: 100%;
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 12px var(--content-padding-side);
    box-sizing: border-box;
}

/* ロゴエリア */
.logo-area, .logo-area a {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0; /* フレックスアイテムの縮小を許可 */
    text-decoration: none;
}

.logo-character {
    height: 48px;
    width: auto;
    flex-shrink: 0;
}

.site-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-color-dark);
    margin: 0;
    white-space: nowrap;
}

.site-subtitle {
    font-size: 14px;
    color: var(--text-color-dark);
    margin: 0;
    font-weight: 700;
    line-height: 1.3;
}

/* ヘッダー右側のアクション */
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.header-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 700;
}
.header-action-btn:hover { opacity: 0.9; }

.menu-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    border-radius: 6px;
    transition: background-color 0.3s;
}
.hamburger-icon {
    width: 32px;
    height: 32px;
    color: var(--text-color-dark);
}

/* =========================================
   モバイルナビゲーション
   ========================================= */
.mobile-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 80%;
    max-width: 320px;
    height: 100%;
    background-color: var(--white);
    box-shadow: -4px 0 10px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    z-index: 1020;
    display: flex;
    flex-direction: column;
}
.mobile-nav.is-open { transform: translateX(0); }

.mobile-nav-header {
    display: flex;
    justify-content: flex-end;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}
.close-menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 28px;
    padding: 8px;
    color: var(--text-color);
}

.nav-links { flex-grow: 1; overflow-y: auto; }

.nav-link {
    display: block;
    padding: 14px 20px;
    border-bottom: 1px solid var(--light-gray);
    color: var(--text-color-dark);
    font-weight: 500;
    font-size: 16px;
}

/* アコーディオンメニュー */
.accordion-toggle {
    width: 100%;
    background: none;
    border: none;
    border-bottom: 1px solid var(--light-gray);
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    font-family: inherit;
    color: var(--text-color-dark);
}
.accordion-icon { transition: transform 0.3s; }
.accordion-toggle.is-open .accordion-icon { transform: rotate(180deg); }

.accordion-submenu {
    background-color: #fcfcfc;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
}
.accordion-sublink {
    display: block;
    padding: 12px 20px 12px 35px;
    border-bottom: 1px solid var(--light-gray);
    color: var(--text-color);
    font-size: 15px;
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1010;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}
.menu-overlay.is-open { opacity: 1; visibility: visible; }

/* =========================================
   メインコンテンツ・その他共通
   ========================================= */
.main-content {
    flex-grow: 1;
    width: 100%;
}
.page-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 20px 0;
    margin-bottom: 40px;
    text-align: center;
    width: 100%;
}
.section-heading {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-color-dark);
    text-align: center;
    margin-top: 0;
    margin-bottom: 24px;
    position: relative;
    padding-bottom: 12px;
}
.section-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

/* フッター */
.site-footer {
    background-color: #70757a;
    color: var(--white);
    text-align: center;
    padding: 24px 0;
    font-size: 14px;
}
.footer-inner p { margin: 4px 0; }
.copyright { font-size: 12px; color: #e0e0e0; }

/* 画像モーダル */
.image-modal {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}
.image-modal.is-open { opacity: 1; visibility: visible; }

.modal-container {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    max-width: 90vw;
    width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    position: relative;
}
.close-modal-btn {
    position: absolute;
    top: -16px;
    right: -16px;
    background-color: var(--white);
    border-radius: 50%;
    border: none;
    width: 36px;
    height: 36px;
    box-shadow: var(--shadow);
    color: var(--text-color-dark);
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-content { overflow-y: auto; padding: 20px; }
.modal-content img { width: 100%; margin-bottom: 16px; }

/* =========================================
   レスポンシブ対応 (PC: 1024px以上)
   ========================================= */
@media screen and (min-width: 1024px) {
    /* PCではメニューボタンに「メニュー」という文字を表示 */
    .menu-toggle-btn {
        padding: 8px 12px;
        border: 1px solid var(--border-color);
    }
    .menu-toggle-btn:hover { background-color: #f1f3f4; }
    .menu-toggle-btn::after {
        content: 'メニュー';
        font-size: 16px;
        font-weight: 700;
        color: var(--text-color-dark);
        margin-left: 2px;
    }

    /* サイトサブタイトルの調整 */
    .site-subtitle {
        font-size: 15px;
        margin-left: 8px;
        position: relative;
    }
    
    /* PC用の文字サイズ調整 */
    .nav-link, .accordion-toggle { font-size: 18px; }
    .section-heading { font-size: 28px; }
    .header-action-btn { font-size: 18px; padding: 10px 16px; }
}

/* =========================================
   レスポンシブ対応 (Mobile: 1024px未満)
   ========================================= */
@media screen and (max-width: 1023px) {
    /* モバイルではサイトタイトル「福ナビ」を隠し、ロゴのみにする */
    .site-title { display: none; }
    
    /* サブタイトルを中央配置に */
    .logo-area { flex-grow: 1; }
    .site-subtitle {
        font-size: clamp(12px, 3.5vw, 15px);
    }

    /* 「評価結果をみる」ボタンをアイコン＋「評価」などに短縮 */
    .header-action-btn span { font-size: 0; }
    .header-action-btn span::after {
        content: '検索';
        font-size: 14px;
    }
}
/* =========================================
   スクロールインジケーター（円形・全ページ追従型）
   ========================================= */
.scroll-indicator-circle {
    position: fixed; /* 画面に固定 */
    bottom: 30px;    /* 画面下からの距離 */
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    
    /* 円形のスタイル */
    width: 50px;
    height: 50px;
    border: 2px solid var(--primary-color); /* メインカラーの枠線 */
    border-radius: 50%; /* 完全な円にする */
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.8); /* 背景を少し半透明の白にして視認性確保 */
    box-shadow: 0 2px 10px rgba(0,0,0,0.1); /* ほんのり影をつけて浮かせる */
    
    opacity: 1;
    pointer-events: none; /* クリックを邪魔しない */
    transition: opacity 0.5s ease, visibility 0.5s ease, transform 0.3s ease;
    
    /* 上下にふわふわ動くアニメーション */
    animation: bounceArrow 2s infinite ease-in-out;
}

/* ページ最下部で消すためのクラス */
.scroll-indicator-circle.is-hidden {
    opacity: 0;
    visibility: hidden;
    animation: none; /* 消えるときは動きを止める */
}

/* 中の矢印アイコン（SVG用スタイル） */
.scroll-arrow-icon {
    width: 20px;
    height: 20px;
    fill: var(--primary-color); /* 矢印の色 */
}

/* 上下バウンドのアニメーション定義 */
@keyframes bounceArrow {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(10px); /* 下に10px動く */
    }
}