* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary: #2c3e50;
    --secondary: #8b4513;
    --accent: #d4af37;
    --text: #333;
    --light: #f8f9fa;
    --border: #dee2e6;
    --shadow: rgba(0,0,0,0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background: var(--primary);
    color: white;
    padding: 1.5rem 0;
    box-shadow: 0 2px 10px var(--shadow);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo { text-decoration: none; color: white; }
.logo h1 { font-size: 1.5rem; }

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.main-nav a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.main-nav a:hover { color: var(--accent); }

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero h2 { font-size: 2.5rem; margin-bottom: 1rem; }
.hero p { font-size: 1.2rem; opacity: 0.9; }

/* Articles Grid */
.featured-articles, .category-articles {
    padding: 3rem 0;
}

.featured-articles h2, .category-header h1 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--primary);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.article-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px var(--shadow);
}

.article-card a { text-decoration: none; color: inherit; display: block; }

.article-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.article-card-content { padding: 1.5rem; }

.category-badge {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.article-card h3 {
    font-size: 1.25rem;
    margin: 0.5rem 0;
    color: var(--primary);
}

.article-card p {
    color: #666;
    margin-bottom: 1rem;
}

/* Article Header Meta - ЗАМЕНИТЬ */
.article-header {
    text-align: center;
    margin-bottom: 2rem;
}

.article-header h1 {
    font-size: 2.5rem;
    margin: 1rem 0;
    color: var(--primary);
}

.article-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: #666;
    align-items: center;
    justify-content: center;
}

.article-meta a {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 600;
}

.article-meta a:hover {
    text-decoration: underline;
}

.article-meta span {
    display: inline-flex;
    align-items: center;
}

/* Single Article */
.breadcrumbs {
    padding: 1rem 0;
    font-size: 0.9rem;
    color: #666;
}

.breadcrumbs a { color: var(--secondary); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }

.article-single {
    padding: 2rem 0;
}

.article-featured-image {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.article-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-content p { margin-bottom: 1.5rem; }

.author-bio {
    max-width: 800px;
    margin: 3rem auto;
    padding: 2rem;
    background: var(--light);
    border-radius: 8px;
}

/* Category */
.category-header {
    background: var(--light);
    padding: 3rem 0;
    text-align: center;
}

.category-description {
    max-width: 700px;
    margin: 1rem auto;
    font-size: 1.1rem;
    color: #666;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin: 3rem 0;
}

.pagination a {
    color: var(--secondary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    transition: background 0.3s;
}

.pagination a:hover {
    background: var(--light);
}

/* Footer */
.site-footer {
    background: var(--primary);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-nav ul {
    list-style: none;
}

.footer-nav a {
    color: white;
    text-decoration: none;
    display: block;
    padding: 0.25rem 0;
}

.footer-nav a:hover { color: var(--accent); }

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* 404 */
.error-404 {
    text-align: center;
    padding: 5rem 0;
}

.error-404 h1 { font-size: 3rem; color: var(--primary); margin-bottom: 1rem; }
.error-404 p { font-size: 1.2rem; margin-bottom: 2rem; }

.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: var(--secondary);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s;
}

.btn:hover { background: var(--primary); }

/* Mobile */
@media (max-width: 768px) {
    .header-content { flex-direction: column; gap: 1rem; }
    .main-nav ul { flex-wrap: wrap; justify-content: center; }
    .hero h2 { font-size: 1.8rem; }
    .articles-grid { grid-template-columns: 1fr; }
    .article-header h1 { font-size: 1.8rem; }
}

/* Logo Styles */
.logo-img {
    height: 50px;
    width: auto;
}

.footer-logo {
    height: 60px;
    width: auto;
    margin-bottom: 1rem;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: white;
    transition: all 0.3s;
}

.social-links a:hover {
    background: var(--accent);
    transform: translateY(-3px);
}

.social-links svg {
    width: 20px;
    height: 20px;
}

/* Enhanced Hero */
.hero-main {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    color: white;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(44,62,80,0.9), rgba(139,69,19,0.8));
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-main h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.hero-main p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 0.75rem 2rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-block;
}

.btn-primary {
    background: var(--accent);
    color: var(--primary);
}

.btn-primary:hover {
    background: #c4941f;
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: var(--primary);
}

.btn-large {
    padding: 1rem 3rem;
    font-size: 1.1rem;
}

/* Stats Section */
.stats-section {
    background: var(--light);
    padding: 3rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #666;
    font-size: 1rem;
}

/* About Section */
.about-section {
    padding: 4rem 0;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text h2 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #666;
    margin-bottom: 1rem;
}

.about-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 20px var(--shadow);
}

/* Categories Section */
.categories-section {
    padding: 4rem 0;
    background: var(--light);
}

.categories-section h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 3rem;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.category-card {
    position: relative;
    height: 350px;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    box-shadow: 0 4px 15px var(--shadow);
    transition: transform 0.3s;
}

.category-card:hover {
    transform: translateY(-8px);
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    color: white;
}

