/* ==========================================================================
   Beg365 — единый стиль сайта
   ========================================================================== */

:root {
    --color-bg: #0f1712;
    --color-bg-soft: #141f19;
    --color-surface: #1a261f;
    --color-surface-2: #202f26;
    --color-border: #2b3a31;

    --color-text: #eaf2ec;
    --color-text-muted: #a9bdb0;
    --color-text-faint: #7c9184;

    --color-accent: #3ddc84;
    --color-accent-strong: #2bbf6c;
    --color-accent-soft: rgba(61, 220, 132, 0.14);
    --color-gold: #e8b84b;

    --radius-lg: 20px;
    --radius-md: 16px;
    --radius-sm: 12px;

    --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.28);
    --shadow-card-hover: 0 16px 36px rgba(0, 0, 0, 0.38);

    --max-width: 1240px;

    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Manrope', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: radial-gradient(circle at 15% -10%, #16241c 0%, var(--color-bg) 45%);
    color: var(--color-text);
    font-family: var(--font-body);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: inherit;
    text-decoration: none;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    line-height: 1.25;
    margin: 0 0 16px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

p {
    margin: 0 0 18px;
    color: var(--color-text-muted);
}

ul, ol {
    color: var(--color-text-muted);
    padding-left: 22px;
}
ul li, ol li {
    margin-bottom: 8px;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 23, 18, 0.88);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    max-width: var(--max-width);
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 20px;
    color: var(--color-text);
}

.logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-strong));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #08130d;
    font-size: 16px;
    flex-shrink: 0;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.main-nav a {
    font-size: 15px;
    color: var(--color-text-muted);
    font-weight: 500;
    transition: color 0.2s ease;
}

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

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    color: var(--color-text);
    cursor: pointer;
}

.nav-toggle svg {
    width: 20px;
    height: 20px;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
    padding: 64px 0 48px;
    text-align: center;
}

.hero-eyebrow {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--color-accent-soft);
    color: var(--color-accent);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-bottom: 20px;
}

.hero h1 {
    font-size: clamp(30px, 4.5vw, 48px);
    max-width: 780px;
    margin: 0 auto 18px;
}

.hero p.lead {
    max-width: 620px;
    margin: 0 auto;
    font-size: 17px;
    color: var(--color-text-muted);
}

/* ==========================================================================
   Categories block
   ========================================================================== */

.categories-strip {
    padding: 8px 0 40px;
}

.categories-strip .container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.category-chip {
    padding: 10px 18px;
    border-radius: 999px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-muted);
    transition: all 0.2s ease;
}

.category-chip:hover,
.category-chip.active {
    border-color: var(--color-accent);
    color: var(--color-accent);
    background: var(--color-accent-soft);
}

.category-chip .count {
    color: var(--color-text-faint);
    font-weight: 500;
    margin-left: 4px;
}

/* ==========================================================================
   Article grid & cards
   ========================================================================== */

.section-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 24px;
}

.section-title h2 {
    font-size: 24px;
    margin: 0;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    padding-bottom: 40px;
}

.article-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-card);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
    border-color: var(--color-accent);
}

.article-card .card-image {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--color-surface-2);
}

.article-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.article-card:hover .card-image img {
    transform: scale(1.05);
}

.card-body {
    padding: 20px 22px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-category {
    font-size: 12.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-accent);
    margin-bottom: 10px;
}

.card-body h3 {
    font-size: 19px;
    margin-bottom: 10px;
}

.card-body p {
    font-size: 14.5px;
    margin-bottom: 16px;
    flex: 1;
}

.card-date {
    font-size: 13px;
    color: var(--color-text-faint);
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 12px 0 56px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-size: 14px;
    font-weight: 600;
    padding: 0 8px;
}

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

.pagination .current {
    background: var(--color-accent);
    color: #08130d;
    border-color: var(--color-accent);
}

.pagination .disabled {
    opacity: 0.35;
}

/* ==========================================================================
   Article page layout
   ========================================================================== */

.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 40px;
    padding: 40px 0 64px;
    align-items: start;
}

.breadcrumbs {
    font-size: 13.5px;
    color: var(--color-text-faint);
    margin-bottom: 18px;
}

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

article.post h1 {
    font-size: clamp(28px, 4vw, 40px);
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--color-text-faint);
    font-size: 14px;
    margin-bottom: 26px;
    flex-wrap: wrap;
}

.post-meta .post-category {
    background: var(--color-accent-soft);
    color: var(--color-accent);
    padding: 5px 12px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.post-hero-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 30px;
    border: 1px solid var(--color-border);
}

.post-content h2 {
    font-size: 26px;
    margin-top: 40px;
}

.post-content h3 {
    font-size: 20px;
    margin-top: 28px;
    color: var(--color-text);
}

.post-content p,
.post-content li {
    font-size: 16.5px;
}

.post-content img {
    border-radius: var(--radius-md);
    margin: 24px 0;
    border: 1px solid var(--color-border);
}

.callout {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-left: 4px solid var(--color-accent);
    border-radius: var(--radius-sm);
    padding: 18px 22px;
    margin: 26px 0;
}

