/**
 * FAQ Section Styles
 * Стилі для блоку FAQ з анімацією розгортання/згортання
 */

.faq-section {
    padding: 60px 0;
    background-color: #f8f9fa;
    margin-top: 40px;
    position: relative;
}

.faq-section::after {
    content: "";
    background-color: #f8f9fa;
    display: block;
    width: 1000vw;
    height: 100%;
    position: absolute;
    left: -100vw;
    top: 0;
    z-index: 1;
}

.faq-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    position: relative;
    z-index: 9;
}

.faq-title {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    text-align: center;
    margin-bottom: 40px;
    line-height: 1.3;
}

.faq-accordion {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: #ffffff;
    border-radius: 8px;
    margin-bottom: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

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

.faq-question {
    width: 100%;
    padding: 20px 24px;
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    transition: color 0.3s ease;
    line-height: 1.5;
}

.faq-question:hover {
    color: #F26B5A;
}

.faq-question:focus {
    outline: none;
}

.faq-question:focus-visible {
    outline: 2px solid #F26B5A;
    outline-offset: -2px;
}

.faq-question span:first-child {
    flex: 1;
    padding-right: 20px;
}

.faq-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    position: relative;
    color: #F26B5A;
    transition: transform 0.3s ease;
}

.faq-icon svg {
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.faq-icon-minus {
    opacity: 0;
    transform: rotate(-90deg);
}

.faq-item.active .faq-icon-plus {
    opacity: 0;
    transform: rotate(90deg);
}

.faq-item.active .faq-icon-minus {
    opacity: 1;
    transform: rotate(0deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}

.faq-item.active .faq-answer {
    max-height: 1000px;
}

.faq-answer-content {
    padding: 0 24px 20px 24px;
    color: #666;
    font-size: 16px;
    line-height: 1.7;
}

.faq-answer-content p {
    margin-bottom: 12px;
}

.faq-answer-content p:last-child {
    margin-bottom: 0;
}

.faq-answer-content ul,
.faq-answer-content ol {
    margin: 12px 0;
    padding-left: 24px;
}

.faq-answer-content li {
    margin-bottom: 8px;
}

.faq-answer-content a {
    color: #F26B5A;
    text-decoration: none;
    transition: color 0.3s ease;
}

.faq-answer-content a:hover {
    color: #d45545;
    text-decoration: underline;
}

/* Адаптивність для планшетів */
@media (max-width: 768px) {
    .faq-section {
        padding: 40px 0;
        margin-top: 30px;
    }

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

    .faq-question {
        font-size: 16px;
        padding: 16px 20px;
    }

    .faq-answer-content {
        padding: 0 20px 16px 20px;
        font-size: 15px;
    }
}

/* Адаптивність для мобільних */
@media (max-width: 480px) {
    .faq-section {
        padding: 30px 0;
        margin-top: 20px;
    }

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

    .faq-question {
        font-size: 15px;
        padding: 14px 16px;
    }

    .faq-icon {
        width: 20px;
        height: 20px;
    }

    .faq-answer-content {
        padding: 0 16px 14px 16px;
        font-size: 14px;
    }

    .faq-item {
        margin-bottom: 12px;
    }
}

/* Анімація появи FAQ блоку */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.faq-section {
    animation: fadeInUp 0.6s ease-out;
}

/* Покращена доступність */
.faq-question:focus {
    outline: none;
}

.faq-question:focus-visible {
    outline: 3px solid #F26B5A;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .faq-section,
    .faq-answer,
    .faq-icon,
    .faq-icon svg {
        animation: none;
        transition: none;
    }
}
