/* Стили для страницы FAQ */
.faq-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: clamp(15px, 2vw, 30px) clamp(10px, 1.5vw, 20px);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Хлебные крошки */
.breadcrumb {
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: #666;
}

.breadcrumb a {
    color: #e84118;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    color: #333;
    font-weight: 600;
}

/* Основной контент */
.faq-content {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    flex: 1;
}

.faq-content h1 {
    font-size: clamp(1.5rem, 3.5vw, 2.2rem);
    color: #2c3e50;
    margin-bottom: 1rem;
    text-align: center;
    line-height: 1.3;
    border-bottom: 2px solid #e84118;
    padding-bottom: 0.5rem;
}

.faq-intro {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 2.5rem;
    text-align: center;
}

.faq-intro p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #555;
    margin: 0;
}

/* Аккордеон FAQ на чистом CSS */
.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.faq-item {
    background: white;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    border-left: 4px solid #e84118;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.12);
}

/* Скрываем чекбокс */
.faq-toggle {
    display: none;
}

.faq-question {
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: #f8f9fa;
    transition: background-color 0.3s ease;
    position: relative;
    margin: 0;
}

.faq-question:hover {
    background: #e9ecef;
}

.faq-question h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #2c3e50;
    font-weight: 600;
    line-height: 1.4;
    flex: 1;
    padding-right: 2rem;
}

/* Стрелка аккордеона */
.faq-arrow {
    font-size: 14px;
    color: #e84118;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
}

/* Стиль для открытого аккордеона */
.faq-toggle:checked + .faq-question .faq-arrow {
    transform: translateY(-50%) rotate(90deg);
}

.faq-toggle:checked + .faq-question {
    background: #e9ecef;
}

/* ОБНОВЛЕННЫЙ СТИЛЬ ДЛЯ ОТВЕТА - теперь с неограниченной высотой */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
    background: white;
}

.faq-toggle:checked ~ .faq-answer {
    max-height: 5000px; /* Достаточно для очень длинного контента */
}

.answer-content {
    padding: 0;
}

.answer-content p {
    padding: 1.5rem 1.5rem 0.5rem 1.5rem;
    margin: 0;
    font-size: 1rem;
    line-height: 1.7;
    color: #555;
}

.answer-content h4 {
    padding: 0.5rem 1.5rem 0.5rem 1.5rem;
    margin: 1rem 0 0.5rem 0;
    font-size: 1.1rem;
    color: #e84118;
    font-weight: 600;
    border-bottom: 1px solid #e9ecef;
}

.answer-content ul,
.answer-content ol {
    padding: 0.5rem 1.5rem 0.5rem 3rem;
    margin: 0.5rem 0;
}

.answer-content li {
    margin-bottom: 0.8rem;
    line-height: 1.6;
    color: #555;
}

.answer-content strong {
    color: #2c3e50;
    font-weight: 600;
}

/* Стили для таблиц внутри ответов */
.accuracy-table {
    margin: 1rem 1.5rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.table-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    border-bottom: 1px solid #e9ecef;
}

.table-row:last-child {
    border-bottom: none;
}

.table-row.header {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.table-cell {
    padding: 1rem;
    border-right: 1px solid #e9ecef;
    display: flex;
    align-items: center;
}

.table-cell:last-child {
    border-right: none;
}

/* Контактная информация внутри аккордеона */
.contact-info {
    margin: 1.5rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #e84118;
}

.contact-info p {
    margin-bottom: 0.8rem;
}

.contact-info strong {
    color: #2c3e50;
    display: block;
    margin-bottom: 0.3rem;
}

.contact-info a {
    color: #e84118;
    text-decoration: none;
    font-weight: 500;
}

.contact-info a:hover {
    text-decoration: underline;
}

.valuation-reports {
    list-style-type: none;
    padding-left: 0;
    margin: 1.5rem;
}

.valuation-reports li {
    margin-bottom: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.valuation-reports a {
    color: #2c5aa0;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.valuation-reports a:hover {
    color: #1a365f;
    text-decoration: underline;
}

ol {
    padding-left: 20px;
    margin: 15px 0;
}

ol li {
    margin-bottom: 15px;
    line-height: 1.5;
}

/* ОБНОВЛЕННЫЕ СТИЛИ ДЛЯ СПИСКА КАМНЕЙ - УДАЛЕН ДУБЛИРУЮЩИЙСЯ КОД */
.gemstone-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    margin: 20px 1.5rem;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.gemstone-column {
    display: flex;
    flex-direction: column;
}

.gemstone-item {
    padding: 10px 15px;
    margin-bottom: 8px;
    background-color: white;
    border-radius: 8px;
    border-left: 4px solid #e84118;
    font-size: 14px;
    font-weight: 500;
    color: #2c3e50;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.gemstone-item:hover {
    background-color: #fff5f5;
    transform: translateX(5px);
    box-shadow: 0 4px 8px rgba(232, 65, 24, 0.15);
}

/* Навигация */
.page-links.faq-navigation {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #e9ecef;
    width: 100%;
}

.nav-buttons-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem;
    align-items: center;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.nav-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.5rem;
    border: 2px solid #e84118;
    border-radius: 6px;
    transition: all 0.3s ease;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    text-align: center;
    min-height: 44px;
}

.prev-button {
    color: #e84118;
    background: white;
    justify-self: start;
}

.home-button {
    color: white;
    background: #e84118;
    border-color: #e84118;
    justify-self: center;
    min-width: 120px;
}

.next-button {
    color: white;
    background: #e84118;
    border-color: #e84118;
    justify-self: end;
}

.nav-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(232, 65, 24, 0.3);
}

