/*
Theme Name: Lucky7even AU
Theme URI: https://lucky7even-australia.com/
Description: Affiliate theme for lucky7even-australia.com (en-AU).
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: l7e-qwszg
*/

/* ══ Палитра задаётся в assets/main.css после DESIGN GATE ══ */
:root {
  --bg: #08081a;
  --surface: #10102b;
  --surface-2: #171738;
  --surface-3: #21214a;
  --text: #eef0ff;
  --muted: #a6aacb;
  --muted-2: #7d87ad;
  --accent: #f2b705;
  --accent-2: #7b3ff2;
  --good: #2fbf71;
  --warn: #e2564d;
  --line: rgba(255, 255, 255, .10);
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --s-sm: .75rem;
  --s-md: 1.25rem;
  --s-lg: 2.5rem;
  --shadow: 0 10px 30px rgba(0, 0, 0, .38);
}

/* ══ Reset / инварианты ══ */
* { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.72 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Arial, sans-serif;
}

img, video, canvas, svg, iframe { max-width: 100%; }
img { height: auto; }

/* ⛔ Ширина колонки текста НИКОГДА не уже таблиц и врезок:
   max-width в ch/em/rem на текстовых элементах запрещён (правило 31-08-26). */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-inline: var(--s-md);
}

/* grid/flex-дети не распирают контейнер на узком экране */
.games-grid > *, .footer-grid > *, .facts-grid > *, .cards > * { min-width: 0; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.22; margin: 2.2rem 0 .9rem; font-weight: 800; letter-spacing: -.015em; }
h1 { font-size: clamp(1.85rem, 4.4vw, 2.9rem); margin-top: .6rem; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.15rem, 2.2vw, 1.42rem); }
p, li { font-size: 1.02rem; }
ul, ol { padding-left: 1.25rem; }
li { margin: .38rem 0; }

/* ══ Возрастная полоса ══ */
.age-strip {
  background: var(--surface-2);
  color: var(--muted);
  font-size: .8rem;
  text-align: center;
  padding: .42rem var(--s-md);
  border-bottom: 1px solid var(--line);
}

/* ══ Шапка: ДЕСКТОП — строго одна строка ══ */
.site-header {
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 900;
}

.hdr-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 1rem;
  min-height: 68px;
  padding-block: .55rem;
}

.logo { flex: 0 0 auto; display: flex; align-items: center; }
.logo img { display: block; height: 44px; width: auto; }
.logo-text {
  font-weight: 900; font-size: 1.35rem; color: var(--text); letter-spacing: -.02em;
}
.logo-text span { color: var(--accent); }

.nav { flex: 1 1 auto; min-width: 0; }
.nav-menu {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 1.05rem;
  justify-content: flex-start;
}
.nav-menu > a, .more-toggle {
  color: var(--text);
  font-size: .95rem;
  font-weight: 600;
  white-space: nowrap;
  padding: .35rem 0;
  border-bottom: 2px solid transparent;
}
.nav-menu > a:hover, .more-toggle:hover { color: var(--accent); border-bottom-color: var(--accent); text-decoration: none; }

/* Дропдаун: absolute → visual_gate не считает его пункты строкой шапки */
.more-wrap { position: relative; }
.more-toggle::after { content: " ▾"; font-size: .8em; }
.more-drop {
  display: none;
  position: absolute;
  top: calc(100% + .55rem);
  right: 0;
  min-width: 230px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow);
  padding: .5rem;
  z-index: 950;
}
.more-drop.open { display: block; }
.more-drop a {
  display: block;
  padding: .55rem .7rem;
  color: var(--text);
  font-size: .93rem;
  border-radius: var(--r-sm);
}
.more-drop a:hover { background: var(--surface-3); color: var(--accent); text-decoration: none; }

.hdr-cta-row { flex: 0 0 auto; display: flex; gap: .6rem; }

.burger {
  display: none;
  flex: 0 0 auto;
  background: var(--surface-3);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  width: 46px; height: 42px;
  padding: 10px 11px;
  cursor: pointer;
}
.burger span { display: block; height: 2px; background: var(--text); border-radius: 2px; margin: 4px 0; }

