.faq {
    display: flex;
    flex-direction: column;
}

.faq-topics {
    padding: 0 20px;
    justify-content: center;
    max-width: 790px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin: 26px auto 30px auto;
}

.faq-topic {
    color: #072AC8;
    padding: 4px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.3s ease;
    border: 1px solid #072AC8;
}

.faq-topic.active {
    background-color: #072AC8;
    color: #fff;
}

.faq-description {
    margin-bottom: 25px;
}

.faq-item {
    border-bottom: 1px solid #C2D3FF;
}

/* Button that toggles the FAQ */
.faq-question {
    all: unset; /* reset all default button styles */
    background: none;
    border: none;
    width: 100%;
    padding: 15px 0;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.faq-question p {
    font-family: 'RegularFont', sans-serif;
    color: #072AC8;
}

.faq-question .chevron {
    margin: 0 5px;
    color: #072AC8;
    transition: transform 0.4s ease;
}

.faq-question.active .chevron {
    transform: rotate(180deg);
}

/* Answer section with smooth open effect */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0;
    color: rgba(11, 16, 40, 0.70);
}

.faq-answer p {
    margin: 0;
    padding: 10px 0 15px 0;
}

/* Button below FAQ list */
.faq-container .normal-btn {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

@media screen and (max-width: 500px) {
    .faq-topics {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch; /* for smooth scrolling on iOS */
        margin: 20px 0 30px 0;
        padding: 0 10px;
        justify-content: flex-start;
        max-width: 100%;
    }

    .faq-topics::-webkit-scrollbar {
        display: none; /* optional: hides scrollbar on WebKit browsers */
    }

    .faq-topic {
        flex: 0 0 auto; /* prevent shrinking */
        margin-bottom: 2px;
    }

    .faq-topic:first-child {
        margin-left: 10px;
    }

    .faq-topic:last-child {
        margin-right: 10px;
    }
}