.prev-button:hover {
    background: #e84118;
    color: white;
}

.next-button:hover {
    background: #c23616;
    border-color: #c23616;
    color: white;
}

.home-button:hover {
    background: #c23616;
    border-color: #c23616;
    color: white;
}

/* АДАПТИВНОСТЬ */

/* Планшеты */
@media screen and (max-width: 1024px) {
    .faq-content {
        max-width: 900px;
    }

    .faq-question {
        padding: 1.2rem;
    }

    .faq-question h3 {
        font-size: 1.15rem;
    }

    .answer-content p,
    .answer-content h4,
    .answer-content ul,
    .answer-content ol {
        padding-left: 1.2rem;
        padding-right: 1.2rem;
    }

    .accuracy-table {
        margin: 1rem 1.2rem;
    }

    .gemstone-grid {
        grid-template-columns: 1fr 1fr;
        margin: 20px 1.2rem;
    }
}

/* Большие мобильные */
@media screen and (max-width: 768px) {
    .faq-content {
        max-width: 100%;
    }

    .faq-question {
        padding: 1rem;
    }

    .faq-question h3 {
        font-size: 1.1rem;
        padding-right: 2.5rem;
    }

    .faq-arrow {
        right: 1rem;
    }

    .answer-content p,
    .answer-content h4,
    .answer-content ul,
    .answer-content ol {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .answer-content ul,
    .answer-content ol {
        padding-left: 2rem;
    }

    .accuracy-table {
        margin: 1rem;
    }

    .table-row {
        grid-template-columns: 1fr;
    }

    .table-cell {
        padding: 0.8rem;
        border-right: none;
        border-bottom: 1px solid #e9ecef;
    }

    .table-cell:last-child {
        border-bottom: none;
    }

    .table-row.header {
        display: none;
    }

    .gemstone-grid {
        grid-template-columns: 1fr;
        margin: 20px 1rem;
        gap: 8px;
    }

    .gemstone-item {
        padding: 8px 12px;
        font-size: 13px;
    }

    /* Навигация для планшетов */
    .nav-buttons-container {
        grid-template-columns: 1fr;
        gap: 0.8rem;
        max-width: 300px;
    }

    .nav-button {
        width: 100%;
        justify-self: center;
    }
}

/* Мобильные устройства */
@media screen and (max-width: 480px) {
    .faq-page {
        padding: 10px;
    }

    .breadcrumb {
        font-size: 0.8rem;
        margin-bottom: 1rem;
    }

    .faq-content h1 {
        font-size: 1.4rem;
        margin-bottom: 0.8rem;
    }

    .faq-intro {
        padding: 1.2rem;
        margin-bottom: 2rem;
    }

    .faq-intro p {
        font-size: 1rem;
    }

    .faq-question {
        padding: 1rem 0.8rem;
    }

    .faq-question h3 {
        font-size: 1rem;
        padding-right: 2rem;
    }

    .faq-arrow {
        right: 0.8rem;
        font-size: 12px;
    }

    .answer-content p {
        padding: 1.2rem 0.8rem 0.5rem 0.8rem;
        font-size: 0.95rem;
    }

    .answer-content h4 {
        padding: 0.5rem 0.8rem 0.5rem 0.8rem;
        font-size: 1rem;
    }

    .answer-content ul,
    .answer-content ol {
        padding: 0.5rem 0.8rem 0.5rem 1.5rem;
    }

    .answer-content li {
        font-size: 0.95rem;
        margin-bottom: 0.6rem;
    }

    .accuracy-table {
        margin: 1rem 0.8rem;
    }

    .contact-info {
        margin: 1rem 0.8rem;
        padding: 1rem;
    }

    .valuation-reports {
        margin: 1rem 0.8rem;
    }

    .gemstone-grid {
        margin: 15px 0.8rem;
        padding: 10px;
    }

    /* Навигация для мобильных */
    .faq-navigation {
        margin-top: 2rem;
        padding-top: 1.5rem;
    }

    .nav-buttons-container {
        gap: 0.6rem;
    }

    .nav-button {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
        min-height: 40px;
    }

    .home-button {
        min-width: 100px;
    }
}

/* Очень маленькие мобильные */
@media screen and (max-width: 360px) {
    .faq-content h1 {
        font-size: 1.2rem;
    }

    .faq-question h3 {
        font-size: 0.95rem;
    }

    .answer-content ul,
    .answer-content ol {
        padding-left: 1.2rem;
    }

    .nav-button {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .gemstone-grid {
        margin: 10px 0.5rem;
        padding: 8px;
    }

    .gemstone-item {
        padding: 6px 10px;
        font-size: 12px;
    }
}

/* Улучшенная поддержка касаний */
@media (hover: none) and (pointer: coarse) {
    .nav-button:hover {
        transform: none;
        box-shadow: none;
    }

    .nav-button:active {
        transform: translateY(-1px);
    }

    .faq-item:hover {
        box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    }

    .faq-question:hover {
        background: #f8f9fa;
    }

    .faq-question:active {
        background: #e9ecef;
    }

    .gemstone-item:hover {
        transform: none;
        background-color: white;
    }

    .gemstone-item:active {
        background-color: #fff5f5;
        transform: translateX(3px);
    }
}