/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header styles */
.header {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo a {
    text-decoration: none;
    color: white;
}

.logo h1 {
    font-size: 1.8rem;
    margin-bottom: 0.2rem;
}

.logo span {
    font-size: 0.9rem;
    opacity: 0.8;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    flex-wrap: wrap;
}

.main-nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.main-nav a:hover {
    color: #ecf0f1;
    text-decoration: underline;
}

/* Hero section */
.hero {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-text {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0.9;
}

/* Content sections */
.content {
    padding: 3rem 0;
}

.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.main-content h2 {
    color: #2c3e50;
    font-size: 2rem;
    margin-bottom: 1rem;
    border-bottom: 3px solid #3498db;
    padding-bottom: 0.5rem;
}

.main-content h3 {
    color: #34495e;
    font-size: 1.4rem;
    margin: 2rem 0 1rem 0;
}

.main-content p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    line-height: 1.7;
}

.main-content ul {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

.main-content li {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.info-box, .nav-box {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-left: 4px solid #3498db;
}

.info-box h3, .nav-box h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.nav-box ul {
    list-style: none;
}

.nav-box li {
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    position: relative;
}

.nav-box li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: #3498db;
    font-weight: bold;
}

.nav-box a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-box a:hover {
    color: #3498db;
    text-decoration: underline;
}

/* Articles section */
.articles {
    background: white;
    padding: 3rem 0;
}

.articles h2 {
    text-align: center;
    color: #2c3e50;
    font-size: 2rem;
    margin-bottom: 2rem;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.article-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.article-card h3 {
    margin-bottom: 1rem;
}

.article-card a {
    color: #2c3e50;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 600;
}

.article-card a:hover {
    color: #3498db;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: #ecf0f1;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 1rem;
    text-align: center;
    color: #bdc3c7;
}

/* Page-specific styles */
.page-header {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.page-header h1 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.page-content {
    padding: 3rem 0;
    background: white;
}

.page-content h2 {
    color: #2c3e50;
    font-size: 1.8rem;
    margin: 2rem 0 1rem 0;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

.page-content h3 {
    color: #34495e;
    font-size: 1.3rem;
    margin: 1.5rem 0 0.5rem 0;
}

/* Responsive design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .main-nav ul {
        justify-content: center;
        gap: 1rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* Utility classes */
.text-center {
    text-align: center;
}

.mt-2 {
    margin-top: 2rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

.highlight {
    background: #fff3cd;
    padding: 1rem;
    border-left: 4px solid #ffc107;
    margin: 1rem 0;
    border-radius: 4px;
}

/* Стили для кнопок "Перейти" */
.btn-read-more {
    display: inline-block;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    padding: 0.8rem 1.5rem;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    margin-top: 1rem;
    border: none;
    cursor: pointer;
    text-align: center;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.btn-read-more:hover {
    background: linear-gradient(135deg, #2980b9 0%, #1f5f8b 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.btn-read-more:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(52, 152, 219, 0.3);
}

/* Обновленные стили для карточек статей */
.article-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.article-card p {
    flex-grow: 1;
    margin-bottom: 1rem;
}


/* Дополнительные стили для статейной системы */

/* Хлебные крошки */
.breadcrumbs {
    padding: 1rem 0;
    font-size: 0.9rem;
    color: #6c757d;
}

.breadcrumbs a {
    color: #3498db;
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

/* Заголовок статьи */
.article-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #dee2e6;
}

.article-header h1 {
    color: #2c3e50;
    font-size: 2.2rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

/* Мета информация статьи */
.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

.article-meta .category a {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
}

.article-meta .category a:hover {
    text-decoration: underline;
}

/* Теги статьи */
.article-tags {
    margin-top: 1rem;
}

.tags-label {
    font-weight: 600;
    color: #495057;
    margin-right: 0.5rem;
}

.tag {
    display: inline-block;
    background: #e9ecef;
    color: #495057;
    padding: 0.3rem 0.8rem;
    margin: 0.2rem;
    border-radius: 15px;
    text-decoration: none;
    font-size: 0.8rem;
    transition: all 0.3s;
}

.tag:hover {
    background: #3498db;
    color: white;
}

/* Контент статьи */
.article-content {
    line-height: 1.8;
    font-size: 1.1rem;
    margin: 2rem 0;
}

.article-content h2 {
    color: #2c3e50;
    font-size: 1.8rem;
    margin: 2rem 0 1rem 0;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

.article-content h3 {
    color: #34495e;
    font-size: 1.4rem;
    margin: 1.5rem 0 1rem 0;
}

.article-content p {
    margin-bottom: 1.2rem;
}

.article-content ul, .article-content ol {
    margin: 1rem 0 1.5rem 2rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content blockquote {
    background: #f8f9fa;
    border-left: 4px solid #3498db;
    margin: 1.5rem 0;
    padding: 1rem;
    font-style: italic;
}

/* Кнопки поделиться */
.article-share {
    margin: 3rem 0;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
}

.article-share h4 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s;
}

.share-btn.vk {
    background: #4680c2;
}

.share-btn.telegram {
    background: #0088cc;
}

.share-btn.whatsapp {
    background: #25d366;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Похожие статьи */
.similar-articles {
    background: #f8f9fa;
    padding: 3rem 0;
}

.similar-articles h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 2rem;
}

/* Контент с сайдбаром */
.content-with-sidebar {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

/* Сайдбар виджеты */
.sidebar-widget {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    border-left: 4px solid #3498db;
}

.sidebar-widget h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

/* Форма поиска */
.search-form {
    display: flex;
    gap: 0.5rem;
}

.search-form input {
    flex: 1;
    padding: 0.7rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.search-form button {
    background: #3498db;
    color: white;
    border: none;
    padding: 0.7rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

.search-form button:hover {
    background: #2980b9;
}

/* Список категорий */
.categories-list {
    list-style: none;
}

.categories-list li {
    margin-bottom: 0.5rem;
}

.categories-list a {
    color: #495057;
    text-decoration: none;
    display: block;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.3s;
}

.categories-list a:hover,
.categories-list a.active {
    background: #e9ecef;
    color: #2c3e50;
}

/* Популярные статьи */
.popular-articles {
    list-style: none;
}

.popular-articles li {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.popular-articles li:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.popular-articles a {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    line-height: 1.4;
}

.popular-articles a:hover {
    color: #3498db;
}

.popular-articles small {
    display: block;
    color: #6c757d;
    margin-top: 0.3rem;
}

/* Пагинация */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 3rem 0;
}

.pagination-btn {
    background: #3498db;
    color: white;
    padding: 0.7rem 1.2rem;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s;
}

.pagination-btn:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

.pagination-numbers {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.pagination-numbers a,
.pagination-numbers span {
    display: inline-block;
    padding: 0.5rem 0.8rem;
    text-decoration: none;
    border-radius: 4px;
    color: #495057;
    border: 1px solid #dee2e6;
}

.pagination-numbers a:hover {
    background: #e9ecef;
    color: #2c3e50;
}

.pagination-numbers .current {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

/* Страница 404 */
.error-404 {
    text-align: center;
    padding: 4rem 0;
}

.error-404 h1 {
    font-size: 4rem;
    color: #e74c3c;
    margin-bottom: 1rem;
}

.error-404 h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.error-404 p {
    color: #6c757d;
    margin-bottom: 2rem;
}

/* Сообщение об отсутствии статей */
.no-articles {
    text-align: center;
    padding: 3rem 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.no-articles h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.no-articles p {
    color: #6c757d;
    margin-bottom: 1rem;
}

/* Адаптивность для статейной системы */
@media (max-width: 768px) {
    .content-with-sidebar {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .article-header h1 {
        font-size: 1.8rem;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .share-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .pagination {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .pagination-numbers {
        order: -1;
        width: 100%;
        justify-content: center;
    }
}

/* Product image styles */
.product-image-container {
    position: relative;
    text-align: center;
    margin: 20px auto;
    max-width: 300px;
}
.product-image {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.ad-label {
    position: absolute;
    top: -10px;
    right: 8px;
    background: rgba(0, 0, 0, 0.9);
    color: white !important;
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
    font-family: Arial, sans-serif;
}