/* ============================================================
   CODEWORD HACKATHON FAQ
   Theme:
   Purple #4F46D8
   Dark Purple #3932B8
   Orange #F6A623
   Dark #172033
   Light Background #F5F7FB
   ============================================================ */


/* ============================================================
   ROOT / BASE
============================================================ */

.faq-hero,
.faq-search,
.faq-section,
.ask-question {
    font-family: 'Poppins', sans-serif;
}

.faq-section *,
.faq-search *,
.ask-question *,
.faq-hero * {
    box-sizing: border-box;
}


/* ============================================================
   FAQ HERO
============================================================ */

.faq-hero {
    position: relative;

    padding: 125px 20px 75px;

    text-align: center;

    background:
        radial-gradient(
            circle at 15% 20%,
            rgba(79, 70, 216, 0.18),
            transparent 30%
        ),
        radial-gradient(
            circle at 85% 80%,
            rgba(246, 166, 35, 0.12),
            transparent 28%
        ),
        linear-gradient(
            135deg,
            #172033 0%,
            #202a45 55%,
            #263149 100%
        );

    color: #ffffff;

    overflow: hidden;
}


/* Decorative glow */

.faq-hero::before {
    content: "";

    position: absolute;

    width: 280px;
    height: 280px;

    top: -150px;
    left: -80px;

    border-radius: 50%;

    background: rgba(79, 70, 216, 0.16);

    filter: blur(10px);
}

.faq-hero::after {
    content: "";

    position: absolute;

    width: 250px;
    height: 250px;

    right: -100px;
    bottom: -150px;

    border-radius: 50%;

    background: rgba(246, 166, 35, 0.12);

    filter: blur(10px);
}


.faq-hero h1 {
    position: relative;
    z-index: 2;

    margin: 0 0 12px;

    font-size: 46px;

    line-height: 1.2;

    font-weight: 800;

    letter-spacing: -0.8px;

    color: #ffffff;
}

.faq-hero h1::after {
    content: "";

    display: block;

    width: 70px;
    height: 4px;

    margin: 18px auto 0;

    border-radius: 10px;

    background: linear-gradient(
        90deg,
        #4F46D8,
        #F6A623
    );
}

.faq-hero p {
    position: relative;
    z-index: 2;

    max-width: 650px;

    margin: 20px auto 0;

    font-size: 16px;

    line-height: 1.7;

    color: #cbd2df;
}


/* ============================================================
   FAQ SEARCH
============================================================ */

.faq-search {
    padding: 60px 20px;

    background: #ffffff;

    text-align: center;

    border-bottom: 1px solid #edf0f5;
}

.faq-search-box {
    max-width: 850px;

    margin: 0 auto;
}

.faq-search-box h2 {
    margin: 0 0 22px;

    font-size: 30px;

    font-weight: 800;

    color: #172033;
}

.faq-search-box h2::after {
    content: "";

    display: block;

    width: 45px;
    height: 3px;

    margin: 12px auto 0;

    border-radius: 10px;

    background: #F6A623;
}


/* ============================================================
   SEARCH BOX
============================================================ */

.search-container {
    position: relative;

    max-width: 620px;

    margin: 0 auto;
}

.search-container input {
    width: 100%;

    height: 56px;

    padding: 0 55px 0 20px;

    border: 1px solid #e1e6ef;

    border-radius: 14px;

    outline: none;

    background: #f8f9fc;

    color: #273247;

    font-family: 'Poppins', sans-serif;

    font-size: 14px;

    box-shadow:
        0 8px 25px rgba(23, 32, 51, 0.05);

    transition:
        border-color 0.25s ease,
        background 0.25s ease,
        box-shadow 0.25s ease;
}

.search-container input::placeholder {
    color: #98a1b2;
}

.search-container input:focus {
    border-color: #4F46D8;

    background: #ffffff;

    box-shadow:
        0 0 0 4px rgba(79, 70, 216, 0.10),
        0 10px 30px rgba(23, 32, 51, 0.08);
}

.search-container i {
    position: absolute;

    right: 20px;
    top: 50%;

    transform: translateY(-50%);

    color: #4F46D8;

    font-size: 16px;

    pointer-events: none;
}


/* ============================================================
   FAQ SECTION
============================================================ */

.faq-section {
    padding: 70px 20px 85px;

    background: #F5F7FB;
}

.faq-container {
    max-width: 950px;

    margin: 0 auto;
}


/* ============================================================
   FAQ TITLE
============================================================ */

.faq-title {
    margin: 0 0 38px;

    text-align: center;

    font-size: 30px;

    font-weight: 800;

    color: #172033;
}

