/* FAQW - Mobile Category Popup + Arial Font + Color #241960 */
.faqw-container {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: 'Arial', Helvetica, sans-serif;
    color: #334155;
    position: relative;
    scroll-margin-top: 120px; /* Helps with fixed headers */
}

#faqw-top {
    scroll-margin-top: 120px;
}

.faqw-hero {
    color: #fff;
    text-align: center;
    padding: 20px 20px;
    border-radius: 24px;
    margin-bottom: 60px;
}

.faqw-hero h1 {
    font-size: 48px;
    margin: 0 0 16px;
    font-weight: 800;
    font-family: "Be Vietnam Pro", Sans-serif;
    padding: 0 0 20px 0;
}

.faqw-hero p {
    font-size: 20px;
    margin: 0 0 30px;
    opacity: .95;
}

#faqw-search {
    width: 100%;
    max-width: 600px;
    padding: 28px 24px;
    font-size: 18px;
    border: none;
    border-radius: 23px;
    outline: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
    margin: 0 auto 30px;
    display: block;
    font-family: 'Arial', Helvetica, sans-serif;
}

/* Desktop Layout */
.faqw-layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 50px;
    align-items: start;
}

/* Mobile: Hide sidebar, show button */
.faqw-mobile-cat-btn {
    display: none;
    background: #241960;
    color: #fff;
    border: none;
    padding: 16px 24px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 14px;
    cursor: pointer;
    width: 100%;
    max-width: 400px;
    margin: 0 auto 30px;
    box-shadow: 0 8px 25px rgba(36, 25, 96, .3);
}

.faqw-mobile-cat-btn:hover {
    background: #1a1140;
}

/* Sidebar - Desktop only */
.faqw-sidebar {
    background: #fff;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,.1);
    position: sticky;
    top: 20px;
    height: fit-content;
}

.faqw-catlist {
    list-style: none;
    padding: 0;
    margin: 0;
}

.faqw-cat {
    padding: 18px 20px;
    margin-bottom: 10px;
    background: #f8fafc;
    border-radius: 14px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    transition: .3s;
}

.faqw-cat:hover {
    background: #e6e0ff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(36, 25, 96, .2);
}

.faqw-cat.active {
    background: #241960;
    color: #fff;
    font-weight: 600;
}

.faqw-cat .count {
    background: rgba(255,255,255,.3);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.faqw-cat.active .count {
    background: rgba(255,255,255,.4);
}

.faqw-main {
    background: #fff;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,.1);
    min-height: 500px;
}

.faqw-item {
    border-bottom: 1px solid #eee;
    position: relative;
}

.faqw-question {
    padding: 25px 50px 25px 30px;
    font-size: 18px;
    font-weight: 600;
    background: #f8fafc;
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: all .3s;
    margin: 30px 0 -30px 0;
}

.faqw-question:hover {
    background: #efebff;
    border-radius: 10px;
}

/* FIXED: Corrected selector */
.faqw-item.open .faqw-question {
    background: #241960;
    color: #fff;
    border-radius: 10px;
}

/* Custom Arrows */
.faqw-question::after {
    content: "";
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    background: url('/wp-content/uploads/2026/01/Union.png') center/contain no-repeat;
    transition: transform .3s ease;
}

.faqw-item.open .faqw-question::after {
    background: url('/wp-content/uploads/2026/01/Union-1.png') center/contain no-repeat;
}

/* Smooth Accordion */
.faqw-answer-wrapper {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.35s ease;
    overflow: hidden;
}

.faqw-item.open .faqw-answer-wrapper {
    grid-template-rows: 1fr;
}

.faqw-answer {
    min-height: 0;
    overflow: hidden;
    font-size: 16px;
    line-height: 1.8;
    color: #444;
    padding: 0 30px 30px 30px;
    font-family: system-ui;
}

.faqw-item.open .faqw-answer {
    padding-top: 45px;
}

/* MOBILE CATEGORY POPUP */
#faqpop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,.6);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

#faqpop.active {
    display: flex;
}

.faqpop-content {
    background: #fff;
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
    animation: popIn 0.3s ease;
}

.faqpop-header {
    background: #241960;
    color: #fff;
    padding: 20px;
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    position: relative;
}

.faqpop-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    width: 40px;
    height: 40px;
}

.faqpop-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.faqpop-body .faqw-cat {
    margin-bottom: 12px;
    padding: 16px 20px;
}

/* Animations */
@keyframes popIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* RESPONSIVE */
@media (max-width: 992px) {
    .faqw-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .faqw-mobile-cat-btn {
        display: block;
    }
    .faqw-sidebar {
        display: none;
    }
    .faqw-main {
        order: 1;
    }
}

@media (max-width: 480px) {
    .faqw-question {
        padding-right: 60px;
        font-size: 17px;
    }
    .faqw-question::after {
        right: 18px;
        width: 20px;
        height: 20px;
    }
}