/* ══ Кнопки ══ */
.cta-button {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, var(--accent) 0%, #d99c03 100%);
  color: #14140a;
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.2;
  padding: .9rem 1.5rem;
  border-radius: var(--r-md);
  border: 0;
  box-shadow: 0 6px 0 rgba(0, 0, 0, .28), 0 10px 24px rgba(242, 183, 5, .22);
  transition: transform .12s ease, box-shadow .12s ease;
  text-align: center;
  cursor: pointer;
}
.cta-button:hover { transform: translateY(-2px); text-decoration: none; box-shadow: 0 8px 0 rgba(0,0,0,.3), 0 14px 30px rgba(242,183,5,.3); }
.cta-button:active { transform: translateY(1px); box-shadow: 0 3px 0 rgba(0,0,0,.3); }
.cta-sub { font-size: .72rem; font-weight: 600; opacity: .78; }

.btn-hdr { padding: .68rem 1.05rem; font-size: .93rem; border-radius: var(--r-sm); }
.btn-alt {
  background: transparent;
  color: var(--text);
  border: 2px solid var(--accent);
  box-shadow: none;
}
.btn-alt:hover { background: rgba(242, 183, 5, .12); box-shadow: none; }
.btn-sm { padding: .5rem .95rem; font-size: .88rem; }
.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: var(--text);
  border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: .5rem .95rem; font-weight: 700; cursor: pointer;
}

/* ══ Контент ══ */
.page-wrap { padding-block: 1.6rem 3rem; }
.crumbs { font-size: .84rem; color: var(--muted); margin-bottom: .6rem; }
.crumbs a { color: var(--muted); }

.page-byline {
  color: var(--muted);
  font-size: .9rem;
  border-left: 3px solid var(--accent);
  padding-left: .8rem;
  margin: 0 0 1.6rem;
}

.cuerpo > :first-child { margin-top: 0; }

/* Таблицы: широкие всегда в прокручиваемой обёртке */
.table-wrap { overflow-x: auto; margin: 1.6rem 0; border-radius: var(--r-md); border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { padding: .8rem .9rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--surface-2); font-weight: 700; color: var(--text); white-space: nowrap; }
tbody tr:nth-child(even) { background: rgba(255, 255, 255, .022); }
tbody tr:last-child td { border-bottom: 0; }

/* Контентные картинки */
.content-img {
  display: block;
  max-width: 800px;
  width: 100%;
  height: auto;
  margin: 1.8rem auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--r-md);
}
.shot { display: block; width: 320px; max-width: 100%; height: auto; border-radius: var(--r-md); margin: 1.5rem auto; }

/* Врезки */
.callout, .box-note {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--r-md);
  padding: 1.1rem 1.3rem;
  margin: 1.6rem 0;
}
.callout-warn { border-left-color: var(--warn); }
.callout-good { border-left-color: var(--good); }

/* Быстрые факты */
.facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: .7rem;
  margin: 1.6rem 0;
}
.fact {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: .85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.fact-k { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.fact-v { font-weight: 800; font-size: 1.02rem; }

/* Галерея игр */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin: 1.8rem 0;
}
.game-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .15s ease, border-color .15s ease;
}
.game-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.game-card img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.game-name { padding: .65rem .8rem .2rem; font-weight: 700; font-size: .95rem; }
.game-meta { padding: 0 .8rem .75rem; font-size: .82rem; color: var(--muted); }

/* Диаграммы */
.chart-fig { margin: 1.9rem 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 1.1rem 1.2rem; }
.chart { display: block; width: 100%; max-width: 100%; height: auto; color: var(--text); }
/* ⛔ Лимит ширины столбчатым/водопадным диаграммам обязателен: viewBox 100×92 при
   width:100% тянет высоту за шириной — без него на десктопе выходило 1120×1030 px
   с подписями ~36px, а на 320px те же подписи сжимались до ~7px. */
.chart-bars, .chart-wf { max-width: 620px; margin-inline: auto; }
.chart-donut { max-width: 340px; margin-inline: auto; }
.chart-title { font-weight: 800; font-size: 1.02rem; margin-bottom: .7rem; }
.chart-cap { font-size: .85rem; color: var(--muted); margin-top: .7rem; }
.chart .c-lbl { font-size: 3.1px; fill: var(--muted); }
.chart .c-val { font-size: 3.4px; fill: var(--text); font-weight: 700; }
.chart-legend { list-style: none; padding: 0; margin: .9rem 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .35rem; }
.chart-legend li { display: flex; align-items: center; gap: .45rem; font-size: .88rem; }
.chart-legend i { width: 12px; height: 12px; border-radius: 3px; flex: 0 0 auto; }

