/*
Theme Name: Advanced Theme1
Theme URI: https://example.com
Author: Your Name
Description: Advanced test theme with basic templates.
Version: 1.0
Text Domain: advanced-theme1
*/

/* Базовые стили */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    background: #f5f5f5;
    color: #222222;
}

a {
    color: #0073aa;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Шапка */

.site-header {
    background: #111111;
    color: #ffffff;
    padding: 1rem 2rem;
}

.site-header .site-title a {
    color: #ffffff;
    font-size: 1.5rem;
}

.site-header .site-description {
    font-size: 0.9rem;
    color: #cccccc;
    margin-top: 0.3rem;
}

.site-header nav ul {
    list-style: none;
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.site-header nav a {
    color: #ffffff;
}

/* Основной контейнер */

.site-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    display: flex;
    flex-direction: row-reverse; /* sidebar right */
    gap: 2rem;
}

/* Основной контент */

.site-main {
    flex: 1;
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    position: relative;
}

.site-main::before {
    content: "MAIN CONTENT";
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    color: #999999;
    margin-bottom: 8px;
}

/* Боковой сайдбар */

.site-sidebar {
    width: 280px;
    background: #f0f4ff;
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px dashed #3b82f6;
    position: relative;
}

.site-sidebar::before {
    content: "SIDEBAR";
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    color: #666666;
    margin-bottom: 8px;
}

/* Подвал */

.site-footer {
    background: #222222;
    color: #ffffff;
    text-align: center;
    padding: 1.5rem;
    margin-top: 2rem;
}

/* Футер: 4 сайдбара */

.footer-widgets {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.footer-widget-column {
    flex: 1 1 calc(25% - 1.5rem);
    min-width: 200px;
}

.footer-widget {
    margin-bottom: 1rem;
}

/* Футер-меню: одна строка на десктопе, колонкой на мобиле */

.footer-navigation {
    margin-top: 0.5rem;
}

.footer-navigation ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 0;
    margin: 0;
}

.footer-navigation li {
    /* по умолчанию в строку через flex родителя */
}

.footer-navigation a {
    color: #ffffff;
    text-decoration: none;
}

/* Посты и заголовки */

.entry-title {
    margin-bottom: 0.5rem;
}

.entry-meta {
    font-size: 0.9rem;
    color: #777777;
    margin-bottom: 1rem;
}

.entry-content {
    margin-bottom: 1.5rem;
}

/* Виджеты */

.widget {
    margin-bottom: 1.5rem;
}

.widget-title {
    margin-bottom: 0.5rem;
    font-weight: bold;
}

/* Виджеты под заголовком контента */

.content-top-widgets {
    margin: 1rem 0 1.5rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 6px;
    border: 1px dashed #d1d5db;
}

/* Мобильная версия */

@media (max-width: 768px) {

    /* Контент и сайдбар: сайдбар над контентом */

    .site-container {
        flex-direction: column;
    }

    .site-sidebar {
        width: 100%;
        order: 1;
    }

    .site-main {
        width: 100%;
        order: 2;
    }

    /* Футер-сайдбары: один под другим */

    .footer-widgets {
        flex-direction: column;
    }

    .footer-widget-column {
        flex: 1 1 100%;
        min-width: 100%;
    }

    /* Футер-меню: пункты один под другим */

    .footer-navigation ul {
        flex-direction: column;
        align-items: center;
    }
}