:root {
  --barca-red: #8b3a62;       /* гранатовый (основной) */
  --barca-blue: #004d99;      /* тёмно‑синий (цвета Барсы) */
  --barca-light: #e6f2ff;     /* светло‑голубой (акцент) */
  --white: #ffffff;
  --gray-dark: #333333;
  --gray-mid: #777777;
  --radius: 14px;             /* Apple‑style скругления */
  --shadow: 0 8px 24px rgba(0,0,0,0.12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0;
  background-color: var(--barca-red); /* весь фон гранатовый */
  color: var(--gray-dark);
  font-family: 'Roboto', system-ui, -apple-system, sans-serif;
  line-height: 1.5;
}

body.is-home h2.name {
    display: none;
}

a {
  text-decoration: none;
  color: #111;
}

/* Контейнер 1000px по центру */
.container {
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 16px;
}

/* Header */
.site-header {
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    height: 40px;
    width: auto;
}

.logo-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 20px;
    color: var(--barca-blue);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 24px;
}

.main-nav a {
    text-decoration: none;
    color: var(--gray-dark);
    font-weight: 600;
    transition: color 0.2s;
}

.main-nav a:hover {
    color: var(--barca-red);
}

/* --- Новые стили для user_menu (чтобы не ломало верстку) --- */
.user_menu {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user_menu a {
    text-decoration: none;
    color: var(--gray-dark);
    font-weight: 600;
    font-size: 14px;
    transition: color 0.2s;
}

.user_menu a:hover {
    color: var(--barca-red);
}

.user.flex-icon {
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon {
    /* если у тебя есть SVG/иконки — оставь как есть; если нет — можно скрыть или задать заглушку */
    display: inline-block;
    width: 16px;
    height: 16px;
    /* background: url(...) no-repeat center / contain; */
}


/* Layout Grid (3 колонки) */
.layout-grid {
  display: grid;
  grid-template-columns: 260px 1fr 280px; /* лево / центр / право */
  gap: 24px;
  margin-top: 24px;
  margin-bottom: 32px;
}

.col {
  display: block;
}

/* Виджеты в колонках */
.widget-box {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 24px;
}

.widget-title {
  margin: 0 0 16px 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--barca-blue);
  border-bottom: 2px solid var(--barca-light);
  padding-bottom: 8px;
}

/* Левая колонка — список новостей */
/* Контейнер списка */
.news-list-small {
  list-style: none;
  padding: 0;
  margin: 0;
}

.bc-news-item {
  margin-bottom: 16px;
}

/* Wrapper: flex, чтобы картинка была слева, текст справа */
.bc-news-wrapper {
  display: flex;
  gap: 12px;
  align-items: flex-start; /* начало по верхнему краю */
}

/* Блок картинки: фиксированная высота, object-fit покрывает всё */
.bc-news-image {
  flex: 0 0 76px; /* ширина 76px, не сжимается */
  height: 76px;   /* одинаковая высота для всех */
  overflow: hidden;
  border-radius: 8px;
}

.bc-news-image img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* картинка заполняет блок, не искажаясь */
  display: block;
}

/* Текстовый блок */
.bc-news-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* заголовок сверху, мета снизу */
  min-height: 76px; /* чтобы высота текста совпадала с картинкой */
}

/* Заголовок: без отступов, сразу от верха */
.bc-news-title {
  margin: 0;
  font-size: 15px;
  line-height: 1.3;
}

.bc-news-title a {
  text-decoration: none;
  color: var(--gray-dark);
  font-weight: 600;
}

.bc-news-title a:hover {
  color: var(--barca-red);
}

/* Мета: сразу внизу, без лишних отступов */
.bc-news-meta {
  margin-top: auto; /* прижимает вниз */
  font-size: 12px;
  color: var(--gray-mid);
  display: flex;
  align-items: center;
  gap: 4px;
}


/* Центральная колонка — большая карточка новости */
.big-news-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.big-news-image img {
  width: 100%;
  height: 360px;
  object-fit: cover;
}

.big-news-header {
  padding: 20px;
}

.big-news-date {
  font-size: 13px;
  color: var(--gray-mid);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.big-news-title {
  margin: 8px 0 0 0;
  font-size: 28px;
  font-weight: 700;
  color: var(--barca-blue);
  line-height: 1.2;
}

.big-news-body {
  padding: 0 20px 20px;
}

.big-news-body p {
  margin: 0 0 16px 0;
}

.btn-read-more {
  display: inline-block;
  margin-top: 16px;
  padding: 10px 20px;
  background: var(--barca-blue);
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  border-radius: 8px;
  transition: background 0.2s;
}

.btn-read-more:hover {
  background: #003a77;
}

.more-news-section .section-title {
  margin: 32px 0 16px 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--white); /* белый на гранатовом фоне виджета */
}

.news-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.news-card-sm {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
}

.news-card-sm img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.news-card-sm h4 {
  margin: 12px;
  font-size: 15px;
  line-height: 1.4;
}

.news-card-sm h4 a {
  text-decoration: none;
  color: var(--gray-dark);
  font-weight: 600;
}

