/**
 * Trevi FAQ PRO - Styles
 * Version: 2.4
 */

/* Основные стили FAQ */
.trevi-faq-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    max-width: 100%;
    margin: 0 auto;
}

.trevi-faq-search {
    margin-bottom: 40px;
    text-align: center;
}

.trevi-faq-search-input {
    width: 100%;
    max-width: 500px;
    padding: 16px 20px;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 400;
    color: #2d3748;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.trevi-faq-search-input:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 4px 20px rgba(0, 124, 186, 0.15);
    transform: translateY(-2px);
}

.trevi-faq-search-input::placeholder {
    color: #a0aec0;
}

/* Стили аккордеона */
.trevi-faq-list {
    space-y: 0;
}

.trevi-faq-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.trevi-faq-item:hover {
    border-color: #cbd5e0;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.trevi-faq-q {
    margin: 0;
    padding: 24px 70px 24px 30px;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    color: #2d3748;
    cursor: pointer;
    position: relative;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
    user-select: none;
}

.trevi-faq-q:hover {
    background: linear-gradient(135deg, #edf2f7 0%, #e2e8f0 100%);
    color: #1a202c;
}

.trevi-faq-q.active {
    background: linear-gradient(135deg, #007cba 0%, #0069a7 100%);
    color: #ffffff;
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.trevi-faq-q::after {
    content: '';
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M12 6v6m0 0v6m0-6h6m-6 0H6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    transition: all 0.3s ease;
}

.trevi-faq-q.active::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23ffffff'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M18 12H6'/%3E%3C/svg%3E");
    transform: translateY(-50%) rotate(180deg);
}

.trevi-faq-a {
    padding: 0 30px;
    font-size: 16px;
    line-height: 1.7;
    color: #4a5568;
    background: #ffffff;
    display: none;
}

.trevi-faq-a > *:first-child {
    margin-top: 30px;
}

.trevi-faq-a > *:last-child {
    margin-bottom: 30px;
}

.trevi-faq-a p {
    margin-bottom: 16px;
}

.trevi-faq-a strong {
    color: #2d3748;
    font-weight: 600;
}

.trevi-faq-a ul, .trevi-faq-a ol {
    margin: 16px 0;
    padding-left: 24px;
}

.trevi-faq-a li {
    margin-bottom: 8px;
}

/* Стили для поиска */
.trevi-faq-search-only {
    margin-bottom: 40px;
}

.trevi-faq-search-results {
    margin-top: 30px;
    animation: fadeIn 0.5s ease-out;
}

.trevi-faq-loading {
    padding: 30px;
    text-align: center;
    background: #f7fafc;
    border-radius: 12px;
    color: #718096;
    font-size: 16px;
}

.trevi-faq-error {
    padding: 30px;
    text-align: center;
    background: #fed7d7;
    border: 1px solid #feb2b2;
    border-radius: 12px;
    color: #c53030;
    font-size: 16px;
}

.trevi-faq-highlight {
    background-color: #fff3cd;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    color: #856404;
}

/* Стили сетки */
.trevi-faq-grid {
    margin: 30px 0;
}

.trevi-faq-grid-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.trevi-faq-grid-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.trevi-faq-grid-item:hover {
    background: #007cba;
    border-color: #007cba;
    box-shadow: 0 8px 25px rgba(0, 124, 186, 0.15);
    transform: translateY(-3px);
}

.trevi-faq-grid-item a {
    display: block;
    padding: 20px 24px;
    color: #2d3748;
    text-decoration: none;
    font-weight: 500;
    line-height: 1.5;
    transition: all 0.3s ease;
}

.trevi-faq-grid-item:hover a {
    color: #ffffff;
}

/* Похожие вопросы */
.trevi-faq-related {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid #e2e8f0;
}

.trevi-faq-related-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 25px;
    color: #2d3748;
    text-align: center;
}

.trevi-faq-related-item {
    margin-bottom: 12px;
    transition: transform 0.2s ease;
}

.trevi-faq-related-item:hover {
    transform: translateX(5px);
}

.trevi-faq-related-link {
    display: block;
    padding: 16px 20px;
    color: #007cba;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    background: #f7fafc;
    border-radius: 8px;
    border-left: 4px solid #007cba;
    transition: all 0.3s ease;
}

.trevi-faq-related-link:hover {
    background: #007cba;
    color: #ffffff;
    text-decoration: none;
}

/* Мета информация */
.trevi-faq-meta {
    font-size: 14px;
    color: #718096;
    margin: 20px 0;
    padding: 16px 20px;
    background: #f7fafc;
    border-radius: 8px;
    border-left: 4px solid #007cba;
}

.trevi-faq-meta a {
    color: #007cba;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.trevi-faq-meta a:hover {
    color: #0069a7;
    text-decoration: underline;
}

/* Хлебные крошки */
.trevi-breadcrumbs {
    margin-bottom: 40px;
    font-size: 14px;
    color: #718096;
}

.trevi-breadcrumbs a {
    color: #007cba;
    text-decoration: none;
}

.trevi-breadcrumbs a:hover {
    text-decoration: underline;
}

/* Статистика */
.trevi-faq-stats-count {
    font-weight: 700;
    color: #007cba;
    font-size: 1.2em;
}

/* Полный список FAQ */
.trevi-faq-all {
    space-y: 40px;
}

.trevi-faq-all-topic {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.trevi-faq-all-topic-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 25px;
    color: #2d3748;
    padding-bottom: 15px;
    border-bottom: 2px solid #007cba;
}

.trevi-faq-all-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
}

