/* ==========================================================================
   ヘッダーコンポーネント
   ========================================================================== */
#main-header {
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem var(--container-padding);
    max-width: var(--container-width);
    margin: 0 auto;
}

/* ロゴデザイン */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 10px;
}

.logo::before {
    content: '東';
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: 800;
    font-size: 1.2rem;
}

.logo-main {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1.1;
}

.logo-sub {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 2px;
}

/* --- デスクトップ用ナビゲーション設定 --- */
.main-nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.95rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color);
}

.nav-cta {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white !important;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-size: 0.9rem;
    box-shadow: var(--shadow-sm);
}

/* モバイル用コンポーネントの初期状態（PCでは非表示） */
.mobile-menu-btn {
    display: none;
}

.mobile-menu {
    display: none;
}

/* --- モバイル対応設定（992px以下） --- */
@media (max-width: 992px) {
    /* PC用ナビを隠す */
    .main-nav {
        display: none;
    }

    /* ハンバーガーボタンを表示 */
    .mobile-menu-btn {
        display: block;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0.5rem;
        z-index: 3500; /* 三本線ボタン自体を最前面に保持 */
    }

    .menu-icon, .menu-icon::before, .menu-icon::after {
        display: block;
        width: 28px;
        height: 3px;
        background-color: var(--primary-color);
        border-radius: 3px;
        position: relative;
        transition: all 0.3s ease;
    }

    .menu-icon::before, .menu-icon::after {
        content: '';
        position: absolute;
    }

    .menu-icon::before { top: -8px; }
    .menu-icon::after { bottom: -8px; }

    /* モバイルメニュー本体：横揺れ防止と重なり順の修正 */
    .mobile-menu {
        display: block;
        position: fixed;
        top: 0;
        right: -100%; /* 初期位置：右外側に完全に隠す */
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: white;
        box-shadow: var(--shadow-lg);
        padding: 5rem 2rem;
        z-index: 3000; /* CTAボタン(2000)より上に配置 */
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        visibility: hidden; /* 閉じている時は要素を無効化 */
    }

    .mobile-menu.active {
        right: 0; /* 画面内にスライドイン */
        visibility: visible;
    }

    /* モバイルメニュー展開時のオーバーレイ */
    .mobile-menu-overlay {
        z-index: 2500 !important; /* メニュー(3000)とCTA(2000)の間に配置 */
    }

    .mobile-nav ul {
        list-style: none;
    }

    .mobile-nav li {
        margin-bottom: 1.5rem;
    }

    .mobile-nav .nav-link {
        display: block;
        font-size: 1.1rem;
        padding-bottom: 0.5rem;
        border-bottom: 1px solid var(--light-gray);
    }
}

/* ==========================================================================
   フッター (PCでの視認性最適化)
   ========================================================================== */
#main-footer {
    background-color: var(--secondary-color);
    color: rgba(255, 255, 255, 0.8);
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 2rem;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.footer-section h3 {
    color: white;
    font-size: 1rem;
    margin-bottom: 1rem;
    border-left: 3px solid var(--accent-color);
    padding-left: 0.8rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    display: inline-block;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.75rem;
}

/* タブレット用フッター調整 */
@media (max-width: 992px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

/* スマホ用フッター調整 */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-section h3 {
        display: inline-block;
        text-align: left;
    }
}

/* ==========================================================================
   追加コンポーネント (FAQ / 料金表等)
   ========================================================================== */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 2rem 0;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

.responsive-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    min-width: 600px;
}

.responsive-table th {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem;
    text-align: left;
}

.responsive-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--light-gray);
}