/*
Theme Name: Betting Info Theme
Theme URI: https://betting-blog.ru
Author: Betting Blog
Description: Информационная тема о ставках на спорт: школа ставок, обзоры букмекеров.
Version: 1.2.2
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: betting-info-theme
*/

:root {
  --bg: #f4f6f9;
  --bg-subtle: #eef1f6;
  --header-bg: #1a1f2e;
  --header-text: #ffffff;
  --surface: #ffffff;
  --surface-2: #f0f3f8;
  --surface-dark: #1a1f2e;
  --surface-dark-2: #252b3b;
  --border: #dde3ed;
  --border-dark: #3a4358;
  --text: #1a1f2e;
  --text-on-dark: #e8ecf2;
  --muted: #5c6b7f;
  --muted-on-dark: #9aa8bc;
  --green: #00a844;
  --green-hover: #00c853;
  --green-dark: #008f3a;
  --radius: 14px;
  --container: 1200px;
  --sidebar: 300px;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0, 168, 68, 0.06) 0%, transparent 55%),
    linear-gradient(180deg, #fafbfc 0%, var(--bg) 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* catfish: без отступов у body/footer — баннер только поверх контента */

a { color: inherit; text-decoration: none; }

.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--header-text);
}

.site-logo__mark {
  width: 32px;
  height: 32px;
  background: var(--green);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #000;
  font-size: 14px;
  font-weight: 800;
  flex-shrink: 0;
}

.site-logo .custom-logo,
.site-logo__img {
  display: block;
  height: 36px;
  width: auto;
  max-width: 220px;
}

.site-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.site-nav a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--muted-on-dark);
  border: 1px solid transparent;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--header-text);
  border-color: var(--border-dark);
  background: rgba(255, 255, 255, 0.08);
}

.ad-mobile-banner {
  display: none;
}

.ad-mobile-banner__link {
  display: block;
  line-height: 0;
}

.ad-mobile-banner__img {
  display: block;
  width: 100%;
  height: auto;
}

.layout {
  display: grid;
  grid-template-columns: 1fr var(--sidebar);
  gap: 28px;
  padding: 28px 0 48px;
  align-items: start;
}

.layout--full { grid-template-columns: 1fr; }

.main-col { min-width: 0; flex: 1; }

.page-title {
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1.2;
  margin: 0 0 8px;
}

.page-lead {
  color: var(--muted);
  margin: 0 0 24px;
  max-width: 720px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
}

.breadcrumb a:hover { color: var(--green); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.card + .card { margin-top: 16px; }

.section-title {
  font-size: 20px;
  margin: 0 0 14px;
}

.section-title--lg {
  font-size: clamp(26px, 3.2vw, 34px);
  margin-bottom: 10px;
}

.section-block { margin-bottom: 32px; }

.school-hub__lead {
  color: var(--muted);
  margin: 0 0 26px;
  max-width: 720px;
  line-height: 1.55;
}

.school-subsection {
  margin-bottom: 30px;
}

.school-subsection__title {
  font-size: 18px;
  margin: 0 0 12px;
}

.section-link {
  margin-top: 14px;
  color: var(--green);
  font-weight: 600;
  display: inline-block;
}

.section-link:hover { color: var(--green-hover); }

.hero {
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 2px 12px rgba(26, 31, 46, 0.06);
  margin-bottom: 32px;
}

.hero h1 {
  font-size: clamp(28px, 4vw, 38px);
  margin: 0 0 12px;
  line-height: 1.15;
}

.hero p {
  color: var(--muted);
  margin: 0;
  max-width: 640px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.tile {
  display: block;
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color 0.15s, transform 0.15s;
}

.tile:hover {
  border-color: rgba(0, 168, 68, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(26, 31, 46, 0.08);
}

.tile__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(0, 168, 68, 0.1);
  color: var(--green);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 12px;
}

.tile__title { font-weight: 600; margin-bottom: 6px; }

.tile__text {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

.tile--school {
  padding: 0;
  overflow: hidden;
}

.tile__cover,
.school-cover {
  display: block;
  overflow: hidden;
}

.tile__cover img,
.school-cover img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.tile__body {
  padding: 14px 16px 16px;
}

.school-cover--fallback {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  background: #12151f;
  color: #ffffff;
  font-size: 28px;
  font-weight: 800;
}

.school-hero-cover {
  margin-bottom: 22px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 8px 28px rgba(26, 31, 46, 0.12);
}

.brand-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color 0.15s;
}

.brand-chip:hover { border-color: rgba(0, 168, 68, 0.4); box-shadow: 0 2px 12px rgba(26, 31, 46, 0.06); }

.brand-chip__logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 11px;
  color: var(--green);
  flex-shrink: 0;
  overflow: hidden;
}

.brand-chip__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-chip__name { font-weight: 600; font-size: 15px; }
.brand-chip__bonus { font-size: 12px; color: var(--muted); }

.brand-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.brand-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 18px;
  align-items: center;
  padding: 20px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.brand-card:hover {
  border-color: rgba(0, 168, 68, 0.4);
  box-shadow: 0 4px 18px rgba(26, 31, 46, 0.08);
  transform: translateY(-1px);
}

.brand-card__logo {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 14px;
  color: var(--green);
  flex-shrink: 0;
  overflow: hidden;
}

.brand-card__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 16px;
  margin-bottom: 8px;
}

