:root {
  --bg: #f0f6ff;
  --surface: #ffffff;
  --surface-soft: #e8f3ff;
  --surface-warm: #fff8ec;
  --line: #cddaee;
  --text: #0f2240;
  --muted: #506480;

  --primary: #0b5ea8;
  --primary-dark: #073f73;
  --primary-light: #d6ebff;

  --accent-teal: #0891b2;
  --accent-teal-light: #e0f7fc;

  --accent-gold: #d97706;
  --accent-gold-light: #fef3c7;

  --accent-green: #166534;
  --accent-green-light: #dcfce7;

  --accent-red: #be123c;

  --shadow: 0 12px 36px rgba(11, 37, 80, 0.10);
  --shadow-card: 0 4px 16px rgba(11, 37, 80, 0.07);

  --radius-sm: 0.75rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;

  --max-width: 1120px;
}


/* ─────────────────────────────────────
   RESET / BASE
───────────────────────────────────── */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;

  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.65;

  color: var(--text);
  background: var(--bg);
}

body.menu-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Для елементів, які JS приховує через hidden */
[hidden] {
  display: none !important;
}


/* ─────────────────────────────────────
   SKIP LINK
───────────────────────────────────── */

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 1000;

  padding: 0.75rem 1rem;

  background: var(--primary);
  color: #fff;

  border-radius: 0.75rem;
}

.skip-link:focus {
  top: 1rem;
}


/* ─────────────────────────────────────
   GLOBAL CONTAINER
───────────────────────────────────── */

header > div,
main > section,
footer {
  width: min(calc(100% - 1.5rem), var(--max-width));
  margin: 0 auto;
}


/* ─────────────────────────────────────
   HEADER
───────────────────────────────────── */

header {
  position: sticky;
  top: 0;
  z-index: 50;

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  background: rgba(240, 246, 255, 0.93);
  border-bottom: 2px solid var(--line);
}

header > div {
  min-height: 4.5rem;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 1rem;
}


/* ── LOGO ── */

header > div > a {
  display: inline-flex;
  flex-direction: column;
  gap: 0.1rem;

  flex-shrink: 0;

  font-weight: 800;
  color: var(--primary-dark);
}

header > div > a span:first-child {
  font-size: 0.78rem;
  font-weight: 700;

  text-transform: uppercase;
  letter-spacing: 0.15em;

  color: var(--accent-teal);
}

header > div > a span:last-child {
  font-size: 1.05rem;
}


/* ─────────────────────────────────────
   MOBILE BURGER BUTTON
───────────────────────────────────── */

header button[data-menu-toggle] {
  width: 44px;
  height: 44px;

  padding: 0;

  flex-shrink: 0;

  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  gap: 0.28rem;

  border: 2px solid var(--primary-light);
  border-radius: 0.9rem;

  background: var(--surface);
  color: var(--primary);

  box-shadow: var(--shadow-card);

  cursor: pointer;
}

header button[data-menu-toggle] span {
  display: block;

  width: 18px;
  height: 2px;

  background: var(--primary);

  border-radius: 999px;
}


/* ─────────────────────────────────────
   DESKTOP NAV
   На мобільному прихований
───────────────────────────────────── */

header > div > nav {
  display: none;
}

header > div > nav a,
#mobile-menu a {
  font-weight: 600;
}


/* ─────────────────────────────────────
   MOBILE MENU
───────────────────────────────────── */

#mobile-menu {
  width: min(calc(100% - 1.5rem), var(--max-width));

  margin: 0 auto 1rem;
  padding: 0.75rem;

  background: var(--surface);

  border: 2px solid var(--primary-light);
  border-radius: 1.25rem;

  box-shadow: var(--shadow);
}

#mobile-menu a {
  display: block;

  padding: 0.95rem 1rem;

  border-radius: 0.9rem;

  color: var(--primary-dark);

  font-weight: 600;
}

#mobile-menu a:hover,
#mobile-menu a:focus-visible {
  background: var(--surface-soft);
  color: var(--primary);
}


