/* ============================================================
   NOMINI CASINO — style.css
   Dark luxury theme: deep navy + gold accents
   ============================================================ */

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: auto;
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
  max-width: 100vw;
  background: #0b0e1a;
  color: #e8ecf4;
  font-family: 'Trebuchet MS', 'Verdana', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
}

:root {
  --color-bg:         #0b0e1a;
  --color-bg2:        #111525;
  --color-bg3:        #161b2e;
  --color-surface:    #1a2038;
  --color-border:     #2a3255;
  --color-gold:       #f5c842;
  --color-gold-dark:  #c8a020;
  --color-accent:     #e84c3d;
  --color-green:      #2ecc71;
  --color-text:       #e8ecf4;
  --color-muted:      #8891b0;
  --color-white:      #ffffff;
  --radius:           10px;
  --header-h:         70px;
  --font-main:        'Georgia', 'Times New Roman', serif;
  --font-ui:          'Trebuchet MS', 'Verdana', sans-serif;
  --transition:       0.22s ease;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-gold); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-block;
  padding: 11px 26px;
  border-radius: var(--radius);
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform 0.15s;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-gold-dark) 100%);
  color: #1a1200;
  border-color: var(--color-gold);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #ffe066 0%, var(--color-gold) 100%);
}

.btn-outline {
  background: transparent;
  color: var(--color-gold);
  border-color: var(--color-gold);
}
.btn-outline:hover {
  background: rgba(245, 200, 66, 0.12);
}

.btn-hero {
  background: linear-gradient(135deg, var(--color-gold) 0%, #e8a010 100%);
  color: #1a1200;
  border-color: var(--color-gold);
  font-size: 18px;
  padding: 15px 40px;
  border-radius: 50px;
  box-shadow: 0 6px 30px rgba(245, 200, 66, 0.35);
}
.btn-hero:hover {
  box-shadow: 0 8px 40px rgba(245, 200, 66, 0.55);
  transform: translateY(-3px);
}

.btn-large {
  font-size: 17px;
  padding: 14px 36px;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 14, 26, 0.97);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(6px);
  height: var(--header-h);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-img {
  height: 46px;
  width: auto;
  display: block;
}

.logo-img[src="YOUR_LOGO_URL_HERE"],
.logo-img:not([src]) { display: none; }
.logo-img[src="YOUR_LOGO_URL_HERE"] ~ .logo-fallback,
.logo-img:not([src]) ~ .logo-fallback { display: block; }

.logo-fallback {
  display: none;
  font-family: var(--font-main);
  font-size: 22px;
  font-weight: bold;
  color: var(--color-gold);
  letter-spacing: 1px;
}

.logo-img[src]:not([src="YOUR_LOGO_URL_HERE"]) { display: block; }
.logo-img[src]:not([src="YOUR_LOGO_URL_HERE"]) ~ .logo-fallback { display: none; }

.header-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-switcher {
  display: flex;
  gap: 6px;
}
.lang-btn {
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-muted);
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  background: transparent;
  transition: color var(--transition), border-color var(--transition);
  text-decoration: none;
}
.lang-btn:hover, .lang-btn.active {
  color: var(--color-gold);
  border-color: var(--color-gold);
  text-decoration: none;
}

/* Burger */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-gold);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.2s;
}
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav */
.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 12px;
  padding: 16px 20px 20px;
  background: var(--color-bg2);
  border-top: 1px solid var(--color-border);
}
.mobile-nav.open { display: flex; }
.mobile-nav .lang-switcher { justify-content: flex-start; }
.mobile-nav .btn { text-align: center; }

/* ============================================================
   BONUS HERO
   ============================================================ */
.bonus-hero {
  background:
    radial-gradient(ellipse at 60% 40%, rgba(245,200,66,0.18) 0%, transparent 65%),
    radial-gradient(ellipse at 20% 80%, rgba(232,76,61,0.12) 0%, transparent 60%),
    linear-gradient(160deg, #0d1020 0%, #141830 50%, #0b0e1a 100%);
  border-bottom: 2px solid var(--color-gold);
  padding: 70px 20px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.bonus-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 40px,
      rgba(245,200,66,0.03) 40px,
      rgba(245,200,66,0.03) 41px
    );
  pointer-events: none;
}

