/* =========================
   vyvod-casino.ru — styles.css
   Mobile-first, clean UI
   ========================= */

/* ---- Reset / Base ---- */
*{ box-sizing:border-box; }
html, body{ height:100%; }
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Helvetica Neue", sans-serif;
  line-height:1.55;
  color:#e9eef7;
  background:
    radial-gradient(1200px 600px at 20% -10%, rgba(99,204,255,.10), transparent 60%),
    radial-gradient(900px 500px at 90% 0%, rgba(123,97,255,.12), transparent 55%),
    #0b0d12;
}

/* prevent horizontal overflow on mobile */
img, svg, video{ max-width:100%; height:auto; }
.container{
  width: min(1100px, calc(100% - 32px));
  margin:0 auto;
}

/* ---- Variables ---- */
:root{
  --bg:#0b0d12;
  --card: rgba(255,255,255,.045);
  --card2: rgba(255,255,255,.035);
  --border: rgba(255,255,255,.10);
  --muted: rgba(233,238,247,.70);
  --text: #e9eef7;
  --shadow: 0 18px 50px rgba(0,0,0,.45);
  --radius: 20px;
  --radius2: 16px;
  --accentA: rgba(123,97,255,1);
  --accentB: rgba(99,204,255,1);
}

/* links */
a{ color:#9bdcff; text-decoration:none; }
a:hover{ text-decoration:underline; }

/* ---- Layout Sections ---- */
.section{ padding: 28px 0; }
.hero{ padding: 28px 0 12px; }
.hr{
  height:1px;
  background: var(--border);
  margin: 18px 0;
  border-radius:1px;
}

/* ---- Typography ---- */
h1,h2,h3{
  margin:0 0 10px;
  line-height:1.2;
  letter-spacing:-.01em;
}
h1{ font-size: clamp(26px, 3.5vw, 40px); }
h2{ font-size: clamp(20px, 2.4vw, 28px); }
h3{ font-size: clamp(16px, 2vw, 20px); }
p{ margin: 0 0 12px; color: var(--text); }
.note, .small{ color: var(--muted); font-size: 13px; }

/* ---- Header / Nav ---- */
.header{
  position: sticky;
  top:0;
  z-index:50;
  backdrop-filter: blur(10px);
  background: rgba(11,13,18,.72);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding: 12px 0;
}
.brand{
  display:flex;
  gap:10px;
  align-items:center;
  font-weight:800;
  color: var(--text);
}
.brand img{
  width: 28px;
  height: 28px;
  border-radius: 10px;
  border:1px solid var(--border);
}
.navlinks{
  display:flex;
  gap:14px;
  flex-wrap:wrap;
  justify-content:center;
}
.navlinks a{
  padding: 8px 10px;
  border-radius: 999px;
  color: var(--muted);
  border:1px solid transparent;
}
.navlinks a:hover{
  color: var(--text);
  border-color: rgba(255,255,255,.10);
  text-decoration:none;
}
.navlinks a.active{
  color: var(--text);
  border-color: rgba(123,97,255,.45);
  background: rgba(123,97,255,.10);
}

/* Compact header on very small screens */
@media (max-width: 560px){
  .nav{
    flex-direction: column;
    align-items: flex-start;
    gap:10px;
  }
  .navlinks{
    width:100%;
    overflow:auto;
    white-space:nowrap;
    padding-bottom: 6px;
  }
}

/* ---- Cards ---- */
.card{
  background: linear-gradient(180deg, var(--card), var(--card2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.cardPad{ padding: 18px; }
@media (max-width: 420px){
  .container{ width: calc(100% - 22px); }
  .cardPad{ padding: 14px; }
}

/* ---- Buttons ---- */
.button, .btnPrimary{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 800;
  border: 1px solid rgba(255,255,255,.12);
  color: var(--text);
  text-decoration:none;
  cursor:pointer;
  transition: transform .15s ease, filter .15s ease, background .15s ease;
  white-space: nowrap;
}
.button{
  background: rgba(255,255,255,.04);
}
.button:hover{ filter: brightness(1.05); transform: translateY(-1px); text-decoration:none; }

.btnPrimary{
  background: linear-gradient(135deg, rgba(123,97,255,.95), rgba(99,204,255,.65));
  border-color: rgba(123,97,255,.50);
  color:#0b0d12;
  box-shadow: 0 14px 36px rgba(123,97,255,.22);
}
.btnPrimary:hover{ filter: brightness(1.03); transform: translateY(-1px); text-decoration:none; }
.btnPrimary:active, .button:active{ transform: translateY(0); }

/* ---- Badges ---- */
.badgeRow{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.badge{
  display:inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: rgba(233,238,247,.85);
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
}

/* ---- Callout ---- */
.callout{
  padding: 12px 14px;
  border-radius: var(--radius2);
  border: 1px solid rgba(123,97,255,.28);
  background: rgba(123,97,255,.08);
  color: rgba(233,238,247,.92);
}
.callout b{ color: var(--text); }

/* ---- Grids ---- */
.grid2{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
@media (max-width: 900px){
  .grid2{ grid-template-columns: 1fr; }
}

/* ---- HERO GRID ---- */
.heroGrid{
  display:grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 22px;
  align-items: stretch;
}
@media (max-width: 992px){
  .heroGrid{ grid-template-columns: 1fr; }
}

/* ---- HERO MEDIA ----
   Your HTML:
   <div class="card heroMedia"><img ...></div>
*/
.card.heroMedia{
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius);
  display:flex;
  align-items: stretch;
  justify-content: stretch;
  min-height: 420px;
}
.card.heroMedia img{
  width:100%;
  height:100%;
  display:block;
  object-fit: cover;
  object-position: center;
}

/* tablet/mobile */
@media (max-width: 992px){
  .card.heroMedia{ min-height: 260px; }
}

/* === MOBILE REQUIREMENT:
   Hero image MUST fit screen fully (no giant poster).
   We force 16:9 and contain on phones.
*/
@media (max-width: 520px){
  .card.heroMedia{
    min-height: auto !important;
    aspect-ratio: 16 / 9;
  }
  .card.heroMedia img{
    object-fit: contain !important;
    background: #0b0d12;
  }
  h1{ font-size: 28px; }
}

/* ---- KPI blocks ---- */
.kpi{
  display:flex;
  gap:12px;
  align-items:flex-start;
}
.kpiIcon{
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border:1px solid rgba(255,255,255,.12);
  background: radial-gradient(circle at 30% 30%, rgba(99,204,255,.35), rgba(123,97,255,.30));
  box-shadow: 0 14px 32px rgba(0,0,0,.25);
  flex: 0 0 auto;
}

/* ---- Pills ---- */
.pill{
  display:inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
  font-size: 12px;
  font-weight: 800;
}
.pill.good{
  border-color: rgba(99,204,255,.35);
  background: rgba(99,204,255,.10);
}

/* ---- Casino table cell helpers ---- */
.casinoCell{ display:flex; gap:12px; align-items:center; }
.casinoLogo{
  width:42px; height:42px;
  border-radius: 14px;
  display:flex; align-items:center; justify-content:center;
  font-weight: 900;
  color: rgba(255,255,255,.92);
  border: 1px solid rgba(255,255,255,.12);
  background: radial-gradient(circle at 30% 30%, rgba(99,204,255,.35), rgba(123,97,255,.32));
  box-shadow: 0 12px 30px rgba(0,0,0,.25);
}
.casinoName{ font-weight: 900; }
.tdMut{ color: var(--muted); }

/* ---- TABLE WRAP (desktop/tablet) ---- */
.tableWrap{
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.16);
  overflow: hidden;
}

/* Desktop table */
table{
  width:100%;
  border-collapse: separate;
  border-spacing: 0;
}
thead th{
  text-align:left;
  font-size: 12px;
  letter-spacing: .02em;
  color: rgba(233,238,247,.86);
  background: rgba(11,13,18,.85);
  border-bottom: 1px solid rgba(255,255,255,.10);
  padding: 12px 12px;
  white-space: nowrap;
}
tbody td{
  padding: 12px 12px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  vertical-align: top;
}
tbody tr:hover td{
  background: rgba(255,255,255,.02);
}
td .btnPrimary, td .button{ white-space: nowrap; }

/* === MOBILE REQUIREMENT:
   Table MUST fit screen — convert table to cards (no horizontal scroll)
*/
@media (max-width: 520px){
  .tableWrap{
    overflow: visible !important;
    border: 0 !important;
    background: transparent !important;
  }

  table{
    width: 100% !important;
    border-spacing: 0 12px !important;
  }

  thead{
    display: none !important;
  }

  tbody tr{
    display: block !important;
    background: rgba(255,255,255,.035) !important;
    border: 1px solid rgba(255,255,255,.10) !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    box-shadow: 0 18px 40px rgba(0,0,0,.35) !important;
  }

  tbody td{
    display: flex !important;
    justify-content: space-between !important;
    gap: 12px !important;
    padding: 10px 12px !important;
    border-bottom: 1px solid rgba(255,255,255,.06) !important;
  }

  tbody td:last-child{
    border-bottom: 0 !important;
  }

  /* labels for 6-column tables:
     Casino | Speed | Methods | Min | KYC | Action
     If a page has 7 columns, it still looks fine (extra will show without label)
  */
  tbody td:nth-child(1)::before{ content:"Казино"; }
  tbody td:nth-child(2)::before{ content:"Скорость"; }
  tbody td:nth-child(3)::before{ content:"Методы"; }
  tbody td:nth-child(4)::before{ content:"Мин. вывод"; }
  tbody td:nth-child(5)::before{ content:"KYC"; }
  tbody td:nth-child(6)::before{ content:"Действие"; }

  tbody td::before{
    color: rgba(233,238,247,.65);
    font-size: 12px;
    font-weight: 800;
    flex: 0 0 92px;
  }

  tbody td{
    font-size: 14px;
  }

  tbody td:last-child a.btnPrimary{
    width: 100%;
    justify-content: center;
  }
}

/* ---- FAQ (accordion) ---- */
.faq{ display:flex; flex-direction:column; gap:10px; }
.faqItem{
  border: 1px solid rgba(255,255,255,.10);
  border-radius: var(--radius2);
  background: rgba(255,255,255,.03);
  overflow:hidden;
}
.faqQ{
  width:100%;
  text-align:left;
  padding: 12px 14px;
  background: transparent;
  border: 0;
  color: var(--text);
  font-weight: 900;
  cursor: pointer;
  display:flex;
  justify-content: space-between;
  gap:10px;
}
.faqQ span{ opacity:.8; font-weight:900; }
.faqA{
  padding: 0 14px 12px 14px;
  color: var(--muted);
  display:none;
}
.faqItem.open .faqA{ display:block; }

/* ---- Footer ---- */
.footer{
  padding: 26px 0 40px;
  color: var(--muted);
}
.footer p{ margin: 8px 0; }

/* ---- QoL ---- */
::selection{ background: rgba(99,204,255,.25); }
.ratingWrap{
  display:flex;
  flex-direction:column;
  gap:18px;
}

.offerCard{
  display:grid;
  grid-template-columns: 240px 1fr 320px;
  gap:18px;
  padding:18px;
  border-radius:18px;
  background:#2f3b44;
  border:2px solid #18d48d;
  box-shadow: 0 0 0 2px rgba(24,212,141,.12) inset;
}

.offerLeft{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.offerLogo{
  width:100%;
  height:130px;
  object-fit:contain;
  border-radius:14px;
  background:#101418;
}

.offerBtn{
  width:100%;
  justify-content:center;
  display:flex;
  align-items:center;
  gap:8px;
  padding:12px 14px;
  border-radius:12px;
  font-weight:800;
}

.offerMeta{
  font-size:13px;
  line-height:1.35;
  color: rgba(255,255,255,.85);
  display:flex;
  flex-direction:column;
  gap:6px;
}

.offerMain{
  min-width:0;
}

.offerTop{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
}

.offerName{
  font-size:18px;
  font-weight:900;
  color:#fff;
}

.offerStars{
  margin-top:6px;
  letter-spacing:2px;
  color:#f6c34a;
  font-size:16px;
}

.offerLicense{
  font-size:13px;
  color: rgba(255,255,255,.85);
  text-align:right;
  max-width:320px;
}

.muted{
  color: rgba(255,255,255,.6);
}

.offerFeatures{
  margin:14px 0 0;
  padding:0;
  list-style:none;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:10px 22px;
  color: rgba(255,255,255,.92);
  font-size:14px;
}

.offerFeatures li{
  display:flex;
  gap:10px;
}

.offerFeatures li::before{
  content:"✓";
  color:#18d48d;
  font-weight:900;
}

.offerBonus{
  border-radius:16px;
  border:2px solid #18d48d;
  padding:14px;
  background: rgba(0,0,0,.18);
  display:flex;
  flex-direction:column;
  gap:10px;
}

.bonusTitle{
  font-weight:900;
  color:#fff;
  font-size:13px;
  letter-spacing:.4px;
  text-align:center;
  opacity:.95;
}

.bonusPill{
  border:1px solid rgba(24,212,141,.55);
  border-radius:12px;
  padding:10px 12px;
  color:#fff;
  text-align:center;
  font-weight:900;
  font-size:14px;
}

.bonusSub{
  font-size:12px;
  color: rgba(255,255,255,.75);
  text-align:center;
}

.bonusBtn{
  display:flex;
  justify-content:center;
  align-items:center;
  text-decoration:none;
  border-radius:12px;
  padding:12px 14px;
  font-weight:900;
  color:#fff;
  border:1px solid rgba(255,255,255,.25);
}

/* Если btnPrimary у тебя другой — можно не трогать */
.btnPrimary{
  background:#18d48d;
  color:#06271b;
  text-decoration:none;
}

/* Адаптив */
@media (max-width: 980px){
  .offerCard{
    grid-template-columns: 1fr;
  }
  .offerLicense{
    text-align:left;
    max-width:none;
  }
  .offerFeatures{
    grid-template-columns: 1fr;
  }
}