/* ─────────────────────────────────────
   HERO SECTION
───────────────────────────────────── */

main > section:first-child {
  display: block;

  padding: 2rem 0 1.5rem;
}

main > section:first-child > aside {
  display: none;
}

main > section:first-child > div {
  position: relative;

  overflow: hidden;

  padding: 1.75rem;

  color: #fff;

  background:
    linear-gradient(
      135deg,
      #0b5ea8 0%,
      #0891b2 100%
    );

  border-radius: var(--radius-lg);

  box-shadow:
    0 20px 50px rgba(11, 94, 168, 0.30);
}

main > section:first-child > div::before {
  content: '';

  position: absolute;

  top: -40px;
  right: -40px;

  width: 200px;
  height: 200px;

  background: rgba(255, 255, 255, 0.07);

  border-radius: 50%;

  pointer-events: none;
}

main > section:first-child > div::after {
  content: '';

  position: absolute;

  bottom: -60px;
  left: -20px;

  width: 260px;
  height: 260px;

  background: rgba(8, 145, 178, 0.18);

  border-radius: 50%;

  pointer-events: none;
}


/* ── HERO BADGE ── */

main > section:first-child > div > p:first-child {
  position: relative;
  z-index: 1;

  display: inline-flex;

  margin: 0 0 1rem;

  padding: 0.45rem 0.9rem;

  border-radius: 999px;

  background: rgba(255, 255, 255, 0.18);

  color: #e0f7ff;

  font-size: 0.85rem;
  font-weight: 700;

  letter-spacing: 0.04em;
}


/* ─────────────────────────────────────
   HEADINGS
───────────────────────────────────── */

h1,
h2,
h3 {
  margin: 0;

  line-height: 1.15;

  color: #0f2240;
}

h1 {
  position: relative;
  z-index: 1;

  margin-bottom: 1rem;

  font-family: 'Playfair Display', serif;

  font-size: clamp(2rem, 7vw, 4rem);

  color: #fff;
}


/* ── HERO TEXT ── */

main > section:first-child > div > p:nth-of-type(2) {
  position: relative;
  z-index: 1;

  margin: 0 0 1.75rem;

  color: rgba(255, 255, 255, 0.88);

  font-size: 1.02rem;
}


/* ── HERO BUTTONS ── */

main > section:first-child > div > div {
  position: relative;
  z-index: 1;

  display: flex;
  flex-direction: column;

  gap: 0.75rem;
}

main > section:first-child > div > div a {
  min-height: 48px;

  padding: 0.95rem 1.1rem;

  border-radius: 0.95rem;

  font-weight: 700;

  text-align: center;
}

main > section:first-child > div > div a:first-child {
  background: #fff;

  color: var(--primary-dark);
}

main > section:first-child > div > div a:last-child {
  background: rgba(255, 255, 255, 0.15);

  border: 2px solid rgba(255, 255, 255, 0.4);

  color: #fff;
}


/* ─────────────────────────────────────
   REVIEW SECTION
───────────────────────────────────── */

#umsagnir {
  padding: 0.75rem 0 4rem;
}

#umsagnir article {
  width: 100%;

  padding: 1.5rem;

  background: var(--surface);

  border: 2px solid var(--line);
  border-radius: var(--radius-lg);

  box-shadow: var(--shadow-card);
}


/*
  Весь контент article використовує
  одну доступну ширину.
*/

#umsagnir article h2,
#umsagnir article h3,
#umsagnir article p,
#umsagnir article ul,
#umsagnir article ol,
#umsagnir article blockquote,
#umsagnir article table,
#umsagnir article img {
  width: 100%;
  max-width: 100%;
}


/* ─────────────────────────────────────
   REVIEW BADGE
───────────────────────────────────── */

#umsagnir article > p:first-child {
  display: inline-flex;

  width: auto;
  max-width: 100%;

  margin: 0 0 0.9rem;

  padding: 0.45rem 0.9rem;

  border-radius: 999px;

  background: var(--accent-green-light);

  color: var(--accent-green);

  font-size: 0.82rem;
  font-weight: 800;

  text-transform: uppercase;

  letter-spacing: 0.13em;
}


