/* 
Author of this APU SFF 2.0 Website/Project/System/Maintainer: Khoo Lay Bin TP083872 (https://khoolb.com), Khoo Lay Yang TP070513 (https://www.dkly.net)
Date: 2025-01-28
Description: FAQ Styling Sheet
*/

html {
    scroll-behavior: smooth;
    height: auto;
    overflow-y: visible;
    overflow-x: visible;
}

body.faq-page {
    height: auto;
    overflow-y: visible;
    overflow-x: visible;
}

.faq-page .icon {
    filter: invert(1);
}

.faq-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 20px 60px;
    background: linear-gradient(180deg, rgba(74, 222, 128, 0.08) 0%, transparent 100%);
    overflow: hidden;
}

.faq-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(74, 222, 128, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.faq-hero h1 {
    font-size: 42px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 12px 0;
    letter-spacing: -0.5px;
    position: relative;
    z-index: 1;
}

.faq-hero h1 span {
    color: var(--green-primary);
}

.faq-hero p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 30px 0;
    max-width: 450px;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

/* ===== Search Box - Glass Effect ===== */
.faq-searchbox {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 550px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.faq-searchbox:focus-within {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(74, 222, 128, 0.4);
    box-shadow: 0 0 20px rgba(74, 222, 128, 0.1);
}

.faq-searchbox .icon {
    width: 20px;
    height: 20px;
    opacity: 0.5;
    flex-shrink: 0;
}

.faq-searchbox:focus-within .icon {
    opacity: 0.8;
}

.faq-searchbox input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-size: 15px;
}

.faq-searchbox input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* ===== Main Content Layout ===== */
.faq-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 60px;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 40px;
    /* Ensure relative positioning for children */
    position: relative;
}

@media (max-width: 900px) {
    .faq-content {
        grid-template-columns: 1fr;
    }
}

.faq-sidebar {
    position: sticky;
    top: 85px;
    height: fit-content;
    align-self: start;
}

.sidebar-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 20px;
    backdrop-filter: blur(10px);
}

.sidebar-header {
    font-size: 10px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.35);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 16px 0;
    padding: 0 12px;
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.category-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.9);
}

.category-item.active {
    background: rgba(74, 222, 128, 0.12);
    color: var(--green-primary);
}

.category-item .icon {
    width: 18px;
    height: 18px;
    opacity: 0.7;
}

.category-item.active .icon {
    filter: invert(72%) sepia(57%) saturate(445%) hue-rotate(85deg) brightness(95%) contrast(96%);
}

/* ===== FAQ Main Area ===== */
.faq-main {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* ===== Section Headers ===== */
.section-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.section-title {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    white-space: nowrap;
}

.section-title .icon {
    width: 24px;
    height: 24px;
    margin-right: 8px;
    vertical-align: middle;
    opacity: 0.8;
}

.section-line {
    height: 1px;
    flex: 1;
    background: rgba(255, 255, 255, 0.12);
}

/* ===== FAQ Cards - Accordion Style ===== */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.faq-card.active {
    background: rgba(74, 222, 128, 0.05);
    border-color: rgba(74, 222, 128, 0.15);
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.faq-question h3 {
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
    line-height: 1.4;
}

.faq-card.active .faq-question h3 {
    color: var(--green-primary);
}

.faq-toggle {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.faq-toggle .icon {
    width: 12px;
    height: 12px;
    opacity: 0.6;
    transition: transform 0.3s ease;
}

.faq-card.active .faq-toggle {
    background: rgba(74, 222, 128, 0.15);
}

.faq-card.active .faq-toggle .icon {
    transform: rotate(180deg);
    filter: invert(72%) sepia(57%) saturate(445%) hue-rotate(85deg) brightness(95%) contrast(96%);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-card.active .faq-answer {
    max-height: 500px;
}

.faq-answer-content {
    padding: 0 24px 24px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.7;
}

.faq-answer-content p {
    margin: 0;
}

.faq-answer-content ul {
    margin: 12px 0 0 0;
    padding-left: 20px;
}

.faq-answer-content li {
    margin-bottom: 8px;
}

.faq-answer-content li:last-child {
    margin-bottom: 0;
}

/* ===== Contact Card ===== */
.contact-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 28px;
    text-align: center;
    backdrop-filter: blur(10px);
}

.contact-card .icon-wrapper {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    background: rgba(74, 222, 128, 0.1);
    border-radius: 50%;
}

.contact-card .icon-wrapper .icon {
    width: 24px;
    height: 24px;
    filter: invert(72%) sepia(57%) saturate(445%) hue-rotate(85deg) brightness(95%) contrast(96%);
}

.contact-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 8px 0;
}

.contact-card p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    margin: 0 0 20px 0;
    line-height: 1.5;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 100px;
    background: var(--green-primary);
    color: #000000;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}

.contact-btn:hover {
    background: var(--green-secondary);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(74, 222, 128, 0.25);
}

.contact-btn .icon {
    width: 16px;
    height: 16px;
    filter: none;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .faq-sidebar {
        position: relative;
        top: 0;
    }

    .sidebar-card {
        padding: 16px;
    }

    .category-list {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }

    .category-item {
        padding: 10px 14px;
        font-size: 13px;
    }
}

@media (max-width: 600px) {
    .faq-hero h1 {
        font-size: 32px;
    }

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

    .section-title {
        font-size: 18px;
    }

    .faq-question {
        padding: 16px 18px;
    }

    .faq-question h3 {
        font-size: 14px;
    }

    .faq-answer-content {
        padding: 0 18px 18px;
        font-size: 13px;
    }
}