/* Casinoin GR (el-GR): общий стиль сайта. Mobile-first. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/inter-400.ttf") format("truetype");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/inter-700.ttf") format("truetype");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../fonts/inter-800.ttf") format("truetype");
}

:root {
  --c-bg: #130c30;
  --c-bg-deep: #0d0822;
  --c-blue: #045cb4;
  --c-card: #1c1c3c;
  --c-panel: #342c4c;
  --c-accent: #daec30;
  --c-accent-hover: #e8f75a;
  --c-on-accent: #130c30;
  --c-text: #ffffff;
  --c-muted: #c6c1dc;
  --c-line: rgba(255, 255, 255, 0.14);
  --c-glass: rgba(255, 255, 255, 0.1);
  --c-glass-hover: rgba(255, 255, 255, 0.18);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --radius: 20px;
  --radius-sm: 12px;
  --pill: 999px;
  --container: 1180px;
  --header-h: 64px;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
}

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

a { color: var(--c-accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--c-accent-hover); }

:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 2px; border-radius: 6px; }

h1, h2, h3, h4 { font-weight: 800; line-height: 1.2; margin: 0 0 0.6em; letter-spacing: -0.01em; }
h1 { font-size: 1.85rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
li { margin-bottom: 0.35em; }
strong { font-weight: 700; }

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

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--c-accent); color: var(--c-on-accent);
  padding: 10px 16px; border-radius: var(--pill); font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 22px;
  border: 2px solid transparent; border-radius: var(--pill);
  font: inherit; font-weight: 700; font-size: 0.95rem; line-height: 1.2; text-align: center;
  text-decoration: none; cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--c-accent); color: var(--c-on-accent); }
.btn--primary:hover { background: var(--c-accent-hover); color: var(--c-on-accent); }
.btn--secondary { background: var(--c-glass); color: var(--c-text); border-color: var(--c-line); }
.btn--secondary:hover { background: var(--c-glass-hover); color: var(--c-text); }
.btn--lg { min-height: 52px; padding: 0 30px; font-size: 1.05rem; }
.btn--block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Шапка ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(19, 12, 48, 0.96);
  border-bottom: 1px solid var(--c-line);
  backdrop-filter: blur(8px);
}
.header-inner { display: flex; align-items: center; gap: 8px; min-height: var(--header-h); }
.logo { display: inline-flex; align-items: center; flex: 0 0 auto; margin-right: auto; }
.logo img { width: 116px; height: auto; }

.header-actions { display: flex; align-items: center; gap: 8px; }
.header-actions .btn { padding: 0 14px; font-size: 0.875rem; }
.header-actions .btn--login { display: none; }

.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0;
  background: var(--c-glass); border: 1px solid var(--c-line); border-radius: var(--pill);
  color: var(--c-text); cursor: pointer;
}
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
  display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { top: 0; transform: rotate(-45deg); }

.nav { flex-basis: 100%; order: 5; }
.nav-list, .nav-sub { list-style: none; margin: 0; padding: 0; }
.nav-list { padding-bottom: 12px; }
.nav-item { margin: 0; }
.nav-link {
  display: flex; align-items: center; min-height: 44px; padding: 6px 14px;
  color: var(--c-text); text-decoration: none; font-weight: 700; border-radius: var(--pill);
  border: 2px solid transparent;
}
.nav-link:hover { color: var(--c-accent); }
.nav-link[aria-current="page"],
.nav-link[aria-current="true"] { border-color: var(--c-accent); color: var(--c-accent); }
.nav-sub { padding-left: 14px; }
.nav-sub .nav-link { font-weight: 400; color: var(--c-muted); min-height: 40px; }
.nav-sub .nav-link:hover { color: var(--c-accent); }
.nav-item--login { margin-top: 8px; }
.nav-item--login .btn { width: 100%; }

/* JS есть: меню на мобильном сворачивается. Без JS список виден всегда. */
.js .nav { display: none; }
.js .nav.is-open { display: block; }
html:not(.js) .nav-toggle { display: none; }

