/**
 * よくあるご質問（固定ページ: faq）
 * 読み込み: inc/theme-faq.php
 */

.entry-content .faq-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    margin: 0 0 40px;
    padding: 0;
    list-style: none;
}

@media (max-width: 768px) {
    .entry-content .faq-nav {
        gap: 8px 16px;
    }
}

.entry-content .faq-nav > li {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* 本文リンク色（.style-hawaiian 等のサイト共通装飾）より優先させる */
.entry-content ul.faq-nav > li > a {
    color: #333;
    font-size: 1.5rem;
    text-decoration: none;
    transition: 0.3s;
}

.entry-content ul.faq-nav > li > a:hover {
    color: #fc6719;
}

.faq {
    margin: 24px 0 56px;
    scroll-margin-top: 120px;
}

#main h2.faq__ttl {
    margin-bottom: 24px;
}

@media (max-width: 768px) {
    #main h2.faq__ttl {
        margin-bottom: 16px;
        padding: 8px;
        font-size: 1.9rem;
        letter-spacing: 1px;
    }
}

.entry-content .faq__item {
    margin: 0 0 16px;
    border-radius: 10px;
    background: #fefad9;
    overflow: hidden;
}

.faq__item > summary {
    display: block;
    position: relative;
    padding: 16px 56px 16px 64px;
    font-size: 1.7rem;
    font-weight: 700;
    line-height: 1.6;
    list-style: none;
    cursor: pointer;
}

@media (max-width: 768px) {
    .faq__item > summary {
        padding: 16px 40px 16px 48px;
        font-size: 1.5rem;
    }
}

.faq__item > summary::-webkit-details-marker {
    display: none;
}

.faq__item > summary::before,
.faq__a::before {
    position: absolute;
    left: 16px;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-family: Arial, sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
}

@media (max-width: 768px) {
    .faq__item > summary::before,
    .faq__a::before {
        left: 12px;
        width: 28px;
        height: 28px;
        font-size: 1.4rem;
    }
}

.faq__item > summary::before {
    content: "Q";
    top: 50%;
    transform: translateY(-50%);
    background: #fc6719;
}

/* 開閉アイコン（下向き矢印 → 上向き） */
.faq__item > summary::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 24px;
    width: 10px;
    height: 10px;
    border-right: 2px solid #fc6719;
    border-bottom: 2px solid #fc6719;
    transform: translateY(-75%) rotate(45deg);
    transition: 0.3s;
}

@media (max-width: 768px) {
    .faq__item > summary::after {
        right: 16px;
    }
}

.faq__item[open] > summary::after {
    transform: translateY(-25%) rotate(-135deg);
}

/* WordPress 本体の「.is-layout-flow > :last-child { margin-block-end: 0 }」より優先させる */
.entry-content .faq__item > .faq__a {
    position: relative;
    margin: 0 16px 16px;
    padding: 16px 24px 16px 56px;
    border-radius: 8px;
    background: #fff;
    font-size: 1.5rem;
    line-height: 1.9;
}

@media (max-width: 768px) {
    .entry-content .faq__item > .faq__a {
        margin: 0 8px 8px;
        padding: 16px 16px 16px 48px;
        font-size: 1.4rem;
    }
}

.faq__a::before {
    content: "A";
    top: 16px;
    left: 12px;
    background: #4eb1e5;
}

@media (max-width: 768px) {
    .faq__a::before {
        left: 8px;
    }
}

.entry-content .faq__a p,
.entry-content .faq__a ul {
    margin: 0 0 0.6em;
}

.entry-content .faq__a > :last-child {
    margin-bottom: 0;
}

.entry-content .faq .faq__a a {
    color: #fc6719;
    text-decoration: underline;
}
