/* FAQ Container */
.mastercard-faq-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.faq-title {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 40px;
    color: #000;
    letter-spacing: -0.5px;
}

/* Search Bar */
.faq-search-wrapper {
    margin-bottom: 40px;
    position: relative;
}

.faq-search-input {
    width: 100%;
    padding: 14px 18px 14px 45px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    background: #f8f8f8;
    transition: all 0.3s ease;
}

.faq-search-input:focus {
    outline: none;
    background: white;
    border-color: #000;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.faq-search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 18px;
}

/* ===== MAIN CATEGORIES GRID (Box Layout - Like Figma) ===== */
.faq-main-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
}

.faq-category-box {
    padding: 25px 20px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 12px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.faq-category-box:hover {
    border-color: #ff5722;
    box-shadow: 0 4px 12px rgba(255, 87, 34, 0.15);
    transform: translateY(-2px);
}

.faq-category-box.active {
    border-color: #000;
    background: #000;
    color: white;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.faq-box-icon {
    font-size: 32px;
    line-height: 1;
}

.faq-box-name {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: inherit;
}

/* ===== SUBCATEGORIES (Dynamic) ===== */
.faq-sub-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    min-height: 40px;
    padding: 10px 0;
}

.faq-sub-btn {
    padding: 8px 15px;
    border: 1px solid #e0e0e0;
    background: white;
    border-radius: 18px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    color: #333;
}

.faq-sub-btn:hover {
    border-color: #ff5722;
    color: #ff5722;
}

.faq-sub-btn.active {
    background: #ff5722;
    color: white;
    border-color: #ff5722;
}

/* ===== FAQ ITEMS ===== */
.faq-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: none;
    background: white;
}

.faq-item.show {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.faq-item:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.faq-question {
    padding: 16px 18px;
    background: #f9f9f9;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    transition: background 0.3s ease;
}

.faq-question:hover {
    background: #f0f0f0;
}

.faq-item.open .faq-question {
    background: #fff;
}

.faq-question-text {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    flex: 1;
    margin-right: 10px;
    line-height: 1.4;
}

.faq-toggle-icon {
    font-size: 16px;
    color: #666;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.faq-item.open .faq-toggle-icon {
    transform: rotate(180deg);
    color: #ff5722;
}

.faq-answer {
    padding: 18px;
    background: white;
    color: #555;
    line-height: 1.8;
    display: none;
    border-top: 1px solid #eee;
    font-size: 14px;
}

.faq-item.open .faq-answer {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ===== NO RESULTS ===== */
.faq-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.faq-no-results-icon {
    font-size: 56px;
    margin-bottom: 20px;
    opacity: 0.4;
}

.faq-no-results p {
    font-size: 16px;
    margin: 0;
    color: #999;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .mastercard-faq-wrapper {
        padding: 30px 15px;
    }

    .faq-title {
        font-size: 28px;
        margin-bottom: 30px;
    }

    .faq-main-categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 15px;
        margin-bottom: 30px;
    }

    .faq-category-box {
        padding: 20px 15px;
        gap: 10px;
    }

    .faq-box-icon {
        font-size: 28px;
    }

    .faq-box-name {
        font-size: 13px;
    }

    .faq-sub-categories {
        gap: 8px;
        margin-bottom: 20px;
    }

    .faq-sub-btn {
        padding: 6px 12px;
        font-size: 12px;
    }

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

    .faq-answer {
        padding: 14px;
        font-size: 13px;
    }

    .faq-no-results-icon {
        font-size: 40px;
    }

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

@media (max-width: 480px) {
    .faq-title {
        font-size: 24px;
        margin-bottom: 25px;
    }

    .faq-main-categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
        gap: 12px;
    }

    .faq-category-box {
        padding: 15px 12px;
    }

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

    .faq-box-name {
        font-size: 12px;
    }

    .faq-sub-btn {
        padding: 5px 10px;
        font-size: 11px;
    }
}




/* ===== GROUPED VIEW HEADINGS (All tab) ===== */
.faq-group-heading {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 30px 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f0f0;
}