.callout p:last-child {
    margin-bottom: 0;
}

.post-links {
    margin-top: 20px;
}

/* Sidebar */

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: sticky;
    top: 90px;
}

.widget {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 22px;
}

.widget h4 {
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text-faint);
    margin-bottom: 16px;
}

.widget-article {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.widget-article:last-child {
    margin-bottom: 0;
}

.widget-article .thumb {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--color-surface-2);
}

.widget-article .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.widget-article .info a {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    display: block;
    margin-bottom: 4px;
}

.widget-article .info a:hover {
    color: var(--color-accent);
}

.widget-article .info span {
    font-size: 12px;
    color: var(--color-text-faint);
}

.widget-categories a {
    display: flex;
    justify-content: space-between;
    padding: 9px 0;
    font-size: 14px;
    color: var(--color-text-muted);
    border-bottom: 1px solid var(--color-border);
}

.widget-categories a:last-child {
    border-bottom: none;
}

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

/* ==========================================================================
   Ad slots
   ========================================================================== */

.ad-slot {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--color-text-faint);
    font-size: 12px;
    background: var(--color-surface);
    border: 1px dashed var(--color-border);
    border-radius: var(--radius-sm);
    min-height: 90px;
    padding: 12px;
    margin: 26px 0;
}

.ad-slot.ad-header-slot {
    margin: 0 0 32px;
    min-height: 70px;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
    border-top: 1px solid var(--color-border);
    background: var(--color-bg-soft);
    padding: 48px 0 28px;
    margin-top: 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 32px;
    margin-bottom: 32px;
}

.footer-brand p {
    font-size: 14.5px;
    max-width: 340px;
}

.footer-col h4 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text-faint);
    margin-bottom: 14px;
}

.footer-col a {
    display: block;
    font-size: 14.5px;
    color: var(--color-text-muted);
    margin-bottom: 10px;
}

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

.footer-bottom {
    border-top: 1px solid var(--color-border);
    padding-top: 22px;
    font-size: 13px;
    color: var(--color-text-faint);
    text-align: center;
}

/* ==========================================================================
   Category page header
   ========================================================================== */

.page-header {
    padding: 48px 0 8px;
}

.page-header h1 {
    font-size: clamp(26px, 4vw, 36px);
    margin-bottom: 8px;
}

.page-header p {
    color: var(--color-text-muted);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--color-text-faint);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 980px) {
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .article-layout {
        grid-template-columns: minmax(0, 1fr) 280px;
        gap: 28px;
    }
}

@media (max-width: 860px) {
    .main-nav {
        position: fixed;
        top: 68px;
        left: 0;
        right: 0;
        background: var(--color-bg-soft);
        border-bottom: 1px solid var(--color-border);
        flex-direction: column;
        align-items: flex-start;
        padding: 16px 24px 24px;
        gap: 16px;
        transform: translateY(-140%);
        opacity: 0;
        transition: transform 0.25s ease, opacity 0.25s ease;
        z-index: 40;
    }

    .main-nav.open {
        transform: translateY(0);
        opacity: 1;
    }

    .nav-toggle {
        display: flex;
    }

    .article-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }
}

@media (max-width: 640px) {
    .articles-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .hero {
        padding: 44px 0 32px;
    }

    .container {
        padding: 0 18px;
    }
}

/* Advertisement slots */
.global-ad-header{width:100%;display:flex;justify-content:center;align-items:center;min-height:44px;padding:8px 16px;box-sizing:border-box;overflow:hidden}
.global-ad-header > *{max-width:100%}
.ad-sidebar-slot{margin-top:20px;padding:0;display:flex;justify-content:center;overflow:hidden}
.post-content + .ad-sidebar-slot{margin-top:24px}
@media(max-width:800px){
  .global-ad-header{min-height:36px;padding:6px 10px}
  .ad-sidebar-slot{margin-top:16px}
}


/* Дополнительная адаптация Beg365 */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}
.container, .header-inner {
    width: 100%;
}
.article-card, .widget, .post, .callout, .ad-slot {
    min-width: 0;
}
.article-card h3, .post h1, .post-content h2, .post-content h3 {
    overflow-wrap: anywhere;
    word-break: normal;
}
.post-content pre, .post-content code, .post-content table {
    max-width: 100%;
}
.post-content table {
    display: block;
    overflow-x: auto;
}
@media (max-width: 640px) {
    .header-inner {
        padding: 12px 18px;
    }
    .logo {
        font-size: 18px;
        min-width: 0;
    }
    .logo > span:last-child {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .hero h1 {
        font-size: clamp(26px, 8vw, 36px);
    }
    .hero p.lead {
        font-size: 15px;
    }
    article.post h1 {
        font-size: clamp(25px, 7vw, 32px);
    }
    .post-content h2 {
        font-size: 22px;
    }
    .post-content h3 {
        font-size: 18px;
    }
    .post-content p,
    .post-content li {
        font-size: 16px;
    }
    .post-hero-image {
        border-radius: 14px;
    }
    .widget {
        padding: 16px;
    }
}
