/* =========================================
   変数定義 (カラーパレット・設定)
   ========================================= */
   :root {
    --primary-color: #00AEEF;
    --primary-hover: #0095cd;
    --accent-yellow: #FFD93D;
    --accent-pink: #FF6B6B;
    --text-main: #333333;
    --text-sub: #666666;
    --text-white: #ffffff;
    --bg-body: #ffffff;
    --bg-light: #f4f9fc;
    --input-border: #ddd;
    --input-focus-ring: rgba(0, 174, 239, 0.3);
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 30px;
    --section-padding: 80px 0;
}

/* =========================================
   リセット & ベーススタイル
   ========================================= */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'M PLUS Rounded 1c', "Hiragino Kaku Gothic ProN", sans-serif;
    color: var(--text-main);
    background-color: var(--bg-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    padding-top: 80px; /* ヘッダー固定分の余白 */
}

h1, h2, h3, h4, p { margin: 0; }
a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; padding: 0; margin: 0; }

.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =========================================
   コンポーネント
   ========================================= */
.btn {
    display: inline-block;
    padding: 12px 32px;
    font-weight: 700;
    border-radius: 9999px;
    cursor: pointer;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
}
.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}
.btn-primary { background-color: var(--primary-color); color: var(--text-white); }
.btn-primary:hover { background-color: var(--primary-hover); }
.btn-secondary { background-color: var(--bg-body); color: var(--primary-color); border: 2px solid var(--primary-color); }
.btn-sm { padding: 8px 20px; font-size: 0.9rem; }
.btn-wide { width: 100%; max-width: 300px; padding: 16px; font-size: 1.1rem; }
.badge {
    background-color: var(--accent-yellow);
    color: var(--text-main);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 10px;
}

/* =========================================
   ヘッダー
   ========================================= */
.header {
    position: fixed; /* stickyからfixedに変更して安定化 */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #eee;
    padding: 15px 0;
    height: 80px; /* 高さ固定 */
    display: flex;
    align-items: center;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-main);
    z-index: 2001; /* スマホメニューより上に */
    position: relative;
}

/* =========================================
   ナビゲーション (共通 & PC)
   ========================================= */
/* ハンバーガーボタン（デフォルト非表示） */
.mobile-menu-btn {
    display: none; 
    background: none;
    border: none;
    cursor: pointer;
    width: 44px; /* タップしやすいサイズ */
    height: 44px;
    position: relative;
    z-index: 2001; /* メニューより手前 */
    margin-left: auto;
}
.mobile-menu-btn span {
    display: block;
    width: 26px;
    height: 3px;
    background: var(--primary-color);
    margin: 5px auto;
    transition: 0.3s;
    border-radius: 2px;
}
/* 開いた時のバツ印アニメーション */
.mobile-menu-btn.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.mobile-menu-btn.open span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* --- PC表示 (769px以上) --- */
@media (min-width: 769px) {
    .nav {
        display: block !important;
    }
    
    .nav ul {
        display: flex;
        gap: 30px;
        align-items: center;
    }

    .nav a {
        font-weight: bold;
        color: var(--text-main);
        padding: 10px 0;
    }
    .nav a:hover { color: var(--primary-color); }

    /* ドロップダウン制御 */
    .nav-item { position: relative; }
    
    .nav-cat-label {
        font-weight: bold;
        cursor: default;
        padding-right: 15px;
        position: relative;
    }
    .nav-cat-label::after {
        content: '▼';
        font-size: 0.6rem;
        color: #ccc;
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
    }

    /* サブメニュー */
    .nav-sub {
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%) translateY(10px);
        background: white;
        min-width: 200px;
        box-shadow: 0 5px 20px rgba(0,0,0,0.1);
        border-radius: 8px;
        padding: 10px 0;
        opacity: 0;
        visibility: hidden;
        transition: 0.2s;
        z-index: 100;
        display: block !important; /* 強制ブロック */
    }
    .nav-item:hover .nav-sub {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
    }
    .nav-sub li a {
        display: block;
        padding: 10px 20px;
        font-weight: normal;
        font-size: 0.9rem;
    }
    .nav-sub li a:hover {
        background: var(--bg-light);
    }
}

/* --- スマホ表示 (768px以下) --- */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block; /* ボタン表示 */
    }

    .nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(255,255,255,0.98);
        padding-top: 80px; /* ヘッダーの高さ分下げる */
        transform: translateX(100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
        z-index: 2000;
    }
    
    .nav.open {
        transform: translateX(0);
        box-shadow: -5px 0 20px rgba(0,0,0,0.1);
    }

    /* リストを縦並びに強制 */
    .nav ul, .nav-list {
        display: block; 
        padding: 0 20px 40px;
    }

    .nav-item {
        border-bottom: 1px solid #eee;
    }

    /* カテゴリラベル */
    .nav-cat-label {
        display: block;
        padding: 15px 0;
        font-weight: bold;
        font-size: 1.1rem;
        position: relative;
        cursor: pointer;
    }
    .nav-cat-label::after {
        content: '+';
        position: absolute;
        right: 0;
        font-size: 1.5rem;
        color: var(--primary-color);
        transition: 0.3s;
    }
    .nav-item.sub-open .nav-cat-label::after {
        transform: rotate(45deg);
    }

    /* サブメニュー（アコーディオン） */
    .nav-sub {
        display: none;
        padding-left: 10px;
        background: #f9f9f9;
        border-radius: 8px;
        margin-bottom: 10px;
    }
    .nav-item.sub-open .nav-sub {
        display: block;
        animation: fadeIn 0.3s;
    }

    .nav-sub li a {
        display: block;
        padding: 12px 10px;
        color: var(--text-sub);
        font-size: 1rem;
        border-bottom: 1px dashed #eee;
    }
    .nav-sub li:last-child a { border-bottom: none; }
    
    @keyframes fadeIn {
        from { opacity: 0; transform: translateY(-5px); }
        to { opacity: 1; transform: translateY(0); }
    }
}

