
:root {
    /* Цветовая палитра */
    --color-primary: #0d47a1;
    --color-primary-dark: #002171;
    --color-accent: #29b6f6;
    --color-cta: #ffc107; /* Желтый для кнопок */
    --color-cta-hover: #ffca28;
    --color-text-main: #1a1a1a;
    --color-text-light: #5f6368;
    --color-bg-body: #f0f2f5;
    --color-bg-card: #ffffff;
    --color-border: #e0e0e0;
    --color-white: #ffffff;

    /* Типографика */
    --font-family-base: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --line-height-base: 1.6;
    --font-size-base: 1rem;
    
    /* Размеры и отступы */
    --container-width: 1200px;
    --gap-base: 1.5rem;
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-pill: 50rem;

    /* Тени и эффекты */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Сброс и базовые стили */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--color-text-main);
    background-color: var(--color-bg-body);
    -webkit-font-smoothing: antialiased;
}

/* Ссылки */
a {
    color: var(--color-primary);
    text-decoration: none;
    transition: var(--transition-base);
}

a:hover {
    color: var(--color-accent);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-md);
}

/* Layout - Сетка */
.grid-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding-left: var(--gap-base);
    padding-right: var(--gap-base);
}

.site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-content {
    display: flex;
    margin-top: 2rem;
    gap: var(--gap-base);
}

.content-area {
    flex: 3;
    min-width: 0; /* Fix flexbox overflow */
}

.widget-area {
    flex: 1;
}

/* Header */
.site-header {
    background: var(--color-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.75rem 0;
}

.inside-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Навигация */
.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.main-navigation a {
    color: var(--color-text-main);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem;
    position: relative;
}

.main-navigation a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--color-primary);
    transition: var(--transition-base);
}

.main-navigation a:hover::after {
    width: 100%;
}

/* Типографика контента */
h1, h2, h3, h4, h5, h6 {
    color: var(--color-primary-dark);
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-top: 2rem; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); color: var(--color-text-main); }

p {
    margin-bottom: 1.5rem;
    color: var(--color-text-light);
}

/* Карточки статей */
.inside-article {
    background: var(--color-bg-card);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
}

/* WP Columns / Grid System */
.wp-block-columns {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gap-base);
    margin-bottom: 2rem;
    align-items: start;
}

.wp-block-column {
    flex: 1;
    min-width: 300px;
}

/* Кнопки и CTA */
.button-container {
    text-align: center;
    margin: 2rem 0;
}

a.winlink {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: var(--color-white);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-md);
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

a.winlink::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-accent), var(--color-primary));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

a.winlink:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

a.winlink:hover::before {
    opacity: 1;
}

a.winlink:active {
    transform: translateY(0);
}

a.winlink.yellow {
    background: linear-gradient(135deg, var(--color-cta), #ffa000);
    color: #000;
    text-shadow: 0 1px 0 rgba(255,255,255,0.4);
}

a.winlink.yellow::before {
    background: linear-gradient(135deg, #ffca28, #ff6f00);
}

/* Элементы списков */
.entry-content ul, .entry-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--color-text-light);
}

.entry-content li {
    margin-bottom: 0.5rem;
    position: relative;
}

/* Сайдбар */
.sidebar .widget {
    background: var(--color-bg-card);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
}

/* Footer */
.site-footer {
    background-color: var(--color-primary-dark);
    color: rgba(255,255,255,0.8);
    padding: 3rem 0;
    margin-top: auto;
}

.site-footer a {
    color: var(--color-white);
}

.site-footer ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

.copyright-bar {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 2rem;
    font-size: 0.85rem;
}

/* Мобильное меню (Slideout) */
.slideout-navigation {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: var(--color-bg-card);
    z-index: 1001;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.slideout-enabled.slideout-open .slideout-navigation {
    transform: translateX(0);
}

.slideout-menu {
    display: flex;
    flex-direction: column;
    padding: 2rem;
}

.slideout-menu li {
    list-style: none;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 0.5rem;
}

/* Микро-анимация появления */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

article {
    animation: fadeIn 0.6s ease-out;
}

/* Адаптивный дизайн */
@media (max-width: 992px) {
    .site-content {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
}

@media (max-width: 768px) {
    /* Скрываем десктопное меню */
    .main-navigation:not(.slideout-navigation) {
        display: none;
    }
    
    /* Кнопка мобильного меню */
    .menu-toggle {
        display: block;
        background: none;
        border: none;
        color: var(--color-primary);
        font-size: 1.5rem;
        cursor: pointer;
    }
    
    .inside-article {
        padding: 1.5rem;
    }
    
    .wp-block-column {
        min-width: 100%;
        margin-bottom: 1rem;
    }
    
    h1 {
        text-align: center;
    }
    
    .winlink {
        width: 100%;
        text-align: center;
    }
}

/* Улучшения для форм и доступности (если появятся) */
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* Скрытие SVG фильтров чтобы не мешали верстке */
svg[style*="visibility: hidden"] {
    display: none;
}
