/* FAQ Filter Bar - Modern Styling */
.faq-filter-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
    margin-bottom: 3rem;
    padding: 1.2rem;
    background: linear-gradient(145deg, rgba(12, 20, 25, 0.7), rgba(9, 15, 20, 0.9));
    border-radius: 12px;
    border: 1px solid rgba(0, 255, 255, 0.1);
    box-shadow: 0 10px 30px -15px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Add subtle background pattern */
.faq-filter-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(rgba(0, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 20px 20px, 30px 30px;
    background-position: 0 0, 15px 15px;
    opacity: 0.5;
    pointer-events: none;
}

/* Light accent line at top */
.faq-filter-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.3), transparent);
}

.filter-btn {
    background: rgba(0, 20, 25, 0.5);
    border: 1px solid rgba(0, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.85);
    padding: 0.7rem 1.4rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    z-index: 1;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Button hover effect with glow */
.filter-btn:hover {
    background: rgba(0, 255, 255, 0.1);
    border-color: rgba(0, 255, 255, 0.5);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px -5px rgba(0, 255, 255, 0.3);
    color: #ffffff;
}

/* Ripple effect on click */
.filter-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(0, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%, -50%);
    transform-origin: 50% 50%;
    z-index: -1;
}

.filter-btn:focus::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 1;
    }

    100% {
        transform: scale(20, 20);
        opacity: 0;
    }
}

.filter-btn.active {
    background: linear-gradient(135deg, rgba(0, 210, 255, 0.9), rgba(0, 255, 255, 0.8));
    color: rgba(0, 40, 50, 1);
    border-color: transparent;
    box-shadow:
        0 0 0 1px rgba(0, 255, 255, 0.15) inset;
    font-weight: 600;
    transform: translateY(-2px);
}

/* Count badge for categories */
.filter-btn .count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    margin-left: 8px;
    padding: 0 6px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.3);
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.filter-btn:hover .count {
    background: rgba(0, 0, 0, 0.5);
}

.filter-btn.active .count {
    background: rgba(0, 40, 50, 0.8);
    color: rgba(0, 255, 255, 1);
}

/* Search Bar Styles */
.search-container {
    margin-bottom: 2rem;
}

.search-wrapper {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
    background: linear-gradient(145deg, rgba(12, 20, 25, 0.7), rgba(9, 15, 20, 0.9));
    border: 1px solid rgba(0, 255, 255, 0.1);
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 10px 30px -15px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}

.search-wrapper:hover,
.search-wrapper:focus-within {
    border-color: rgba(0, 255, 255, 0.4);
    box-shadow: 0 12px 35px -15px rgba(0, 255, 255, 0.25);
}

.search-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(rgba(0, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 20px 20px, 30px 30px;
    background-position: 0 0, 15px 15px;
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
}

.search-input {
    width: 100%;
    background: transparent;
    border: none;
    padding: 1.2rem 1.2rem 1.2rem 3.5rem;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    outline: none;
    position: relative;
    z-index: 1;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 300;
}

.search-icon {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary);
    font-size: 1rem;
    z-index: 1;
}

.search-clear {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    opacity: 0;
    pointer-events: none;
    z-index: 2;
}

.search-clear.visible {
    opacity: 1;
    pointer-events: all;
}

.search-clear:hover {
    background: rgba(0, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.no-results {
    text-align: center;
    padding: 3rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px dashed rgba(0, 255, 255, 0.2);
    margin-top: 2rem;
    display: none;
}

.no-results i {
    font-size: 2rem;
    color: var(--secondary);
    opacity: 0.5;
    margin-bottom: 1rem;
}

/* Highlight search matches */
.highlight {
    background: rgba(0, 255, 255, 0.15);
    color: var(--secondary);
    padding: 0 2px;
    border-radius: 2px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .faq-filter-bar {
        padding: 1rem;
        gap: 0.6rem;
    }

    .filter-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .search-container {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 576px) {
    .faq-filter-bar {
        padding: 0.8rem;
        gap: 0.4rem;
    }

    .filter-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
    }

    .filter-btn .count {
        min-width: 18px;
        height: 18px;
        font-size: 0.7rem;
    }

    .search-container {
        margin-bottom: 1rem;
    }

    .search-wrapper {
        border-radius: 30px;
    }
}

/* Updated FAQ item styles to match the modern look */
.faq-item {
    margin-bottom: 1.2rem;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 255, 255, 0.08);
    background: linear-gradient(145deg, rgba(12, 20, 25, 0.7), rgba(9, 15, 20, 0.8));
    box-shadow: 0 5px 15px -5px rgba(0, 0, 0, 0.2);
}

.faq-question {
    padding: 1.2rem 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.faq-question:hover {
    background-color: rgba(0, 255, 255, 0.05);
}

.faq-question:active {
    background-color: rgba(0, 255, 255, 0.1);
}

.faq-question h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.faq-question i {
    font-size: 0.9rem;
    color: var(--secondary);
    transition: all 0.3s ease;
    background: rgba(0, 255, 255, 0.1);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.faq-answer {
    height: 0;
    overflow: hidden;
    padding: 0 1.5rem;
    background: rgba(0, 10, 15, 0.4);
    border-top: 1px solid rgba(0, 255, 255, 0);
    transition: height .45s ease, padding .3s ease;
    will-change: height;
}

.faq-answer.is-open {
    /* Let JS set explicit pixel height during animation; after transition we set height:auto */
    padding: 1.2rem 1.5rem;
    border-top: 1px solid rgba(0, 255, 255, .08);
}

.faq-answer.animating {
    overflow: hidden;
    /* enforce clipping while animating */
}

.faq-answer p {
    margin-top: 0;
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.6;
}

.faq-item:hover {
    box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.3);
    border-color: rgba(0, 255, 255, 0.2);
}

.faq-item:hover .faq-question h3 {
    color: var(--secondary);
}

.faq-question:hover i {
    background: rgba(0, 255, 255, 0.2);
    transform: rotate(90deg);
}