/* Стили для FAQ секции */

/* Основные стили для FAQ */
.faq-section {
    position: relative;
    overflow: hidden;
}

/* Стили для FAQ элементов */
.faq-item {
    transition: all 0.3s ease;
    cursor: pointer;
    background: rgba(243, 242, 234, 0.95);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    border: 1px solid transparent;
    z-index: 202;
}

.faq-item:hover {
    transform: translateX(10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15) !important;
}

.faq-item.active {
    background: rgba(243, 242, 234, 1);
    border-color: var(--accent-green);
}

/* Стили для заголовков FAQ */
.faq-main-title h2,
.faq-questions-title h3 {
    font-family: 'Druzhok', serif;
    color: #f0e4ac;
    text-transform: uppercase;
    line-height: 1.1;
    margin: 0;
}

.faq-main-title h2 {
    font-size: 48px;
    margin-bottom: 30px;
}

.faq-questions-title h3 {
    font-size: 48px;
    margin-bottom: 40px;
}

/* Стили для контейнера FAQ */
.faq-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
}

.faq-column {
    display: flex;
    flex-direction: column;
    z-index: 201;
}

/* Стили для декоративных элементов */
.faq-ornament img {
    height: 250px;
    width: auto;
    opacity: 0;
    transition: opacity 0.8s ease; /* Упрощенная анимация */
    will-change: opacity; /* Оптимизация производительности */
}

.faq-ornament-1 img {
    transform: translateX(-100px) scale(0.8);
}

.faq-ornament-2 img {
    transform: translateX(100px) scale(0.8);
}

.faq-ornament-3 img {
    transform: translateX(-100px) scale(0.8);
}

.faq-ornament-4 img {
    transform: translateX(100px) scale(0.8);
}

.faq-ornament-5 img {
    transform: translateY(50px) scale(0.9);
}

