:root {
  --color-primary: #24a444;
  --color-secondary: #0dab51;
  --color-background: #ffffff;
  --color-text: #2b2b2b;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  --shadow-soft: 0 10px 25px rgba(0, 35, 55, 0.06);
  --radius-md: 8px;
  --radius-lg: 16px;
  --container-width: 1100px;
}

/* =========================================
   2. ГЛОБАЛЬНІ СТИЛІ
   ========================================= */
body.site-page {
  font-family: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--color-text);
  background-color: var(--color-background);
  line-height: 1.6;
  /* Запобігає загальному горизонтальному скролу всієї сторінки */
  overflow-x: hidden; 
  width: 100%;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-secondary);
  text-decoration: underline;
}

/* Адаптивність медіа-елементів */
img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* =========================================
   3. СТРУКТУРА (LAYOUT)
   ========================================= */
.site-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-header__inner,
.site-main,
.site-footer__inner {
  width: min(var(--container-width), 100% - 2rem);
  margin-inline: auto;
}

.site-main {
  flex-grow: 1;
  padding: 2.5rem 0;
}

/* =========================================
   4. ШАПКА (HEADER)
   ========================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  gap: 1rem;
}

.site-header__logo-link {
  display: flex;
  align-items: center;
}

.site-header__logo {
  max-width: 180px;
  height: auto;
}

.site-menu {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.site-menu__link {
  color: var(--color-text);
  font-weight: 600;
  padding: 0.5rem;
  transition: color 0.3s ease;
}

.site-menu__link:hover {
  color: var(--color-primary);
  text-decoration: none;
}

/* =========================================
   5. ОСНОВНИЙ КОНТЕНТ (ARTICLE)
   ========================================= */
.site-article {
  background-color: #ffffff;
  /* Дозволяє переносити довгі слова/посилання, щоб вони не розпирали екран */
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* Заголовки */
.site-article h1, 
.site-article h2, 
.site-article h3 {
  color: var(--color-text);
  margin-top: 2rem;
  margin-bottom: 1rem;
  line-height: 1.25;
}

.site-article h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-top: 0;
}

.site-article h2 {
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  border-bottom: 2px solid rgba(0, 0, 0, 0.05); /* Зробив лінію підкреслення видимою */
  padding-bottom: 0.5rem;
}

.site-article h3 {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
}

/* Текст та списки */
.site-article p {
  margin-bottom: 1.2rem;
  font-size: 1.05rem;
}

.site-article ul, 
.site-article ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
  font-size: 1.05rem;
}

.site-article li {
  margin-bottom: 0.5rem;
}

.site-article strong {
  color: var(--color-text);
  font-weight: 700;
}

/* =========================================
   6. ТАБЛИЦІ (TABLES)
   ========================================= */
/* Нова обгортка, щоб таблиця скролилась незалежно від сторінки */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch; /* Плавний скрол на iOS */
  margin: 1.5rem 0;
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
}

.site-article table {
  width: 100%;
  border-collapse: collapse;
  /* Відступи й рамки перенесені на обгортку .table-responsive */
  margin: 0;
  border: none;
}

.site-article th, 
.site-article td {
  padding: 1rem 1.2rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  text-align: left;
  vertical-align: middle;
}

.site-article th {
  background-color: rgba(0, 115, 168, 0.08); 
  color: var(--color-primary);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

.site-article tbody tr:nth-child(even) {
  background-color: #fafbfc;
}

.site-article tbody tr:hover {
  background-color: rgba(0, 115, 168, 0.03);
}

/* =========================================
   7. ПІДВАЛ (FOOTER)
   ========================================= */
.site-footer {
  background-color: #ffffff;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  padding: 1.5rem 0;
}

.site-footer__inner {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.site-footer__copyright {
  margin: 0;
  color: #6a7c87;
  font-size: 0.95rem;
}

/* =========================================
   9. КАРТКИ КАЗИНО (OFFERS)
   ========================================= */
.offers-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 2rem 0;
}

.offer-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  gap: 1.5rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.offer-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-soft);
}