/* ─────────────────────────────────────
   REVIEW H2
───────────────────────────────────── */

#umsagnir article h2 {
  margin-bottom: 1.1rem;

  font-family: 'Playfair Display', serif;

  font-size: clamp(1.7rem, 4.5vw, 2.7rem);

  color: var(--primary-dark);
}


/* ─────────────────────────────────────
   REVIEW H3
───────────────────────────────────── */

#umsagnir article h3 {
  margin-top: 2.25rem;
  margin-bottom: 0.85rem;

  padding-bottom: 0.5rem;

  border-bottom: 2px solid var(--primary-light);

  font-size: 1.25rem;

  color: var(--primary);
}


/* ─────────────────────────────────────
   REVIEW PARAGRAPHS
───────────────────────────────────── */

#umsagnir article p {
  /*
    ВАЖЛИВО:
    тут більше немає max-width: 82ch,
    тому текст має ту саму ширину,
    що картинки і таблиці.
  */

  margin: 0 0 1.1rem;

  color: var(--text);
}


/* ─────────────────────────────────────
   REVIEW LISTS
───────────────────────────────────── */

#umsagnir article ul,
#umsagnir article ol {
  margin: 0 0 1.5rem;

  padding-left: 1.35rem;
}

#umsagnir article li {
  margin-bottom: 0.65rem;

  color: var(--muted);
}

#umsagnir article li strong {
  color: var(--text);
}


/* ─────────────────────────────────────
   REVIEW BLOCKQUOTE
───────────────────────────────────── */

#umsagnir article blockquote {
  margin: 2rem 0;

  padding: 1.25rem 1.35rem;

  border-left: 4px solid var(--accent-gold);

  border-radius:
    0
    var(--radius-md)
    var(--radius-md)
    0;

  background: var(--surface-warm);

  color: #7a4a00;

  font-weight: 600;
  font-style: italic;
}


/* ─────────────────────────────────────
   TABLE
───────────────────────────────────── */

#umsagnir article table {
  display: table; 

  width: 100%;
  max-width: 100%;

  margin: 1.75rem 0;

  /* Повертаємо рамку та правильне відображення меж */
  border: 2px solid var(--line);
  border-spacing: 0;
  border-collapse: separate;

  /* Виправляє білі куточки та активує закруглення */
  overflow: hidden; 
  border-radius: var(--radius-md);

  /* Змушує таблицю займати 100% ширини контейнера */
  table-layout: fixed; 
}

#umsagnir article thead {
  background:
    linear-gradient(
      90deg,
      var(--primary-light),
      var(--accent-teal-light)
    );
}

#umsagnir article th {
  color: var(--primary-dark);

  font-size: 0.9rem;
  font-weight: 700;
}

#umsagnir article th,
#umsagnir article td {
  padding: 0.95rem 1rem;

  /* Внутрішні лінії між комірками */
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);

  font-size: 0.95rem;
  text-align: left;

  /* Дозволяємо тексту гарно переноситися на десктопі */
  white-space: normal; 
  word-wrap: break-word;
}

/* Прибираємо праву лінію у останнього стовпчика, щоб вона не дублювала рамку */
#umsagnir article th:last-child,
#umsagnir article td:last-child {
  border-right: 0;
}

#umsagnir article tbody tr:nth-child(even) {
  background: var(--surface-soft);
}

/* Прибираємо нижню лінію в останньому рядку */
#umsagnir article tr:last-child td {
  border-bottom: 0;
}

/* ── АДАПТИВНІСТЬ ТА СКРОЛ ДЛЯ МОБІЛЬНИХ ── */
@media (max-width: 992px) {
  #umsagnir article table {
    display: block;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    table-layout: auto; /* Вимикаємо fixed, щоб стовпчики могли скролитися */
  }
  
  #umsagnir article th,
  #umsagnir article td {
    /* На мобільних забороняємо переноси, щоб активувати горизонтальний скрол */
    white-space: nowrap; 
  }
}