.trevi-faq-all-item {
    margin-bottom: 8px;
}

.trevi-faq-all-item a {
    display: block;
    padding: 14px 18px;
    color: #4a5568;
    text-decoration: none;
    font-weight: 500;
    background: #f7fafc;
    border-radius: 8px;
    border-left: 3px solid #e2e8f0;
    transition: all 0.3s ease;
}

.trevi-faq-all-item a:hover {
    background: #007cba;
    color: #ffffff;
    border-left-color: #007cba;
    transform: translateX(5px);
}

/* Анимации */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.trevi-faq-item {
    animation: fadeIn 0.6s ease-out;
}

/* Адаптивность */
@media (max-width: 768px) {
    .trevi-faq-q {
        padding: 20px 50px 20px 20px;
        font-size: 16px;
    }
    
    .trevi-faq-a {
        padding: 0 20px;
        font-size: 15px;
    }
    
    .trevi-faq-a > *:first-child {
        margin-top: 20px;
    }
    
    .trevi-faq-a > *:last-child {
        margin-bottom: 20px;
    }
    
    .trevi-faq-grid-list {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .trevi-faq-all-list {
        grid-template-columns: 1fr;
    }
    
    .trevi-faq-search-input {
        max-width: 100%;
        padding: 14px 16px;
    }
    
    .trevi-faq-related-title {
        font-size: 20px;
    }
    
    .trevi-faq-all-topic {
        padding: 20px;
    }
    
    .trevi-faq-all-topic-title {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .trevi-faq-q {
        padding: 18px 45px 18px 18px;
        font-size: 15px;
    }
    
    .trevi-faq-q::after {
        right: 20px;
    }
    
    .trevi-faq-item {
        border-radius: 12px;
        margin-bottom: 15px;
    }
}

/* Темная тема поддержка */
@media (prefers-color-scheme: dark) {
    .trevi-faq-item,
    .trevi-faq-grid-item,
    .trevi-faq-all-topic {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .trevi-faq-q {
        background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
        color: #e2e8f0;
    }
    
    .trevi-faq-q:hover {
        background: linear-gradient(135deg, #4a5568 0%, #718096 100%);
    }
    
    .trevi-faq-a {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .trevi-faq-search-input {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .trevi-faq-search-input::placeholder {
        color: #a0aec0;
    }
}

/* Плавные переходы */
.trevi-faq-item,
.trevi-faq-q,
.trevi-faq-a,
.trevi-faq-grid-item,
.trevi-faq-all-item a {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Фокус состояния для доступности */
.trevi-faq-q:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

.trevi-faq-search-input:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}