body{
    font-size: 14px;
}

/* ==========================================================================
   Tournament node — Airbnb-style listing layout on Gin design tokens.
   Everything is scoped under .tournament so it never leaks into the Gin
   admin UI. Gin custom properties are used with safe fallbacks.
   Template: templates/node/node--tournament.html.twig
   ========================================================================== */

.tournament {
  --t-accent: var(--gin-color-primary, #ff385c);
  --t-accent-hover: #d70466;
  --t-border: var(--gin-border-color-secondary, #dddddd);
  --t-divider: #ebebeb;
  --t-text: var(--gin-color-text, #222222);
  --t-muted: var(--gin-color-text-light, #717171);
  --t-surface: var(--gin-bg-layer, #ffffff);
  --t-radius: 12px;
  --t-radius-lg: 18px;
  --t-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  --t-gap: 24px;
  margin-inline: auto;
  color: var(--t-text);
  font-family: var(--gin-font, "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);

}

.tournament *,
.tournament *::before,
.tournament *::after {
  box-sizing: border-box;
}

/* Tame Drupal's default field chrome inside the listing. */
.tournament .field {
  margin: 0;
}

/* Never let embedded media or wide tables push past their column — that
   overflow is what makes a scrollbar flash in and out while resizing. */
.tournament :is(img, svg, video, iframe, embed, object, table, pre) {
  max-width: 100%;
}

.tournament .field__label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--t-muted);
  margin: 0 0 2px;
}

/* --- Photo gallery (hero + thumbnail grid) ------------------------------- */

.tournament__gallery {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 8px;
  border-radius: var(--t-radius-lg);
  overflow: hidden;
  margin-bottom: 28px;
  max-height: 460px;
}

.tournament__gallery:not(:has(.tournament__gallery-grid)) {
  grid-template-columns: 1fr;
}

.tournament__gallery-hero,
.tournament__gallery-grid .field__item {
  overflow: hidden;
  background: #f0f0f0;
}

.tournament__gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.tournament__gallery img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  transition: opacity 0.2s ease;
}

.tournament__gallery-hero {
  min-height: 300px;
}

.tournament__gallery img:hover {
  opacity: 0.92;
}

.tournament__gallery .field__label {
  display: none;
}

/* --- Title / subtitle ---------------------------------------------------- */

.tournament__header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 8px;
}

.tournament__logo img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--t-border);
}

.tournament__title {
  font-size: 1.75rem;
  line-height: 1.2;
  font-weight: 700;
  margin: 0 0 8px;
}

.tournament__title a {
  color: inherit;
  text-decoration: none;
}

.tournament__subtitle {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.9375rem;
  color: var(--t-muted);
}

.tournament__subtitle-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tournament__subtitle-item:not(:last-child)::after {
  content: "·";
  margin-left: 8px;
  color: var(--t-muted);
}

.tournament__subtitle .field,
.tournament__subtitle .field__item,
.tournament__reserve-row .field,
.tournament__reserve-row .field__item {
  display: inline;
}

.tournament__subtitle .field__label,
.tournament__reserve-row .field__label {
  display: inline;
  font-weight: 400;
}

.tournament__pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--t-accent) 12%, transparent);
  color: var(--t-accent);
  font-size: 0.8125rem;
  font-weight: 600;
}

.tournament__pill .field__label {
  display: none;
}

/* --- Two-column layout --------------------------------------------------- */

.tournament__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 360px);
  gap: clamp(24px, 4vw, 56px);
  margin-top: 28px;
  align-items: start;
}

.tournament__main {
  min-width: 0;
}

.tournament__section {
  padding: 28px 0;
  border-top: 1px solid var(--t-divider);
}

.tournament__main > .tournament__section:first-child,
.tournament__main > .tournament__card:first-child + .tournament__section {
  border-top: 0;
  padding-top: 4px;
}

.tournament__section .field__label {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--t-text);
  margin-bottom: 12px;
}

.tournament__section--sponsors .field__items,
.tournament__section--sponsors .field--name-field-sponsors {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
}

/* --- Cards / callouts ---------------------------------------------------- */

.tournament__card {
  border: 1px solid var(--t-border);
  border-radius: var(--t-radius);
  padding: 20px 24px;
  background: var(--t-surface);
}

.tournament__section--callout {
  margin-bottom: 8px;
}

/* --- Sticky reservation card --------------------------------------------- */

.tournament__aside {
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tournament__reserve {
  border: 1px solid var(--t-border);
  border-radius: var(--t-radius);
  box-shadow: var(--t-shadow);
  padding: 24px;
  background: var(--t-surface);
}

.tournament__reserve-price {
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.tournament__reserve-price .field__label {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--t-muted);
}

.tournament__reserve-row {
  padding: 12px 0;
  border-top: 1px solid var(--t-divider);
  font-size: 0.9375rem;
}

.tournament__reserve-row:first-of-type {
  border-top: 0;
}

.tournament__reserve-cta {
  margin-top: 20px;
}

.tournament__reserve-cta a {
  display: block;
  text-align: center;
  padding: 14px 24px;
  border-radius: 8px;
  background: var(--t-accent);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease;
}

.tournament__reserve-cta a:hover {
  background: var(--t-accent-hover);
}

.tournament__contact {
  list-style: none;
  margin: 20px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--t-divider);
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.9375rem;
}

.tournament__contact a {
  color: var(--t-accent);
  text-decoration: none;
}

.tournament__contact a:hover {
  text-decoration: underline;
}

/* --- Responsive ---------------------------------------------------------- */

@media (max-width: 960px) {
  .tournament__layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .tournament__aside {
    position: static;
    order: -1;
  }
}

@media (max-width: 640px) {
  .tournament {
    padding: 16px 16px 48px;
  }

  .tournament__gallery {
    grid-template-columns: 1fr;
    max-height: none;
  }

  .tournament__gallery-grid {
    grid-template-columns: 1fr 1fr;
  }
}