/* FAQ Page Styles */
/* 注意: カラー変数は variables.css で定義されています */

@import "variables.css";

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--color-bg-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
}

/* ナビゲーション */
nav {
    position: fixed;
    width: 100%;
    background: var(--color-header-bg);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    top: 0;
    left: 0;
}

nav .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--color-header-text);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav a {
    text-decoration: none;
    color: var(--color-header-text);
    transition: color 0.3s;
}

nav a:hover {
    color: var(--primary-color);
}

/* ログインボタンスタイル */
nav a.nav-login {
    background: var(--gradient-1);
    color: white !important;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
}

nav a.nav-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
}

/* 769px～1200px: index.cssの影響を打ち消し、通常のデスクトップメニューを表示 */
@media (min-width: 769px) and (max-width: 1200px) {
    .mobile-menu-toggle {
        display: none !important;
    }

    nav ul {
        display: flex !important;
        position: static !important;
        background: none !important;
        flex-direction: row !important;
        top: auto !important;
        right: auto !important;
        width: auto !important;
        padding: 0 !important;
        gap: 2rem !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        max-height: none !important;
        overflow: visible !important;
        backdrop-filter: none !important;
    }

    nav ul li {
        margin: 0 !important;
        padding: 0 !important;
        width: auto !important;
    }

    nav ul li a {
        display: inline !important;
        padding: 0 !important;
        width: auto !important;
        border-bottom: none !important;
        color: var(--text-secondary) !important;
        font-size: inherit !important;
        line-height: inherit !important;
        margin: 0 !important;
    }

    /* ログインボタンは例外としてスタイルを保持 */
    nav ul li a.nav-login {
        display: inline-flex !important;
        padding: 8px 16px !important;
        background: var(--gradient-1) !important;
        color: white !important;
        border-radius: 6px !important;
        font-weight: 500 !important;
        align-items: center !important;
        gap: 6px !important;
    }

    nav ul li a:hover {
        color: var(--primary-color) !important;
        background: none !important;
        padding-left: 0 !important;
    }

    nav ul li a.nav-login:hover {
        transform: translateY(-2px) !important;
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4) !important;
        background: var(--gradient-1) !important;
        padding-left: 16px !important;
    }

    /* フッターのグリッドレイアウトを保持 */
    .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
    }
}

/* モバイル対応 */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
        position: absolute;
        right: 2rem;
        top: 50%;
        transform: translateY(-50%);
    }

    nav ul {
        display: none;
        position: fixed;
        top: 60px;
        right: 0;
        width: 180px;
        background: rgba(85, 80, 80, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 5px 0;
        gap: 0;
        box-shadow: -2px 0 10px rgba(0,0,0,0.2);
        z-index: 1000;
        max-height: calc(100vh - 60px);
        overflow-y: auto;
        border-radius: 0 0 0 8px;
    }

    nav ul.active {
        display: flex;
    }

    nav ul li {
        margin: 0;
        padding: 0;
        width: 100%;
    }

    nav ul li a {
        display: block;
        padding: 10px 20px !important;
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        color: white !important;
        font-size: 14px !important;
        line-height: 1.4 !important;
        transition: all 0.2s;
        margin: 0 !important;
    }

    nav ul li a:hover,
    nav ul li a:active {
        background: rgba(255,255,255,0.15);
        padding-left: 25px !important;
    }

    nav ul li:last-child a {
        border-bottom: none;
    }
}

.faq {
    flex: 0 0 auto;
    padding: 100px 8px 40px;
    display: block;
}

.faq .container {
    max-width: 100%;
    margin: 0 auto;
    width: 100%;
    display: block;
    padding: 0;
}

.faq-answer {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 40px;
    font-size: 1rem;
    line-height: 1.8;
    margin-top: 0;
    max-height: none !important;
    overflow: visible !important;
}

.section-title {
    font-size: 2.5rem;
    font-weight: bold;
    text-align: center;
    color: var(--color-text-primary);
    margin-bottom: 40px;
    padding-bottom: 0;
    border-bottom: none;
}

/* 青線や装飾を削除 */
.section-title::after {
    display: none;
}

.faq-answer p {
    margin-bottom: 12px;
}

.faq-answer ul {
    margin: 8px 0 8px 20px;
    line-height: 1.8;
}

.faq-answer table {
    width: 100%;
    margin: 20px 0;
    border-collapse: collapse;
}

.faq-answer table th,
.faq-answer table td {
    padding: 12px;
    border: 1px solid #e2e8f0;
}

.faq-answer table thead tr {
    background: #f7fafc;
}

/* ボタンスタイル */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--gradient-1);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

/* フッタースタイル */
footer {
    background-color: var(--color-footer-bg);
    color: var(--color-footer-text);
    padding: 30px 0 30px;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-section h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: white;
}

.footer-section p {
    color: #cbd5e0;
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section ul li a {
    color: #cbd5e0;
    text-decoration: none;
    transition: color 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    margin-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e0;
    font-size: 0.9rem;
}

/* FAQトップに戻るボタンのコンテナ */
.faq-back-button-container {
    margin: 15px auto 10px;
    text-align: center;
    padding: 8px;
    width: 100%;
    max-width: 1200px;
    clear: both;
    background: transparent;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .section-title {
        font-size: 1.8rem;
    }

    .faq {
        padding: 80px 8px 30px;
    }

    .faq-answer {
        padding: 20px;
    }
}

/* フッターは550px以下のみ1列にする */
@media (max-width: 550px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1.5rem;
    }

    .faq-answer {
        font-size: 0.95rem;
    }
}

/* ダークモード対応 */
@media (prefers-color-scheme: dark) {
    .faq-answer {
        background: #2d2d2d;
        color: #b0b0b0;
    }

    .faq-answer h1,
    .faq-answer h2,
    .faq-answer h3,
    .faq-answer h4,
    .faq-answer h5,
    .faq-answer h6 {
        color: #ffffff;
    }

    .faq-answer table th,
    .faq-answer table td {
        border-color: #444444;
    }

    .faq-answer table thead tr {
        background: #3a3a3a;
    }

    /* 情報ボックスのダークモード対応 */
    .faq-answer div[style*="background: #f7fafc"] {
        background: #3a3a3a !important;
    }

    .faq-answer div[style*="background: #f7fafc"] p {
        color: #e0e0e0 !important;
    }

    .faq-answer div[style*="background: #f7fafc"] ul {
        color: #b0b0b0 !important;
    }

    .faq-answer div[style*="background: #f7fafc"] li {
        color: #b0b0b0 !important;
    }
}