.offer-position {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background-color: rgba(0, 115, 168, 0.08); /* Легкий фонтий колір */
  color: var(--color-text);
  font-weight: 800;
  font-size: 1.1rem;
  border-radius: 50%;
  flex-shrink: 0;
}

.offer-logo {
  width: 120px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.offer-logo img {
  max-width: 100px;
  height: auto;
  border-radius: 6px;
  object-fit: contain;
}

.offer-info {
  flex-grow: 1;
}

.offer-name {
  margin: 0 0 0.35rem 0 !important;
  font-size: 1.2rem !important;
  color: var(--color-text);
  font-weight: 700;
}

.offer-bonus {
  margin: 0 !important;
  font-size: 0.95rem;
  color: #5a6b75;
}

.offer-rating-box {
  flex-shrink: 0;
}

/* Стиль для плашки з рейтингом */
.offer-rating {
  background-color: #fffbeb; /* Світло-жовтий */
  color: #b45309; /* Темно-оранжевий для контрасту */
  border: 1px solid #fde68a;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
}

.offer-actions {
  flex-shrink: 0;
}

/* Базові стилі кнопок */
.btn {
  display: inline-block;
  text-align: center;
  text-decoration: none;
  font-weight: 600;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  font-size: 1rem;
}

.btn-primary {
  background-color: var(--color-primary);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--color-secondary);
  color: #ffffff;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(36, 219, 115, 0.3);
}

/* =========================================
   АВТОР
   ========================================= */

.author {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.author__image {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  background-color: rgb(from var(--color-primary) r g b / 0.35);
}

.author__name {
  font-weight: 800;
  margin-bottom: 0 !important;
}

.author__meta {
  color: var(--color-muted);
  font-size: 0.92rem;
  margin-bottom: 0 !important;
}

/* =========================================
   8. АДАПТИВНІСТЬ (RESPONSIVE)
   ========================================= */
@media (max-width: 768px) {
  /* Шапка */
  .site-header__inner {
    flex-direction: column;
    justify-content: center;
    padding: 1.25rem 0;
    gap: 1rem;
  }

  .site-article h1 {
    font-size: 1.5rem;
    margin-top: 0;
  }
  
  .site-header__logo {
    max-width: 150px; /* Трохи зменшуємо лого на мобільних */
  }
  
  .site-menu {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
  }

  .site-menu__link {
    font-size: 0.95rem;
    padding: 0.25rem 0.5rem;
  }

  /* Основний контент */
  .site-main {
    padding: 1.5rem 0;
  }
  
  /* Адаптація типографіки для економії місця */
  .site-article p,
  .site-article ul,
  .site-article ol {
    font-size: 1rem;
  }

  /* Таблиці */
  .site-article table {
    white-space: normal; /* Текст може переноситись */
    min-width: 600px; /* Тримає мінімальну ширину стовпців під час скролу */
  }
  
  .site-article th, 
  .site-article td {
    padding: 0.75rem 0.85rem; /* Зменшуємо відступи в таблиці на мобільних */
  }

  .offer-card {
    flex-direction: column; /* Змінюємо напрямок на вертикальний */
    text-align: center;
    padding: 2.5rem 1.25rem 1.5rem; /* Збільшуємо верхній відступ для позиції */
    gap: 1rem;
  }

  /* На мобільному робимо позицію у вигляді "стрічки/куточка" зліва зверху */
  .offer-position {
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 0 0 var(--radius-md) 0; /* Закругляємо тільки правий нижній кут */
    background-color: var(--color-primary);
    color: white;
    width: 48px;
    height: 40px;
    font-size: 1rem;
  }

  .offer-logo {
    width: 140px;
  }

  .offer-info {
    width: 100%;
  }

  .offer-bonus {
    font-size: 0.9rem;
  }

  .offer-actions {
    width: 100%;
    margin-top: 0.5rem;
  }

  /* Кнопка на мобільному стає широкою (на весь екран) для зручного натискання пальцем */
  .btn {
    display: block;
    width: 100%;
    padding: 0.85rem;
    font-size: 1.05rem;
  }
}