/* ---------- Подвал ---------- */
.site-footer { background: var(--c-bg-deep); border-top: 1px solid var(--c-line); margin-top: 48px; padding: 40px 0 24px; }
.footer-grid { display: grid; gap: 28px; grid-template-columns: 1fr 1fr; }
.footer-brand { grid-column: 1 / -1; }
.footer-brand p { color: var(--c-muted); font-size: 0.9rem; margin-top: 14px; max-width: 46ch; }
.footer-title { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--c-muted); margin-bottom: 12px; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin: 0; }
.footer-links a {
  display: inline-flex; align-items: center; min-height: 36px;
  color: var(--c-text); text-decoration: none; font-size: 0.95rem;
}
.footer-links a:hover { color: var(--c-accent); }
.footer-bottom {
  display: flex; flex-direction: column; gap: 16px;
  margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--c-line);
  color: var(--c-muted); font-size: 0.85rem;
}
.footer-bottom p { margin: 0; }
.footer-age { display: flex; align-items: flex-start; gap: 12px; }
.age-badge {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid var(--c-accent); color: var(--c-accent); font-weight: 800; font-size: 0.95rem;
}

/* ---------- Хлебные крошки и ссылка на главную ---------- */
.breadcrumbs { font-size: 0.875rem; color: var(--c-muted); margin: 0 0 14px; }
.breadcrumbs a { color: var(--c-muted); }
.breadcrumbs a:hover { color: var(--c-accent); }

/* ---------- Блоки страницы ---------- */
main { display: block; min-height: 60vh; }
.section { padding: 32px 0; }
.section--alt { background: var(--c-card); }
.section__title { margin-bottom: 0.5em; }
.section__lead { color: var(--c-muted); max-width: 70ch; }
.prose { max-width: 78ch; }
.prose a { font-weight: 700; }

/* hero-screen */
.hero {
  position: relative; overflow: hidden;
  padding: 32px 0 36px;
  background:
    radial-gradient(900px 400px at 85% -10%, rgba(4, 92, 180, 0.55), transparent 70%),
    radial-gradient(600px 300px at 0% 100%, rgba(218, 236, 48, 0.08), transparent 70%),
    var(--c-bg);
  border-bottom: 1px solid var(--c-line);
}
.hero__inner { display: grid; gap: 24px; align-items: center; }
.hero__title { font-size: 1.9rem; margin-bottom: 0.45em; }
.hero__lead { color: var(--c-muted); font-size: 1.05rem; max-width: 62ch; }
.hero__lead a { font-weight: 700; }
.hero__actions { margin-top: 20px; }
.hero__media { margin: 0; }
.hero__media img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }
.hero__badges { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 18px 0 0; }
.hero__badges li {
  margin: 0; padding: 6px 14px; border-radius: var(--pill);
  background: var(--c-glass); border: 1px solid var(--c-line); font-size: 0.85rem; font-weight: 700;
}

/* review: таблица фактов */
.review__intro { max-width: 70ch; }
.table-wrap {
  width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--c-line); border-radius: var(--radius-sm); background: var(--c-card);
  margin: 0 0 1.25em;
}
.section--alt .table-wrap { background: var(--c-bg); }
.table { width: 100%; min-width: 480px; border-collapse: collapse; font-size: 0.95rem; }
.table caption { text-align: left; padding: 14px 16px 6px; color: var(--c-muted); font-size: 0.875rem; caption-side: top; }
.table th, .table td { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--c-line); }
.table thead th { background: var(--c-panel); font-weight: 700; white-space: nowrap; }
.table tbody th { font-weight: 700; width: 38%; color: var(--c-accent); }
.table tbody tr:last-child th, .table tbody tr:last-child td { border-bottom: 0; }

/* text-image */
.text-image { display: grid; gap: 22px; align-items: center; }
.text-image__media { margin: 0; }
.text-image__media img { width: 100%; border-radius: var(--radius); }
.sub-sections { display: grid; gap: 16px; margin-top: 20px; }
.sub-section {
  background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--radius-sm); padding: 18px;
}
.section--alt .sub-section { background: var(--c-bg); }
.sub-section h3 { margin-bottom: 0.4em; }
.sub-section p:last-child { margin-bottom: 0; }

