
/* =========================================
   1. CSS Reset & Variables
   ========================================= */
:root {
    /* Цветовая палитра */
    --color-primary: #1a2c4e; /* Глубокий синий */
    --color-secondary: #2b90d9; /* Яркий голубой 1xBet style */
    --color-accent: #65b534; /* Сочный зеленый для действий */
    --color-accent-hover: #549a2a;
    --color-text: #333333;
    --color-text-light: #666666;
    --color-bg-body: #f4f6f9;
    --color-bg-white: #ffffff;
    --color-border: #e1e4e8;
    
    /* Типографика */
    --font-main: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-heading: 'Helvetica Neue', sans-serif;
    
    /* Размеры и отступы */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 2rem;
    --spacing-xl: 4rem;
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    
    /* Эффекты */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 6px 15px rgba(0,0,0,0.1);
    --shadow-lg: 0 15px 30px rgba(0,0,0,0.15);
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: var(--font-main);
    color: var(--color-text);
    background-color: var(--color-bg-body);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    text-decoration: none;
    color: var(--color-secondary);
    transition: color var(--transition-fast);
}

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

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

ul, ol {
    list-style: none;
}

/* =========================================
   2. Layout & Wrapper
   ========================================= */
.wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: flex;
    flex-direction: column;
}

.main-box {
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

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

/* =========================================
   3. Header & Navigation
   ========================================= */
.header {
    background: var(--color-bg-white);
    box-shadow: var(--shadow-sm);
    padding: var(--spacing-md) 0;
    position: relative;
    z-index: 100;
}

/* Контейнер header внутри wrapper лучше сделать flex */
.header .wrapper, 
.header > div { 
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.logo {
    max-height: 60px;
    transition: transform var(--transition-smooth);
}

.logo:hover {
    transform: scale(1.05);
}

.m-nav {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: var(--spacing-sm);
    flex-grow: 1;
}

/* Sticky Menu */
.sticky_menu {
    background: var(--color-primary);
    width: 100%;
    border-radius: var(--radius-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
}

.main-menu__list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing-md);
}

.main-menu__list li a {
    color: white;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    transition: all var(--transition-fast);
}

.main-menu__list li a:hover,
.main-menu__list li a:focus {
    background: rgba(255,255,255,0.15);
    color: #fff;
    transform: translateY(-2px);
}

/* Скрываем мобильное меню на десктопе, если оно дублируется */
.main-menu__list_m {
    display: none;
}

/* =========================================
   4. Search Form
   ========================================= */
.search-form {
    margin-bottom: var(--spacing-sm);
    width: 100%;
    max-width: 300px;
}

.search-form form {
    display: flex;
    position: relative;
}

.search-form__field {
    width: 100%;
    padding: 0.6rem 2.5rem 0.6rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: 2rem;
    background: var(--color-bg-body);
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

.search-form__field:focus {
    outline: none;
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 3px rgba(43, 144, 217, 0.2);
    background: #fff;
}

.search-form__button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border: none;
    background: var(--color-secondary);
    border-radius: 50%;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white' width='16px' height='16px'%3E%3Cpath d='M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    transition: background-color var(--transition-fast);
}

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

/* =========================================
   5. Main Content & Typography
   ========================================= */
.content {
    background: var(--color-bg-white);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.single__title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: var(--spacing-md);
    line-height: 1.2;
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--color-primary);
    margin: var(--spacing-lg) 0 var(--spacing-md);
    position: relative;
    padding-bottom: 0.5rem;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--color-accent);
    border-radius: 2px;
}

h3 {
    font-size: 1.5rem;
    color: var(--color-text);
    margin: var(--spacing-md) 0;
}

p {
    margin-bottom: 1.2rem;
    font-size: 1.05rem;
    color: var(--color-text);
    text-align: justify;
}

/* Списки внутри контента */
.content ul, 
.content ol {
    margin-bottom: var(--spacing-md);
    padding-left: var(--spacing-lg);
}

.content ul li {
    position: relative;
    padding-left: 0.5rem;
    margin-bottom: 0.5rem;
}

.content ul li::before {
    content: "•";
    color: var(--color-accent);
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

/* Images in content */
.content img {
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--spacing-md);
}

.aligncenter {
    margin: var(--spacing-md) auto;
    display: block;
}

.wp-caption {
    background: #f9f9f9;
    padding: 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    margin-bottom: var(--spacing-md);
    text-align: center;
}

.wp-caption-text {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-top: 0.5rem;
    font-style: italic;
}

/* Tables */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: var(--spacing-lg) 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    font-size: 0.95rem;
}

