:root {
  --primary-dark: #0C2340;
  --primary-red: #FF3B00;
  --accent-blue: #008BCB;
  --text-main: #000000;
  --text-light: #FFFFFF;
  --bg-light: #F5F5F5;
  --card-border: #EAEAEA;
}

* { margin:0; padding:0; box-sizing:border-box; }

/* === Липкий футер — v7 === */
html, body {
  height: 100%;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-light);
  color: var(--text-main);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  padding-bottom: 0; /* будет переопределено, если нужна нижняя полоса */
}

main {
  flex: 1 0 auto;
}

footer {
  flex-shrink: 0;
}

a { text-decoration: none; color: var(--primary-red); }

.container {
  width:90%;
  max-width:1200px;
  margin:0 auto;
  padding:20px 0;
}

.page-title {
  color: var(--primary-dark);
  font-size: 2.4rem;
  margin: 20px 0 15px;
  font-weight: 700;
}

/* Логотип */
.logo a {
  color: var(--text-light);
  font-weight: 800;
  font-size: 1.6rem;
  text-decoration: none;
}

/* Шапка */
header {
  background: var(--primary-dark);
  padding: 12px 0;
  position: sticky;
  top: 0;
  border-bottom: 2px solid var(--primary-red);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
}

.nav-container {
  display: flex;
  align-items: center;
  gap: 20px;
}

nav ul {
  display: flex;
  justify-content: center;
  gap: 25px;
  list-style: none;
}

nav a {
  color: var(--text-light);
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.3s ease;
}

nav a:hover {
  background: var(--primary-red);
  color: var(--text-light);
}

/* Поиск */
.search-box {
  position: relative;
  display: inline-block;
}

.search-input {
  padding: 8px 12px 8px 36px;
  border: 2px solid transparent;
  border-radius: 24px;
  background: rgba(255,255,255,0.1);
  color: var(--text-light);
  font-size: 1rem;
  width: 220px;
  transition: all 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-red);
  background: rgba(255,255,255,0.15);
  width: 240px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  pointer-events: none;
}

/* Бургер-меню */
.burger-menu {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 6px;
  width: 30px;
  height: 30px;
  justify-content: space-between;
}

.burger-menu span {
  width: 100%;
  height: 3px;
  background: var(--text-light);
  border-radius: 2px;
  transition: 0.3s;
}

.mobile-search-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1.4rem;
  cursor: pointer;
  margin-left: 10px;
}

.mobile-search-input {
  position: absolute;
  top: 56px;
  left: 0;
  width: 100%;
  padding: 12px 16px 12px 44px;
  border: none;
  background: var(--primary-dark);
  color: var(--text-light);
  font-size: 1.1rem;
  display: none;
  z-index: 99;
}

.mobile-search-icon {
  position: absolute;
  top: 56px;
  left: 16px;
  color: var(--text-light);
  z-index: 100;
  display: none;
}

/* Герой-блок (главная) */
.hero {
  text-align: center;
  padding: 80px 0;
  background: linear-gradient(135deg, var(--primary-dark) 0%, #112A63 100%);
  border-radius: 16px;
  margin: 30px 0;
  color: var(--text-light);
}

.promo-copy-btn {
  background: linear-gradient(135deg, var(--primary-red), #d13000);
  color: var(--text-light);
  font-weight: 800;
  font-size: 1.6rem;
  padding: 22px 24px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 20px auto;
  box-shadow: 0 6px 20px rgba(255, 59, 0, 0.45);
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  width: 100%;
  max-width: 420px;
  min-height: 120px;
}

.promo-copy-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 26px rgba(255, 59, 0, 0.6);
}

.promo-copy-btn .code {
  display: block;
  font-size: 1.9rem;
  margin-bottom: 10px;
  font-weight: 900;
  letter-spacing: 1px;
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
  cursor: text;
}

.promo-copy-btn .status {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-light);
}

.cta-button {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary-red), #d13000);
  color: var(--text-light);
  font-weight: 700;
  font-size: 1.2rem;
  padding: 16px 36px;
  border-radius: 14px;
  margin: 20px 10px;
  box-shadow: 0 6px 18px rgba(255, 59, 0, 0.4);
  transition: all 0.3s ease;
  border: none;
}

.cta-button:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(255, 59, 0, 0.6);
}

/* Общие карточки — для всех разделов */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* === Карточки прогнозов и новостей === */
.card,
.article-card {
  background: white;
  padding: 15px; /* Уменьшенные внутренние отступы */
  border-radius: 12px;
  border: 1px solid var(--card-border);
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  /* === УБРАНО: justify-content: space-between === */
  /* === УБРАНО: height: 350px === */
  /* === УБРАНО: overflow: hidden === */
  /* === ДОБАВЛЕНО: теперь карточка подстраивается под контент === */
  min-height: auto; /* Не фиксированная высота */
  height: auto; /* Высота под контент */
  overflow: visible; /* Показывать всё содержимое */
}