/* =========================================
   ヒーローセクション
   ========================================= */
.hero { padding: 40px 0 10px; overflow: hidden; }
.hero-inner { display: flex; align-items: center; gap: 40px; }
.hero-content { flex: 1; }
.hero-title { font-size: 3.5rem; line-height: 1.2; margin-bottom: 20px; }
.highlight { color: var(--primary-color); background: linear-gradient(transparent 70%, var(--accent-yellow) 70%); padding: 0 5px; }
.hero-text { font-size: 1.1rem; color: var(--text-sub); margin-bottom: 30px; }
.hero-btns { display: flex; gap: 15px; }
.hero-visual { flex: 1; position: relative; height: 400px; display: flex; justify-content: center; align-items: center; }

.circle { position: absolute; border-radius: 50%; opacity: 0.8; }
.circle-1 { width: 300px; height: 300px; background-color: var(--primary-color); top: 0; right: 20px; z-index: -1; }
.circle-2 { width: 200px; height: 200px; background-color: var(--accent-yellow); bottom: 0; left: 40px; z-index: -1; }

.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: var(--border-radius-md);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    font-weight: bold;
    font-size: 1.5rem;
    display: flex; flex-direction: column; gap: 10px;
    transform: rotate(-5deg);
}

/* =========================================
   汎用セクション & グリッド
   ========================================= */
.section { padding: 40px 0 80px; }
.bg-light { background-color: var(--bg-light); }
.section-header { text-align: center; margin-bottom: 60px; }
.section-title { font-size: 2rem; margin-bottom: 10px; position: relative; display: inline-block; }
.section-title::after { content: ''; display: block; width: 60px; height: 4px; background-color: var(--primary-color); border-radius: 4px; margin: 10px auto 0; }

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.card {
    background: #fff; padding: 40px 30px; border-radius: var(--border-radius-md);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05); transition: transform 0.3s; text-align: center;
}
.feature-card:hover { transform: translateY(-10px); }
.icon-box {
    width: 80px; height: 80px; line-height: 80px; border-radius: 50%;
    background: #eee; margin: 0 auto 20px; font-size: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}
.color-blue { background: #E0F7FA; color: #006064; }
.color-yellow { background: #FFF9C4; color: #FBC02D; }
.color-pink { background: #FFEBEE; color: #C62828; }
.card h4 { margin-bottom: 15px; font-size: 1.25rem; }
.card p { color: var(--text-sub); font-size: 0.95rem; }

/* =========================================
   フォーム
   ========================================= */
.form-wrapper {
    max-width: 700px; margin: 0 auto; background: #fff; padding: 50px;
    border-radius: var(--border-radius-lg); box-shadow: 0 10px 40px rgba(0,0,0,0.05); border: 1px solid #f0f0f0;
}
.form-group { margin-bottom: 25px; }
.form-group label { display: block; margin-bottom: 10px; font-weight: 700; color: var(--text-main); font-size: 1rem; }
.required { background: var(--accent-pink); color: white; font-size: 0.7rem; padding: 2px 6px; border-radius: 4px; margin-left: 8px; vertical-align: middle; }
.form-input {
    width: 100%; padding: 15px; font-size: 16px; border: 2px solid var(--input-border);
    border-radius: 12px; background-color: #fcfcfc; transition: all 0.3s ease; font-family: inherit; appearance: none;
}
.form-input:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 4px var(--input-focus-ring); background-color: #fff; }
.form-input::placeholder { color: #ccc; }
.select-wrapper { position: relative; }
.select-wrapper::after {
    content: '▼'; font-size: 0.8rem; color: var(--text-sub); position: absolute; right: 20px; top: 50%; transform: translateY(-50%); pointer-events: none;
}
.form-btn-area { margin-top: 40px; text-align: center; }

/* =========================================
   フッター
   ========================================= */
.footer { background: var(--text-main); color: white; padding: 30px 0; text-align: center; font-size: 0.9rem; }

/* =========================================
   レスポンシブ微調整 (SPレイアウト)
   ========================================= */
@media (max-width: 768px) {
    .header-inner { padding: 0 20px; }
    
    .hero-inner { flex-direction: column-reverse; text-align: center; }
    .hero-title { font-size: 2rem; }
    .hero-btns { justify-content: center; }
    .hero-visual { height: 250px; width: 100%; }
    
    .form-wrapper { padding: 30px 20px; }
}

/* =========================================
   広告エリアの共通スタイル
   ========================================= */

.ad-area {
    width: 100%;
    max-width: 1080px; /* サイト幅に合わせる */
    margin: 0px auto 0px; /* 上下の余白 */
    text-align: center;
    padding: 0 20px;
    box-sizing: border-box;
}