thead th {
    background-color: var(--color-primary);
    color: #fff;
    padding: 1rem;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    font-weight: 600;
}

tbody td {
    padding: 1rem;
    border-bottom: 1px solid var(--color-border);
    background: #fff;
    vertical-align: top;
    transition: background 0.2s;
}

tbody tr:last-child td {
    border-bottom: none;
}

tbody tr:hover td {
    background-color: rgba(43, 144, 217, 0.05);
}

/* Blockquote alternative styling for hints inside tables or text */
blockquote {
    border-left: 4px solid var(--color-accent);
    background: #f0fdf4;
    padding: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
}

/* =========================================
   6. Sidebar & Widgets
   ========================================= */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.section_widget {
    background: var(--color-bg-white);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border-top: 4px solid var(--color-secondary);
}

.section_widget .title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 0.5rem;
}

/* Promocode Widget Style */
.promocode-style {
    display: block;
    background: #f8f9fa;
    border: 2px dashed var(--color-accent);
    color: var(--color-text);
    font-family: monospace;
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
    padding: 0.8rem;
    margin-bottom: 0.8rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.promocode-style::after {
    content: 'COPY';
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.6rem;
    background: var(--color-accent);
    color: white;
    padding: 2px 4px;
    border-radius: 3px;
    opacity: 0;
    transition: opacity 0.2s;
}

.promocode-style:hover {
    background: #e6ffea;
    transform: scale(1.02);
    box-shadow: var(--shadow-sm);
}

.promocode-style:hover::after {
    opacity: 1;
}

/* Phone link styling */
.widget_text a[href^="tel"] {
    display: inline-block;
    color: var(--color-accent) !important; /* Override inline style */
    font-size: 1.5rem !important;
    font-weight: 800;
    transition: transform var(--transition-fast);
}

.widget_text a[href^="tel"]:hover {
    transform: scale(1.05);
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* =========================================
   7. Footer
   ========================================= */
.footer {
    background: var(--color-primary);
    color: rgba(255, 255, 255, 0.7);
    padding: var(--spacing-lg) 0;
    margin-top: auto;
    font-size: 0.9rem;
}

.footer-bottom .copy {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    text-align: center;
}

/* =========================================
   8. Interactive Elements & Effects
   ========================================= */
/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-secondary);
}

/* Buttons (Generic class based on context if not present in HTML, 
   but targeting submit buttons and links looking like buttons) */
input[type="submit"], button {
    cursor: pointer;
}

/* =========================================
   9. Responsive Design (Media Queries)
   ========================================= */

/* Tablet & Smaller Desktop */
@media (max-width: 1024px) {
    .content-wrapper {
        gap: var(--spacing-md);
    }
    
    .main-menu__list li a {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
    }
}

/* Mobile Devices */
@media (max-width: 768px) {
    /* Layout Reset */
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        order: 2; /* Sidebar below content */
    }
    
    /* Header Mobile */
    .header .wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    
    .logo {
        margin: 0 auto;
        max-height: 50px;
    }
    
    .m-nav {
        align-items: center;
        width: 100%;
    }
    
    .search-form {
        max-width: 100%;
        margin-bottom: 1rem;
    }
    
    /* Mobile Navigation */
    .sticky_menu {
        position: static; /* No sticky on small screens to save space */
        padding: 0;
        background: transparent;
        box-shadow: none;
    }

    .main-menu__inner {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 10px; /* Space for scrollbar */
    }
    
    .main-menu__list {
        flex-wrap: nowrap; /* Horizontal scroll */
        justify-content: flex-start;
        padding: 0 var(--spacing-xs);
    }
    
    .main-menu__list li {
        flex: 0 0 auto;
    }
    
    .main-menu__list li a {
        background: var(--color-primary);
        color: white;
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
        white-space: nowrap;
        box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    }
    
    /* Typography on Mobile */
    h1.single__title {
        text-align: center;
    }
    
    h2::after {
        left: 50%; /* Center underline */
    }

    /* Responsive Tables */
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    /* Images */
    .wp-caption {
        width: 100% !important;
    }
}

/* =========================================
   10. Specific Overrides & Polish
   ========================================= */
/* Uptolike Social Buttons Fixes */
.uptolike-buttons {
    margin-top: 2rem;
    justify-content: center;
}

/* Fix for inline style center text in tables */
td strong {
    color: var(--color-primary);
}

/* Links inside content that look like buttons */
.entry p a img {
    transition: transform var(--transition-smooth), filter var(--transition-fast);
}

.entry p a img:hover {
    transform: translateY(-3px);
    filter: brightness(1.1);
    box-shadow: var(--shadow-md);
}