.bonus-hero-inner {
  position: relative;
  max-width: 750px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.bonus-badge {
  display: inline-block;
  background: rgba(245,200,66,0.15);
  border: 1px solid rgba(245,200,66,0.5);
  color: var(--color-gold);
  font-size: 13px;
  font-weight: 700;
  padding: 5px 18px;
  border-radius: 50px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.bonus-title {
  font-family: var(--font-main);
  font-size: clamp(24px, 5vw, 46px);
  font-weight: bold;
  color: var(--color-white);
  line-height: 1.2;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
  word-break: break-word;
}

.bonus-subtitle {
  font-size: clamp(15px, 2.5vw, 21px);
  color: var(--color-text);
  max-width: 560px;
  word-break: break-word;
}
.bonus-subtitle strong { color: var(--color-gold); }

.bonus-note {
  font-size: 12px;
  color: var(--color-muted);
  margin-top: 4px;
}

/* ============================================================
   SECTION TITLE
   ============================================================ */
.section-title {
  font-family: var(--font-main);
  font-size: clamp(20px, 3.5vw, 32px);
  color: var(--color-white);
  text-align: center;
  margin-bottom: 30px;
}
.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--color-gold);
  margin: 10px auto 0;
  border-radius: 2px;
}

/* ============================================================
   VISUAL BLOCK 1 — CAROUSEL
   ============================================================ */
.visual-block {
  padding: 60px 0;
}