.faq-title::after {
    content: "";

    display: block;

    width: 55px;
    height: 4px;

    margin: 13px auto 0;

    border-radius: 10px;

    background: linear-gradient(
        90deg,
        #4F46D8,
        #F6A623
    );
}


/* ============================================================
   FAQ CARD
============================================================ */

.faq-item {
    position: relative;

    margin-bottom: 16px;

    overflow: hidden;

    background: #ffffff;

    border: 1px solid #e1e6ef;

    border-radius: 15px;

    border-left: 4px solid #4F46D8;

    box-shadow:
        0 7px 25px rgba(23, 32, 51, 0.055);

    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

.faq-item:hover {
    transform: translateY(-2px);

    border-left-color: #F6A623;

    box-shadow:
        0 12px 32px rgba(23, 32, 51, 0.09);
}


/* ============================================================
   FAQ QUESTION
============================================================ */

.faq-question {
    width: 100%;

    min-height: 70px;

    padding: 19px 22px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    border: none;

    outline: none;

    background: #ffffff;

    color: #273247;

    cursor: pointer;

    text-align: left;

    font-family: 'Poppins', sans-serif;

    font-size: 15px;

    font-weight: 700;

    line-height: 1.5;

    transition:
        background 0.25s ease,
        color 0.25s ease;
}

.faq-question:hover {
    background: #f8f8ff;

    color: #4F46D8;
}

.faq-question i {
    flex-shrink: 0;

    width: 32px;
    height: 32px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #eeeeff;

    color: #4F46D8;

    font-size: 12px;

    transition:
        transform 0.3s ease,
        background 0.3s ease,
        color 0.3s ease;
}


/* If JS adds active class */

.faq-question.active {
    color: #4F46D8;

    background: #fbfbff;
}

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

    background: #4F46D8;

    color: #ffffff;
}


/* ============================================================
   FAQ ANSWER
============================================================ */

.faq-answer {
    max-height: 0;

    overflow: hidden;

    background: #f8f9fc;

    border-top: 1px solid transparent;

    transition:
        max-height 0.4s ease,
        border-color 0.3s ease;
}

.faq-answer p {
    margin: 0;

    padding: 18px 24px 22px;

    color: #5B6577;

    font-family: 'Poppins', sans-serif;

    font-size: 14px;

    font-weight: 400;

    line-height: 1.8;
}


/* ============================================================
   DYNAMIC FAQ TEXT
============================================================ */

.faq-question-text {
    margin: 0 0 10px;

    color: #273247;

    font-size: 15px;

    font-weight: 600;
}

.faq-answer-text {
    margin: 0;

    padding: 16px 18px;

    border-radius: 10px;

    background: #ffffff;

    border: 1px solid #edf0f5;

    color: #5B6577;

    font-size: 14px;

    line-height: 1.7;
}


/* ============================================================
   ASK QUESTION SECTION
============================================================ */

.ask-question {
    padding: 80px 20px;

    background:
        radial-gradient(
            circle at 10% 30%,
            rgba(79, 70, 216, 0.15),
            transparent 30%
        ),
        radial-gradient(
            circle at 90% 70%,
            rgba(246, 166, 35, 0.10),
            transparent 28%
        ),
        #172033;

    color: #ffffff;
}

.ask-container {
    max-width: 760px;

    margin: 0 auto;

    text-align: center;
}

.ask-container h2 {
    margin: 0 0 10px;

    font-size: 32px;

    font-weight: 800;

    color: #ffffff;
}

.ask-container h2::after {
    content: "";

    display: block;

    width: 50px;
    height: 4px;

    margin: 14px auto 0;

    border-radius: 10px;

    background: #F6A623;
}

.ask-container > p {
    margin: 18px 0 30px;

    color: #cbd2df;

    font-size: 14px;

    line-height: 1.7;
}


/* ============================================================
   QUESTION FORM
============================================================ */

.question-form {
    padding: 32px;

    text-align: left;

    background: #ffffff;

    border: 1px solid rgba(255, 255, 255, 0.12);

    border-radius: 20px;

    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.18);
}


/* ============================================================
   FORM ROW
============================================================ */

.form-row {
    display: flex;

    gap: 18px;

    margin-bottom: 0;
}

.form-row .input-group {
    flex: 1;
}


/* ============================================================
   INPUT GROUP
============================================================ */

.input-group {
    width: 100%;

    margin-bottom: 18px;
}


/* ============================================================
   FORM INPUTS
============================================================ */

.question-form input,
.question-form textarea {
    width: 100%;

    padding: 14px 15px;

    border: 1px solid #e1e6ef;

    border-radius: 10px;

    outline: none;

    background: #f8f9fc;

    color: #273247;

    font-family: 'Poppins', sans-serif;

    font-size: 13px;

    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        background 0.25s ease;
}

.question-form input {
    height: 50px;
}

