/* ===== ОБЩИЕ СТИЛИ ===== */
.sonnik-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}

.sonnik-empty {
    color: #666;
    font-style: italic;
    padding: 20px;
    text-align: center;
}

.sonnik-loading {
    color: #666;
    text-align: center;
    padding: 20px;
}

.sonnik-error {
    color: #dc3545;
    text-align: center;
    padding: 20px;
}

.sonnik-hint {
    color: #666;
    text-align: center;
    padding: 10px;
    font-size: 14px;
}

/* ===== РАЗДЕЛЫ ===== */
.sonnik-sections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.sonnik-section-card {
    display: block;
    padding: 20px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.sonnik-section-card:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.sonnik-section-card h3 {
    margin: 0 0 10px 0;
    color: #1a1a1a;
    font-size: 18px;
}

.sonnik-section-card p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* ===== КАТЕГОРИИ ===== */
.sonnik-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.sonnik-category-card {
    display: block;
    padding: 25px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
}

.sonnik-category-card:hover {
    background: #e9ecef;
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.sonnik-category-card h3 {
    margin: 0 0 10px 0;
    color: #1a1a1a;
    font-size: 18px;
}

.sonnik-category-count {
    display: inline-block;
    padding: 3px 12px;
    background: #007cba;
    color: #fff;
    border-radius: 12px;
    font-size: 13px;
}

/* ===== БУКВЫ ===== */
.sonnik-letters {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.sonnik-letter {
    display: inline-block;
    width: 36px;
    height: 36px;
    line-height: 36px;
    text-align: center;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    color: #007cba;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    transition: all 0.2s;
}

.sonnik-letter:hover {
    background: #007cba;
    color: #fff;
    border-color: #007cba;
}

.sonnik-letter.active {
    background: #007cba;
    color: #fff;
    border-color: #007cba;
}

.sonnik-letter.disabled {
    color: #ccc;
    background: #f5f5f5;
    cursor: not-allowed;
}

/* ===== СПИСОК СТАТЕЙ ===== */
.sonnik-article-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.sonnik-article-list li {
    padding: 0;
}

.sonnik-article-list a {
    display: block;
    padding: 10px 15px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s;
}

.sonnik-article-list a:hover {
    background: #e9ecef;
    border-color: #007cba;
}

.sonnik-section-tag {
    display: inline-block;
    padding: 2px 8px;
    background: #e9ecef;
    border-radius: 12px;
    font-size: 12px;
    color: #666;
}

/* ===== ПАГИНАЦИЯ ===== */
.sonnik-pagination {
    display: flex;
    gap: 5px;
    margin: 20px 0;
    justify-content: center;
}

.sonnik-pagination a {
    display: inline-block;
    padding: 8px 14px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    color: #007cba;
    text-decoration: none;
}

.sonnik-pagination a.active {
    background: #007cba;
    color: #fff;
    border-color: #007cba;
}

/* ===== ПОИСК ===== */
.sonnik-search-widget {
    margin: 20px 0;
}

.sonnik-search-form {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.sonnik-search-input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #dee2e6;
    border-radius: 4px;
    font-size: 16px;
}

.sonnik-search-input:focus {
    border-color: #007cba;
    outline: none;
}

.sonnik-search-button {
    padding: 10px 30px;
    background: #007cba;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.sonnik-search-button:hover {
    background: #005a87;
}

.sonnik-search-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sonnik-search-list li {
    padding: 10px 15px;
    border-bottom: 1px solid #f0f0f0;
}

.sonnik-search-list li:last-child {
    border-bottom: none;
}

.sonnik-search-list a {
    color: #007cba;
    text-decoration: none;
}

.sonnik-search-list a:hover {
    text-decoration: underline;
}

/* ===== ИНФОРМЕР ===== */
.sonnik-informer {
    padding: 20px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

.sonnik-informer-title {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: #1a1a1a;
}

.sonnik-informer-item {
    margin-bottom: 15px;
}

.sonnik-informer-item:last-child {
    margin-bottom: 0;
}

.sonnik-informer-link {
    font-size: 16px;
    font-weight: 500;
    color: #007cba;
    text-decoration: none;
}

.sonnik-informer-link:hover {
    text-decoration: underline;
}

.sonnik-informer-excerpt {
    margin: 5px 0 0 0;
    color: #666;
    font-size: 14px;
}

/* ===== СЛУЧАЙНЫЕ ===== */
.sonnik-random-widget {
    margin: 20px 0;
}

.sonnik-random-items {
    margin-bottom: 15px;
}

.sonnik-random-item {
    padding: 10px 15px;
    border-bottom: 1px solid #f0f0f0;
}

.sonnik-random-item:last-child {
    border-bottom: none;
}

.sonnik-random-item a {
    color: #333;
    text-decoration: none;
}

.sonnik-random-item a:hover {
    color: #007cba;
}

.sonnik-random-refresh {
    padding: 8px 20px;
    background: #6c757d;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.sonnik-random-refresh:hover {
    background: #5a6268;
}

/* ===== FAQ ===== */
.sonnik-faq {
    margin: 20px 0;
}

.sonnik-faq-item {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    margin-bottom: 10px;
    overflow: hidden;
}

.sonnik-faq-question {
    padding: 0;
}

.sonnik-faq-toggle {
    width: 100%;
    padding: 15px 20px;
    background: #f8f9fa;
    border: none;
    text-align: left;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.sonnik-faq-toggle:hover {
    background: #e9ecef;
}

.sonnik-faq-icon {
    font-size: 20px;
    color: #666;
    transition: transform 0.3s;
}

.sonnik-faq-answer {
    padding: 20px;
    background: #fff;
    border-top: 1px solid #dee2e6;
}

.sonnik-faq-answer p {
    margin: 0 0 10px 0;
}

.sonnik-faq-answer a {
    color: #007cba;
    text-decoration: none;
}

.sonnik-faq-answer a:hover {
    text-decoration: underline;
}

/* ===== СТРАНИЦА СТАТЬИ ===== */
.sonnik-article {
    max-width: 800px;
    margin: 0 auto;
}

.sonnik-breadcrumbs {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

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

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

.sonnik-article-body {
    font-size: 16px;
    line-height: 1.8;
    margin: 30px 0;
}

.sonnik-article-body p {
    margin: 0 0 15px 0;
}

.sonnik-article-meta {
    padding: 15px 0;
    border-top: 1px solid #dee2e6;
    color: #666;
    font-size: 14px;
}

/* ===== СТРАНИЦА КАТЕГОРИИ ===== */
.sonnik-category-page {
    max-width: 900px;
    margin: 0 auto;
}

.sonnik-category-desc {
    color: #666;
    font-size: 16px;
    margin-bottom: 30px;
}

.sonnik-section-category {
    margin: 10px 0 20px 0;
}

.sonnik-section-category a {
    color: #007cba;
    text-decoration: none;
}

.sonnik-section-category a:hover {
    text-decoration: underline;
}

.sonnik-section-desc {
    color: #666;
    margin-bottom: 25px;
}

/* ===== АДАПТИВ ===== */
@media (max-width: 768px) {
    .sonnik-sections-grid {
        grid-template-columns: 1fr;
    }
    
    .sonnik-article-list {
        grid-template-columns: 1fr;
    }
    
    .sonnik-categories-grid {
        grid-template-columns: 1fr;
    }
    
    .sonnik-search-form {
        flex-direction: column;
    }
    
    .sonnik-letter {
        width: 30px;
        height: 30px;
        line-height: 30px;
        font-size: 12px;
    }
    
    .sonnik-wrapper {
        padding: 10px;
    }
}