/* how-to: нумерованные шаги */
.how-to__steps { list-style: none; counter-reset: step; margin: 20px 0 0; padding: 0; display: grid; gap: 14px; }
.how-to__step {
  counter-increment: step; position: relative; margin: 0;
  background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--radius-sm);
  padding: 16px 16px 16px 66px; min-height: 64px;
}
.section--alt .how-to__step { background: var(--c-bg); }
.how-to__step::before {
  content: counter(step); position: absolute; left: 16px; top: 16px;
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--c-accent); color: var(--c-on-accent); font-weight: 800;
}
.how-to__step h3 { font-size: 1.05rem; margin-bottom: 0.25em; }
.how-to__step p { margin: 0; color: var(--c-muted); }

/* короткий нумерованный список L4 */
.list-short { list-style: none; counter-reset: li; padding: 0; margin: 0 0 1.25em; }
.list-short li {
  counter-increment: li; position: relative; padding-left: 40px; margin-bottom: 0.7em;
}
.list-short li::before {
  content: counter(li); position: absolute; left: 0; top: 0;
  width: 28px; height: 28px; border-radius: 50%; background: var(--c-accent); color: var(--c-on-accent);
  display: flex; align-items: center; justify-content: center; font-size: 0.85rem; font-weight: 800;
}

/* списки с галочками и условия */
.list-check { list-style: none; padding: 0; margin: 0 0 1.25em; }
.list-check li { position: relative; padding-left: 28px; margin-bottom: 0.6em; }
.list-check li::before {
  content: ""; position: absolute; left: 4px; top: 0.45em;
  width: 7px; height: 12px; border: solid var(--c-accent); border-width: 0 3px 3px 0; transform: rotate(45deg);
}

/* games: лобби, карточки игр, провайдеры */
.games__grid { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); margin: 20px 0; }
.game-card {
  margin: 0; background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--radius-sm); overflow: hidden;
}
.game-card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.game-card__body { padding: 10px 12px 12px; }
.game-card__title { font-size: 0.95rem; font-weight: 700; margin: 0; line-height: 1.3; }
.game-card__meta { font-size: 0.8rem; color: var(--c-muted); margin: 2px 0 0; }
.lobby-list { list-style: none; padding: 0; margin: 20px 0; display: grid; gap: 12px; grid-template-columns: 1fr; }
.lobby-list__item {
  margin: 0; padding: 16px 18px; background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--radius-sm);
}
.lobby-list__item h3 { font-size: 1.05rem; margin-bottom: 0.3em; }
.lobby-list__item p { margin: 0; color: var(--c-muted); font-size: 0.95rem; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 1.25em; }
.chips li {
  margin: 0; padding: 6px 14px; border-radius: var(--pill);
  background: var(--c-panel); border: 1px solid var(--c-line); font-size: 0.9rem; font-weight: 700;
}

/* match center (#sports на главной): блок заполняет site.js, при ошибке остаётся скрытым */
.match-center { margin-top: 20px; display: grid; gap: 16px; }
.match-center[hidden] { display: none; }
.match-section { background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--radius-sm); padding: 16px 18px; }
.match-section__title { font-size: 1.05rem; margin: 0 0 10px; }
.match-tournament + .match-tournament { margin-top: 14px; }
.match-tournament__name { font-size: 0.85rem; font-weight: 700; color: var(--c-muted); margin: 0 0 8px; }
.match-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; grid-template-columns: 1fr; }
.match-card { margin: 0; padding: 10px 12px; background: var(--c-bg); border: 1px solid var(--c-line); border-radius: var(--radius-sm); }
.match-card p { margin: 0; }
.match-card__meta { font-size: 0.8rem; color: var(--c-muted); }
.match-card__meta--live { color: var(--c-accent); font-weight: 700; }
.match-card__teams { font-weight: 700; font-size: 0.95rem; margin-top: 2px; }
.match-card__odds { font-size: 0.85rem; color: var(--c-muted); margin-top: 4px; }
@media (min-width: 720px) {
  .match-list { grid-template-columns: 1fr 1fr; }
}

/* faq */
.faq__list { margin-top: 20px; display: grid; gap: 10px; }
.faq__item { background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--radius-sm); }
.section--alt .faq__item { background: var(--c-bg); }
.faq__item summary {
  list-style: none; cursor: pointer; position: relative;
  min-height: 44px; padding: 14px 48px 14px 16px; font-weight: 700;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  font-size: 1.5rem; line-height: 1; color: var(--c-accent);
}
.faq__item[open] summary::after { content: "\2212"; }
.faq__answer { padding: 0 16px 16px; color: var(--c-muted); }
.faq__answer p:last-child { margin-bottom: 0; }

