/* Секция «Турниры» на главной (modules/mod_events.php, js/events.js). Тёмная секция .dark_section */
.ev {
  --ev-panda: #3ddc84;
  --ev-ru: #4ea8ff;
  --ev-world: #ff9900;
  --ev-live: #ff4757;
  --ev-card: rgba(9, 24, 44, .72);
  --ev-line: rgba(255, 255, 255, .12);
  --ev-text: #fff;
  --ev-muted: rgba(255, 255, 255, .62);
  color: var(--ev-text);
  padding-bottom: 40px;
}

.ev svg { width: 14px; height: 14px; fill: currentColor; flex: none; }
.ev [hidden] { display: none !important; }

/* ---------- верх: ближайший турнир клуба + главный турнир мира ---------- */
.ev-top {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 20px;
  margin-bottom: 26px;
}

.ev-hero,
.ev-main {
  position: relative;
  overflow: hidden;
  padding: 24px 26px;
  background: var(--ev-card);
  border: 1px solid var(--ev-line);
  border-radius: 14px;
}

.ev-hero { border-left: 4px solid var(--ev-panda); }
.ev-hero::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(61, 220, 132, .22), transparent 70%);
  pointer-events: none;
}

.ev-hero__label,
.ev-main__label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ev-muted);
  margin-bottom: 10px;
}

.ev-hero__when { display: flex; align-items: baseline; gap: 14px; }
.ev-hero__day {
  font-family: 'Oswald', sans-serif;
  font-size: 30px;
  text-transform: uppercase;
  line-height: 1;
}
.ev-hero__time {
  font-family: 'Oswald', sans-serif;
  font-size: 30px;
  color: var(--ev-panda);
  line-height: 1;
}
.ev-hero__name {
  margin: 10px 0 18px;
  font-size: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.ev-count { display: flex; gap: 10px; margin-bottom: 18px; }
.ev-count > div {
  min-width: 68px;
  padding: 10px 6px 8px;
  text-align: center;
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--ev-line);
  border-radius: 10px;
}
.ev-count b {
  display: block;
  font-family: 'Oswald', sans-serif;
  font-weight: 500;
  font-size: 34px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.ev-count span {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ev-muted);
}
.ev-count.is-soon b { color: var(--ev-panda); }

.ev-hero__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  color: var(--ev-muted);
}
.ev-hero__btn {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 8px;
  background: var(--ev-panda);
  color: #08321b !important;
  font-weight: 700;
  text-decoration: none;
  transition: transform .15s, box-shadow .15s;
}
.ev-hero__btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(61, 220, 132, .35); }

.ev-main {
  display: flex;
  flex-direction: column;
  color: var(--ev-text) !important;
  text-decoration: none;
  border-left: 4px solid var(--ev-world);
  background:
    radial-gradient(120% 140% at 100% 0, rgba(255, 153, 0, .22), transparent 55%),
    var(--ev-card);
  transition: transform .2s, border-color .2s;
}
.ev-main:hover { transform: translateY(-2px); border-color: var(--ev-world); }
.ev-main--live { border-left-color: var(--ev-live); }
.ev-main__tier {
  align-self: flex-start;
  padding: 3px 10px;
  border-radius: 4px;
  background: var(--ev-world);
  color: #2b1600;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.ev-main__title {
  margin: 12px 0 8px;
  font-family: 'Oswald', sans-serif;
  font-size: 26px;
  line-height: 1.15;
}
.ev-main__place,
.ev-card__place {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--ev-muted);
  font-size: 14px;
}
.ev-main__dates {
  margin-top: auto;
  padding-top: 14px;
  font-family: 'Oswald', sans-serif;
  font-size: 22px;
  color: var(--ev-world);
}
.ev-main__status { margin-top: 8px; }

/* ---------- вкладки и фильтр ---------- */
.ev-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.ev-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: rgba(0, 0, 0, .28);
  border-radius: 10px;
}
.ev-tab,
.ev-chip,
.ev-more {
  font: inherit;
  cursor: pointer;
  border: 0;
}
.ev-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 7px;
  background: transparent;
  color: var(--ev-muted);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  transition: background .2s, color .2s;
}
.ev-tab:hover { color: #fff; }
.ev-tab.is-on { background: #fff; color: #10233b; }
.ev-tab__n {
  min-width: 22px;
  padding: 1px 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .14);
  font-size: 12px;
  text-align: center;
}
.ev-tab.is-on .ev-tab__n { background: #10233b; color: #fff; }

.ev-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ev-live);
  box-shadow: 0 0 0 0 rgba(255, 71, 87, .7);
  animation: ev-pulse 1.6s infinite;
}
@keyframes ev-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 71, 87, .7); }
  70% { box-shadow: 0 0 0 8px rgba(255, 71, 87, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 71, 87, 0); }
}