.question-form textarea {
    min-height: 125px;

    resize: vertical;
}

.question-form input::placeholder,
.question-form textarea::placeholder {
    color: #98a1b2;
}

.question-form input:focus,
.question-form textarea:focus {
    border-color: #4F46D8;

    background: #ffffff;

    box-shadow:
        0 0 0 4px rgba(79, 70, 216, 0.09);
}


/* ============================================================
   INPUT ERROR
============================================================ */

.question-form input.input-error,
.question-form textarea.input-error {
    border-color: #EF4444;

    background: #fff8f8;

    box-shadow:
        0 0 0 3px rgba(239, 68, 68, 0.07);
}

.error {
    display: block;

    margin-top: 5px;

    color: #EF4444;

    font-size: 11px;

    font-weight: 500;

    line-height: 1.4;
}


/* ============================================================
   SUBMIT BUTTON
============================================================ */

.question-form button {
    width: 100%;

    min-height: 50px;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 8px;

    padding: 13px 25px;

    border: none;

    border-radius: 11px;

    background: linear-gradient(
        135deg,
        #4F46D8,
        #3932B8
    );

    color: #ffffff;

    font-family: 'Poppins', sans-serif;

    font-size: 14px;

    font-weight: 700;

    cursor: pointer;

    box-shadow:
        0 8px 22px rgba(79, 70, 216, 0.22);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        background 0.25s ease;
}

.question-form button:hover {
    transform: translateY(-2px);

    background: linear-gradient(
        135deg,
        #F6A623,
        #D98C08
    );

    color: #172033;

    box-shadow:
        0 10px 25px rgba(246, 166, 35, 0.25);
}

.question-form button:active {
    transform: translateY(0);
}


/* ============================================================
   FORM MESSAGE
============================================================ */

#formMessage {
    margin: 16px 0 0;

    min-height: 20px;

    font-size: 13px;

    font-weight: 600;

    line-height: 1.5;
}


/* ============================================================
   SUCCESS / ERROR MESSAGE SUPPORT
============================================================ */

#formMessage.success {
    color: #22C55E;
}

#formMessage.error {
    color: #EF4444;
}


/* ============================================================
   RESPONSIVE - TABLET
============================================================ */

@media (max-width: 900px) {

    .faq-hero {
        padding: 115px 20px 65px;
    }

    .faq-hero h1 {
        font-size: 38px;
    }

    .faq-search {
        padding: 50px 20px;
    }

    .faq-section {
        padding: 60px 20px 70px;
    }

    .ask-question {
        padding: 70px 20px;
    }

}


/* ============================================================
   RESPONSIVE - MOBILE
============================================================ */

@media (max-width: 768px) {

    .faq-hero {
        padding: 105px 18px 60px;
    }

    .faq-hero h1 {
        font-size: 32px;

        letter-spacing: -0.4px;
    }

    .faq-hero p {
        font-size: 14px;
    }


    .faq-search {
        padding: 45px 18px;
    }

    .faq-search-box h2 {
        font-size: 24px;
    }


    .faq-section {
        padding: 50px 15px 60px;
    }

    .faq-title {
        font-size: 25px;

        margin-bottom: 28px;
    }


    .faq-question {
        min-height: 64px;

        padding: 16px 17px;

        font-size: 14px;
    }

    .faq-question i {
        width: 29px;
        height: 29px;

        font-size: 11px;
    }


    .faq-answer p {
        padding: 16px 18px 19px;

        font-size: 13px;
    }


    .ask-question {
        padding: 60px 15px;
    }

    .ask-container h2 {
        font-size: 26px;
    }

    .ask-container > p {
        font-size: 13px;
    }


    .question-form {
        padding: 22px 18px;

        border-radius: 16px;
    }


    .form-row {
        flex-direction: column;

        gap: 0;
    }


    .question-form input,
    .question-form textarea {
        font-size: 13px;
    }

}


/* ============================================================
   SMALL MOBILE
============================================================ */

@media (max-width: 480px) {

    .faq-hero {
        padding: 95px 15px 50px;
    }

    .faq-hero h1 {
        font-size: 27px;
    }

    .faq-hero p {
        font-size: 13px;
    }


    .faq-search-box h2 {
        font-size: 22px;
    }

    .search-container input {
        height: 52px;

        font-size: 13px;
    }


    .faq-title {
        font-size: 23px;
    }


    .faq-question {
        padding: 14px;

        gap: 12px;

        font-size: 13px;
    }

    .faq-question i {
        width: 27px;
        height: 27px;

        min-width: 27px;
    }


    .faq-answer-text {
        padding: 13px;

        font-size: 13px;
    }


    .question-form {
        padding: 18px 15px;
    }

    .question-form button {
        font-size: 13px;
    }

}