/* OLIMP Sports Archive v0.2.15 — wide, responsive content layout.
   Presentation only. Loaded AFTER existing site/gallery/video CSS.
   No backend, permissions, media or JavaScript changes. */

/* The old .shell was capped at 1240px, leaving large side gutters on desktops.
   Keep a small, fluid safe area for all site sections including the header. */
:root {
  --oa-wide-gutter: clamp(16px, 2.5vw, 56px);
}
.shell {
  width: calc(100% - (2 * var(--oa-wide-gutter)));
  max-width: 2400px;
  margin-inline: auto;
}

/* A shorter introduction: the archive navigation appears higher on the page. */
.hero {
  min-height: 338px;
  padding: 44px clamp(24px, 3vw, 56px) 40px;
  margin-top: 24px;
  margin-bottom: 39px;
}
.hero h1 {
  font-size: clamp(30px, 3.5vw, 60px);
  max-width: 950px;
  margin-top: 13px;
  margin-bottom: 13px;
}
.hero p { max-width: 650px; }
.hero-actions { margin-top: 22px; }
.hero .arena {
  right: -62px;
  top: -60px;
  transform: rotate(-16deg) scale(.84);
  transform-origin: center;
}

/* Better use of the horizontal room, without overly large sport cards. */
.cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.two-sections { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.admin-layout { grid-template-columns: 220px minmax(0, 1fr); gap: 28px; }
.admin-layout > *, .two-sections > * { min-width: 0; }
.login-wrap { max-width: 1300px; margin-inline: auto; }
.match-banner .versus { max-width: 1380px; margin-left: auto; margin-right: auto; }

/* Preserve meaningful image/video tile sizes when the outer page grows. */
.archive-gallery { grid-template-columns: repeat(7, minmax(0, 1fr)); }
@media (min-width: 851px) {
  .oa-match-tabbed .files-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }
}
@media (min-width: 1850px) {
  .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1599px) {
  .archive-gallery { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (max-width: 1199px) {
  .archive-gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 850px) {
  /* Follow the site's native one-column mobile layout. */
  .shell { width: calc(100% - 28px); }
  .hero { min-height: 310px; padding: 38px 26px; }
  .hero h1 { font-size: clamp(29px, 6vw, 46px); }
  .hero .arena { right: -180px; top: -55px; opacity: .27; }
  .two-sections { grid-template-columns: 1fr; }
  .admin-layout { grid-template-columns: 1fr; gap: 16px; }
  .archive-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .shell { width: calc(100% - 28px); }
  .hero { min-height: 300px; padding: 30px 20px; margin-bottom: 30px; }
  .hero h1 { font-size: clamp(25px, 7.8vw, 39px); }
  .hero .arena { right: -260px; opacity: .18; }
  .cards { grid-template-columns: 1fr; }
  .archive-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
