/* ========================================
   КОМПОНЕНТ: faq
   Описание: FAQ секция с раскрывающимися вопросами через details/summary
   ======================================== */

/* Базовый контейнер */
.faq {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    width: 100%;
}

/* ========================================
   HEADING - Заголовок
   ======================================== */

.faq__title {
    margin: 0;
    width: 100%;
    

    font-weight: 500;
    font-size: 28px;
    line-height: 1.29;
    letter-spacing: -0.005em;
    color: #FFFFFF;
}

/* ========================================
   CONTENT - Контентная часть
   ======================================== */

.faq__wrapper {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    width: 100%;
}

.faq__content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

/* ========================================
   FAQ ITEM - Элемент вопроса (details)
   ======================================== */

.faq__item {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    
    background: linear-gradient(180deg, rgba(79, 64, 67, 1) 0%, rgba(67, 55, 57, 1) 100%);
    
    transition: background 0.3s ease;
}

.faq__item[hidden] {
    display: none;
}

/* Градиентная рамка через псевдоэлемент */
.faq__item::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 1px;
    background: linear-gradient(180deg, rgba(212, 199, 196, 0.32) 0%, rgba(212, 199, 196, 0.16) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    transition: background 0.3s ease;
}

/* Открытое состояние */
.faq__item[open] {
    background: linear-gradient(180deg, rgba(39, 32, 33, 1) 0%, rgba(44, 36, 37, 1) 100%);
}

.faq__item[open]::before {
    background: linear-gradient(180deg, rgba(212, 199, 196, 0.2) 0%, rgba(212, 199, 196, 0.08) 100%);
}

/* ========================================
   SUMMARY - Заголовок вопроса
   ======================================== */

.faq__question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    list-style: none;
    position: relative;
    
    background: linear-gradient(180deg, rgba(79, 64, 67, 1) 0%, rgba(67, 55, 57, 1) 100%);
    border-radius: 16px;
    
    transition: background 0.3s ease;
}

/* Градиентная рамка через псевдоэлемент */
.faq__question::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 1px;
    background: linear-gradient(180deg, rgba(212, 199, 196, 0.32) 0%, rgba(212, 199, 196, 0.16) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* Убираем стандартный маркер */
.faq__question::-webkit-details-marker {
    display: none;
}

.faq__question::marker {
    display: none;
}

/* Hover эффект */
.faq__question:hover {
    background: linear-gradient(180deg, rgba(90, 73, 76, 1) 0%, rgba(79, 64, 67, 1) 100%);
}

/* Текст вопроса */
.faq__question-text {
    margin: 0;
    width: 100%;
    

    font-weight: 500;
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: -0.005em;
    color: #BAB6B6;
}

/* Иконка */
.faq__icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.faq__icon img {
    width: 100%;
    height: 100%;
    display: block;
}

/* Поворот иконки при открытии */
.faq__item[open] .faq__icon {
    transform: rotate(180deg);
}

/* ========================================
   ANSWER - Ответ
   ======================================== */

.faq__answer {
    padding: 64px 16px 16px;
    background: #292223;
    border-radius: 16px;
    margin-top: -48px;
}

.faq__answer-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.faq__answer-text {
    margin: 0;
    

    font-weight: 500;
    font-size: 16px;
    line-height: 1.25;
    color: #CECACA;
}

/* ========================================
   PAGINATION - Пагинация
   ======================================== */

.faq__pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.faq__pagination-arrow {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px;
    background: #4D3F42;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.faq__pagination-arrow:hover {
    background: #5A4B4E;
}

.faq__pagination-arrow img {
    width: 24px;
    height: 24px;
    display: block;
}

.faq__pagination-label {
    margin: 0;
    width: 70px;
    

    font-weight: 700;
    font-size: 16px;
    line-height: 1;
    text-align: center;
    color: #7B7B9E;
}

/* ========================================
   MEDIA QUERIES - Адаптивность (Desktop-first)
   ======================================== */

/* ≤1599 */
@media (max-width: 1599px) {
}

/* ≤1439 */
@media (max-width: 1439px) {
    .faq__title {
        font-size: 24px;
    }
}

/* ≤1279 */
@media (max-width: 1279px) {
    .faq__title {
        font-size: 22px;
    }
    
    .faq__question-text {
        font-size: 18px;
    }
}

/* ≤959 */
@media (max-width: 959px) {
    .faq {
        gap: 10px;
    }
    
    .faq__title {
        font-size: 20px;
    }
    
    .faq__wrapper {
        gap: 16px;
    }
    
    .faq__question-text {
        font-size: 16px;
    }
    
    .faq__answer-text {
        font-size: 14px;
    }
}

/* ≤599 */
@media (max-width: 599px) {
    .faq__title {
        font-size: 18px;
    }
    
    .faq__question {
        padding: 10px 12px;
    }
    
    .faq__question-text {
        font-size: 14px;
    }
    
    .faq__answer {
        padding: 48px 12px 12px;
        margin-top: -36px;
    }
    
    .faq__answer-text {
        font-size: 13px;
    }
    
    .faq__icon {
        width: 20px;
        height: 20px;
    }
}

