/* ==============================
   FAQ Page Styles
   File: /assets/css/faq.css
============================== */

.faq-section {
    padding: 80px 0;
}

.faq-search {
    max-width: 600px;
    margin: 0 auto 40px;
    position: relative;
}

.faq-search input {
    width: 100%;
    padding: 14px 50px 14px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    transition: border-color 0.2s;
    background: #fff;
}

.faq-search input:focus {
    outline: none;
    border-color: var(--theme-color, #007bff);
}

.faq-search button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--theme-color, #007bff);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.faq-search button:hover {
    background: var(--theme-color-dark, #0056b3);
}

.faq-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 40px;
}

.faq-category-btn {
    padding: 10px 20px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 30px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    color: #333;
}

.faq-category-btn:hover,
.faq-category-btn.active {
    background: var(--theme-color, #007bff);
    border-color: var(--theme-color, #007bff);
    color: #fff;
}

.faq-accordion {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.2s;
}

.faq-item:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.faq-question {
    width: 100%;
    padding: 18px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: none;
    text-align: left;
    font-size: 1.05rem;
    font-weight: 500;
    color: #222;
    cursor: pointer;
    transition: background 0.2s;
}

.faq-question:hover {
    background: #f8f9fa;
}

.faq-question::after {
    content: "+";
    font-size: 1.5rem;
    color: var(--theme-color, #007bff);
    font-weight: 300;
    transition: transform 0.2s;
    flex-shrink: 0;
    margin-left: 12px;
}

.faq-item.active .faq-question::after {
    content: "−";
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 24px;
    color: #555;
    line-height: 1.6;
}

.faq-item.active .faq-answer {
    padding: 0 24px 20px;
    max-height: 500px;
}

.faq-contact-box {
    background: linear-gradient(135deg, #f8f9ff, #eef1ff);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    max-width: 700px;
    margin: 50px auto 0;
    border: 1px solid #d0d5ff;
}

.faq-contact-box h3 {
    margin-bottom: 15px;
    color: #222;
}

.faq-contact-box p {
    margin-bottom: 20px;
    color: #555;
}

.faq-contact-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.faq-contact-buttons .th-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Анимация появления */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.faq-item {
    animation: fadeInUp 0.3s ease forwards;
    animation-delay: calc(var(--i, 0) * 0.05s);
    opacity: 0;
}

.faq-item.visible {
    opacity: 1;
}

/* Адаптив */
@media (max-width: 768px) {
    .faq-section {
        padding: 50px 0;
    }

    .faq-question {
        font-size: 1rem;
        padding: 16px 20px;
    }

    .faq-answer {
        padding: 0 20px;
    }

    .faq-item.active .faq-answer {
        padding: 0 20px 18px;
    }

    .faq-contact-buttons {
        flex-direction: column;
    }

    .faq-contact-buttons .button2 {
        color: #333 !important;
    }

    .faq-search {
        margin-bottom: 30px;
    }

    .faq-categories {
        gap: 8px;
    }

    .faq-category-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .faq-question {
        padding: 14px 16px;
        font-size: 0.95rem;
    }

    .faq-question::after {
        font-size: 1.3rem;
    }
}