.brand-card__name {
  font-weight: 700;
  font-size: 18px;
}

.brand-card__bonus {
  font-size: 13px;
  color: var(--green);
  font-weight: 600;
}

.brand-card__excerpt {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

.btn-go {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--green);
  color: #ffffff;
  font-weight: 700;
  font-size: 13px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.btn-go:hover { background: var(--green-hover); }
.btn-go--sm { padding: 7px 12px; font-size: 12px; }
.btn-go--block { width: 100%; }
.btn-go.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.article-body h2 { font-size: 20px; margin: 28px 0 12px; }
.article-body h3 { font-size: 17px; margin: 22px 0 10px; }
.article-body p, .article-body li { color: #3d4a5c; }
.article-body ul, .article-body ol { padding-left: 20px; }
.article-body p { margin: 0 0 14px; }

.article-list { list-style: none; padding: 0; margin: 0; }

.article-list__item {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 0;
  padding: 0;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  margin-bottom: 12px;
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
  align-items: stretch;
}

.article-list__item:hover {
  border-color: rgba(0, 168, 68, 0.4);
  box-shadow: 0 4px 16px rgba(26, 31, 46, 0.08);
}

.article-list__cover img {
  width: 100%;
  height: 100%;
  min-height: 124px;
  object-fit: cover;
  aspect-ratio: 16 / 9;
}

.article-list__body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.article-list__title { font-weight: 600; margin-bottom: 4px; }
.article-list__excerpt { font-size: 13px; color: var(--muted); margin: 0; }

.brand-hero {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  margin-bottom: 24px;
}

.brand-hero__logo {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 800;
  color: var(--green);
  overflow: hidden;
}

.brand-hero__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-hero__title {
  margin: 0 0 6px;
  font-size: 28px;
}

.brand-hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.stat-pill {
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(0, 168, 68, 0.1);
  color: var(--green-dark);
  border: 1px solid rgba(0, 168, 68, 0.25);
}

.stat-pill--muted {
  background: var(--surface-2);
  color: var(--muted);
  border-color: var(--border);
}

.sidebar-col { min-width: 0; }

.sidebar {
  position: sticky;
  top: 80px;
}

.sidebar__title {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 12px;
}

.rating-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.rating-table th,
.rating-table td {
  padding: 8px 6px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.rating-table th {
  color: var(--muted);
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.rating-table .rank {
  color: var(--muted);
  width: 28px;
  text-align: center;
}

.rating-table .rank--top { color: var(--green); font-weight: 700; }
.rating-table .brand-name { font-weight: 600; }

.rating-table .brand-logo {
  width: 48px;
  padding: 6px 4px;
}

.rating-table .brand-logo__link {
  display: block;
  line-height: 0;
}

.rating-table .brand-logo__img {
  display: block;
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 8px;
  background: var(--surface-2);
}

.rating-table .bonus { color: var(--muted); font-size: 11px; }

.rating-table th:last-child,
.rating-table td:last-child {
  width: 76px;
  min-width: 76px;
  text-align: center;
}

.rating-table .btn-go {
  width: 76px;
  max-width: 76px;
  min-width: 76px;
  box-sizing: border-box;
  padding-left: 6px;
  padding-right: 6px;
  justify-content: center;
  white-space: nowrap;
}

.sidebar--rating {
  background: var(--surface);
  border-color: var(--border);
  box-shadow: 0 2px 12px rgba(26, 31, 46, 0.06);
}

.sidebar--rating .sidebar__title {
  color: var(--text);
}

.sidebar--rating .rating-table th {
  color: var(--muted);
}

.sidebar--rating .rating-table td {
  border-bottom-color: var(--border);
}

.sidebar--rating .rating-table .brand-name {
  color: var(--text);
}

.sidebar--rating .rating-table .bonus {
  color: var(--muted);
}

.sidebar--rating .rating-table .rank--top {
  color: var(--green);
}

.sidebar--dark {
  background: var(--surface-dark);
  border-color: var(--border-dark);
  color: var(--text-on-dark);
}

.sidebar--dark .sidebar__title {
  color: var(--header-text);
}

.sidebar--dark .rating-table th {
  color: var(--muted-on-dark);
}

.sidebar--dark .rating-table td {
  border-bottom-color: var(--border-dark);
}

.sidebar--dark .rating-table .brand-name {
  color: var(--text-on-dark);
}

.sidebar--dark .rating-table .bonus {
  color: var(--muted-on-dark);
}

.sidebar--dark .rating-table .rank--top {
  color: var(--green-hover);
}

.site-footer {
  border-top: 1px solid var(--border-dark);
  padding: 24px 0;
  margin-top: auto;
  background: var(--header-bg);
  color: var(--muted-on-dark);
  font-size: 13px;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
}

.ad-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 31, 46, 0.72);
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.ad-overlay.is-visible { display: flex; }

.ad-popup {
  width: min(600px, 100%);
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  line-height: 0;
}

.ad-popup__link {
  display: block;
  line-height: 0;
}

.ad-popup__img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(85vh, 500px);
  object-fit: contain;
  border-radius: 16px;
}

.ad-popup__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(26, 31, 46, 0.85);
  border: none;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.ad-popup__close:hover {
  background: #1a1f2e;
}

#ad-catfish.ad-catfish {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  height: auto;
  max-height: none;
  z-index: 9999;
  background: transparent;
  padding: 0;
  margin: 0;
  top: auto;
  bottom: calc(var(--catfish-bottom-offset, 0px) + env(safe-area-inset-bottom, 0px));
  transform: translateY(0);
  transition: transform 0.25s ease, bottom 0.15s ease;
  line-height: 0;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
}

#ad-catfish.ad-catfish.is-visible {
  visibility: visible;
  opacity: 1;
}