/* Review block */
.review-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.3rem 1.4rem;
  margin: 1.9rem 0;
}
.review-head { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; }
.byline { margin: 0; color: var(--muted); font-size: .93rem; }
.review-date { margin: .2rem 0 0; font-size: .82rem; color: var(--muted-2); }
.rating { display: flex; align-items: baseline; gap: .4rem; flex-wrap: wrap; }
.rating .stars { color: var(--accent); font-size: 1.15rem; letter-spacing: .06em; }
.rating strong { font-size: 1.7rem; font-weight: 900; }
.rating-max { color: var(--muted); }
.rating-count { color: var(--muted); font-size: .86rem; margin-left: .35rem; }
.review-block blockquote { margin: .9rem 0 0; padding-left: .9rem; border-left: 3px solid var(--accent); color: var(--text); font-style: italic; }

/* Редакционная врезка над футером */
.editorial-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.3rem 1.4rem;
  margin: 2.6rem 0 0;
}
.editorial-box h2 { margin-top: 0; font-size: 1.15rem; }
.editorial-sign { color: var(--muted); font-size: .9rem; }

/* ══ Футер ══ */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  margin-top: 3rem;
  padding: 2.6rem 0 1.4rem;
  font-size: .93rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.3fr;
  gap: 1.8rem;
}
.footer-col a { display: block; color: var(--muted); padding: .22rem 0; font-size: .9rem; }
.footer-col a:hover { color: var(--accent); }
.footer-title { font-weight: 800; margin: 0 0 .7rem; color: var(--text); }
.footer-desc, .footer-op { color: var(--muted); font-size: .88rem; }
.footer-op { font-size: .8rem; color: var(--muted-2); }
.help-list { list-style: none; padding: 0; margin: .5rem 0 0; color: var(--muted); font-size: .86rem; }
.footer-bottom {
  border-top: 1px solid var(--line);
  margin-top: 1.8rem;
  padding-top: 1.1rem;
  color: var(--muted-2);
  font-size: .82rem;
}
.badge-18 {
  display: inline-block;
  background: var(--warn);
  color: #fff;
  font-weight: 800;
  border-radius: 999px;
  padding: .1rem .5rem;
  margin-right: .4rem;
  font-size: .78rem;
}

/* ══ Cookie bar ══ */
.cookie-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--surface-2);
  border-top: 1px solid var(--line);
  padding: .9rem var(--s-md);
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  align-items: center;
  justify-content: center;
  z-index: 990;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, .35);
}
.cookie-bar p { margin: 0; font-size: .88rem; color: var(--muted); }
.cookie-btns { display: flex; gap: .5rem; }

/* ══ Мобилка ══ */
@media (max-width: 1000px) {
  .hdr-row { flex-wrap: wrap; row-gap: .6rem; }
  .logo { flex: 1 1 auto; }
  .burger { display: block; order: 2; }
  .hdr-cta-row { order: 3; flex: 1 0 100%; gap: .55rem; }
  .hdr-cta-row .cta-button { flex: 1 1 50%; padding: .8rem .6rem; font-size: .92rem; }
  .nav { order: 4; flex: 1 0 100%; position: relative; }
  .nav-menu {
    display: none;
    position: absolute;
    top: .4rem; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: .5rem;
    z-index: 999;
    box-shadow: var(--shadow);
  }
  .nav-menu.open { display: flex; }
  .nav-menu > a, .more-toggle { padding: .65rem .7rem; border-bottom: 1px solid var(--line); }
  .more-wrap { position: static; }
  .more-drop { position: static; box-shadow: none; border: 0; padding: 0 0 0 .8rem; background: transparent; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.4rem; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .footer-grid { grid-template-columns: 1fr; }
  .facts-grid { grid-template-columns: 1fr 1fr; }
  .games-grid { grid-template-columns: 1fr 1fr; }
  .cookie-bar { flex-direction: column; align-items: stretch; text-align: center; }
  .cookie-btns { justify-content: center; }
  /* Страховка под инлайн-гриды из контента */
  [style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
}

@media (max-width: 380px) {
  .facts-grid, .games-grid { grid-template-columns: 1fr; }
  .hdr-cta-row .cta-button { font-size: .85rem; padding: .75rem .4rem; }
}
