/* style/faq.css */

/* Base styles for the FAQ page */
.page-faq {
    font-family: Arial, sans-serif;
    background-color: #0D0E12; /* Background color from custom配色 */
    color: #FFF3E6; /* Text Main color from custom配色 */
    line-height: 1.6;
}

.page-faq__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Top Section (Hero-like) */
.page-faq__top-section {
    padding-top: 10px; /* Small top padding as per rules */
    padding-bottom: 60px;
    text-align: center;
    background-color: #0D0E12;
}

.page-faq__main-title {
    font-size: clamp(2.2rem, 4vw, 3.5rem); /* Using clamp for responsive H1 font size */
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: #FFF3E6;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    letter-spacing: -0.02em;
}

.page-faq__description {
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto 30px;
    color: #FFF3E6;
}

.page-faq__cta-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    margin-top: 30px;
}

.page-faq__btn {
    display: inline-block;
    padding: 14px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    cursor: pointer;
    max-width: 100%; /* Ensure buttons are responsive */
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
}

.page-faq__btn--primary {
    background: linear-gradient(180deg, #FFA53A 0%, #D96800 100%); /* Custom button gradient */
    color: #FFF3E6; /* Text Main color */
    border: none;
    box-shadow: 0 4px 15px rgba(255, 140, 26, 0.4);
}

.page-faq__btn--primary:hover {
    background: linear-gradient(180deg, #D96800 0%, #FFA53A 100%);
    box-shadow: 0 6px 20px rgba(255, 140, 26, 0.6);
    transform: translateY(-2px);
}

.page-faq__btn--secondary {
    background-color: transparent;
    color: #FFA53A; /* Auxiliary color */
    border: 2px solid #A84F0C; /* Border color from custom配色 */
}

.page-faq__btn--secondary:hover {
    background-color: rgba(255, 165, 58, 0.1);
    color: #FFB04D; /* Glow color */
    border-color: #FFB04D;
    transform: translateY(-2px);
}

/* Content Section - FAQ List */
.page-faq__content-section {
    padding: 60px 0;
    background-color: #0D0E12; /* Background color from custom配色 */
}

.page-faq__dark-section {
    background-color: #17191F; /* Card BG color for this section */
    color: #FFF3E6; /* Text Main color */
}

.page-faq__section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    color: #FFF3E6;
}

.page-faq__faq-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 900px;
    margin: 0 auto;
}

.page-faq__faq-item {
    background-color: #17191F; /* Card BG color */
    border: 1px solid #A84F0C; /* Border color */
    border-radius: 10px;
    overflow: hidden;
    color: #FFF3E6; /* Text Main color */
    transition: all 0.3s ease;
}

.page-faq__faq-item[open] {
    box-shadow: 0 0 20px rgba(255, 140, 26, 0.3);
}

.page-faq__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    background-color: #17191F;
    color: #FFF3E6;
    user-select: none;
    position: relative;
    list-style: none; /* Hide default marker */
}

.page-faq__faq-question::-webkit-details-marker {
    display: none; /* Hide default marker for webkit browsers */
}

.page-faq__faq-question .page-faq__faq-toggle {
    font-size: 1.8rem;
    line-height: 1;
    transition: transform 0.3s ease;
    color: #FFA53A;
    margin-left: 15px;
}

.page-faq__faq-item[open] .page-faq__faq-question .page-faq__faq-toggle {
    transform: rotate(45deg);
}

.page-faq__faq-answer {
    padding: 0 25px 20px;
    font-size: 1rem;
    color: #FFF3E6;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
}

.page-faq__faq-item[open] .page-faq__faq-answer {
    max-height: 1000px; /* Large enough to show content */
    padding-top: 15px;
}

.page-faq__faq-answer p {
    margin-bottom: 15px;
}

.page-faq__faq-answer p:last-child {
    margin-bottom: 0;
}

.page-faq__image-wrapper {
    margin: 25px 0;
    text-align: center;
    background-color: #0D0E12;
    padding: 10px;
    border-radius: 8px;
}

.page-faq__image {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    margin: 0 auto;
}

.page-faq__image-caption {
    font-size: 0.9rem;
    color: #FFA53A;
    margin-top: 10px;
}

/* Promo Section */
.page-faq__promo-section {
    padding: 60px 0;
    text-align: center;
    background-color: #0D0E12;
    border-top: 1px solid #A84F0C;
}

.page-faq__promo-title {
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 700;
    margin-bottom: 20px;
    color: #FFF3E6;
}

.page-faq__promo-description {
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto 30px;
    color: #FFF3E6;
}

/* Responsive Styles */
/* Tablet & Mobile (max-width: 1024px) */
@media (max-width: 1024px) {
    .page-faq__main-title {
        font-size: clamp(2rem, 5vw, 3rem);
    }
    .page-faq__description, .page-faq__promo-description {
        font-size: 1rem;
    }
    .page-faq__faq-question {
        font-size: 1.1rem;
        padding: 18px 20px;
    }
    .page-faq__faq-answer {
        font-size: 0.95rem;
        padding: 0 20px 18px;
    }
    .page-faq__btn {
        padding: 12px 25px;
        font-size: 1rem;
    }
}

/* Mobile specific styles (max-width: 768px) */
@media (max-width: 768px) {
    /* Top Section */
    .page-faq__top-section {
        padding-top: 10px !important; /* Ensure small top padding */
        padding-bottom: 40px;
    }
    .page-faq__main-title {
        font-size: clamp(1.8rem, 7vw, 2.5rem);
        padding: 0 15px; /* Add horizontal padding to prevent overflow */
    }
    .page-faq__description {
        font-size: 0.95rem;
        padding: 0 15px;
    }
    .page-faq__cta-buttons {
        flex-direction: column; /* Stack buttons vertically */
        gap: 10px;
        padding: 0 15px; /* Add horizontal padding to button container */
    }
    .page-faq__btn {
        width: 100% !important; /* Force full width */
        max-width: 100% !important; /* Ensure buttons are responsive */
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding-left: 15px; /* Ensure text padding within button */
        padding-right: 15px;
    }

    /* Content Section */
    .page-faq__content-section,
    .page-faq__promo-section {
        padding: 40px 0;
    }
    .page-faq__section-title,
    .page-faq__promo-title {
        font-size: clamp(1.5rem, 6vw, 2rem);
        padding: 0 15px;
        margin-bottom: 30px;
    }
    .page-faq__faq-list {
        gap: 10px;
        padding: 0 15px; /* Add horizontal padding to FAQ list */
    }
    .page-faq__faq-question {
        font-size: 1rem;
        padding: 15px 20px;
    }
    .page-faq__faq-answer {
        font-size: 0.9rem;
        padding: 0 20px 15px;
    }
    .page-faq__image-wrapper {
        margin: 20px 0;
        padding: 5px;
    }

    /* Universal image responsive rule for content area */
    .page-faq img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
    }

    /* All containers that might hold images or content */
    .page-faq__container,
    .page-faq__faq-item,
    .page-faq__image-wrapper,
    .page-faq__content-section,
    .page-faq__promo-section,
    .page-faq__faq-answer {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        /* Padding handled by specific elements, avoid double padding here */
    }
}