/* FAQ Section Styles
   Created for Saql Al Mawahib Schools by PUIUX
   May 2025
*/

.faq-section {
    background-color: var(--white-color);
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.faq-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%2324bbbd' fill-opacity='0.05' fill-rule='evenodd'%3E%3Ccircle cx='3' cy='3' r='3'/%3E%3Ccircle cx='13' cy='13' r='3'/%3E%3C/g%3E%3C/svg%3E");
    z-index: 0;
    opacity: 0.5;
}

.faq-container {
    position: relative;
    z-index: 1;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.faq-header {
    text-align: center;
    margin-bottom: 3rem;
}

.faq-title {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-weight: 800;
}

.faq-description {
    font-size: 1.1rem;
    color: var(--dark-gray);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Accordion Styles */
.faq-item {
    background-color: var(--white-color);
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.faq-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: rgba(36, 187, 189, 0.1);
}

.faq-question {
    padding: 1.5rem;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: rgba(36, 187, 189, 0.03);
    transition: all 0.3s ease;
}

.faq-question h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--secondary-color);
    transition: all 0.3s ease;
    flex: 1;
}

.faq-toggle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: rgba(36, 187, 189, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 1rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.faq-toggle i {
    color: var(--primary-color);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
    background-color: var(--white-color);
}

.faq-answer-content {
    padding: 0 1.5rem 1.5rem;
    font-size: 1rem;
    line-height: 1.8;
    color: var(--dark-gray);
}

/* Active State */
.faq-item.active {
    border-color: var(--primary-color);
}

.faq-item.active .faq-question {
    background-color: rgba(36, 187, 189, 0.1);
}

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

.faq-item.active .faq-toggle {
    background-color: var(--primary-color);
}

.faq-item.active .faq-toggle i {
    color: var(--white-color);
    transform: rotate(45deg);
}

.faq-item.active .faq-answer {
    max-height: 1000px; /* Increased max-height for longer content */
}

/* Categories */
.faq-categories {
    display: flex;
    justify-content: center;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.faq-category {
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    background-color: var(--white-color);
    color: var(--secondary-color);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    border: 2px solid var(--light-gray);
}

.faq-category:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: rgba(36, 187, 189, 0.3);
}

.faq-category.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: var(--white-color);
    border-color: transparent;
    box-shadow: 0 5px 15px rgba(36, 187, 189, 0.3);
}

/* Contact Section */
.faq-contact {
    margin-top: 4rem;
    text-align: center;
    background-color: rgba(36, 187, 189, 0.05);
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.faq-contact h3 {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.faq-contact p {
    font-size: 1.1rem;
    color: var(--dark-gray);
    margin-bottom: 1.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.faq-contact-btn {
    display: inline-flex;
    align-items: center;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: var(--white-color);
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(36, 187, 189, 0.3);
}

.faq-contact-btn i {
    margin-left: 0.75rem;
    font-size: 1.2rem;
}

.faq-contact-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(36, 187, 189, 0.4);
}

/* Enhanced animation for accordion */
@keyframes accordionOpen {
    0% { max-height: 0; }
    100% { max-height: 1000px; }
}

/* Responsive Styles */
@media (max-width: 768px) {
    .faq-title {
        font-size: 2rem;
    }
    
    .faq-categories {
        flex-direction: column;
        align-items: center;
    }
    
    .faq-category {
        width: 100%;
        max-width: 250px;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .faq-question h3 {
        font-size: 1rem;
    }
    
    .faq-toggle {
        width: 25px;
        height: 25px;
        margin-right: 0.75rem;
    }
    
    .faq-answer-content {
        font-size: 0.9rem;
    }
}