/* Стили для декоративных изображений */
.faq-decorative-images {
    position: absolute;
    top: 100px;
    left: 0;
    right: 0;
    z-index: 1;
    pointer-events: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.faq-decorative-images img:first-child {
    height: 600px;
    width: auto;
    opacity: 0;
    transform: translateY(50px) scale(0.9);
    transition: opacity 1.2s ease, transform 1.2s ease;
}

.faq-decorative-images img:last-child {
    height: 500px;
    width: auto;
    opacity: 0;
    transform: translateY(50px) scale(0.9);
    transition: opacity 1.2s ease, transform 1.2s ease;
}

/* Стили для солнц */
.faq-sun {
    position: absolute;
    left: 0;
    right: 0;
    z-index: 1;
    pointer-events: none;
}

.faq-sun-top {
    top: -260px;
}

.faq-sun-bottom {
    bottom: -300px;
}

.faq-sun img {
    width: 35%;
    height: auto;
    opacity: 0;
    transition: opacity 1.2s ease, transform 1.2s ease;
    margin: 0 auto;
    display: block;
}

.faq-sun-top img {
    transform: translateY(-50px) scale(0.9) rotate(180deg);
}

.faq-sun-bottom img {
    transform: translateY(50px) scale(0.9);
}

/* Анимация вращения для солнц */
@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.rotating-sun.animated {
    animation: rotate 20s linear infinite;
}

/* Адаптивность для планшетов */
@media (max-width: 1024px) {
    .faq-container {
        gap: 20px;
        padding: 0 20px;
    }
    
    .faq-main-title h2,
    .faq-questions-title h3 {
        font-size: 42px;
    }
    
    .faq-ornament img {
        height: 200px;
    }
    
    .faq-decorative-images img:first-child {
        height: 500px;
    }
    
    .faq-decorative-images img:last-child {
        height: 400px;
    }
    
    .faq-sun img {
        width: 40%;
    }
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .faq-section {
        padding: 80px 0 8vw 0 !important;
    }
    
    .faq-content-wrapper {
        margin-top: 100px !important;
        padding: 0 20px !important;
    }
    
    .faq-main-title h2,
    .faq-questions-title h3 {
        font-size: 32px;
        margin-bottom: 20px;
    }
    
    .faq-main-title {
        margin-bottom: 40px !important;
    }
    
    .faq-questions-title {
        margin-bottom: 30px !important;
    }
    
    /* Переключаем на одну колонку на мобильных */
    .faq-container {
        grid-template-columns: 1fr !important;
        gap: 15px;
        padding: 0;
    }
    
    .faq-column {
        gap: 15px;
    }
    
    .faq-item {
        padding: 16px;
        margin-bottom: 10px;
        /* Улучшаем touch взаимодействие */
        -webkit-tap-highlight-color: transparent;
        user-select: none;
        /* Убираем начальную анимацию на мобильных для лучшей производительности */
        opacity: 1 !important;
        transform: none !important;
    }
    
    .faq-item h3 {
        font-size: 16px !important;
        line-height: 1.3 !important;
        /* Улучшаем читаемость на мобильных */
        word-wrap: break-word;
        hyphens: auto;
    }
    
    .faq-answer {
        font-size: 13px !important;
        line-height: 1.4 !important;
        margin-top: 10px !important;
        /* Улучшаем читаемость на мобильных */
        word-wrap: break-word;
        hyphens: auto;
    }
    
    /* Скрываем декоративные элементы на мобильных */
    .faq-ornament {
        display: none !important;
    }
    
    .faq-decorative-images {
        display: none !important;
    }
    
    .faq-sun {
        display: none !important;
    }
    
    /* Убираем hover эффекты на мобильных */
    .faq-item:hover {
        transform: none !important;
        box-shadow: none !important;
    }
    
    /* Уменьшаем отступы */
    .faq-guarantees {
        margin-bottom: 40px !important;
    }
    
    /* Улучшаем touch взаимодействие */
    .faq-item:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
    
    /* Улучшаем доступность на мобильных */
    .faq-item:focus {
        outline: 2px solid var(--accent-green);
        outline-offset: 2px;
    }
}

/* Адаптивность для очень маленьких экранов */
@media (max-width: 480px) {
    .faq-section {
        padding: 60px 0 6vw 0 !important;
    }
    
    .faq-content-wrapper {
        margin-top: 80px !important;
        padding: 0 15px !important;
    }
    
    .faq-main-title h2,
    .faq-questions-title h3 {
        font-size: 28px;
    }
    
    .faq-item {
        padding: 14px;
        margin-bottom: 8px;
    }
    
    .faq-item h3 {
        font-size: 15px !important;
    }
    
    .faq-answer {
        font-size: 12px !important;
    }
    
    .faq-container {
        gap: 12px;
    }
    
    .faq-column {
        gap: 12px;
    }
    
    /* Дополнительные улучшения для очень маленьких экранов */
    .faq-item {
        border-radius: 8px;
    }
    
    .faq-main-title h2,
    .faq-questions-title h3 {
        word-wrap: break-word;
        hyphens: auto;
    }
}

/* Адаптивность для ландшафтной ориентации на мобильных */
@media (max-width: 768px) and (orientation: landscape) {
    .faq-section {
        padding: 60px 0 6vw 0 !important;
    }
    
    .faq-content-wrapper {
        margin-top: 80px !important;
    }
    
    .faq-main-title h2,
    .faq-questions-title h3 {
        font-size: 28px;
    }
    
    .faq-item h3 {
        font-size: 15px !important;
    }
    
    .faq-answer {
        font-size: 12px !important;
    }
}

/* Анимации появления элементов */
.faq-ornament.visible img,
.faq-decorative-images.visible img,
.faq-sun.visible img {
    opacity: 1;
    transform: translateX(0) translateY(0); /* Упрощенная анимация */
}

/* Анимация появления FAQ элементов - упрощенная */
.faq-item {
    opacity: 0;
    transform: translateY(20px); /* Уменьшенное движение */
    transition: opacity 0.5s ease, transform 0.5s ease; /* Более быстрая анимация */
    will-change: opacity, transform; /* Оптимизация производительности */
}

.faq-item.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Анимация для PNG изображений - упрощенная */
.faq-ornament img,
.faq-decorative-images img,
.faq-sun img {
    opacity: 0;
    transition: opacity 0.8s ease; /* Упрощенная анимация */
    will-change: opacity; /* Оптимизация производительности */
    transform: translateZ(0); /* Включаем аппаратное ускорение */
}

.faq-ornament img.visible,
.faq-decorative-images img.visible,
.faq-sun img.visible {
    opacity: 1;
}

/* Упрощенные анимации без сложных transform */
.faq-ornament img[src*="ramram.png"] {
    transform: translateX(-50px); /* Упрощенное движение */
}

.faq-ornament img[src*="Photoroom.png"] {
    transform: translateY(30px); /* Упрощенное движение */
}

.faq-decorative-images img:first-child {
    transform: translateY(30px); /* Упрощенное движение */
}

.faq-decorative-images img:last-child {
    transform: translateY(30px); /* Упрощенное движение */
}

.faq-sun img[src*="Photoroom.png"] {
    transform: translateY(-30px); /* Упрощенное движение */
}

/* Анимация вращения для солнц - упрощенная */
.rotating-sun.visible {
    animation: rotate 30s linear infinite; /* Более медленное вращение для лучшей производительности */
}

/* Стили для активного состояния FAQ */
.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-item.active .faq-answer {
    display: block !important;
    animation: slideDown 0.3s ease-out;
}

/* Анимация появления ответа */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Улучшенные стили для иконки */
.faq-icon {
    font-size: 20px;
    color: var(--accent-green);
    font-weight: bold;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}



/* Стили для ответов FAQ */
.faq-answer {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    display: none;
    margin-top: 12px;
}

/* Стили для заголовков вопросов */
.faq-item h3 {
    font-family: 'Connector', serif;
    font-size: 18px;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.4;
}

/* Стили для гарантий */
.faq-guarantees {
    margin-bottom: 60px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Стили для основного контента */
.faq-content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    position: relative;
    z-index: 2;
    margin-top: 200px;
}

/* Улучшения для accessibility */
.faq-item:focus {
    outline: 2px solid var(--accent-green);
    outline-offset: 2px;
}

.faq-item:focus:not(:focus-visible) {
    outline: none;
}

/* Улучшения для печати */
@media print {
    .faq-ornament,
    .faq-decorative-images,
    .faq-sun {
        display: none !important;
    }
    
    .faq-item {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    .faq-answer {
        display: block !important;
    }
} 