/* Kezdőlapi „Versenyek”: kiemelt + lista (bajnokságok és egyéni futamok, mind képpel) */
.hv-ev {
  --hv-red: #e10600;
  --hv-red-text: #ff5a55;
  --hv-card: #1c1c1c;
  --hv-line: rgba(255, 255, 255, 0.09);
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 18px;
  max-width: 1080px;
  margin: 0 auto;
}

.hv-ev[data-count="1"] {
  grid-template-columns: minmax(0, 1fr);
  max-width: 640px;
}

/* Kiemelt kártya */
.hv-ev__feat {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--hv-card);
  border: 1px solid var(--hv-line);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.hv-ev__feat:hover,
.hv-ev__item:hover {
  border-color: rgba(225, 6, 0, 0.6);
}

.hv-ev__media,
.hv-ev__thumb {
  position: relative;
  display: block;
  background: #000;
  overflow: hidden;
}

.hv-ev__media {
  aspect-ratio: 16 / 9;
}

.hv-ev__media img,
.hv-ev__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hv-ev__media-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: rgba(255, 255, 255, 0.25);
  font-size: 2.2rem;
}

.hv-ev__status {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  font-family: 'Rajdhani', 'Arial Narrow', Arial, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(17, 17, 17, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

.hv-ev__status--ongoing {
  background: var(--hv-red);
  border-color: var(--hv-red);
}

.hv-ev__status--inline {
  position: static;
  align-self: flex-start;
  padding: 2px 7px;
  font-size: 0.7rem;
}

.hv-ev__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 12px;
  padding: 14px 18px 18px;
}

.hv-ev__title,
.hv-ev__item-title {
  margin: 0;
  font-family: 'Rajdhani', 'Arial Narrow', Arial, sans-serif;
  font-weight: 700;
  line-height: 1.15;
}

.hv-ev__title { font-size: 1.5rem; }
.hv-ev__item-title { font-size: 1.12rem; }

.hv-ev__title a,
.hv-ev__item-title a {
  color: #fff;
  text-decoration: none;
}

.hv-ev__title a:hover,
.hv-ev__item-title a:hover {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: var(--hv-red);
  text-underline-offset: 4px;
}

.hv-ev__sub {
  margin-top: 3px;
  font-size: 0.86rem;
  color: #b3b3b3;
}

.hv-ev__bar {
  height: 4px;
  margin-top: 10px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  overflow: hidden;
}

.hv-ev__bar span {
  display: block;
  height: 100%;
  background: var(--hv-red);
}

.hv-ev__next {
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.04);
  border-left: 3px solid var(--hv-red);
}

.hv-ev__label {
  display: block;
  margin-bottom: 2px;
  font-family: 'Rajdhani', 'Arial Narrow', Arial, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9a9a9a;
}

.hv-ev__when {
  display: block;
  font-family: 'Rajdhani', 'Arial Narrow', Arial, sans-serif;
  font-size: 1.08rem;
  font-weight: 700;
  color: #fff;
}

.hv-ev__when-sm {
  color: var(--hv-red-text);
  font-weight: 600;
}

.hv-ev__track {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-top: 2px;
  font-size: 0.9rem;
  color: #d0d0d0;
}

.hv-ev__track i {
  flex: 0 0 auto;
  font-size: 0.8rem;
  color: #8f8f8f;
}

.hv-ev__when-sm {
  font-family: 'Rajdhani', 'Arial Narrow', Arial, sans-serif;
  font-size: 1rem;
}

.hv-ev__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
}

.hv-ev__btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 14px;
  font-family: 'Rajdhani', 'Arial Narrow', Arial, sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 4px;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.hv-ev__btn:hover {
  color: #fff;
  border-color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.hv-ev__btn--primary {
  flex: 0 0 auto;
  padding-inline: 22px;
  background: var(--hv-red);
  border-color: var(--hv-red);
}

.hv-ev__btn--primary:hover {
  background: #ff1a14;
  border-color: #ff1a14;
}

/* Lista: kisebb kártyák, kép balra */
.hv-ev__list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.hv-ev__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  background: var(--hv-card);
  border: 1px solid var(--hv-line);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

/* A borítók plakátok szöveggel: a keret a képek saját 16:9-es arányát követi, így semmi nem vágódik le */
.hv-ev__thumb {
  aspect-ratio: 16 / 9;
}

.hv-ev__item-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 12px 14px;
}