#ad-catfish.ad-catfish.is-hidden { transform: translateY(110%); }

.ad-catfish__link {
  display: block;
  line-height: 0;
  height: auto;
  pointer-events: auto;
}

.ad-catfish__img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 100px;
  object-fit: cover;
  vertical-align: top;
}

.ad-catfish__close {
  position: absolute;
  top: -12px;
  right: 12px;
  z-index: 2;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 16px;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  pointer-events: auto;
}

.disclaimer {
  color: var(--muted);
  font-size: 13px;
  margin-top: 20px;
}

@media (max-width: 960px) {
  body { background-attachment: scroll; }

  .ad-mobile-banner {
    display: block;
    background: #fff;
    border-bottom: 1px solid var(--border);
  }

  #ad-catfish {
    display: none !important;
  }

  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; order: -1; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .brand-card {
    grid-template-columns: 60px 1fr;
    padding: 16px 18px;
  }
  .brand-card__logo {
    width: 60px;
    height: 60px;
  }
  .article-list__item { grid-template-columns: 1fr; }
  .article-list__body { padding: 14px 16px 16px; }
  .brand-hero {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .brand-hero .btn-go { width: 100%; }
  #ad-catfish.ad-catfish {
    background: #fff;
    box-shadow: 0 -4px 24px rgba(26, 31, 46, 0.12);
  }
  .ad-catfish__close {
    top: 8px;
    right: 8px;
  }
  .ad-popup__img { max-height: 70vh; }
  .site-nav { display: none; }
}