.visual-carousel-block {
  background: var(--color-bg2);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.carousel-track-wrapper {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
}

.carousel-track {
  display: flex;
  gap: 16px;
  overflow: hidden;
  flex: 1;
  min-width: 0;
}

.game-card {
  flex: 0 0 calc(25% - 12px);
  min-width: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: center;
  transition: transform var(--transition), border-color var(--transition);
  cursor: pointer;
}
.game-card:hover {
  transform: translateY(-5px);
  border-color: var(--color-gold);
}

.game-thumb {
  width: 100%;
  aspect-ratio: 3/2;
  background-size: cover;
  background-position: center;
}

.game-1 { background: linear-gradient(135deg, #1a0a2e 0%, #6b21a8 100%); }
.game-2 { background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%); }
.game-3 { background: linear-gradient(135deg, #1a2a00 0%, #4a7c20 100%); }
.game-4 { background: linear-gradient(135deg, #2d1b00 0%, #b8620a 100%); }
.game-5 { background: linear-gradient(135deg, #00094f 0%, #0050c8 100%); }
.game-6 { background: linear-gradient(135deg, #3d0000 0%, #c80000 100%); }
.game-7 { background: linear-gradient(135deg, #001a1a 0%, #007070 100%); }
.game-8 { background: linear-gradient(135deg, #1f0030 0%, #9000c8 100%); }

.game-card span {
  display: block;
  padding: 8px 6px;
  font-size: 13px;
  color: var(--color-text);
  font-weight: 600;
}

.carousel-btn {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-gold);
  font-size: 18px;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.carousel-btn:hover {
  background: rgba(245,200,66,0.15);
  border-color: var(--color-gold);
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}
.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-border);
  cursor: pointer;
  border: none;
  transition: background var(--transition), transform var(--transition);
}
.carousel-dot.active {
  background: var(--color-gold);
  transform: scale(1.3);
}

/* ============================================================
   TEXT CONTENT SECTION
   ============================================================ */
.text-content-section {
  padding: 60px 0;
  background: var(--color-bg);
}

.content-container {
  max-width: 860px;
  /* Критично: не даёт контенту вылезать за границы */
  overflow: hidden;
}

.content-container h2 {
  font-family: var(--font-main);
  font-size: clamp(20px, 3vw, 30px);
  color: var(--color-white);
  margin-top: 40px;
  margin-bottom: 16px;
  border-left: 4px solid var(--color-gold);
  padding-left: 16px;
  line-height: 1.3;
  word-break: break-word;
}
.content-container h2:first-child { margin-top: 0; }

.content-container h3 {
  font-family: var(--font-main);
  font-size: clamp(17px, 2.5vw, 24px);
  color: var(--color-gold);
  margin-top: 32px;
  margin-bottom: 12px;
  word-break: break-word;
}

.content-container h4 {
  font-size: 17px;
  color: var(--color-text);
  margin-top: 20px;
  margin-bottom: 8px;
}

.content-container p {
  color: var(--color-text);
  margin-bottom: 16px;
  line-height: 1.8;
  word-break: break-word;
  overflow-wrap: break-word;
}

.content-container ul,
.content-container ol {
  margin: 0 0 20px 24px;
  color: var(--color-text);
}
.content-container li {
  margin-bottom: 8px;
  line-height: 1.7;
  word-break: break-word;
  overflow-wrap: break-word;
}
.content-container ul li::marker { color: var(--color-gold); }

/* ============================================================
   TABLES — ключевое исправление
   ============================================================ */
.table-wrapper {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 24px;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  /* Запрещаем растягивать родителя */
  max-width: 100%;
}

.content-container table {
  /* НЕТ min-width — таблица сужается вместе с экраном,
     а если не влезает — скроллится внутри .table-wrapper */
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.content-container thead {
  background: var(--color-surface);
}

.content-container th {
  padding: 12px 16px;
  text-align: left;
  color: var(--color-gold);
  font-weight: 700;
  border-bottom: 2px solid var(--color-border);
  white-space: nowrap;
}

.content-container td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
  /* Перенос длинных слов в ячейках */
  word-break: break-word;
  overflow-wrap: break-word;
}

.content-container tr:last-child td { border-bottom: none; }
.content-container tbody tr:nth-child(odd) {
  background: rgba(255,255,255,0.03);
}
.content-container tbody tr:hover {
  background: rgba(245,200,66,0.06);
}

.cta-inline {
  text-align: center;
  margin-top: 40px;
  padding: 30px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

/* ============================================================
   VISUAL BLOCK 2 — STATS / RINGS
   ============================================================ */
.visual-stats-block {
  background: var(--color-bg3);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  align-items: start;
}

.stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px 20px 22px;
  text-align: center;
  transition: border-color var(--transition), transform var(--transition);
  min-width: 0;
}
.stat-card:hover {
  border-color: var(--color-gold);
  transform: translateY(-4px);
}

.stat-ring {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 14px;
}

.ring-svg {
  width: 120px;
  height: 120px;
  transform: rotate(-90deg);
}

.ring-bg {
  fill: none;
  stroke: var(--color-border);
  stroke-width: 10;
}

.ring-fill {
  fill: none;
  stroke: var(--color-gold);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 314;
  stroke-dashoffset: 314;
  transition: stroke-dashoffset 1.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.ring-fill-green { stroke: var(--color-green); }
.ring-fill-gold  { stroke: #f5c842; }

.ring-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.2;
}

.ring-value {
  font-size: 22px;
  font-weight: bold;
  color: var(--color-white);
}
.ring-label {
  font-size: 11px;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.counter-block {
  width: 120px;
  height: 120px;
  margin: 0 auto 14px;
  background: linear-gradient(135deg, rgba(245,200,66,0.1) 0%, rgba(245,200,66,0.05) 100%);
  border: 2px solid rgba(245,200,66,0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.counter-number {
  font-size: 28px;
  font-weight: 900;
  color: var(--color-gold);
}
.counter-plus {
  font-size: 24px;
  font-weight: 900;
  color: var(--color-gold);
  align-self: flex-start;
  margin-top: 10px;
}
.stat-desc {
  font-size: 13px;
  color: var(--color-muted);
  line-height: 1.5;
}

/* ============================================================
   AUTHOR BLOCK
   ============================================================ */
.author-block {
  background: var(--color-bg2);
  border-top: 1px solid var(--color-border);
  padding: 48px 0;
}

.author-inner {
  display: flex;
  align-items: flex-start;
  gap: 28px;
  max-width: 860px;
}

.author-avatar-wrap { flex-shrink: 0; }

.author-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--color-gold);
  background: var(--color-surface);
}

.author-info { flex: 1; min-width: 0; }

.author-name {
  font-family: var(--font-main);
  font-size: 20px;
  font-weight: bold;
  color: var(--color-white);
  margin-bottom: 2px;
}

.author-role {
  font-size: 13px;
  color: var(--color-gold);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.author-bio {
  font-size: 15px;
  color: var(--color-muted);
  line-height: 1.75;
  word-break: break-word;
  overflow-wrap: break-word;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: #070a13;
  border-top: 1px solid var(--color-border);
  padding: 28px 0;
}

.footer-legal {
  font-size: 12px;
  color: #505878;
  line-height: 1.7;
  text-align: center;
  word-break: break-word;
  overflow-wrap: break-word;
}
.footer-legal strong { color: #7080a0; }

/* ============================================================
   RESPONSIVE — TABLET ≤900px
   ============================================================ */
@media (max-width: 900px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================================
   RESPONSIVE — MOBILE ≤768px
   ============================================================ */
@media (max-width: 768px) {
  :root { --header-h: 60px; }

  .header-nav { display: none; }
  .burger { display: flex; }

  .bonus-hero { padding: 50px 16px 44px; }

  .game-card { flex: 0 0 calc(50% - 8px); }
  .carousel-track-wrapper { gap: 8px; }

  .author-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
  }
  .author-bio { text-align: left; }

  .cta-inline { padding: 20px 16px; }

  /* Таблица на мобильном — компактные ячейки */
  .content-container th,
  .content-container td {
    padding: 9px 12px;
    font-size: 14px;
  }
}

/* ============================================================
   RESPONSIVE — SMALL MOBILE ≤480px
   ============================================================ */
@media (max-width: 480px) {
  .bonus-hero { padding: 40px 14px 36px; }

  .game-card { flex: 0 0 calc(50% - 8px); }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  .stat-card { padding: 20px 12px 16px; }

  .content-container h2 { padding-left: 12px; }

  .author-avatar { width: 75px; height: 75px; }

  .btn-hero { font-size: 16px; padding: 13px 28px; }

  .content-container th,
  .content-container td {
    padding: 8px 10px;
    font-size: 13px;
  }
}

@media (max-width: 360px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
}