/* === Заголовки карточек === */
.card h3,
.article-card h3 {
  color: var(--primary-dark);
  margin-bottom: 10px;
  font-size: 1.4rem;
}

/* === Текст внутри карточки === */
.card p,
.article-card p {
  margin: 8px 0;
  color: #555;
  /* === УБРАНО: flex: 1 === */
  /* === УБРАНО: -webkit-line-clamp === */
  /* === ТЕПЕРЬ: нормальный текст === */
  line-height: 1.6;
}

/* === Кнопки копирования (если есть) === */
.promo-copy-btn {
  margin-top: 10px;
  padding: 10px 15px;
  background: var(--primary-red);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
}

.promo-copy-btn:hover {
  background: #e02d00;
}

.card:hover,
.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  border-color: var(--primary-red);
}

.card h3,
.article-card h3 {
  color: var(--primary-dark);
  margin-bottom: 15px;
  font-size: 1.4rem;
}

.card p,
.article-card p {
  margin: 8px 0;
  color: #555;
  flex: 1; /* Занимает оставшееся место */
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2; /* Показывать максимум 4 строки */
  -webkit-box-orient: vertical;
  line-height: 1.5;
  word-break: break-word; /* Перенос слов */
  hyphens: auto; /* Переносы для длинных слов */
}

.card strong {
  color: var(--primary-red);
}

/* Новости */
.news-grid {
  display: flex;
  flex-direction: column;
  gap: 25px;
  margin-top: 40px;
}

.news-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.news-item {
  background: white;
  padding: 25px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
  /* === НОВОЕ: фиксированная высота и выравнивание === */
  height: 350px; /* Можно изменить под ваш вкус */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden; /* Чтобы текст не вылезал за границы */
}

.news-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  border-color: var(--primary-red);
}

.news-item h2 {
  color: var(--primary-dark);
  margin-bottom: 10px;
  font-size: 1.5rem;
}

.news-date {
  color: #64748b;
  font-size: 0.95rem;
  margin-bottom: 15px;
  display: block;
}

/* Убедимся, что <p> внутри не растягивает карточку */
.news-item p {
  flex: 1; /* Занимает всё доступное пространство */
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 4; /* Показывать максимум 4 строки */
  -webkit-box-orient: vertical;
  margin: 8px 0;
  color: #444;
}

/* Статьи (новости, промокоды, букмекеры) */
.article-block {
  background: white;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 15px;
  margin: 30px 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.article-block h1 {
  color: var(--primary-dark);
  margin-bottom: 20px;
  font-size: 2rem;
}

.article-block p {
  margin: 8px 0;
  color: #444;
}

/* Синяя полоса с прогнозом */
.result-bar {
  background: linear-gradient(90deg, #2196F3, #0D47A1);
  padding: 16px 25px;
  border-radius: 0 0 12px 12px;
  margin: 30px -30px -30px -30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: white;
  font-weight: 700;
  font-size: 1.2rem;
}

/* Изображения */
.article-block img,
.hero img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 20px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Футер */
footer {
  background: var(--primary-dark);
  text-align: center;
  padding: 30px 0;
  margin-top: 60px;
  color: var(--text-light);
  font-size: 0.9rem;
  border-top: 2px solid var(--primary-red);
}

/* Мобильная адаптация */
@media (max-width: 768px) {
  header {
    padding: 8px 0;
    height: 56px;
  }

  .burger-menu, .mobile-search-btn {
    display: flex;
  }

  .search-box {
    display: none;
  }

  nav ul {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 20px 0;
    background: var(--primary-dark);
    position: absolute;
    top: 56px;
    left: 0;
    width: 100%;
    z-index: 100;
  }

  nav ul.active {
    display: flex;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .cta-button {
    display: block;
    margin: 20px auto;
    width: 90%;
    padding: 18px;
    font-size: 1.1rem;
  }

  .promo-copy-btn {
    margin: 20px auto;
    padding: 24px 20px;
    font-size: 1.5rem;
    border-radius: 18px;
    min-height: 130px;
    max-width: 92%;
    width: 92%;
  }

  .promo-copy-btn .code {
    font-size: 1.7rem;
    margin-bottom: 12px;
  }

  .promo-copy-btn .status {
    font-size: 1.2rem;
  }

  /* Адаптация синей полосы */
  .result-bar {
    flex-direction: column;
    gap: 8px;
    text-align: center;
    font-size: 1.1rem;
    padding: 16px;
  }
}
/* === Пагинация === */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 40px 0;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border: 1px solid #ddd;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 600;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.pagination a:hover {
  background-color: var(--primary-red);
  color: var(--text-light);
  border-color: var(--primary-red);
}

.pagination .current {
  background-color: var(--primary-red);
  color: var(--text-light);
  border-color: var(--primary-red);
  font-weight: 700;
}

.pagination .prev,
.pagination .next {
  min-width: auto;
  padding: 0 12px;
  border-radius: 6px;
}