/* Simple responsive grid for the cards (keeps your 3-up look) */
@media (max-width: 980px) {
  .fourup {
    width: 50% !important;
  }
}
@media (max-width: 640px) {
  .fourup {
    width: 100% !important;
  }
}

.card-placeholder {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed #d4d4d4;
  border-radius: 10px;
  background: #fbfbfb;
  color: #777;
  font-style: italic;
}
.image.fixed img {
  height: 180px;
  object-fit: cover;
  border-radius: 10px;
}
/* Centered, responsive tournament grid */
.tournament-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px; /* space between cards */
  justify-content: center; /* center when there are 1–3 cards */
}

/* Card width: 4-up on large screens */
.tournament-row .fourup {
  /* 4 columns = 3 gaps */
  width: calc((100% - 3 * 16px) / 4);
  max-width: 360px; /* optional cap so cards don’t get huge */
}

/* 3-up */
@media (max-width: 1200px) {
  .tournament-row .fourup {
    width: calc((100% - 2 * 16px) / 3);
  }
}

/* 2-up */
@media (max-width: 980px) {
  .tournament-row .fourup {
    width: calc((100% - 1 * 16px) / 2);
  }
}

/* 1-up on phones */
@media (max-width: 640px) {
  .tournament-row .fourup {
    width: 100%;
    max-width: none;
  }
}
body {
  padding-top: 0 !important;
}
#banner {
  margin-top: -70px;
}
/* --- Active tournaments: force 3 across on desktop --- */
.tournament-row {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* remove any float/width constraints from old grid system */
.tournament-card {
  flex: 1 1 300px;
  max-width: 340px;
}
/* Card layout fix */
.tournament-card .box {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* push buttons to bottom */
.tournament-card .actions {
  margin-top: auto;
}
.tournament-row .box {
  padding: 1.25rem 1.1rem;
}
.tournament-card .box {
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.tournament-card .box:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

/* On medium screens go 2 across */
@media (max-width: 980px) {
  .tournament-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* On phones 1 across */
@media (max-width: 640px) {
  .tournament-row {
    grid-template-columns: 1fr;
  }
}

.archive-form {
  max-width: 650px;
  margin: 0 auto;
}

.archive-select select {
  width: 100%;
}

.archive-row {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  align-items: center;
}

.archive-go {
  margin-top: 0.4rem;
  text-align: center;
}

.archive-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: end;
}

.archive-go .button.small,
.archive-go input.button.small,
.archive-go button.button.small {
  height: 2.35em;
  line-height: 2.35em;
}

/* Archive section: stack select + button and match small button sizing */
#archive-jump .archive-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

#archive-jump .archive-select {
  width: min(720px, 100%);
}

#archive-jump .archive-select select {
  width: 100%;
}

#archive-jump .archive-go {
  margin-top: 0; /* remove extra spacing */
  text-align: center;
}

/* Make "small" actually small (ONLY in archive) */
#archive-jump .button.small,
#archive-jump input.button.small,
#archive-jump button.button.small {
  height: 2.35em;
  line-height: 2.35em;
  padding: 0 1.25em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7em; /* keep consistent with your .button.small */
}
