/* FAQ Page Styles */

/* Hero Section отступы */
.hero-title-section {
    padding: 120px 20px 60px 20px;
}

.faq-section {
    padding: 80px 0;
    background: var(--light-gray);
}

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: var(--white);
    border-radius: var(--border-radius-medium);
    box-shadow: var(--shadow-default);
    overflow: hidden;
    transition: var(--transition-normal);
}

.faq-item:hover {
    box-shadow: var(--shadow-primary-default);
    transform: translateY(-2px);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    cursor: pointer;
    background: var(--white);
    transition: var(--transition-normal);
    border-bottom: 1px solid transparent;
}

.faq-question:hover {
    background: var(--primary-light);
}

.faq-question h3 {
    font-size: 1.2rem;
    font-weight: var(--font-weight-semibold);
    color: var(--secondary-color);
    margin: 0;
    line-height: 1.4;
    flex: 1;
    padding-right: 20px;
}

.faq-toggle {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    transition: var(--transition-normal);
    flex-shrink: 0;
}

.faq-toggle i {
    font-size: 16px;
    transition: var(--transition-normal);
}

.faq-item.active .faq-toggle i {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-slow) ease;
    background: var(--white);
}

.faq-item.active .faq-answer {
    max-height: 2000px;
}

.faq-answer-content {
    padding: 0 30px 30px;
}

.faq-answer p {
    color: var(--secondary-color);
    line-height: 1.7;
    margin-bottom: 20px;
    font-size: 1rem;
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

.faq-answer ul {
    margin: 20px 0;
    padding-left: 0;
    list-style: none;
}

.faq-answer li {
    color: var(--secondary-color);
    line-height: 1.6;
    margin-bottom: 10px;
    font-size: 1rem;
    position: relative;
    padding-left: 20px;
}

.faq-answer li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: var(--primary-color);
    border-radius: 50%;
}

.faq-answer strong {
    color: var(--secondary-color);
    font-weight: var(--font-weight-semibold);
}

.faq-contact {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.contact-button {
    display: inline-block;
    background: var(--primary-color);
    color: var(--white);
    padding: 12px 24px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: var(--font-weight-semibold);
    font-size: 0.95rem;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-button);
}

.contact-button:hover {
    background: var(--primary-hover);
    box-shadow: var(--shadow-primary-hover);
    transform: translateY(-2px);
}

/* Адаптивность */
@media (max-width: 768px) {
    .hero-title-section {
        padding: 100px 20px 40px 20px;
    }

    .faq-section {
        padding: 60px 0;
    }

    .faq-question {
        padding: 20px 25px;
    }

    .faq-question h3 {
        font-size: 1.1rem;
        padding-right: 15px;
    }

    .faq-answer-content {
        padding: 0 25px 25px;
    }

    .faq-answer p {
        font-size: 0.95rem;
    }

    .faq-answer li {
        font-size: 0.95rem;
        color: var(--secondary-color);
    }

    .contact-button {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .hero-title-section {
        padding: 80px 15px 30px 15px;
    }

    .faq-section {
        padding: 40px 0;
    }

    .container {
        padding: 0 15px;
    }

    .faq-question {
        padding: 18px 20px;
    }

    .faq-question h3 {
        font-size: 1rem;
        padding-right: 10px;
    }

    .faq-answer-content {
        padding: 0 20px 20px;
    }

    .faq-answer p {
        font-size: 0.9rem;
    }

    .faq-answer li {
        font-size: 0.9rem;
        color: var(--secondary-color);
    }

    .contact-button {
        width: 100%;
        text-align: center;
        padding: 12px 20px;
    }
}

/* Анимации для плавного появления */
.faq-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}



/* Hover эффекты для интерактивности */
.faq-item:hover .faq-toggle {
    transform: scale(1.1);
}

.faq-item.active .faq-question {
    background: var(--primary-light);
    border-bottom-color: var(--primary-color);
}

.faq-item.active .faq-toggle {
    color: var(--primary-hover);
}

/* Дополнительные стили для лучшей читаемости */
.faq-answer p:first-child {
    margin-top: 20px;
}

.faq-answer ul {
    background: var(--light-gray);
    padding: 20px;
    border-radius: var(--border-radius-small);
    margin: 20px 0;
    list-style: none;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
    z-index: var(--z-tooltip);
    box-shadow: var(--shadow-primary-default);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow-primary-hover);
}

/* Popup overlay */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
}

.popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    background: var(--white);
    border-radius: var(--border-radius-medium);
    padding: 20px;
    max-width: 90%;
    max-height: 90%;
    position: relative;
    transform: scale(0.8);
    transition: var(--transition-normal);
}

.popup-overlay.active .popup-content {
    transform: scale(1);
}

.popup-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-color);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition-normal);
}

.popup-close:hover {
    background: var(--light-gray);
    color: var(--secondary-color);
}

/* Адаптивность для popup и back to top */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }

    .popup-content {
        padding: 15px;
        margin: 20px;
    }
}

@media (max-width: 480px) {
    .back-to-top {
        bottom: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
    }

    .popup-content {
        padding: 10px;
        margin: 15px;
    }
}