/* FAQ ページのスタイル - シンプルデザイン */

/* 基本レイアウト */
.section_padding {
    padding: 80px 0 60px;
}

.base_width {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
}

/* h2タイトルは共通クラス common_h2_title を使用 */
/* layout.css の .common_h2 スタイルが適用される */

/* ページ内ナビゲーションは共通クラス subpage_page_nai_nav を使用 */
/* layout.css の .subpage_page_nai_nav スタイルが適用される */

/* FAQ専用スタイル */
.faq_box_body {
    margin-bottom: 40px;
}

.faq_box {
    padding: 0 0 0 50px;
    position: relative;
    margin-bottom: 30px;
}

.faq_box_q {
    font-size: 1.1em;
    margin-bottom: 20px;
    font-weight: bold;
    color: #3F76D6;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.faq_box_q:hover {
    background: #e9ecef;
    border-color: #3F76D6;
}

.faq_box_q.active {
    background: #3F76D6;
    color: #fff;
    border-color: #3F76D6;
}

.faq_box_q::after {
    content: "\f107";
    font-family: FontAwesome;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
}

.faq_box_q.active::after {
    transform: translateY(-50%) rotate(180deg);
}

.faq_box:before {
    position: absolute;
    display: block;
    content: "Q";
    font-family: Arial, Helvetica, sans-serif;
    color: #fff;
    left: 0;
    top: 0;
    height: 30px;
    line-height: 30px;
    width: 30px;
    text-align: center;
    font-style: italic;
    font-size: 20px;
    font-weight: bold;
    background: #3F76D6;
    border-radius: 50%;
}

.faq_box .faq_box:before {
    content: "A";
    background: #555;
}

.faq_box .faq_box_body {
    background: #eef3fb;
    border: 1px solid #c1cfe7;
    padding: 30px;
    border-radius: 8px;
    margin-top: 15px;
    display: none;
}

.faq_box .faq_box_body p {
    margin-bottom: 15px;
    line-height: 1.8;
}

.faq_box .faq_box_body p:last-child {
    margin-bottom: 0;
}

.faq_box .faq_box_body ul,
.faq_box .faq_box_body ol {
    margin: 15px 0;
    padding-left: 20px;
}