.ev-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ev-chip {
  padding: 7px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font-size: 14px;
  border: 1px solid var(--ev-line);
  transition: background .2s, border-color .2s;
}
.ev-chip:hover { background: rgba(255, 255, 255, .16); }
.ev-chip.is-on { background: #fff; color: #10233b; border-color: #fff; }
.ev-chip--panda.is-on { background: var(--ev-panda); border-color: var(--ev-panda); color: #08321b; }
.ev-chip--ru.is-on { background: var(--ev-ru); border-color: var(--ev-ru); color: #062038; }
.ev-chip--world.is-on { background: var(--ev-world); border-color: var(--ev-world); color: #2b1600; }

/* ---------- списки ---------- */
.ev-panel { margin-bottom: 6px; }
.ev-panel__title {
  margin: 18px 0 12px;
  font-family: 'Oswald', sans-serif;
  font-weight: 400;
  font-size: 22px;
  text-transform: uppercase;
}
.ev.js .ev-panel { display: none; }
.ev.js .ev-panel.is-on { display: block; animation: ev-in .35s ease; }
.ev.js .ev-panel__title { display: none; }
@keyframes ev-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.ev-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.ev-card {
  --c: var(--ev-world);
  display: flex;
  min-width: 0;
  color: var(--ev-text) !important;
  text-decoration: none;
  background: var(--ev-card);
  border: 1px solid var(--ev-line);
  border-radius: 12px;
  overflow: hidden;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.ev-card--panda { --c: var(--ev-panda); }
.ev-card--ru { --c: var(--ev-ru); }
.ev-card:hover {
  transform: translateY(-3px);
  border-color: var(--c);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .35);
}
.ev-card.is-hidden { display: none; }
.ev-card--past { opacity: .82; }
.ev-card--past:hover { opacity: 1; }

.ev-card__date {
  flex: none;
  width: 74px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 4px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02));
  border-right: 3px solid var(--c);
  text-align: center;
}
.ev-card__d {
  font-family: 'Oswald', sans-serif;
  font-size: 32px;
  line-height: 1;
}
.ev-card__m {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--c);
  font-weight: 700;
}
.ev-card__len { margin-top: 6px; font-size: 11px; color: var(--ev-muted); }

.ev-card__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 12px 14px;
}
.ev-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ev-tag {
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.ev-tag--panda { background: var(--ev-panda); color: #08321b; }
.ev-tag--ru { background: var(--ev-ru); color: #062038; }
.ev-tag--world { background: var(--ev-world); color: #2b1600; }
.ev-tag--home { background: transparent; color: var(--ev-panda); border: 1px solid var(--ev-panda); }
.ev-card__tier { font-size: 12px; color: var(--ev-muted); }
.ev-card__title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ev-card__place { font-size: 13px; }
.ev-card__fd {
  padding: 0 5px;
  border: 1px solid var(--ev-line);
  border-radius: 3px;
  font-size: 11px;
}
.ev-card__status {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}
.ev-card__go {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--c);
  font-weight: 600;
  transition: gap .2s;
}
.ev-card:hover .ev-card__go { gap: 8px; }

.ev-st { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.ev-st--live { color: var(--ev-live); }
.ev-st--live i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ev-live);
  animation: ev-pulse 1.6s infinite;
}
.ev-st--soon { color: #fff; }
.ev-st--past { color: var(--ev-muted); font-weight: 400; }
.ev-progress {
  flex-basis: 100%;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, .12);
  overflow: hidden;
  order: 3;
}
.ev-progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--ev-live), #ff9f43);
  border-radius: 2px;
}
.ev-card--live { border-color: rgba(255, 71, 87, .45); }

.ev-empty {
  padding: 26px;
  text-align: center;
  color: var(--ev-muted);
  border: 1px dashed var(--ev-line);
  border-radius: 12px;
}
.ev-more {
  display: block;
  margin: 18px auto 0;
  padding: 11px 28px;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .4);
  font-weight: 600;
  transition: background .2s;
}
.ev-more:hover { background: rgba(255, 255, 255, .1); }

.ev-src {
  margin-top: 22px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ev-muted);
}
.ev-src a { color: #fff; }

@media (prefers-reduced-motion: reduce) {
  .ev-dot, .ev-st--live i, .ev.js .ev-panel.is-on { animation: none; }
}

@media (max-width: 1199px) {
  .ev-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 899px) {
  .ev-top { grid-template-columns: minmax(0, 1fr); }
  .ev-bar { flex-direction: column; align-items: stretch; }
  .ev-tabs { overflow-x: auto; }
  .ev-tab { flex: 1; justify-content: center; padding: 9px 10px; }
}

@media (max-width: 639px) {
  .ev-grid { grid-template-columns: minmax(0, 1fr); }
  .ev-hero, .ev-main { padding: 18px 16px; }
  .ev-count { gap: 6px; }
  .ev-count > div { min-width: 0; flex: 1; }
  .ev-count b { font-size: 28px; }
  .ev-hero__day, .ev-hero__time { font-size: 24px; }
  .ev-main__title { font-size: 22px; }
  .ev-tab { font-size: 14px; gap: 5px; }
}
