/*
Theme Name: Modern Blog Theme
Description: Современная, легкая и SEO-оптимизированная тема для блога с поддержкой Google AdSense
Version: 1.0
Author: Custom Theme
Text Domain: modern-blog
*/

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    line-height: 1.6;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #333;
    background-color: #fff;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* Header */
.site-header {
    background: #fff;
    border-bottom: 1px solid #e1e8ed;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.site-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.3s ease;
}

.site-title:hover {
    color: #007cba;
}

.site-description {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.25rem;
}

/* Navigation */
.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.main-navigation a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

.main-navigation a:hover {
    color: #007cba;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Main Content */
.site-main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

.content-area {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Articles */
.article-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 2rem;
}

.article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.article-thumbnail {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.article-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-card:hover .article-thumbnail img {
    transform: scale(1.05);
}

.article-content {
    padding: 1.5rem;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: #666;
}

.article-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.article-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.3s ease;
}

.article-title a:hover {
    color: #007cba;
}

.article-excerpt {
    color: #555;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.read-more {
    color: #007cba;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.read-more:hover {
    color: #005a87;
}

/* Single Post */
.single-article {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    padding: 2rem;
}

.single-article .article-header {
    margin-bottom: 2rem;
    text-align: center;
}

.single-article .article-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.single-article .article-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.single-article .article-content h2,
.single-article .article-content h3,
.single-article .article-content h4 {
    margin: 2rem 0 1rem;
    font-weight: 600;
}

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

.single-article .article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 1.5rem 0;
}

/* Sidebar */
.sidebar {
    padding: 0 0 0 1rem;
}

.widget {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.widget-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1a1a1a;
    border-bottom: 2px solid #007cba;
    padding-bottom: 0.5rem;
}

.widget ul {
    list-style: none;
}

.widget li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.widget li:last-child {
    border-bottom: none;
}

.widget a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.widget a:hover {
    color: #007cba;
}

/* AdSense Blocks */
.adsense-block {
    margin: 2rem 0;
    text-align: center;
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 4px;
    border: 1px dashed #ddd;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: #666;
}

.adsense-sidebar {
    margin-bottom: 2rem;
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 4px;
    border: 1px dashed #ddd;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: #666;
}

/* Footer */
.site-footer {
    background: #1a1a1a;
    color: #fff;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .main-navigation ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        padding: 1rem;
    }

    .main-navigation ul.show {
        display: flex;
    }

    .content-area {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .sidebar {
        padding: 0;
    }

    .single-article .article-title {
        font-size: 1.8rem;
    }

    .article-title {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .article-card {
        margin-bottom: 1.5rem;
    }

    .article-content {
        padding: 1rem;
    }

    .single-article {
        padding: 1.5rem;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Performance Optimization */
img {
    max-width: 100%;
    height: auto;
}

.lazy {
    opacity: 0;
    transition: opacity 0.3s;
}

.lazy.loaded {
    opacity: 1;
}