/* ============================================================
   Homepage FAQ Section – Frequently Asked Questions
   Prefix: hfaq-
   Accordion with smooth CSS transitions, no external libraries.
   ============================================================ */

/* --- Section wrapper --- */
.hfaq-section {
    padding: 70px 0;
    background-color: var(--light-bg);
}

/* --- Section header --- */
.hfaq-header {
    text-align: center;
    margin-bottom: 40px;
}

.hfaq-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0 0 10px;
    line-height: 1.5;
}

.hfaq-subtitle {
    font-size: 1.05rem;
    color: var(--text-gray);
    margin: 0;
    line-height: 1.6;
}

/* --- FAQ list container --- */
.hfaq-list {
    max-width: 880px;
    margin: 0 auto;
}

/* --- Individual FAQ item --- */
.hfaq-item {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 12px;
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.hfaq-item.open {
    border-color: var(--secondary-color);
    box-shadow: var(--shadow-sm);
}

/* --- Question button --- */
.hfaq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: right;
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary-color);
    line-height: 1.6;
    gap: 16px;
    transition: color 0.25s ease;
}

.hfaq-question:hover {
    color: var(--secondary-color);
}

/* Question text */
.hfaq-question span {
    flex: 1;
}

/* --- Arrow icon --- */
.hfaq-arrow {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: var(--secondary-color);
    transition: transform 0.3s ease;
}

.hfaq-item.open .hfaq-arrow {
    transform: rotate(180deg);
}

/* --- Answer panel (collapsed by default) --- */
.hfaq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
    padding: 0 24px;
}

.hfaq-item.open .hfaq-answer {
    max-height: 800px;
    padding: 0 24px 24px;
}

/* Answer text */
.hfaq-answer p {
    font-size: 1rem;
    line-height: 1.85;
    color: var(--text-gray);
    margin: 0 0 10px;
}

.hfaq-answer p:last-child {
    margin-bottom: 0;
}

/* Answer lists */
.hfaq-answer ul {
    list-style: none;
    padding: 0;
    margin: 8px 0;
}

.hfaq-answer ul li {
    position: relative;
    padding-right: 24px;
    margin-bottom: 8px;
    color: var(--text-dark);
    line-height: 1.75;
    font-size: 0.98rem;
}

.hfaq-answer ul li::before {
    content: "✓";
    position: absolute;
    right: 0;
    color: var(--secondary-color);
    font-weight: bold;
}

/* Bold text inside answers */
.hfaq-answer strong {
    color: var(--primary-color);
}

/* ============================================================
   Responsive
   ============================================================ */

/* Tablet */
@media (max-width: 1024px) {
    .hfaq-section {
        padding: 60px 0;
    }

    .hfaq-title {
        font-size: 1.5rem;
    }

    .hfaq-question {
        padding: 18px 20px;
        font-size: 1rem;
    }

    .hfaq-answer {
        padding: 0 20px;
    }

    .hfaq-item.open .hfaq-answer {
        padding: 0 20px 20px;
    }
}

/* Mobile */
@media (max-width: 640px) {
    .hfaq-section {
        padding: 45px 0;
    }

    .hfaq-title {
        font-size: 1.25rem;
    }

    .hfaq-subtitle {
        font-size: 0.95rem;
    }

    .hfaq-header {
        margin-bottom: 28px;
    }

    .hfaq-question {
        padding: 16px 16px;
        font-size: 0.95rem;
        gap: 12px;
    }

    .hfaq-answer {
        padding: 0 16px;
    }

    .hfaq-item.open .hfaq-answer {
        padding: 0 16px 18px;
    }

    .hfaq-answer p {
        font-size: 0.93rem;
        line-height: 1.75;
    }

    .hfaq-answer ul li {
        font-size: 0.93rem;
    }
}