/* ── TABLE SCROLLBAR ── */

#umsagnir article table::-webkit-scrollbar {
  height: 8px;
}

#umsagnir article table::-webkit-scrollbar-track {
  background: var(--surface-soft);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

#umsagnir article table::-webkit-scrollbar-thumb {
  background: var(--primary-light);
  border-radius: 999px;
}

#umsagnir article table::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}


/* ─────────────────────────────────────
   ARTICLE IMAGES / BANNERS
───────────────────────────────────── */

#umsagnir article img {
  display: block;

  width: 100%;
  max-width: 100%;

  height: auto;

  margin: 1.5rem 0;

  border-radius: var(--radius-md);

  object-fit: contain;
}


/* Якщо банер є посиланням */

#umsagnir article a:has(img) {
  display: block;

  width: 100%;
}


/* ─────────────────────────────────────
   STRONG
───────────────────────────────────── */

#umsagnir article strong {
  color: var(--primary-dark);
}


/* ─────────────────────────────────────
   DESKTOP
───────────────────────────────────── */

@media (min-width: 768px) {

  /* ── HEADER ── */

  header > div {
    min-height: 5rem;
  }


  /* Бургер повністю прихований */

  header button[data-menu-toggle] {
    display: none;
  }


  /*
    Мобільне меню завжди приховане
    на desktop, навіть якщо JS залишив
    його відкритим.
  */

  #mobile-menu {
    display: none !important;
  }


  /* Повертаємо normal scroll */

  body.menu-open {
    overflow: auto;
  }


  /* ── DESKTOP NAVIGATION ── */

  header > div > nav {
    display: flex;

    align-items: center;
    justify-content: flex-end;

    gap: 0.25rem;
  }

  header > div > nav a {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-height: 42px;

    padding: 0.65rem 0.9rem;

    border-radius: 0.75rem;

    color: var(--primary-dark);

    font-size: 0.95rem;
    font-weight: 600;

    white-space: nowrap;

    transition:
      background 0.2s ease,
      color 0.2s ease;
  }

  header > div > nav a:hover,
  header > div > nav a:focus-visible {
    background: var(--surface-soft);

    color: var(--primary);
  }


  /* ── HERO ── */

  main > section:first-child {
    padding-top: 2.5rem;
    padding-bottom: 2rem;
  }

  main > section:first-child > div {
    padding: 2.5rem;
  }

  main > section:first-child > div > p:nth-of-type(2) {
    font-size: 1.08rem;
  }

  main > section:first-child > div > div {
    flex-direction: row;
    align-items: center;
  }

  main > section:first-child > div > div a {
    min-width: 160px;
  }


  /* ── REVIEW ── */

  #umsagnir article {
    padding: 2rem;
  }

  #umsagnir article img {
    margin: 2rem 0;
  }
}


/* ─────────────────────────────────────
   LARGE DESKTOP
───────────────────────────────────── */

@media (min-width: 1024px) {

  header > div > nav {
    gap: 0.4rem;
  }

  header > div > nav a {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  #umsagnir article {
    padding: 2.5rem;
  }
}

/* TOP / IFRAME — only display fix */
#casino-widget-iframe {
  display: block !important;
  width: calc(100% - 24px) !important;
  max-width: 1120px !important;
  height: 1950px !important;
  min-height: 1950px !important;
  margin: 0 auto !important;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
}

/* tablet */
@media (min-width: 768px) and (max-width: 1279px) {
  #casino-widget-iframe {
    height: 1950px !important;
    min-height: 1950px !important;
  }
}

/* mobile */
@media (max-width: 767px) {
  #casino-widget-iframe {
    width: calc(100% - 24px) !important;
    max-width: calc(100% - 24px) !important;
    height: 3400px !important;
    min-height: 3400px !important;
    margin: 0 auto !important;
  }
}
