/*
Theme Name: GraySteelblueGridTheme
Author: Ведерников Сергей Николаевич город Саратов
Author URI: https://1promtai.ru/
Description: Мой первый адаптивный шаблон WordPress
Version: 4.9
License: GNU General Public License v3 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html
*/

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
}

/* Основная сетка */
body {
    display: grid;
    grid-template-areas: 
        "header header header"
        "nav nav nav"
        "ads main aside"
        "footer footer footer";
    grid-template-columns: 0.3fr 1fr 0.3fr;
    grid-template-rows: auto auto 1fr auto;
    min-height: 100vh;
    margin: 0;
    background: white;
    color: #2c3e50;
    line-height: 1.5;
    font-size: 14px;
}

/* Шапка - тёмная */
.header {
    grid-area: header;
    background: #2c3e50;
    text-align: center;
    padding: 15px 20px;
    border-bottom: 3px solid #3498db;
}

.header a {
    color: #ecf0f1;
    text-decoration: none;
    font-size: 1.8em;
    font-weight: bold;
    letter-spacing: -0.5px;
}

.header a:hover {
    color: #3498db;
}

/* Навигация - тёмная */
.nav {
    grid-area: nav;
    background: #34495e;
    padding: 12px 0;
}

.nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    margin: 0;
    padding: 0;
}

.nav li {
    margin: 0 12px;
}

.nav a {
    color: #bdc3c7;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 15px;
    border-radius: 3px;
    transition: all 0.3s ease;
    font-size: 13px;
    text-transform: uppercase;
}

.nav a:hover {
    background: #3498db;
    color: white;
}

/* Основной контент - белый */
.main {
    grid-area: main;
    padding: 25px 20px;
    background: white;
    max-width: 100%;
    min-height: 500px;
}

.main a {
    color: #2980b9;
    text-decoration: none;
}

.main a:hover {
    color: #e74c3c;
    text-decoration: underline;
}

/* Боковые колонки - серые */
.ads {
    grid-area: ads;
    padding: 20px 15px;
    background: #ecf0f1;
    border-right: 1px solid #bdc3c7;
}

.aside {
    grid-area: aside;
    padding: 20px 15px;
    background: #ecf0f1;
    border-left: 1px solid #bdc3c7;
}

