/*
Theme Name: Betov
Theme URI: https://betov.ru
Description: Собственная тема для рейтинга букмекеров
Version: 3.4.2
Author: Betov
License: GPL-2.0+
Text Domain: betov
*/

/* ========== Сброс ========== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:focus-visible {
  outline: 2px solid #2ecc71;
  outline-offset: 2px;
}

/* ========== Базовые стили ========== */
body {
  font-family: 'Inter', sans-serif;
  background-color: #f5f7fc;
  color: #1e1e2f;
  line-height: 1.6;
  padding-top: 52px;
  transition: background-color 0.3s, color 0.3s;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.admin-bar { padding-top: calc(52px + 32px); }
body.dark { background-color: #0f0f1a; color: #e8e9f0; }

.wrapper {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

/* ========== Фиксированная шапка ========== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 52px;
  background: #121416;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  z-index: 1000;
  display: flex;
  align-items: center;
  transition: background-color 0.3s, border-color 0.3s;
}

body.admin-bar .site-header { top: 32px; }
body.dark .site-header { background: #1a1a2e; border-bottom-color: rgba(255,255,255,0.08); }

.header-inner {
  max-width: 1300px;
  margin: 0 auto;
  width: 100%;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo-link {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  color: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}

.logo-link i { color: #2ecc71; font-size: 15px; }

.logo-text {
  background: linear-gradient(135deg, #2ecc71, #1abc9c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ========== Основное меню ========== */
.main-nav ul {
  display: flex;
  list-style: none;
  gap: 12px;
  align-items: center;
  margin: 0;
  padding: 0;
}

.main-nav li { position: relative; }

.main-nav a {
  text-decoration: none;
  font-weight: 600;
  color: #ffffff;
  font-size: 13px;
  line-height: 1;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  transition: color 0.2s, background 0.2s;
  border-radius: 8px;
  white-space: nowrap;
}

body.dark .main-nav a { color: #b0b9cc; }
.main-nav a:hover, .main-nav a.active {
  background: rgba(46,204,113,0.15);
  color: #ffffff;
}

/* Выпадающее меню (десктоп) */
.main-nav .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #121416;
  border-radius: 12px;
  box-shadow: 0 16px 32px rgba(0,0,0,0.2);
  padding: 8px 0;
  min-width: 200px;
  z-index: 1001;
  flex-direction: column;
  gap: 0;
}

body.dark .main-nav .sub-menu { background: #1e1e32; }

.main-nav .menu-item-has-children > a::after {
  content: "\f107";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  margin-left: 6px;
  font-size: 12px;
  transition: transform 0.3s;
}

.main-nav .menu-item-has-children:hover > a::after,
.main-nav .menu-item-has-children.open > a::after { transform: rotate(180deg); }

.main-nav .menu-item-has-children:hover > .sub-menu { display: flex; }
.main-nav .sub-menu li { width: 100%; }

.main-nav .sub-menu a {
  padding: 10px 16px;
  font-size: 13px;
  display: block;
  width: 100%;
}

/* ========== Кнопки шапки ========== */
.header-actions { display: flex; align-items: center; gap: 8px; }

.search-toggle, .theme-toggle {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 18px;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.dark .search-toggle, body.dark .theme-toggle { color: #b0b9cc; }
.search-toggle:hover, .theme-toggle:hover { background: #252628; color: #ffffff; }
body.dark .search-toggle:hover, body.dark .theme-toggle:hover { background: #2d2d44; }

/* ========== Мобильный бургер ========== */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  gap: 5px;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  transition: background 0.2s;
}

.mobile-menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: #ffffff;
  border-radius: 1px;
  transition: transform 0.3s, opacity 0.3s;
}

body.dark .mobile-menu-toggle span { background: #b0b9cc; }
.mobile-menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-menu-toggle.open span:nth-child(2) { opacity: 0; }
.mobile-menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ========== Модальное окно поиска ========== */
.search-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
  opacity: 0;
  transition: opacity 0.3s;
}

.search-modal.active { display: flex; opacity: 1; }

.search-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
}

.search-modal-content {
  position: relative;
  max-width: 640px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.3);
  z-index: 2001;
  transform: scale(0.95) translateY(-20px);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-modal.active .search-modal-content { transform: scale(1) translateY(0); }
body.dark .search-modal-content { background: #1a1a2e; border: 1px solid #2d2d4a; }

.search-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid #edf2f7;
  display: flex;
  align-items: center;
  gap: 12px;
}

body.dark .search-modal-header { border-bottom-color: #2d2d44; }
.search-modal-header i { color: #7e8b9d; font-size: 20px; }

.search-modal-header input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 17px;
  background: transparent;
  color: inherit;
  font-family: inherit;
}

.search-modal-header input::placeholder { color: #9aa6b5; }

.search-modal-close {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #7e8b9d;
  line-height: 1;
  padding: 4px;
}

.search-modal-body { padding: 20px 24px 24px; }

.search-popular-title {
  font-size: 13px;
  font-weight: 600;
  color: #7e8b9d;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.search-popular-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }

.search-popular-item {
  background: #f1f5f9;
  border-radius: 20px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  color: #334155;
}

body.dark .search-popular-item { background: #2d2d44; color: #cbd5e1; }
.search-popular-item:hover { background: #2ecc71; color: white; }

.search-results-inline { list-style: none; padding: 0; margin: 0; }
.search-results-inline li { padding: 12px 0; border-bottom: 1px solid #f1f5f9; }
body.dark .search-results-inline li { border-bottom-color: #2d2d4a; }

.search-results-inline a {
  text-decoration: none;
  color: inherit;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
}

.search-results-inline a:hover { color: #2ecc71; }
.search-results-inline .result-cat { font-size: 12px; color: #7e8b9d; text-transform: uppercase; }

.search-loader { padding: 15px 0; color: #7e8b9d; text-align: center; }

.search-retry-btn {
  display: inline-block;
  margin-top: 10px;
  background: #edf2f7;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 13px;
  color: #334155;
  transition: background 0.2s;
}

.search-retry-btn:hover { background: #dde3ed; }
body.dark .search-retry-btn { background: #2d2d44; color: #cbd5e1; }
body.dark .search-retry-btn:hover { background: #3d3d5c; }

/* ========== Контентная область ========== */
.content-wrapper {
  display: flex;
  gap: 30px;
  margin-top: 24px;
  align-items: flex-start;
  width: 100%;
}

.main-content { flex: 1; min-width: 0; }

.sidebar {
  width: 300px;
  flex-shrink: 0;
  position: sticky;
  top: 72px;
  align-self: flex-start;
}

body.admin-bar .sidebar { top: calc(52px + 32px + 20px); }

/* ========== Виджеты ========== */
.widget {
  background: #fff;
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 24px;
  border: 1px solid #eef2f6;
  box-shadow: 0 8px 24px rgba(0,0,0,0.04);
  transition: background-color 0.3s, border-color 0.3s;
}

body.dark .widget { background: #1e1e32; border-color: #2a2a45; }
.widget-title { font-size: 18px; font-weight: 700; margin-bottom: 16px; color: inherit; }
.widget ul { list-style: none; padding: 0; }
.widget ul li { margin-bottom: 10px; }
.widget a { color: #4a5568; text-decoration: none; transition: color 0.2s; }
body.dark .widget a { color: #cbd5e1; }
.widget a:hover { color: #2ecc71; }

/* ========== Хлебные крошки ========== */
.breadcrumbs {
  margin-bottom: 20px;
  font-size: 14px;
  color: #7e8b9d;
}

.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  padding: 0;
  align-items: center;
}

.breadcrumbs li { margin-right: 6px; white-space: nowrap; }
.breadcrumbs li a { color: #334155; text-decoration: none; transition: color 0.2s; }
.breadcrumbs li a:hover { color: #2ecc71; }
.breadcrumbs .separator { margin: 0 4px; color: #cbd5e1; }
body.dark .breadcrumbs li a { color: #b0b9cc; }
body.dark .breadcrumbs li a:hover { color: #2ecc71; }
body.dark .breadcrumbs .separator { color: #4a5568; }

/* ========== Слайдер ========== */
.hero-slider {
  position: relative;
  width: 100%;
  max-width: 1300px;
  margin: 0 auto 32px;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.08);
  background: #f0f2f5;
}

body.dark .hero-slider { background: #1a1a2e; box-shadow: 0 12px 32px rgba(0,0,0,0.4); }

.hero-slider-track { display: flex; transition: transform 0.5s ease; will-change: transform; }
.hero-slide { flex: 0 0 100%; display: flex; align-items: center; justify-content: center; }
.hero-slide a { display: block; width: 100%; }

.hero-slide img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  aspect-ratio: 16 / 5;
  border-radius: 24px;
}

.hero-prev, .hero-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.9);
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 28px;
  font-weight: 700;
  color: #1e1e2f;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: background 0.2s, color 0.2s;
  z-index: 5;
}

.hero-prev:hover, .hero-next:hover { background: #2ecc71; color: #ffffff; }
.hero-prev { left: 16px; }
.hero-next { right: 16px; }
body.dark .hero-prev, body.dark .hero-next { background: rgba(30,30,50,0.9); color: #cbd5e1; }

.hero-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 5;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: background 0.2s;
}

.hero-dot.active { background: #2ecc71; }

/* ========== Главная страница ========== */
.page-title { margin: 8px 0 24px; font-size: 26px; font-weight: 700; display: flex; align-items: center; gap: 12px; }
.page-title i { color: #fbbf24; font-size: 24px; }

.filters { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }

.filter-btn {
  background: transparent;
  border: 1px solid #dde3ed;
  padding: 8px 24px;
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  color: #334155;
  font-size: 14px;
  font-family: inherit;
}

body.dark .filter-btn { border-color: #2d2d44; color: #ffffff; }
.filter-btn.active {
  background: #2ecc71;
  border-color: #2ecc71;
  color: white;
  box-shadow: 0 6px 16px rgba(46,204,113,0.3);
}
.filter-btn:hover { border-color: #2ecc71; color: #000000; }

/* Сортировка */
.sort-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 14px;
  color: #334155;
}
body.dark .sort-controls { color: #cbd5e1; }
.sort-label { font-weight: 600; }

.sort-controls select {
  padding: 8px 12px;
  border: 1px solid #dde3ed;
  border-radius: 8px;
  background: white;
  color: #1e1e2f;
  font-family: inherit;
  font-size: 14px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z' fill='%23334155'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

body.dark .sort-controls select {
  background-color: #1e1e32;
  border-color: #2d2d44;
  color: #e8e9f0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z' fill='%23cbd5e1'/%3E%3C/svg%3E");
}

/* Методология (Аккордеон) */
.methodology {
  background: #fff;
  border-radius: 16px;
  padding: 20px 24px;
  margin: 20px 0 40px;
  border: 1px solid #eef2f6;
}

body.dark .methodology { background: #1e1e32; border-color: #2a2a45; }

.methodology summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  padding: 8px 0;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
}

.methodology summary::-webkit-details-marker { display: none; }
.methodology summary::before {
  content: "\f128";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: #2ecc71;
  transition: transform 0.2s;
}
.methodology[open] summary::before { transform: rotate(90deg); }

.methodology p {
  margin-top: 12px;
  color: #7e8b9d;
  font-size: 14px;
  line-height: 1.7;
}
body.dark .methodology p { color: #9aa6b5; }

/* Список букмекеров */
.bookmakers-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 40px;
  width: 100%;
}

.bk-skeleton {
  background: #f0f2f5;
  border-radius: 20px;
  padding: 30px;
  text-align: center;
  color: #7e8b9d;
  font-size: 15px;
  animation: pulse 1.5s infinite ease-in-out;
}
body.dark .bk-skeleton { background: #1e1e32; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.no-results-message {
  padding: 20px;
  text-align: center;
  color: #7e8b9d;
  background: #fff;
  border-radius: 16px;
  border: 1px solid #eef2f6;
}
body.dark .no-results-message { background: #1e1e32; border-color: #2a2a45; }

.reset-filter-btn {
  display: inline-block;
  margin-top: 10px;
  background: #edf2f7;
  border: none;
  border-radius: 20px;
  padding: 8px 20px;
  cursor: pointer;
  color: #334155;
  font-weight: 500;
  transition: background 0.2s;
  font-family: inherit;
  font-size: 14px;
}
.reset-filter-btn:hover { background: #dde3ed; }
body.dark .reset-filter-btn { background: #2d2d44; color: #cbd5e1; }
body.dark .reset-filter-btn:hover { background: #3d3d5c; }

.bk-item {
  background: #ffffff;
  border-radius: 20px;
  padding: 20px 24px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.03);
  border: 1px solid #f0f2f7;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  width: 100%;
  transition: box-shadow 0.2s, border-color 0.2s;
}
body.dark .bk-item { background: #1a1a2e; border-color: #2d2d4a; }
.bk-item:hover { box-shadow: 0 12px 32px rgba(46,204,113,0.08); border-color: rgba(46,204,113,0.4); }

/* Логотипы БК */
.bk-logo, .rating-row-logo {
  width: 52px;
  height: 52px;
  background: linear-gradient(145deg, #2ecc71, #27ae60);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 20px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(46,204,113,0.2);
}

.bk-logo img, .rating-row-logo img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 12px;
  display: block;
  background: transparent;
}

.bk-info { flex: 1; min-width: 160px; }
.bk-name { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.bk-rating { display: flex; align-items: center; gap: 6px; }
.stars { color: #fbbf24; letter-spacing: 2px; font-size: 14px; }

.rating-value {
  font-weight: 600;
  background: #f1f5f9;
  padding: 2px 10px;
  border-radius: 30px;
  font-size: 13px;
}
body.dark .rating-value { background: #2d2d44; }

.bk-bonus { font-size: 14px; flex: 1; min-width: 140px; }
.bk-bonus strong { color: #2ecc71; font-size: 15px; display: block; }
.bk-features { display: flex; gap: 10px; flex-wrap: wrap; flex: 1.5; min-width: 160px; font-size: 13px; }
.bk-features span i { color: #2ecc71; margin-right: 4px; }

.bk-btn {
  background: #2ecc71;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
  box-shadow: 0 6px 16px rgba(46,204,113,0.3);
}
.bk-btn i { margin-right: 6px; }
.bk-btn:hover { background: #27ae60; transform: scale(1.02); }

/* Топ по надёжности */
.rating-rows { display: flex; flex-direction: column; gap: 14px; margin-bottom: 40px; width: 100%; }

.rating-row {
  background: #ffffff;
  border-radius: 20px;
  padding: 18px 24px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.02);
  border: 1px solid #edf2f7;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  width: 100%;
  transition: box-shadow 0.2s, border-color 0.2s;
}
body.dark .rating-row { background: #1a1a2e; border-color: #2d2d4a; }
.rating-row:hover { box-shadow: 0 12px 32px rgba(46,204,113,0.08); border-color: rgba(46,204,113,0.4); }

.rating-row-logo {
  width: 48px;
  height: 48px;
  background: linear-gradient(145deg, #2ecc71, #27ae60);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 20px;
  flex-shrink: 0;
}

.rating-row-info { flex: 1; min-width: 130px; }
.rating-row-name { font-weight: 700; font-size: 16px; margin-bottom: 4px; }
.rating-row-bonus { flex: 1; min-width: 130px; font-size: 14px; }
.rating-row-bonus strong { color: #2ecc71; font-size: 15px; display: block; }
.rating-row-payout { flex: 0.8; min-width: 90px; font-weight: 600; color: #2ecc71; font-size: 14px; }

.table-btn {
  background: #2ecc71;
  color: white;
  padding: 10px 24px;
  border-radius: 30px;
  font-weight: 600;
  text-decoration: none;
  font-size: 14px;
  display: inline-block;
  transition: background 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}
.table-btn:hover { background: #229954; }

/* Новости */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; margin: 28px 0 48px; }

.news-card {
  background: #fff;
  border-radius: 18px;
  padding: 20px;
  border: 1px solid #eef2f6;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: box-shadow 0.2s, border-color 0.2s;
}
body.dark .news-card { background: #1e1e32; border-color: #2a2a45; }
.news-card:hover { box-shadow: 0 12px 28px rgba(0,0,0,0.06); border-color: rgba(46,204,113,0.3); }

.news-cat { color: #2ecc71; font-weight: 600; font-size: 13px; margin-bottom: 8px; }
.news-title { font-weight: 600; margin-bottom: 10px; line-height: 1.4; font-size: 16px; }
.news-date { color: #7e8b9d; font-size: 13px; display: flex; align-items: center; gap: 6px; }

/* ========== Внутренние страницы ========== */
.post-card {
  background: #ffffff;
  border-radius: 28px;
  padding: 32px 32px;
  box-shadow: 0 14px 36px rgba(0,0,0,0.06);
  margin-bottom: 36px;
  border: 1px solid #edf2f7;
  transition: background-color 0.3s, border-color 0.3s;
}
body.dark .post-card { background: #1e1e32; border-color: #2d2d4a; }
.post-card h1, .post-card h2 { font-size: 28px; font-weight: 700; margin-bottom: 20px; }

.post-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; font-size: 14px; color: #7e8b9d; }
body.dark .post-meta { color: #9aa6b5; }
.post-item-date { white-space: nowrap; }
.post-item-meta-sep { opacity: 0.5; }
.post-item-cats { display: flex; flex-wrap: wrap; gap: 8px; }

.post-item-cat {
  background: #f1f5f9;
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 12px;
  font-weight: 500;
  color: #334155;
  transition: background 0.2s, color 0.2s;
}
body.dark .post-item-cat { background: #2d2d44; color: #cbd5e1; }

.post-content { font-size: 16px; line-height: 1.7; }
.post-content a { color: #2ecc71; text-decoration: underline; text-underline-offset: 3px; transition: color 0.2s; }
body.dark .post-content a { color: #2ecc71; }
.post-content a:hover { color: #27ae60; }
.post-content img { max-width: 100%; height: auto; border-radius: 16px; margin: 24px 0; }
.post-content h2, .post-content h3, .post-content h4 { margin-top: 28px; margin-bottom: 16px; }
.post-content p { margin-bottom: 16px; }
.post-content ul, .post-content ol { margin-bottom: 16px; padding-left: 24px; }

.archive-title { font-size: 24px; font-weight: 700; margin-bottom: 28px; }

.pagination { margin-top: 44px; text-align: center; }
.pagination .page-numbers {
  display: inline-block;
  padding: 10px 16px;
  margin: 0 4px;
  border-radius: 10px;
  background: #edf2f7;
  color: #334155;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
body.dark .pagination .page-numbers { background: #2d2d44; color: #cbd5e1; }
.pagination .current { background: #2ecc71; color: white; box-shadow: 0 3px 10px rgba(46,204,113,0.3); }
.pagination .page-numbers:hover { background: #2ecc71; color: white; }

/* ========== Блок «Поделиться» ========== */
.share-buttons {
  margin: 30px 0 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: #7e8b9d;
}
body.dark .share-buttons { color: #9aa6b5; }
.share-buttons .share-title { font-weight: 600; margin-right: 8px; }

.share-buttons a, .share-buttons button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #f1f5f9;
  border-radius: 12px;
  padding: 10px 16px;
  text-decoration: none;
  color: #334155;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
body.dark .share-buttons a, body.dark .share-buttons button { background: #2d2d44; color: #cbd5e1; }
.share-buttons a:hover, .share-buttons button:hover { background: #2ecc71; color: white; }
.share-buttons .copy-link-btn.copied { background: #2ecc71; color: white; }

/* ========== Блок оценки статьи ========== */
.post-rating {
  margin: 20px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #7e8b9d;
}
body.dark .post-rating { color: #9aa6b5; }
.post-rating .rating-stars { display: flex; gap: 4px; cursor: pointer; }
.post-rating .rating-stars.voted { cursor: default; }

.post-rating .star {
  font-size: 22px;
  color: #dde3ed;
  transition: color 0.2s, transform 0.1s;
}
.post-rating .star.active, .post-rating .star:hover { color: #fbbf24; }
.post-rating .star:hover { transform: scale(1.2); }

.post-rating .rating-text { font-weight: 600; color: #334155; }
body.dark .post-rating .rating-text { color: #cbd5e1; }
.post-rating .rating-msg { font-size: 13px; margin-left: 8px; }

/* ========== Комментарии ========== */
.comments-area { margin-top: 48px; }
.comments-title { font-size: 22px; font-weight: 700; margin-bottom: 24px; }
.comment-list { list-style: none; padding: 0; }
.comment { background: #fff; border-radius: 20px; padding: 24px; margin-bottom: 16px; border: 1px solid #eef2f6; }
body.dark .comment { background: #1e1e32; border-color: #2a2a45; }
.comment-author { font-weight: 600; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.comment-author img { border-radius: 50%; }
.comment-metadata { font-size: 13px; color: #7e8b9d; margin-bottom: 10px; }
.comment-content { font-size: 15px; line-height: 1.6; }
.reply { margin-top: 10px; }
.reply a { color: #2ecc71; font-weight: 600; text-decoration: none; }
.reply a:hover { text-decoration: underline; }

.comment-respond { margin-top: 30px; background: #fff; border-radius: 20px; padding: 24px; border: 1px solid #eef2f6; }
body.dark .comment-respond { background: #1e1e32; border-color: #2a2a45; }
.comment-respond h3 { font-size: 18px; margin-bottom: 16px; }

.comment-form input[type="text"], .comment-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  font-family: inherit;
  font-size: 14px;
  margin-bottom: 12px;
  background: #f8fafc;
  color: inherit;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
body.dark .comment-form input, body.dark .comment-form textarea { background: #2d2d44; border-color: #3d3d5c; color: #e8e9f0; }
.comment-form input:focus, .comment-form textarea:focus { border-color: #2ecc71; box-shadow: 0 0 0 3px rgba(46,204,113,0.2); }
.comment-form textarea { min-height: 120px; resize: vertical; }

.comment-form .submit {
  background: #2ecc71;
  color: #ffffff;
  border: none;
  padding: 12px 28px;
  border-radius: 40px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
  box-shadow: 0 4px 12px rgba(46,204,113,0.3);
}
body.dark .comment-form .submit { background: #2ecc71; color: #ffffff; }
.comment-form .submit:hover { background: #27ae60; }
.comment-form .submit:disabled { opacity: 0.7; cursor: wait; }

/* ========== Подвал ========== */
.site-footer { margin-top: 60px; padding: 30px 0 25px; border-top: 1px solid rgba(0,0,0,0.06); color: #5a6a7e; font-size: 14px; }
body.dark .site-footer { border-top-color: #2d2d44; color: #9aa6b5; }
.site-footer .wrapper { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
.footer-menu { display: flex; list-style: none; gap: 24px; margin: 0; padding: 0; }
.footer-menu a { color: inherit; text-decoration: none; transition: color 0.2s; }
.footer-menu a:hover { color: #2ecc71; }

/* ========== Карточки записей ========== */
.posts-list { display: flex; flex-direction: column; gap: 16px; width: 100%; }

.post-item {
  background: #fff;
  border-radius: 20px;
  padding: 20px 24px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.03);
  border: 1px solid #f0f2f7;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  width: 100%;
  transition: box-shadow 0.2s, border-color 0.2s;
}
body.dark .post-item { background: #1a1a2e; border-color: #2d2d4a; }
.post-item:hover { box-shadow: 0 12px 32px rgba(46,204,113,0.08); border-color: rgba(46,204,113,0.3); }

.post-item-body { flex: 1; min-width: 220px; }
.post-item-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; font-size: 13px; color: #7e8b9d; }
body.dark .post-item-meta { color: #9aa6b5; }
.post-item-title { font-size: 17px; font-weight: 700; margin-bottom: 4px; line-height: 1.3; }
.post-item-title a { color: inherit; text-decoration: none; transition: color 0.2s; }
.post-item-title a:hover { color: #2ecc71; }

.post-item-btn {
  background: #2ecc71;
  color: white;
  padding: 12px 24px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s, box-shadow 0.2s;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(46,204,113,0.3);
}
.post-item-btn:hover { background: #27ae60; }

/* ========== 404 ========== */
.error-404 { display: flex; align-items: center; justify-content: center; min-height: 60vh; text-align: center; padding: 40px 20px; }
.error-404-content { max-width: 500px; }
.error-404-icon { font-size: 60px; color: #2ecc71; margin-bottom: 20px; }
.error-404-title { font-size: 100px; font-weight: 700; color: #2ecc71; letter-spacing: 10px; line-height: 1; margin-bottom: 10px; }
.error-404-text { font-size: 24px; font-weight: 600; margin-bottom: 15px; }
.error-404-desc { color: #7e8b9d; font-size: 16px; margin-bottom: 30px; }
body.dark .error-404-desc { color: #9aa6b5; }
.error-404-search { display: flex; margin-bottom: 20px; }
.error-404-search input {
  flex: 1;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 40px 0 0 40px;
  font-family: inherit;
  font-size: 14px;
  background: #f8fafc;
  color: inherit;
  outline: none;
  transition: border-color 0.2s;
}
body.dark .error-404-search input { background: #2d2d44; border-color: #3d3d5c; }
.error-404-search input:focus { border-color: #2ecc71; }
.error-404-search button {
  background: #2ecc71;
  border: none;
  color: white;
  padding: 0 20px;
  border-radius: 0 40px 40px 0;
  cursor: pointer;
  font-size: 16px;
}
.error-404-search button:hover { background: #27ae60; }
.btn-back-home {
  display: inline-block;
  background: #2ecc71;
  color: white;
  padding: 12px 28px;
  border-radius: 40px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
  box-shadow: 0 4px 12px rgba(46,204,113,0.3);
}
.btn-back-home:hover { background: #27ae60; }

/* ========== Логотипы темы ========== */
.logo-img { height: 25px; width: auto; display: none; }
body:not(.dark) .logo-light { display: block; }
body:not(.dark) .logo-text { display: block; }
body.dark .logo-dark { display: block; }
body:not(.dark) .logo-light:only-child { display: block; }

/* ========== Кнопка «Наверх» ========== */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 800;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #2ecc71;
  color: white;
  border: none;
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s, transform 0.3s, background 0.2s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.back-to-top:hover { background: #27ae60; }
.back-to-top.visible { opacity: 1; transform: translateY(0); }

/* ========== Адаптивность ========== */
@media (max-width: 1024px) {
  .sidebar { width: 250px; }
}

@media (max-width: 900px) {
  .content-wrapper { flex-direction: column; }
  .sidebar { width: 100%; position: static; margin-top: 32px; }
  .mobile-menu-toggle { display: flex; }
  
  .main-nav {
    display: none;
    position: fixed;
    top: 52px;
    left: 0;
    width: 100%;
    height: calc(100vh - 52px);
    background: #ffffff;
    overflow-y: auto;
    padding: 16px 20px calc(20px + env(safe-area-inset-bottom, 0px));
    z-index: 999;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    border-radius: 0 0 16px 16px;
  }
  body.dark .main-nav { background: #1a1a2e; }
  .main-nav--open { display: block !important; }

  .main-menu-list { flex-direction: column; gap: 0; margin-top: 0; width: 100%; }
  .main-menu-list li { border-bottom: 1px solid rgba(0,0,0,0.05); }
  body.dark .main-menu-list li { border-bottom-color: rgba(255,255,255,0.05); }

  .main-menu-list a {
    font-size: 18px;
    padding: 16px 0;
    display: block;
    width: 100%;
    color: #1e1e2f;
    min-height: 48px;
  }
  body.dark .main-menu-list a { color: #cbd5e1; }
  .main-menu-list a:hover { background: none; color: #2ecc71; }

  .main-nav .sub-menu {
    display: none;
    position: static;
    background: transparent;
    box-shadow: none;
    padding: 0 0 0 24px;
    border-radius: 0;
  }
  .main-nav .sub-menu.open { display: flex; }
  .main-nav .menu-item-has-children > a::after { float: right; }
  .main-nav .menu-item-has-children.open > a::after { transform: rotate(180deg); }
}

@media (max-width: 768px) {
  .header-inner, .wrapper { padding: 0 16px; }
  .page-title { font-size: 22px; justify-content: center; }
  .post-card h1, .post-card h2 { font-size: 24px; }
  .news-grid { grid-template-columns: 1fr; gap: 16px; }
  
  .bookmakers-list, .rating-rows { gap: 14px; }
  .bk-item, .rating-row {
    flex-direction: column;
    align-items: center;
    padding: 18px 16px;
    gap: 14px;
    text-align: center;
  }
  .bk-logo, .rating-row-logo { margin: 0 auto; }
  .bk-info, .bk-bonus, .bk-features, .rating-row-info, .rating-row-bonus, .rating-row-payout { min-width: auto; width: 100%; }
  .bk-rating, .bk-features { justify-content: center; }
  .bk-features span { display: inline-flex; align-items: center; gap: 4px; margin: 0 4px; }
  .bk-btn, .table-btn { align-self: stretch; width: 100%; text-align: center; padding: 14px 0; }

  .post-item { flex-direction: column; align-items: stretch; padding: 18px 16px; }
  .post-item-btn { align-self: stretch; width: 100%; text-align: center; }
}

@media (max-width: 480px) {
  .logo-link { font-size: 13px; gap: 4px; }
  .search-toggle, .theme-toggle { font-size: 16px; padding: 4px; }
  .bk-logo, .rating-row-logo { width: 44px; height: 44px; font-size: 16px; }
  .filter-btn { padding: 8px 16px; font-size: 13px; }
}