
:root {
    /* Цветовая палитра */
    --primary-color: #1a56be;
    --primary-dark: #123d8c;
    --accent-color: #79c12b;
    --accent-hover: #67a624;
    --secondary-accent: #ff9100;
    --text-main: #334155;
    --text-light: #64748b;
    --text-white: #ffffff;
    --bg-body: #f1f5f9;
    --bg-surface: #ffffff;
    --bg-header: #ffffff;
    
    /* Отступы и размеры */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --container-width: 1200px;
    --header-height: 80px;

    /* Границы и тени */
    --border-radius-sm: 0.375rem;
    --border-radius-md: 0.75rem;
    --border-radius-lg: 1rem;
    --border-radius-full: 9999px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --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);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Типографика */
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
    --font-size-base: 1rem;
    --line-height-base: 1.6;
    
    /* Анимации */
    --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: var(--line-height-base);
    overflow-x: hidden;
}

ul, ol {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-base);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button, input {
    font-family: inherit;
    border: none;
    outline: none;
}

/* --- Layout & Utility Classes --- */
.site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-content-inner, .site-header-inner, .main-navigation-inner {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    width: 100%;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* --- Header Styling --- */
.site-header {
    background-color: var(--bg-header);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    gap: var(--spacing-md);
}

.site-logotype img {
    max-height: 50px;
    width: auto;
    transition: var(--transition-base);
}

.site-logotype:hover img {
    transform: scale(1.05);
}

/* Navigation */
.top-menu {
    flex: 1;
    display: flex;
    justify-content: center;
}

.top-menu ul {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
}

.top-menu a {
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    color: var(--text-main);
    padding: var(--spacing-sm) var(--spacing-xs);
    position: relative;
    letter-spacing: 0.02em;
}

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

.top-menu a:hover {
    color: var(--primary-color);
}

.top-menu a:hover::after {
    width: 100%;
}

/* Header Buttons (Overriding inline styles for consistency) */
.header-html-1 {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
}

.su-button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 0.6em 1.2em !important;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem !important;
    border-radius: var(--border-radius-sm) !important;
    transition: var(--transition-base);
    box-shadow: var(--shadow-md);
    border: none !important;
    cursor: pointer;
    line-height: 1.2 !important;
}

.su-button span {
    padding: 0 !important;
    font-size: inherit !important;
    line-height: inherit !important;
    text-shadow: none !important;
    border: none !important;
}

/* Specific styling for Reg/Login buttons to ignore inline colors if needed, 
   but respecting the HTML structure implies we treat them as primary/secondary actions */
.header-html-1 > a.su-button:first-child {
    background: var(--accent-color) !important;
    color: #fff !important;
}

.header-html-1 > a.su-button:first-child:hover {
    background: var(--accent-hover) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.header-html-1 a.su-button:last-child {
    background: var(--primary-color) !important;
    color: #fff !important;
}

.header-html-1 a.su-button:last-child:hover {
    background: var(--primary-dark) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Hamburger (Mobile) */
.humburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
}

.humburger span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--text-main);
    border-radius: 2px;
    transition: var(--transition-base);
}

/* --- Main Content Area --- */
.site-content {
    padding: var(--spacing-xl) 0;
    flex: 1;
}

.site-content-inner {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: var(--spacing-xl);
    align-items: start;
}

/* Article Styling */
.article-post {
    background: var(--bg-surface);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    padding: var(--spacing-xl);
    overflow: hidden;
}

.entry-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: var(--spacing-lg);
    line-height: 1.2;
    position: relative;
    padding-bottom: var(--spacing-md);
}

.entry-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: var(--border-radius-full);
}

.entry-content {
    font-size: 1.05rem;
    color: var(--text-main);
}

.entry-content p {
    margin-bottom: var(--spacing-lg);
}

.entry-content h2 {
    font-size: 1.75rem;
    margin: var(--spacing-xl) 0 var(--spacing-md);
    color: var(--primary-dark);
    font-weight: 700;
}

.entry-content h3 {
    font-size: 1.4rem;
    margin: var(--spacing-lg) 0 var(--spacing-sm);
    color: var(--text-main);
}

.entry-content ul, .entry-content ol {
    margin-bottom: var(--spacing-lg);
    padding-left: var(--spacing-lg);
}

.entry-content ul li {
    list-style: disc;
    margin-bottom: var(--spacing-xs);
    color: var(--text-light);
}

.entry-content ol li {
    list-style: decimal;
    margin-bottom: var(--spacing-xs);
    color: var(--text-light);
}

/* --- Sidebar --- */
.widget-area {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.widget {
    background: var(--bg-surface);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: var(--transition-base);
}

.widget:hover {
    box-shadow: var(--shadow-lg);
}

/* Promo Widget Specifics */
.promo {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: var(--spacing-xl);
    text-align: center;
    color: var(--text-white);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
}

.promo::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(26, 86, 190, 0.85), rgba(0, 0, 0, 0.6));
    z-index: 1;
}

.promo dl {
    position: relative;
    z-index: 2;
}

.promo dt {
    font-size: 2.5rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: var(--spacing-xs);
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.promo dt span {
    font-size: 1rem;
    font-weight: 400;
    opacity: 0.8;
}

.promo dd p {
    font-size: 1rem;
    margin-bottom: var(--spacing-md);
    opacity: 0.9;
}

.promo .btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--secondary-accent);
    color: var(--text-white);
    font-weight: 700;
    text-transform: uppercase;
    border-radius: var(--border-radius-full);
    box-shadow: 0 4px 10px rgba(255, 145, 0, 0.4);
    transition: var(--transition-base);
    letter-spacing: 0.05em;
    font-size: 0.9rem;
}

