
:root {
    /* Цветовая палитра (Dark Theme) */
    --c-bg-main: #0f172a;
    --c-bg-secondary: #1e293b;
    --c-bg-surface: #334155;
    
    --c-text-primary: #f8fafc;
    --c-text-secondary: #cbd5e1;
    --c-text-accent: #38bdf8;
    
    --c-primary: #3b82f6;
    --c-primary-hover: #2563eb;
    --c-accent: #f97316;
    --c-accent-hover: #ea580c;
    --c-success: #22c55e;
    --c-danger: #ef4444;

    /* Градиенты */
    --g-primary: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    --g-accent: linear-gradient(135deg, #f97316 0%, #ef4444 100%);
    --g-surface: linear-gradient(180deg, rgba(51, 65, 85, 0.5) 0%, rgba(30, 41, 59, 0.5) 100%);

    /* Размеры и отступы */
    --gap-sm: 0.5rem;
    --gap-md: 1rem;
    --gap-lg: 2rem;
    --gap-xl: 4rem;
    
    --border-radius-sm: 0.5rem;
    --border-radius-md: 1rem;
    --border-radius-lg: 1.5rem;

    /* Тени */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-glow: 0 0 15px rgba(59, 130, 246, 0.5);

    /* Типографика */
    --font-main: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --fs-h1: clamp(2rem, 5vw, 3rem);
    --fs-h2: clamp(1.5rem, 4vw, 2.25rem);
    --fs-body: 1rem;
}

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    background-color: var(--c-bg-main);
    color: var(--c-text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--c-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

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

ul {
    list-style: none;
}

/* --- Layout Container --- */
.ast-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--gap-md);
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
    color: var(--c-text-primary);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: var(--gap-md);
    letter-spacing: -0.02em;
}

h1 { font-size: var(--fs-h1); text-transform: uppercase; background: var(--g-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
h2 { font-size: var(--fs-h2); border-left: 4px solid var(--c-accent); padding-left: var(--gap-sm); }
h3 { font-size: 1.5rem; }

p {
    margin-bottom: var(--gap-md);
    color: var(--c-text-secondary);
    font-size: var(--fs-body);
}

/* --- Header --- */
.site-header {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: var(--gap-sm) 0;
    box-shadow: var(--shadow-lg);
}

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

.site-branding img {
    height: 40px;
    width: auto;
    filter: drop-shadow(0 0 5px rgba(255,255,255,0.2));
}

/* Navigation */
.main-header-menu {
    display: flex;
    gap: var(--gap-md);
}

.menu-item .menu-link {
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    color: var(--c-text-primary);
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius-sm);
    transition: all 0.3s ease;
    letter-spacing: 0.05em;
}

.menu-item .menu-link:hover,
.menu-item.current-menu-item .menu-link {
    background: rgba(255,255,255,0.1);
    color: var(--c-text-accent);
}

/* Header Buttons (Registration) */
.ast-custom-button {
    background: var(--g-accent);
    color: white !important;
    padding: 0.6rem 1.2rem;
    border-radius: var(--border-radius-sm);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s, box-shadow 0.2s;
    text-align: center;
}

.ast-custom-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(249, 115, 22, 0.5);
}

/* --- Main Content Area --- */
.site-content {
    padding: var(--gap-lg) 0;
}

/* Grid Layout for Content + Sidebar */
@media (min-width: 922px) {
    .ast-container {
        display: grid;
        grid-template-columns: 1fr 320px; /* Main content | Sidebar */
        gap: var(--gap-lg);
        align-items: start;
    }
}

/* Article Styling */
article.page {
    background: var(--c-bg-secondary);
    padding: var(--gap-lg);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255,255,255,0.05);
}

/* Blockquotes / Preformatted text boxes */
.wp-block-preformatted {
    font-family: var(--font-main);
    padding: var(--gap-md);
    border-radius: var(--border-radius-sm);
    border-left: 4px solid;
    margin-bottom: var(--gap-lg);
    font-weight: 500;
    color: var(--c-bg-main); /* Text color for light backgrounds */
    position: relative;
    overflow: hidden;
}

/* Specific colors from HTML styles overridden with cleaner CSS */
.wp-block-preformatted[style*="background-color:#f8d7da"] {
    background-color: rgba(239, 68, 68, 0.15) !important;
    color: #fca5a5;
    border-color: var(--c-danger);
}
.wp-block-preformatted[style*="background-color:#d4edda"] {
    background-color: rgba(34, 197, 94, 0.15) !important;
    color: #86efac;
    border-color: var(--c-success);
}
.wp-block-preformatted[style*="background-color:#fff3cd"] {
    background-color: rgba(234, 179, 8, 0.15) !important;
    color: #fde047;
    border-color: #eab308;
}