.news-card-sm h4 a:hover {
  color: var(--barca-red);
}

/* Отступ от предыдущего блока */
.la-liga-table-widget {
  margin-top: 28px;
}

.la-liga-table-widget .widget-title {
  margin: 0 0 16px 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--barca-blue);
  border-bottom: 2px solid var(--barca-light);
  padding-bottom: 8px;
}

/* Таблица */
.la-liga-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
  background: transparent;
}

.la-liga-table th,
.la-liga-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-color);
}

.la-liga-table thead th {
  color: var(--gray-mid);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(255,255,255,0.7);
}

/* Позиция */
.pos {
  font-weight: 700;
  color: var(--barca-red);
  min-width: 30px;
  text-align: center;
}

/* Название команды */
.team-name {
  font-weight: 600;
  color: var(--gray-dark);
}

/* Выделение первой строки (Барселона) */
.top-team {
  background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border: 1px solid rgba(139, 58, 98, 0.15);
  border-radius: 8px;
}

.top-team .team-name {
  color: var(--barca-blue);
}

.points-high {
  color: var(--barca-red);
  font-weight: 700;
}

/* Убираем нижнюю границу у последней строки */
.la-liga-table tbody tr:last-child td {
  border-bottom: none;
}

/* Кнопка «Вся таблица» — теперь с жёлтой обводкой */
.btn-full-table {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 12px;
  background: var(--white);
  color: var(--barca-blue);
  text-decoration: none;
  font-weight: 700;
  text-align: center;
  /* Жёлтая обводка */
  border: 2px solid #ffd700;
  border-radius: var(--radius);
  transition: all 0.2s ease;
}

.btn-full-table:hover {
  background: #ffd700;
  color: #333;
  border-color: #d4af37;
}
/* Отступ от предыдущего блока */
.la-liga-table-widget {
  margin-top: 28px;
}

.la-liga-table-widget .widget-title {
  margin: 0 0 16px 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--barca-blue);
  border-bottom: 2px solid var(--barca-light);
  padding-bottom: 8px;
}

/* Таблица */
.la-liga-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
  background: transparent;
}

.la-liga-table th,
.la-liga-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-color);
}

.la-liga-table thead th {
  color: var(--gray-mid);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(255,255,255,0.7);
}

/* Позиция */
.pos {
  font-weight: 700;
  color: var(--barca-red);
  min-width: 30px;
  text-align: center;
}

/* Название команды */
.team-name {
  font-weight: 600;
  color: var(--gray-dark);
}

/* Выделение первой строки (Барселона) */
.top-team {
  background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border: 1px solid rgba(139, 58, 98, 0.15);
  border-radius: 8px;
}

.top-team .team-name {
  color: var(--barca-blue);
}

.points-high {
  color: var(--barca-red);
  font-weight: 700;
}

/* Убираем нижнюю границу у последней строки */
.la-liga-table tbody tr:last-child td {
  border-bottom: none;
}

/* Кнопка «Вся таблица» — теперь с жёлтой обводкой */
.btn-full-table {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 12px;
  background: var(--white);
  color: var(--barca-blue);
  text-decoration: none;
  font-weight: 700;
  text-align: center;
  /* Жёлтая обводка */
  border: 2px solid #ffd700;
  border-radius: var(--radius);
  transition: all 0.2s ease;
}

.btn-full-table:hover {
  background: #ffd700;
  color: #333;
  border-color: #d4af37;
}


/* Правая колонка: матчи */
.match-widget .match-block {
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
  border: 1px solid var(--barca-light);
}

.match-header {
  font-size: 14px;
  font-weight: 700;
  color: var(--barca-blue);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
}

.match-teams {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.team-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.team-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.team-name {
  font-weight: 600;
  color: var(--gray-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}

.vs {
  color: var(--gray-mid);
  font-weight: 700;
}

.match-info,
.match-info.result {
  font-size: 13px;
  color: var(--gray-mid);
}

.match-info.result {
  color: var(--barca-red);
  font-weight: 700;
}

/* Footer */
.site-footer {
  background: rgba(0,77,153,0.9);
  color: var(--white);
  padding: 24px 0;
}

.site-footer .container {
  text-align: center;
  font-size: 14px;
}

/* Адаптив: на экранах меньше 1024px — убираем 3 колонки, делаем одну */
@media (max-width: 1024px) {
  .layout-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .col-left,
  .col-center,
  .col-right {
    width: 100%;
  }

  /* На планшетах можно правую колонку поставить под центр, если хочется */
}

/* На мобильных — ещё проще: все блоки друг под другом */
@media (max-width: 768px) {
  .header-inner {
    flex-wrap: wrap;
    justify-content: center;
    height: auto;
    padding: 12px 0;
    gap: 16px;
  }

  .logo-area {
    order: 1;
    justify-content: center;
  }

  .main-nav ul {
    order: 2;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }

  .big-news-image img {
    height: 260px;
  }

  .news-grid-3 {
    grid-template-columns: 1fr; /* одна колонка */
  }
}