.category-overlay h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.category-overlay p {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.category-count {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 600;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Footer Updates */
.footer-content {
    grid-template-columns: 2fr 1fr 1fr;
}

.footer-info h4,
.footer-nav h4 {
    margin-bottom: 1rem;
    color: var(--accent);
}

.footer-info p {
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-bottom a {
    color: var(--accent);
    text-decoration: none;
}

.footer-bottom a:hover {
    text-decoration: underline;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hero-main h1 { font-size: 2rem; }
    .hero-main p { font-size: 1.1rem; }
    .about-content { grid-template-columns: 1fr; }
    .categories-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-content { grid-template-columns: 1fr; }
    .hero-cta { flex-direction: column; }
    .logo-img { height: 40px; }
}

/* Image Size Optimization */
.hero-main {
    background-size: cover;
    background-position: center;
}

.category-card img,
.article-card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
}

.about-image img {
    width: 100%;
    height: auto;
    max-height: 600px;
}

.article-featured-image {
    width: 100%;
    height: auto;
    max-height: 630px;
}

/* Author Page */
.author-page {
    padding: 3rem 0;
}

.author-header {
    display: flex;
    gap: 3rem;
    margin-bottom: 4rem;
    align-items: flex-start;
}

.author-photo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 20px var(--shadow);
}

.author-info {
    flex: 1;
}

.author-info h1 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.author-title {
    font-size: 1.2rem;
    color: var(--secondary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.author-bio {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #666;
    margin-bottom: 1.5rem;
}

.author-social {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-btn {
    padding: 0.5rem 1.5rem;
    background: var(--secondary);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.social-btn:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

/* Author Bio Card in Article */
.author-bio-card {
    display: flex;
    gap: 2rem;
    margin: 3rem auto;
    max-width: 800px;
    padding: 2rem;
    background: var(--light);
    border-radius: 8px;
    align-items: center;
}

.author-bio-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.author-bio-content h3 {
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.author-bio-content p {
    margin-bottom: 1rem;
    color: #666;
}

.author-link {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 600;
}

.author-link:hover {
    text-decoration: underline;
}

/* Mobile */
@media (max-width: 768px) {
    .author-header {
        flex-direction: column;
        text-align: center;
    }

    .author-photo {
        margin: 0 auto;
    }

    .author-social {
        justify-content: center;
    }

    .author-bio-card {
        flex-direction: column;
        text-align: center;
    }
}

/* Stats Icons */
.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-icon {
    color: var(--accent);
    margin-bottom: 1rem;
    filter: drop-shadow(0 2px 4px rgba(212, 175, 55, 0.3));
}

.stat-icon svg {
    width: 48px;
    height: 48px;
}

/* Cookie Notice */
.cookie-notice {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    padding: 1.5rem;
    max-width: 400px;
    z-index: 9999;
    display: none;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.cookie-content p {
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text);
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.cookie-accept {
    background: var(--secondary);
    color: white;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.cookie-accept:hover {
    background: var(--primary);
}

.cookie-learn {
    color: var(--secondary);
    text-decoration: none;
    font-size: 0.9rem;
}

.cookie-learn:hover {
    text-decoration: underline;
}

/* Static Pages */
.static-page {
    padding: 3rem 0;
}

.static-page .container {
    max-width: 900px;
}

.static-page h1 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.update-date {
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.static-page h2 {
    font-size: 1.8rem;
    color: var(--primary);
    margin: 2rem 0 1rem;
}

.static-page h3 {
    font-size: 1.3rem;
    color: var(--secondary);
    margin: 1.5rem 0 0.75rem;
}

.static-page p {
    line-height: 1.8;
    margin-bottom: 1rem;
}

.static-page a {
    color: var(--secondary);
}

.static-page a:hover {
    text-decoration: underline;
}

.about-text-full {
    max-width: 800px;
    margin: 0 auto;
}

.footer-links {
    list-style: none;
}

.footer-links a {
    color: white;
    text-decoration: none;
    display: block;
    padding: 0.25rem 0;
}

.footer-links a:hover {
    color: var(--accent);
}

/* Breadcrumbs Mobile Fix */
@media (max-width: 768px) {
    .breadcrumbs {
        padding-left: 20px;
        padding-right: 20px;
    }

    .cookie-notice {
        bottom: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* Categories Grid - 6 items */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

@media (max-width: 1024px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .categories-grid {
        grid-template-columns: 1fr;
    }
}

/* Article Card without Image */
.article-card.no-image {
    display: flex;
    flex-direction: column;
}

.article-card.no-image .article-card-content {
    padding: 2rem 1.5rem;
    flex: 1;
}

.article-card.no-image h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.article-card.no-image p {
    font-size: 1rem;
    line-height: 1.6;
}

/* Adjust card hover for no-image */
.article-card.no-image:hover {
    transform: translateY(-5px);
}

/* Static Page Lists */
.static-page ul {
    margin: 1rem 0 1.5rem 2rem;
    line-height: 1.8;
}

.static-page ul li {
    margin-bottom: 0.5rem;
}

.static-page strong {
    color: var(--primary);
    font-weight: 600;
}