/* --- Buttons (Content) --- */
.wp-block-button__link {
    display: inline-block;
    background: var(--g-primary);
    color: white;
    padding: 1rem 2rem;
    border-radius: var(--border-radius-lg);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    box-shadow: var(--shadow-glow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    text-align: center;
    width: 100%;
}

@media (min-width: 768px) {
    .wp-block-button__link { width: auto; }
}

.wp-block-button__link:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 20px 25px -5px rgba(59, 130, 246, 0.4);
    color: white;
}

.wp-block-button__link:active {
    transform: translateY(0);
}

/* --- Images --- */
figure.wp-block-image {
    margin-bottom: var(--gap-lg);
    overflow: hidden;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255,255,255,0.05);
}

figure.wp-block-image img {
    transition: transform 0.5s ease;
    width: 100%;
}

figure.wp-block-image:hover img {
    transform: scale(1.03);
}

/* --- Sidebar / Widget Area --- */
.widget {
    background: var(--c-bg-secondary);
    border-radius: var(--border-radius-md);
    margin-bottom: var(--gap-lg);
    border: 1px solid rgba(255,255,255,0.05);
    overflow: hidden;
}

.widget h3 {
    font-size: 1.25rem;
    margin-bottom: var(--gap-sm);
    color: var(--c-text-primary);
}

/* Coupon Widget Specifics */
.widget_block .wp-block-group {
    background-color: var(--c-bg-surface) !important; /* Override inline styles */
    border: 1px solid rgba(255,255,255,0.1);
    padding: var(--gap-md) !important;
}

.widget_block h3 {
    color: var(--c-accent) !important;
    text-align: center;
}

.widget_block p.has-background {
    background-color: rgba(255,255,255,0.05) !important;
    color: var(--c-text-secondary);
    padding: var(--gap-md);
    border-radius: var(--border-radius-sm);
    border: 1px dashed rgba(255,255,255,0.2);
}

/* --- Footer --- */
.site-footer {
    background-color: #020617;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding: var(--gap-xl) 0 var(--gap-md);
    margin-top: var(--gap-xl);
    font-size: 0.9rem;
}

.site-footer ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--gap-md);
    margin-bottom: var(--gap-lg);
}

.site-footer a {
    color: var(--c-text-secondary);
}

.site-footer a:hover {
    color: var(--c-primary);
}

.site-footer p {
    text-align: center;
    color: #64748b;
    font-size: 0.85rem;
    margin-bottom: var(--gap-sm);
}

/* --- Mobile Menu & Responsive --- */
@media (max-width: 921px) {
    .main-header-bar {
        flex-wrap: wrap;
    }
    
    .main-header-menu {
        display: none; /* Hidden by default, toggled via JS usually */
        flex-direction: column;
        width: 100%;
        background: var(--c-bg-secondary);
        position: absolute;
        top: 100%;
        left: 0;
        padding: var(--gap-md);
        box-shadow: var(--shadow-lg);
    }
    
    .ast-mobile-menu-trigger-minimal {
        background: transparent;
        border: none;
        color: var(--c-text-primary);
        cursor: pointer;
    }
    
    .menu-toggle .ast-mobile-svg {
        width: 24px;
        height: 24px;
        fill: currentColor;
    }

    .ast-header-button-1 {
        display: none; /* Hide standard button on mobile if needed, or adjust */
    }

    .ast-builder-grid-row {
        flex-direction: column;
    }
    
    h1 { margin-top: var(--gap-md); }
}

/* --- Form Elements (Search) --- */
.search-form {
    position: relative;
    display: flex;
    align-items: center;
}

.search-field {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--c-text-primary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-family: inherit;
    outline: none;
    transition: all 0.3s;
    width: 200px;
}

.search-field:focus {
    background: rgba(255,255,255,0.1);
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.search-submit {
    background: transparent;
    border: none;
    color: var(--c-text-secondary);
    cursor: pointer;
    margin-left: -35px;
    padding: 5px;
}

.search-submit:hover {
    color: var(--c-text-primary);
}

/* --- Scrollbar Customization --- */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--c-bg-main);
}

::-webkit-scrollbar-thumb {
    background: var(--c-bg-surface);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* --- Micro-animations --- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.entry-content > * {
    animation: fadeIn 0.6s ease-out forwards;
}