.ads h2, .aside h2 {
    background: #3498db;
    color: white;
    text-align: center;
    padding: 12px;
    margin: 0 0 15px 0;
    font-size: 13px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ads ul, .aside ul {
    list-style: none;
    background: white;
    padding: 12px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.ads li, .aside li {
    padding: 6px 0;
    border-bottom: 1px solid #eee;
    font-size: 13px;
}

.ads li:last-child, .aside li:last-child {
    border-bottom: none;
}

.ads a, .aside a {
    color: #2c3e50;
    text-decoration: none;
    font-size: 13px;
}

.ads a:hover, .aside a:hover {
    color: #e74c3c;
}

/* Подвал - чёрный, три колонки */
.footer {
    grid-area: footer;
    background: #1a1a1a;
    color: #bdc3c7;
    padding: 30px 20px;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto 20px;
}

.footer-column {
    padding: 0 10px;
}

.footer-column h4 {
    color: #3498db;
    font-size: 14px;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #3498db;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-column p,
.footer-column a {
    color: #95a5a6;
    font-size: 12px;
    line-height: 1.6;
    margin-bottom: 8px;
}

.footer-column a:hover {
    color: #3498db;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #333;
    margin-top: 20px;
}

.footer-bottom p {
    color: #7f8c8d;
    margin: 3px 0;
    font-size: 11px;
}

/* Сетка записей - новостной стиль */
.loop {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.article-loop {
    background: white;
    border: 1px solid #ecf0f1;
    border-radius: 5px;
    overflow: hidden;
    transition: all 0.3s ease;
    padding: 15px;
}

.article-loop:hover {
    border-color: #3498db;
    box-shadow: 0 2px 10px rgba(52, 152, 219, 0.2);
}

.article-loop img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    margin-bottom: 12px;
    border-radius: 3px;
}

.article-loop h2 {
    margin: 0 0 10px 0;
    font-size: 16px;
    line-height: 1.3;
}

.article-loop h2 a {
    color: #2c3e50;
    text-decoration: none;
    font-weight: bold;
}

.article-loop h2 a:hover {
    color: #e74c3c;
}

.article-loop .entry-excerpt {
    color: #7f8c8d;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 10px;
}

.more-link {
    color: #3498db;
    font-weight: bold;
    text-decoration: none;
    font-size: 12px;
    display: inline-block;
}

.more-link:hover {
    color: #e74c3c;
    text-decoration: underline;
}

/* Пагинация */
.pag {
    text-align: center;
    margin: 25px 0;
}

.pag .page-numbers {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 3px;
    background: #ecf0f1;
    color: #2c3e50;
    text-decoration: none;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
    min-width: 35px;
    text-align: center;
    border: 1px solid #ddd;
}

.pag .page-numbers:hover,
.pag .page-numbers.current {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.pag .dots {
    background: transparent;
    color: #7f8c8d;
    border: none;
}

/* Стили для текста статей - убираем маркеры везде кроме контента */
.main ul:not(.wp-block-gallery):not(.blocks-gallery-grid):not(.wp-block-social-links),
.main ol:not(.wp-block-gallery):not(.blocks-gallery-grid) {
    list-style: none;
    padding-left: 0;
}

.main ul:not(.wp-block-gallery):not(.blocks-gallery-grid):not(.wp-block-social-links) li,
.main ol:not(.wp-block-gallery):not(.blocks-gallery-grid) li {
    padding-left: 0;
    margin-left: 0;
}

/* Только для контента статей оставляем маркеры */
.entry-content ul:not(.wp-block-gallery):not(.blocks-gallery-grid):not(.wp-block-social-links),
.entry-content ol:not(.wp-block-gallery):not(.blocks-gallery-grid) {
    list-style: disc;
    padding-left: 20px;
    margin: 15px 0;
}

.entry-content ul:not(.wp-block-gallery):not(.blocks-gallery-grid):not(.wp-block-social-links) li,
.entry-content ol:not(.wp-block-gallery):not(.blocks-gallery-grid) li {
    padding-left: 5px;
    margin-bottom: 5px;
    font-size: 13px;
    line-height: 1.5;
}

/* Изображения */
img {
    max-width: 100%;
    height: auto;
    object-fit: cover;
}

/* Кнопка наверх */
#myBtn {
    display: none;
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 99;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

#myBtn:hover {
    background: #2980b9;
}

/* Адаптивность */
@media (max-width: 1024px) {
    body {
        grid-template-areas: 
            "header"
            "nav"
            "main"
            "ads"
            "aside"
            "footer";
        grid-template-columns: 1fr;
    }
    
    .ads {
        border-right: none;
        border-bottom: 1px solid #bdc3c7;
    }
    
    .aside {
        border-left: none;
        border-top: 1px solid #bdc3c7;
    }
    
    .footer-widgets {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .nav ul {
        flex-wrap: wrap;
    }
    
    .nav li {
        margin: 5px;
    }
}

@media (max-width: 768px) {
    .header a {
        font-size: 1.5em;
    }
    
    .nav a {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .main {
        padding: 20px 15px;
    }
    
    .ads, .aside {
        padding: 15px 10px;
    }
    
    .article-loop h2 {
        font-size: 15px;
    }
    
    .article-loop .entry-excerpt {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .header a {
        font-size: 1.3em;
    }
    
    .nav {
        padding: 8px 0;
    }
    
    .nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    .nav li {
        margin: 3px 0;
    }
    
    .footer {
        padding: 20px 15px;
    }
    
    #myBtn {
        bottom: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
}

/* Специфические стили для виджетов */
.widget {
    margin-bottom: 20px;
}

.widget ul {
    list-style: none;
    padding: 0;
}

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

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

/* Календарь */
#wp-calendar {
    width: 100%;
    background: white;
    border-radius: 4px;
    border: 1px solid #ddd;
}

#wp-calendar caption {
    background: #3498db;
    color: white;
    padding: 8px;
    font-weight: bold;
}

/* Поиск форма */
.search-form {
    display: flex;
    margin: 15px 0;
}

.search-form input[type="search"] {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 3px 0 0 3px;
    font-size: 13px;
}

.search-form input[type="submit"] {
    background: #3498db;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 0 3px 3px 0;
    cursor: pointer;
    font-size: 12px;
}