.hv-ev__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  margin-top: auto;
  font-family: 'Rajdhani', 'Arial Narrow', Arial, sans-serif;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--hv-red-text);
  text-decoration: none;
}

.hv-ev__link:hover { color: #fff; }

.hv-ev__btn:focus-visible,
.hv-ev__link:focus-visible,
.hv-ev__title a:focus-visible,
.hv-ev__item-title a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Tablet: a kiemelt felül, alatta a többi egymás mellett */
@media (max-width: 991.98px) {
  .hv-ev {
    grid-template-columns: minmax(0, 1fr);
    max-width: 720px;
  }

  .hv-ev__list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }

  /* Keskenyebb kártyán a kép felülre, teljes szélességre kerül, hogy a plakát olvasható maradjon */
  .hv-ev__item {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Mobil: minden egymás alatt, a kis kártyák kép balra maradnak */
@media (max-width: 575.98px) {
  .hv-ev,
  .hv-ev__list {
    gap: 14px;
  }

  .hv-ev__list {
    grid-template-columns: minmax(0, 1fr);
  }


  .hv-ev__title { font-size: 1.3rem; }
  .hv-ev__body { padding: 12px 14px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .hv-ev__feat,
  .hv-ev__item,
  .hv-ev__btn { transition: none; }
}

/* Az egész kártya kattintható (a cím linkje kifeszül), a gombok fölötte maradnak */
.hv-ev__feat,
.hv-ev__item {
  position: relative;
}

.hv-ev__title a::after,
.hv-ev__item-title a::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hv-ev__actions,
.hv-ev__link {
  position: relative;
  z-index: 2;
}

/* Asztali nézet: a kiemelt esemény felül teljes szélességben (kép balra, adatok jobbra),
   alatta a többi egymás mellett. Így a 16:9-es plakátok vágás nélkül, kiegyensúlyozott magassággal férnek el. */
@media (min-width: 992px) {
  .hv-ev {
    grid-template-columns: minmax(0, 1fr);
  }

  .hv-ev__feat {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  }

  .hv-ev__feat .hv-ev__media {
    align-self: start;
  }

  .hv-ev__body {
    padding: 18px 22px 20px;
  }

  .hv-ev__list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hv-ev[data-count="2"] .hv-ev__list {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (min-width: 992px) {
  .hv-ev[data-count="1"] {
    max-width: 1080px;
  }
}

/* Asztali nézetben a kis kártyák képe függőlegesen középre kerül, körben kis margóval,
   így nem tapad a kártya tetejéhez, ha a szöveg magasabb a képnél */
@media (min-width: 992px) {
  .hv-ev__item {
    align-items: center;
  }

  .hv-ev__thumb {
    margin: 12px 0 12px 12px;
    border-radius: 4px;
  }
}

/* Oldalsáv melletti (keskenyebb) változat: a kiemelt kártya kép balra marad,
   a kis kártyák képe felülre kerül teljes szélességben, hogy a plakát olvasható maradjon */
.hv-ev--narrow,
.hv-ev--narrow[data-count="1"] {
  max-width: none;
}

@media (min-width: 992px) {
  .hv-ev--narrow .hv-ev__feat {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  }

  .hv-ev--narrow .hv-ev__body {
    padding: 14px 16px 16px;
  }

  .hv-ev--narrow .hv-ev__title {
    font-size: 1.35rem;
  }

  .hv-ev--narrow .hv-ev__item {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .hv-ev--narrow .hv-ev__thumb {
    margin: 0;
    border-radius: 0;
  }
}

/* Kis kártya: a Nevezés valódi gomb, ugyanúgy, mint a kiemelt kártyán */
.hv-ev__btn--item {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  align-self: flex-start;
  margin-top: 10px;
}

.hv-ev__item-body {
  padding-bottom: 14px;
}

/* Egyoszlopos kis kártyán (kép felül) a kép sora nem nyúlik: a többletmagasság a szöveg alá kerül */
@media (max-width: 991.98px) {
  .hv-ev__item {
    grid-template-rows: auto 1fr;
  }
}

@media (min-width: 992px) {
  .hv-ev--narrow .hv-ev__item {
    grid-template-rows: auto 1fr;
  }
}
