/*
Theme Name: MyCleanBlog
Theme URI: https://вашсайт.ru
Author: TrueWP
Author URI: https://truewp.ru
Description: MyCleanBlog — это современная, лёгкая и адаптивная тема для WordPress, созданная для блогеров, фрилансеров и малого бизнеса. Тема поддерживает кастомное меню, виджеты, миниатюры записей, поиск и панель настроек Customizer (изменение цветов, логотипа, положения миниатюры, текста в подвале). Идеально подходит для личного блога, портфолио, новостного сайта или корпоративного блога. Адаптивный дизайн гарантирует отличный вид на всех устройствах: от смартфонов до широкоформатных мониторов.
Version: 1.0
License: GPL v2 or later
Text Domain: mycleanblog
Tags: blog, two-columns, right-sidebar, custom-menu, custom-logo, custom-colors, featured-images, threaded-comments, translation-ready, rtl-language-support, responsive-layout, accessibility-ready
*/

/* Общие стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f4f4f4;
}

.container {
    max-width: 1100px;
    margin: auto;
    overflow: hidden;
    padding: 0 20px;
}

/* Шапка */
header {
    background: #333;
    color: #fff;
    padding-top: 15px;
    padding-bottom: 15px;
    border-bottom: #e8491d 3px solid;
}

header a {
    color: #fff;
    text-decoration: none;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

.site-title {
    font-size: 1.5rem;
    margin: 0;
}

.site-title a {
    text-decoration: none;
}

/* Кнопка гамбургер (по умолчанию скрыта на десктопе) */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    padding: 0 10px;
}

/* Десктопное меню */
.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.main-navigation li {
    margin: 0 5px;
}

.main-navigation a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    transition: background 0.3s;
}

.main-navigation a:hover {
    background: #e8491d;
    border-radius: 4px;
}

/* Главная колонка и сайдбар */
#main {
    float: left;
    width: 70%;
    margin-top: 20px;
}

#sidebar {
    float: right;
    width: 25%;
    margin-top: 20px;
    background: #fff;
    padding: 15px;
    border-radius: 5px;
}

/* Карточка записи */
.post {
    background: #fff;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    overflow: hidden;
}

.post h2 {
    margin-bottom: 10px;
    margin-top: 0;
}

.post h2 a {
    color: #333;
    text-decoration: none;
}

.post-meta {
    color: #777;
    font-size: 14px;
    margin-bottom: 15px;
}

.post-thumbnail {
    margin-bottom: 15px;
}

.post-thumbnail img,
.post-thumbnail-left img,
.post-thumbnail-right img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}

.post-excerpt {
    margin-bottom: 20px;
    line-height: 1.6;
    overflow: hidden;
}

.post-excerpt p {
    margin: 0 0 10px 0;
}

.button {
    display: inline-block;
    background: #e8491d;
    color: #fff;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background 0.3s;
    clear: both;
    float: left;
    margin-top: 5px;
}

.button:hover {
    background: #333;
}

/* Стили для положения миниатюры */
.post-thumbnail-left {
    float: left;
    width: 200px;
    margin-right: 20px;
}

.post-thumbnail-right {
    float: right;
    width: 200px;
    margin-left: 20px;
}

.post-content-right {
    overflow: hidden;
}

/* Подвал */
footer {
    background: #333;
    color: #fff;
    text-align: center;
    padding: 20px;
    margin-top: 20px;
    clear: both;
}

/* Формы */
input, textarea, select {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

button, input[type="submit"] {
    background: #e8491d;
    color: #fff;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 4px;
}

/* Пагинация */
.pagination {
    margin: 20px 0;
    text-align: center;
}

.pagination a {
    display: inline-block;
    background: #e8491d;
    color: #fff;
    padding: 8px 15px;
    text-decoration: none;
    border-radius: 4px;
    margin: 0 5px;
}

/* Исправление выхода изображений за границы на странице статьи */
.post-content img,
.post-content iframe,
.post-content video,
.post-content object {
    max-width: 100%;
    height: auto;
}

.post-content {
    overflow-x: hidden;
}

.single .post img,
.page .post img {
    max-width: 100%;
    height: auto;
}

.post-content table,
.post-content pre,
.post-content blockquote {
    max-width: 100%;
    overflow-x: auto;
    display: block;
}

/* ===== АДАПТИВ (МОБИЛЬНОЕ МЕНЮ) ===== */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .main-navigation {
        display: none;
        width: 100%;
        background: #333;
        margin-top: 15px;
        order: 3;
    }
    
    .main-navigation.active {
        display: block;
    }
    
    .main-navigation ul {
        flex-direction: column;
        text-align: center;
    }
    
    .main-navigation li {
        margin: 0;
        border-top: 1px solid #555;
    }
    
    .main-navigation a {
        padding: 12px;
    }
    
    .header-container {
        position: relative;
    }
    
    .logo-area {
        flex: 1;
    }
    
    /* Адаптация колонок */
    #main, #sidebar {
        float: none;
        width: 100%;
    }
    
    .post-thumbnail-left,
    .post-thumbnail-right {
        float: none;
        width: 100%;
        margin: 0 0 15px 0;
    }
    
    .post-content-right {
        overflow: visible;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .post {
        padding: 15px;
    }
    
    .button {
        display: block;
        text-align: center;
        float: none;
    }
}

/* Красивое название сайта в шапке */
.site-title {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin: 0;
}

.site-title a {
    background: linear-gradient(135deg, #fff 0%, #e8491d 100%);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: opacity 0.3s;
}

.site-title a:hover {
    opacity: 0.8;
}