.faq_box .faq_box_body li {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* ページ内リンクナビゲーション - シンプル化 */
.page_anchor_nav {
    margin: 0 0 60px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.page_anchor_nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.page_anchor_nav a {
    display: block;
    padding: 16px 20px;
    background: #ffffff;
    color: #495057;
    text-decoration: none;
    border-radius: 6px;
    text-align: center;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    border: 1px solid #dee2e6;
    margin-bottom: 6px;
}

.page_anchor_nav a:last-child {
    margin-bottom: 0;
}

.page_anchor_nav a:hover {
    background: #3F76D6;
    color: white;
    border-color: #3F76D6;
}

.page_anchor_nav a.active {
    background: #3F76D6;
    color: white;
    border-color: #3F76D6;
}

/* FAQ セクション */
.faq-section {
    margin-bottom: 80px;
    scroll-margin-top: 120px;
}

.faq-section:last-child {
    margin-bottom: 0;
}

/* FAQ リスト */
.faq-list {
    margin-top: 30px;
}

/* FAQ カード - シンプルデザイン */
.faq-card {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-card:hover {
    border-color: #3F76D6;
    box-shadow: 0 2px 8px rgba(63, 118, 214, 0.1);
}

/* FAQ 質問部分 - シンプル化 */
.faq-question {
    padding: 20px 60px 20px 60px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.6;
    color: #495057;
    background: #ffffff;
    border-bottom: 1px solid #dee2e6;
    transition: all 0.3s ease;
    position: relative;
    user-select: none;
}

.faq-question:hover {
    background: #f8f9fa;
    color: #3F76D6;
}

.faq-question.active {
    background: #f8f9fa;
    color: #3F76D6;
    border-bottom-color: #3F76D6;
}

/* Q アイコン */
.faq-question::before {
    content: "Q";
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 700;
    font-size: 16px;
    color: #fff;
    background: #3F76D6;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-style: normal;
}

/* + / - アイコン */
.faq-question::after {
    content: "+";
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
    color: #6c757d;
    font-size: 20px;
    font-weight: bold;
    line-height: 1;
}

.faq-question.active::after {
    content: "−";
    color: #3F76D6;
}

/* FAQ 回答部分 */
.faq-answer {
    padding: 0;
    background: #ffffff;
    display: none;
}

.faq-answer p {
    padding: 20px 20px 20px 60px;
    margin: 0;
    line-height: 1.8;
    color: #495057;
    position: relative;
}

/* A アイコン */
.faq-answer p::before {
    content: "A";
    position: absolute;
    left: 20px;
    top: 20px;
    font-weight: 700;
    font-size: 16px;
    color: #fff;
    background: #6c757d;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-style: normal;
}

/* セクションハイライト効果 - シンプル化 */
.faq-section.highlighted {
    animation: highlightPulse 2s ease-in-out;
}

@keyframes highlightPulse {
    0%, 100% { background-color: transparent; }
    50% { background-color: rgba(63, 118, 214, 0.05); }
}

/* トップに戻るボタン - シンプル化 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #3F76D6;
    color: white;
    border: none;
    border-radius: 8px;
    width: 50px;
    height: 50px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1000;
    font-size: 18px;
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: #2c5aa0;
    transform: translateY(-2px);
}

.back-to-top:active {
    transform: translateY(0);
}

/* レスポンシブ対応 */
@media screen and (max-width: 768px) {
    .section_padding {
        padding: 60px 0 40px;
    }
    
    .base_width {
        padding: 0 20px;
    }
    
    .page_anchor_nav {
        padding: 15px;
        margin-bottom: 40px;
    }
    
    .page_anchor_nav a {
        padding: 14px 15px;
        font-size: 13px;
    }
    
    .faq-section {
        margin-bottom: 60px;
    }
    
    .faq-question {
        padding: 16px 50px 16px 50px;
        font-size: 15px;
    }
    
    .faq-question::before {
        width: 24px;
        height: 24px;
        font-size: 14px;
        left: 16px;
    }
    
    .faq-question::after {
        right: 16px;
        font-size: 18px;
    }
    
    .faq-answer p {
        padding: 16px 16px 16px 50px;
        font-size: 14px;
    }
    
    .faq-answer p::before {
        width: 24px;
        height: 24px;
        font-size: 14px;
        left: 16px;
        top: 16px;
    }
    
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
        font-size: 16px;
    }
}

@media screen and (max-width: 640px) {
    .faq-question {
        padding: 14px 45px 14px 45px;
        font-size: 14px;
    }
    
    .faq-question::before {
        width: 22px;
        height: 22px;
        font-size: 12px;
        left: 14px;
    }
    
    .faq-question::after {
        right: 14px;
        font-size: 16px;
    }
    
    .faq-answer p {
        padding: 14px 14px 14px 45px;
        font-size: 13px;
    }
    
    .faq-answer p::before {
        width: 22px;
        height: 22px;
        font-size: 12px;
        left: 14px;
        top: 14px;
    }
    
    .page_anchor_nav a {
        padding: 12px 12px;
        font-size: 12px;
    }
    
    /* スマートフォン用プルダウン */
    .faq-select {
        font-size: 14px;
        padding: 12px 16px;
        border: 1px solid #dee2e6;
        border-radius: 6px;
        background: #ffffff;
        color: #495057;
        transition: all 0.3s ease;
        width: 100%;
        box-sizing: border-box;
        appearance: none;
        background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
        background-repeat: no-repeat;
        background-position: right 12px center;
        background-size: 24px;
        padding-right: 40px;
        height: 56px !important;
        line-height: 1.4;
    }
    
    .faq-select:focus {
        border-color: #3F76D6;
        outline: none;
        box-shadow: 0 0 0 3px rgba(63, 118, 214, 0.1);
    }
    
    /* UIkitのline-height設定を上書き */
    .uk-select.faq-select:not(select) {
        line-height: 1.4 !important;
    }
}

/* アンカーポイントのスタイル調整 */
.anchor_point {
    height: 1px;
    margin-top: -120px;
    padding-top: 120px;
}

/* プリント用の設定 */
@media print {
    .page_anchor_nav,
    .back-to-top {
        display: none;
    }
    
    .faq-card {
        border: 1px solid #ccc;
        break-inside: avoid;
        box-shadow: none;
    }
    
    .faq-answer {
        display: block !important;
    }
    
    .faq-question::after {
        display: none;
    }
}

/* アクセシビリティ対応 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .faq-section.highlighted {
        animation: none;
        background-color: rgba(63, 118, 214, 0.05);
    }
}

/* フォーカス状態のスタイル */
.faq-question:focus,
.page_anchor_nav a:focus,
.back-to-top:focus {
    outline: 2px solid #3F76D6;
    outline-offset: 2px;
}

/* 高コントラストモード対応 */
@media (prefers-contrast: high) {
    .faq-card {
        border: 2px solid #000;
    }
    
    .faq-question {
        border-bottom: 2px solid #000;
    }
    
    .page_anchor_nav a {
        border: 2px solid #000;
    }
}

