/*
Theme Name: Main
*/


@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 400;
    src: url('https://fonts.gstatic.com/s/roboto/v30/KFOmCnqEu92Fr1Mu4mxK.woff2') format('woff2');
}

body {
    font-family: 'Roboto', sans-serif;
}


.site-header {
    border-bottom: 1px solid #eee;
    padding: 1rem 0;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
}

.site-title {
    margin: 0;
    font-size: 1.5rem;
}

.site-title a {
    text-decoration: none;
    color: #333;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: #666;
}

.site-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.site-footer {
    border-top: 1px solid #eee;
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    text-align: center;
}

.single-post {
    max-width: 90%;
    margin: 0 auto;
}

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

.post-title {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.post-meta {
    color: #666;
    font-size: 0.9rem;
}

.post-content {
    line-height: 1.6;
    font-size: 1.1rem;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.post-card {
    border: 1px solid #eee;
    padding: 1.5rem;
    border-radius: 4px;
}

.post-card-title {
    margin-top: 0;
}

.post-card-title a {
    text-decoration: none;
    color: #333;
}

.home-page {
    max-width: 1000px;
    margin: 0 auto;
}

.featured-posts {
    margin-bottom: 4rem;
}

.featured-post {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #eee;
}

.featured-post-title {
    font-size: 1.8rem;
}

.featured-post-title a {
    text-decoration: none;
    color: #333;
}

.posts-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.post-item {
    padding-bottom: 2rem;
    border-bottom: 1px solid #eee;
}

.post-item-title {
    margin-top: 0;
}

.post-item-title a {
    text-decoration: none;
    color: #333;
}

.pagination {
    margin-top: 3rem;
    text-align: center;
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .post-title {
        font-size: 2rem;
    }
}


/* Добавь в style.css */
.single-post-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: start;
}

.post-thumbnail {
    margin: 2rem 0;
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.single-sidebar {
    position: sticky;
    top: 2rem;
}

.recent-posts-widget h3 {
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
}

.recent-post-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f5f5f5;
}

.recent-post-thumbnail {
    flex-shrink: 0;
}

.recent-post-thumbnail img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.recent-post-title {
    flex-grow: 1;
}

.recent-post-title a {
    text-decoration: none;
    color: #333;
    font-size: 0.9rem;
    line-height: 1.3;
}

.recent-post-title a:hover {
    color: #0073aa;
}

@media (max-width: 768px) {
    .single-post-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .single-sidebar {
        position: static;
    }
}

```php
<?php
// index.php (главная страница)
get_header(); ?>

<section class="home-page">
    <div class="site-logo">
        <img src="<?php echo get_template_directory_uri(); ?>/logo.png" alt="<?php bloginfo('name'); ?>">
    </div>
    
    <div class="featured-posts">
        <?php
        $featured_posts = new WP_Query(array(
            'posts_per_page' => 3,
            'meta_query' => array(
                array(
                    'key' => '_is_featured',
                    'value' => 'yes'
                )
            )
        ));
        
        if ($featured_posts->have_posts()):
            while ($featured_posts->have_posts()): $featured_posts->the_post();
        ?>
            <article class="featured-post">
                <?php if (has_post_thumbnail()): ?>
                    <div class="featured-post-thumbnail">
                        <a href="<?php the_permalink(); ?>">
                            <?php the_post_thumbnail('large'); ?>
                        </a>
                    </div>
                <?php endif; ?>
                <h2 class="featured-post-title">
                    <a href="<?php the_permalink(); ?>">
                        <?php the_title(); ?>
                    </a>
                </h2>
                <div class="featured-post-excerpt">
                    <?php the_excerpt(); ?>
                </div>
            </article>
        <?php
            endwhile;
            wp_reset_postdata();
        endif;
        ?>
    </div>
    
    <div class="recent-posts">
        <h2 class="section-title">Последние статьи</h2>
        <div class="posts-list">
            <?php while (have_posts()): the_post(); ?>
                <article class="post-item">
                    <?php if (has_post_thumbnail()): ?>
                        <div class="post-item-thumbnail">
                            <a href="<?php the_permalink(); ?>">
                                <?php the_post_thumbnail('medium'); ?>
                            </a>
                        </div>
                    <?php endif; ?>
                    <div class="post-item-content">
                        <h3 class="post-item-title">
                            <a href="<?php the_permalink(); ?>">
                                <?php the_title(); ?>
                            </a>
                        </h3>
                        <div class="post-item-meta">
                            <time><?php echo get_the_date(); ?></time>
                        </div>
                        <div class="post-item-excerpt">
                            <?php the_excerpt(); ?>
                        </div>
                    </div>
                </article>
            <?php endwhile; ?>
        </div>
        
        <div class="pagination">
            <?php the_posts_pagination(); ?>
        </div>
    </div>
</section>

<?php get_footer(); ?>
```

```css
/* Добавь в style.css */
.site-logo {
    text-align: center;
    margin: 2rem 0 3rem;
}

.site-logo img {
    max-width: 200px;
    height: auto;
}

.featured-posts {
    margin-bottom: 4rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.featured-post {
    border-bottom: 1px solid #eee;
    padding-bottom: 2rem;
}

.featured-post-thumbnail {
    margin-bottom: 1rem;
}

.featured-post-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
}

.featured-post-title {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.featured-post-title a {
    text-decoration: none;
    color: #333;
}

.posts-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.post-item {
    display: flex;
    gap: 1.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #eee;
}

.post-item-thumbnail {
    flex-shrink: 0;
    width: 200px;
}

.post-item-thumbnail img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
}

.post-item-content {
    flex-grow: 1;
}

.post-item-title {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.post-item-title a {
    text-decoration: none;
    color: #333;
}

.post-item-meta {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .post-item {
        flex-direction: column;
    }
    
    .post-item-thumbnail {
        width: 100%;
    }
    
    .featured-posts {
        grid-template-columns: 1fr;
    }
}
.logo {
    display: block;
    width: 240px;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    padding: 20px 0;
}

@media (max-width: 768px) {
    .logo {
        width: 200px;
        padding: 15px 0;
    }
}

@media (max-width: 480px) {
    .logo {
        width: 160px;
        padding: 10px 0;
    }
}