/*
Theme Name: Advanced Grid Theme
Theme URI: https://1promtai.ru
Author: Vedernikov Sergey
Author URI: https://1promtai.ru
Description: WordPress theme with specific CSS Grid layout
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: advanced-grid-theme
*/

/* ===== ОСНОВНАЯ СЕТКА ===== */
body {
    display: grid;
    grid-template-areas: 
        "header header header"
        "nav nav nav"
        "ads article aside"
        "pag pag pag"
        "footer footer footer";
    grid-gap: 0;
    margin: 0;
    grid-template-columns: .5fr 1fr .5fr;
    grid-auto-rows: minmax(70px, auto);
    min-height: 100vh;
    max-width: 1400px;
    margin: 0 auto;
}

/* ===== ГЛАВНАЯ СТРАНИЦА ===== */
.home-main {
    grid-area: article;
    padding: 2rem;
}

/* Сетка 3 колонки ТОЛЬКО для главной */
.posts-grid-three-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 1024px) {
    .posts-grid-three-columns {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    body {
        grid-template-areas: 
            "header header header"
            "nav nav nav"
            "article article article"
            "ads ads ads"
            "aside aside aside"
            "pag pag pag"
            "footer footer footer";
        grid-template-columns: 1fr;
    }
    
    .posts-grid-three-columns {
        grid-template-columns: 1fr;
    }
    
    .home-main {
        padding: 1rem;
    }
}

/* ===== ОБЩИЕ СТИЛИ (для всех страниц) ===== */
.site-header { grid-area: header; background: #2c3e50; color: white; padding: 0 20px; }
.main-navigation { grid-area: nav; background: #34495e; }
.sidebar-left { grid-area: ads; background: #ecf0f1; padding: 1rem; }
.main-content { grid-area: article; background: white; padding: 2rem; }
.sidebar-right { grid-area: aside; background: #ecf0f1; padding: 1rem; }
.pagination { grid-area: pag; background: #f8f9fa; padding: 1rem; text-align: center; }
.site-footer { grid-area: footer; background: #2c3e50; color: white; padding: 2rem; text-align: center; }

/* Посткарточки */
.post-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.post-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.post-content {
    padding: 1.5rem;
}