/* финальный CTA */
.cta-band { padding: 32px 0; }
.cta-band__box {
  background: linear-gradient(135deg, var(--c-blue), #2b2a7a 70%);
  border-radius: var(--radius); padding: 28px 20px; text-align: center; box-shadow: var(--shadow);
}
.cta-band__title { margin-bottom: 0.4em; }
.cta-band__text { color: #e6e3f5; max-width: 56ch; margin: 0 auto 18px; }
.cta-band .btn-row { justify-content: center; }

/* оглавление */
.toc { background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--radius-sm); padding: 16px 20px; margin: 0 0 24px; }
.toc__title { font-weight: 800; margin: 0 0 8px; }
.toc ol { margin: 0; padding-left: 1.2em; }

/* примечание, дисклеймер */
.note {
  border-left: 4px solid var(--c-accent); background: var(--c-glass);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 12px 16px; margin: 0 0 1.25em; color: var(--c-muted); font-size: 0.95rem;
}

/* юридические страницы */
.legal { max-width: 78ch; }
.legal h2 { margin-top: 1.6em; font-size: 1.3rem; }

/* контакты */
.contact-grid { display: grid; gap: 14px; margin: 20px 0; }
.contact-card { background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--radius-sm); padding: 18px; }
.contact-card h3 { margin-bottom: 0.3em; }
.contact-card p { margin: 0; color: var(--c-muted); }
.contact-card a { overflow-wrap: anywhere; font-weight: 700; }

/* 404 */
.error-page { text-align: center; padding: 64px 0; }
.error-page__code { font-size: 5rem; font-weight: 800; color: var(--c-accent); line-height: 1; margin: 0 0 12px; }
.error-page .btn-row { justify-content: center; margin-top: 20px; }

/* ---------- Планшет ---------- */
@media (min-width: 640px) {
  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.75rem; }
  .logo img { width: 130px; }
  .header-actions .btn { padding: 0 18px; }
  .header-actions .btn--login { display: inline-flex; }
  .nav-item--login { display: none; }
  .games__grid { grid-template-columns: repeat(3, 1fr); }
  .lobby-list { grid-template-columns: 1fr 1fr; }
  .sub-sections { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: repeat(4, 1fr); }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: row; justify-content: space-between; align-items: flex-start; }
  .section { padding: 44px 0; }
  .hero__title { font-size: 2.4rem; }
}

/* ---------- Десктоп ---------- */
@media (min-width: 1000px) {
  :root { --header-h: 72px; }
  .container { padding: 0 24px; }
  .nav-toggle { display: none; }
  .nav, .js .nav { display: block; flex: 1 1 auto; order: 0; margin: 0 8px; }
  .nav-list { display: flex; justify-content: center; gap: 2px; padding: 0; }
  .nav-item { position: relative; }
  .nav-link { padding: 6px 12px; font-size: 0.9rem; white-space: nowrap; }
  .nav-sub {
    display: none; position: absolute; left: 0; top: 100%; min-width: 220px; z-index: 20;
    padding: 8px; background: var(--c-card); border: 1px solid var(--c-line);
    border-radius: var(--radius-sm); box-shadow: var(--shadow);
  }
  .nav-item:hover > .nav-sub, .nav-item:focus-within > .nav-sub { display: block; }
  .nav-sub .nav-link { padding: 6px 12px; color: var(--c-text); font-size: 0.9rem; }
  .logo { margin-right: 0; }
  .header-actions { margin-left: 0; }
  .hero { padding: 56px 0 60px; }
  .hero__inner { grid-template-columns: 1.15fr 1fr; gap: 40px; }
  .hero__inner--single { grid-template-columns: 1fr; }
  .hero__title { font-size: 2.8rem; }
  .text-image { grid-template-columns: 1fr 1fr; gap: 40px; }
  .text-image--reverse .text-image__media { order: -1; }
  .games__grid { grid-template-columns: repeat(6, 1fr); }
  .lobby-list { grid-template-columns: repeat(3, 1fr); }
  .how-to__steps { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1.6fr repeat(4, 1fr); }
  .footer-brand { grid-column: auto; }
  .cta-band__box { padding: 44px 32px; }
  .section { padding: 56px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after { transition: none; }
}