.promo .btn:hover {
    background: #ffaa33;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 145, 0, 0.5);
}

/* --- Search Overlay --- */
.search-screen-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 101;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-base);
}

.search-screen {
    position: fixed;
    top: -100px;
    left: 0;
    width: 100%;
    background: var(--bg-surface);
    padding: var(--spacing-lg);
    z-index: 102;
    transition: var(--transition-base);
    box-shadow: var(--shadow-lg);
}

.search-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    gap: var(--spacing-sm);
}

.search-form label {
    flex: 1;
}

.search-field {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: var(--border-radius-md);
    font-size: 1rem;
    transition: var(--transition-base);
}

.search-field:focus {
    border-color: var(--primary-color);
}

.search-submit {
    padding: 0 1.5rem;
    background-color: var(--primary-color);
    border-radius: var(--border-radius-md);
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z' /%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 20px;
    transition: var(--transition-base);
}

.search-submit:hover {
    background-color: var(--primary-dark);
}

/* --- Footer --- */
.site-footer {
    background-color: #1e293b;
    color: #94a3b8;
    padding: var(--spacing-xl) 0;
    text-align: center;
    margin-top: auto;
}

.site-footer p {
    font-size: 0.9rem;
}

/* --- Promocode Sticky Bar --- */
.promocode {
    position: fixed;
    bottom: var(--spacing-md);
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(90deg, #1a237e, #283593);
    color: white;
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--border-radius-full);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    box-shadow: 0 10px 25px rgba(26, 35, 126, 0.4);
    z-index: 900;
    animation: slideUp 0.5s ease-out;
    width: 90%;
    max-width: 600px;
}

.promocode > div {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-weight: 500;
}

.promocode .gift {
    display: block;
    width: 24px;
    height: 24px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ff9100'%3E%3Cpath d='M20 7h-4.18C16.4 5.8 16.69 4.65 16.69 4.5c0-1.38-1.12-2.5-2.5-2.5-1.15 0-2.12.78-2.42 1.84L12 3.19l.23.69C11.93 2.78 10.96 2 9.81 2c-1.38 0-2.5 1.12-2.5 2.5 0 .15.29 1.3.87 2.5H4c-1.1 0-2 .9-2 2v2c0 1.1.9 2 2 2v7c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-7c1.1 0 2-.9 2-2V9c0-1.1-.9-2-2-2zm-5.81-3c.28 0 .5.22.5.5 0 .06-.11.77-.6 1.83l-.71-2.15c.24-.12.52-.18.81-.18zm-4.38 0c.29 0 .57.06.81.18l-.71 2.15c-.49-1.06-.6-1.77-.6-1.83 0-.28.22-.5.5-.5zM12 11c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 7h-5v-3h5v3zm0-5h-5v-3h5v3zM6 18H1v-3h5v3zm0-5H1v-3h5v3z'/%3E%3C/svg%3E") no-repeat center/contain;
}

.promocode-button {
    background: var(--accent-color);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-full);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-base);
    white-space: nowrap;
}

.promocode-button:hover {
    background: var(--accent-hover);
}

.promocode-button span {
    color: #fff;
    text-shadow: 0 1px 1px rgba(0,0,0,0.2);
}

.promocode-close {
    cursor: pointer;
    margin-left: auto;
    opacity: 0.7;
    transition: var(--transition-base);
    width: 20px;
    height: 20px;
}

.promocode-close:hover {
    opacity: 1;
}

.promocode-close svg {
    width: 100%;
    height: 100%;
}

@keyframes slideUp {
    from { transform: translate(-50%, 100%); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

/* --- Scroll Top Button --- */
.scrolltop {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    background: var(--primary-color);
    border-radius: 50%;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-base);
    z-index: 99;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 10l7-7m0 0l7 7m-7-7v18' /%3E%3C/svg%3E");
    background-size: 1.5rem;
    background-position: center;
    background-repeat: no-repeat;
}

.scrolltop.is-visible { /* Assuming JS adds this class */
    opacity: 1;
    visibility: visible;
}

.scrolltop:hover {
    background-color: var(--primary-dark);
    transform: translateY(-5px);
}

/* --- Responsive Design --- */

/* Tablet & Smaller Desktop */
@media (max-width: 992px) {
    .site-content-inner {
        grid-template-columns: 1fr;
    }

    .widget-area {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: var(--spacing-md);
    }
    
    .top-menu a {
        font-size: 0.8rem;
        padding: var(--spacing-sm) 0.3rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }

    .top-menu {
        display: none; /* Hide default menu, assume mobile menu takes over via JS styling */
    }

    .humburger {
        display: flex;
    }

    .header-html-1 {
        display: none; /* Often buttons are moved to mobile menu, but if wanted: */
    }

    .site-logotype img {
        max-height: 40px;
    }

    .article-post {
        padding: var(--spacing-md);
    }

    .entry-title {
        font-size: 1.75rem;
    }
    
    .promocode {
        flex-direction: column;
        padding: var(--spacing-md);
        bottom: 0;
        width: 100%;
        max-width: 100%;
        border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    }
    
    .promocode > div {
        flex-direction: column;
        text-align: center;
    }
    
    .promocode-close {
        position: absolute;
        top: 10px;
        right: 10px;
    }
}
