/* AMK Zanatlija Zagreb
   Boje iz klupskog grba: plava, zlatna, crvena; asfalt za "startnu mrežu". */
:root {
  --navy: #1E2D5C;
  --navy-deep: #16234A;
  --gold: #B38A3E;
  --gold-soft: #F3EAD7;
  --red: #B42A2F;
  --ink: #26292E;
  --muted: #5B6270;
  --steel: #E9EDF2;
  --line: #D5DBE3;
  --paper: #FFFFFF;
  --asphalt: #2E3238;

  --display: "Saira Condensed", "Roboto Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --text: "Literata", Georgia, "Times New Roman", serif;
  --wrap: 72rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.7 var(--text);
}
img { max-width: 100%; height: auto; }
a { color: var(--navy); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: .005em;
  margin: 0 0 .5em;
  font-stretch: condensed;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
h3 { font-size: 1.4rem; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }
.section { padding-top: 2.75rem; padding-bottom: 2.75rem; }
.skip { position: absolute; left: -999px; top: 0; background: var(--gold); color: #000; padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 0; }

/* ---------------------------------------------------------------- header */
.masthead { background: var(--navy); color: #fff; border-bottom: 4px solid var(--gold); }
.masthead-in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-top: .7rem; padding-bottom: .7rem; }
.brand { display: flex; align-items: center; gap: .75rem; color: #fff; text-decoration: none; }
.brand img { width: 40px; height: auto; display: block; }
.brand-name { font: 700 1.45rem/1 var(--display); font-stretch: condensed; letter-spacing: .01em; }
.brand:hover { color: #fff; }
.nav { display: flex; flex-wrap: wrap; gap: .15rem .3rem; }
.nav a {
  color: #fff; text-decoration: none; font: 600 1.12rem/1 var(--display); font-stretch: condensed;
  padding: .55rem .7rem; border-radius: 4px;
}
.nav a:hover { background: var(--navy-deep); color: #fff; }
.nav a[aria-current="page"] { background: var(--paper); color: var(--navy); }

/* ------------------------------------------------------------------ hero */
.hero { border-bottom: 1px solid var(--line); }
.hero-in { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 2.5rem; align-items: stretch; padding-top: 3rem; padding-bottom: 3rem; }
.hero h1 { font-size: clamp(3.4rem, 9vw, 6.4rem); line-height: .9; margin-bottom: 1.25rem; color: var(--navy); }
.hero-since {
  display: block; width: max-content; margin-top: .6rem;
  font-size: .42em; font-weight: 700; color: var(--ink);
  border: 3px solid var(--ink); border-radius: 10px; padding: .1em .45em .14em;
}
.lede { font-size: 1.18rem; line-height: 1.65; max-width: 36em; }
.hero-links { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.btn {
  display: inline-block; background: var(--red); color: #fff; text-decoration: none;
  font: 600 1.15rem/1 var(--display); font-stretch: condensed; padding: .8rem 1.2rem; border-radius: 4px;
}
.btn:hover { background: #8F1F24; color: #fff; }
.btn-quiet { background: transparent; color: var(--navy); box-shadow: inset 0 0 0 2px var(--navy); }
.btn-quiet:hover { background: var(--navy); color: #fff; }

/* ------------------------------------------------- start grid (history) */
.hero-grid, .asphalt {
  background: var(--asphalt);
  background-image:
    radial-gradient(rgba(255,255,255,.035) 1px, transparent 1.4px),
    radial-gradient(rgba(0,0,0,.18) 1px, transparent 1.4px);
  background-size: 7px 7px, 11px 11px;
  color: #fff; border-radius: 6px; padding: 1.5rem 1.5rem 2rem;
}
.grid-title { color: #fff; font-size: 1.35rem; margin-bottom: 1.25rem; font-weight: 600; }
.grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 1.75rem; row-gap: .5rem;
}
.slot { min-width: 0; }
/* Staggered like a race start grid; painted slot bracket behind each plate. */
.slot { position: relative; padding: .7rem .7rem 1rem; }
.slot:nth-child(even) { margin-top: 2.75rem; }
.slot::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 48%;
  border: 3px solid rgba(255,255,255,.82); border-bottom: 0;
}
.plate {
  position: relative; display: flex; flex-direction: column; text-align: center;
  background: var(--paper); color: var(--ink); text-decoration: none;
  border: 3px solid var(--ink); border-radius: 14px; overflow: hidden;
  box-shadow: 0 0 0 3px var(--paper);
  transition: transform .15s ease;
  container-type: inline-size;
}
.plate:hover { color: var(--ink); transform: translateY(-3px); }
.plate:focus-visible { outline-offset: 5px; }
.plate-band { background: var(--red); color: #fff; font: 600 1rem/1 var(--display); font-stretch: condensed; padding: .4rem .5rem .35rem; }
.plate-num { font: 800 1.6rem/1 var(--display); font-size: min(2.6rem, 17cqi); font-stretch: condensed; padding: .6rem .3rem .25rem; white-space: nowrap; }
.plate-meta { font-size: .85rem; color: var(--muted); padding-bottom: .55rem; }

/* ----------------------------------------------------------------- news */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; border-bottom: 3px solid var(--navy); margin-bottom: .5rem; }
.section-head h2 { margin-bottom: .3rem; }
.section-head a { font: 600 1.1rem var(--display); font-stretch: condensed; }
.rows { list-style: none; margin: 0; padding: 0; }
.row { display: grid; grid-template-columns: 10.5rem minmax(0, 1fr); gap: 1.5rem; padding: 1.5rem 0; border-bottom: 1px solid var(--line); }
.row-img { display: block; aspect-ratio: 4 / 3; background: var(--steel); border-radius: 4px; overflow: hidden; }
.row-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.row h3 { margin: .1rem 0 .4rem; }
.row h3 a { color: var(--ink); text-decoration: none; }
.row h3 a:hover { color: var(--red); text-decoration: underline; }
.row p { margin: 0; max-width: 46em; }
.date { font-family: var(--display); font-stretch: condensed; font-size: 1rem; color: var(--muted); margin: 0; }
.date a { color: var(--muted); }
.tag { display: inline-block; margin-left: .4rem; background: var(--gold-soft); color: #6E5320; padding: 0 .45rem; border-radius: 3px; text-decoration: none; }

.page-head { margin-bottom: 1.75rem; }
.page-head h1 { color: var(--navy); }
.years { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .25rem; }
.years a { font: 600 1.05rem/1 var(--display); font-stretch: condensed; text-decoration: none; padding: .45rem .65rem; border-radius: 4px; background: var(--steel); color: var(--ink); }
.years a:hover { background: var(--line); color: var(--ink); }
.years a[aria-current="page"] { background: var(--navy); color: #fff; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-top: 1.5rem; font-family: var(--display); font-stretch: condensed; font-size: 1.1rem; }

/* -------------------------------------------------------------- article */
.article-head { max-width: 46rem; margin-bottom: 1.75rem; }
.article-head h1 { color: var(--navy); }
.prose { max-width: 42rem; }
.prose p, .prose ul, .prose ol, .prose table, .prose blockquote { margin: 0 0 1.1em; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose img { display: inline-block; margin: .3rem .3rem .3rem 0; border-radius: 3px; vertical-align: top; }
.prose iframe { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; background: var(--steel); border-radius: 4px; }
.prose table { border-collapse: collapse; width: 100%; font-size: .95rem; display: block; overflow-x: auto; }
.prose td, .prose th { border: 1px solid var(--line); padding: .35rem .6rem; text-align: left; vertical-align: top; }
.prose th { background: var(--steel); font-family: var(--display); font-stretch: condensed; font-size: 1.05rem; }
.prose blockquote { border-left: 4px solid var(--gold); padding: .2rem 0 .2rem 1rem; margin-left: 0; font-family: var(--display); font-stretch: condensed; font-size: 1.25rem; }
.prose .file a::before { content: "PDF  "; font: 700 .75rem var(--display); color: var(--red); }
.prose .file a[href$=".doc"]::before, .prose .file a[href$=".docx"]::before { content: "DOC  "; }
.article .gallery { max-width: none; margin: 1.5rem 0 2rem; }
.article-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 2.5rem; padding-top: 1.25rem; border-top: 3px solid var(--navy); max-width: 46rem; }
.article-nav a { text-decoration: none; color: var(--ink); font: 600 1.15rem/1.2 var(--display); font-stretch: condensed; }
.article-nav a span { display: block; color: var(--muted); font-weight: 400; font-size: .95rem; margin-bottom: .2rem; }
.article-nav a:hover { color: var(--red); }
.article-nav .next { grid-column: 2; text-align: right; }

/* ------------------------------------------------------------- galleries */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; }
.gallery a { display: block; aspect-ratio: 4 / 3; background: var(--steel); border-radius: 3px; overflow: hidden; }
.gallery img { width: 100%; height: 100%; object-fit: cover; display: block; margin: 0; border-radius: 0; transition: opacity .15s; }
.gallery a:hover img { opacity: .85; }

.history { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 2.5rem; align-items: start; }
.asphalt-wide .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.asphalt-wide .slot:nth-child(even) { margin-top: 2.75rem; }
.link-list { list-style: none; padding: 0; margin: 0; max-width: 46rem; }
.link-list li { padding: .6rem 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.gal-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1.5rem; }
.gal-list a { display: block; text-decoration: none; color: var(--ink); }
.gal-list img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; border-radius: 4px; background: var(--steel); margin-bottom: .5rem; }
.gal-title { display: block; font: 700 1.35rem/1.1 var(--display); font-stretch: condensed; }
.note { color: var(--muted); margin-top: 1.5rem; }

/* --------------------------------------------------------------- footer */
.footer { background: var(--navy); color: #DCE2EE; margin-top: 2rem; border-top: 4px solid var(--gold); font-size: .98rem; }
.footer-in { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; padding-top: 2rem; padding-bottom: 2rem; }
.footer a { color: #fff; }
.footer a:hover { color: var(--gold-soft); }
.footer-name { font: 700 1.3rem var(--display); font-stretch: condensed; color: #fff; margin-bottom: .3rem; }
.footer p { margin: 0 0 .6rem; }

/* ------------------------------------------------------------- lightbox */
.lightbox { border: 0; padding: 0; margin: 0; width: 100vw; height: 100vh; max-width: none; max-height: none; background: rgba(14, 18, 30, .96); color: #fff; }
.lightbox::backdrop { background: rgba(14, 18, 30, .96); }
.lightbox figure { margin: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3.5rem 4rem 1rem; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 7rem); object-fit: contain; }
.lightbox figcaption { min-height: 2.5rem; padding-top: .75rem; text-align: center; font-family: var(--display); font-stretch: condensed; font-size: 1.15rem; }
.lb-count { color: #A7B0C4; margin-left: .5rem; }
.lightbox button { position: absolute; background: rgba(255,255,255,.08); color: #fff; border: 0; cursor: pointer; font: 400 2.4rem/1 var(--text); width: 3rem; height: 3rem; border-radius: 50%; }
.lightbox button:hover { background: rgba(255,255,255,.2); }
.lb-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 1rem; top: 50%; transform: translateY(-50%); }
.lb-close { right: 1rem; top: 1rem; font-size: 2rem !important; }

/* ----------------------------------------------------------- responsive */
@media (max-width: 860px) {
  .hero-in, .history { grid-template-columns: 1fr; }
  .asphalt-wide .grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .asphalt-wide .slot:nth-child(even) { margin-top: 2.75rem; }
}
@media (max-width: 600px) {
  .masthead-in { justify-content: center; }
  .nav { justify-content: center; }
  .nav a { font-size: 1.02rem; padding: .5rem .5rem; }
  .row { grid-template-columns: 5.5rem minmax(0, 1fr); gap: 1rem; }
  .row p:not(.date) { display: none; }
  .row h3 { font-size: 1.2rem; }
  .footer-in { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
  .lightbox figure { padding: 3.5rem .5rem 1rem; }
  .lb-prev, .lb-next { top: auto !important; bottom: 1rem; transform: none !important; }
  .grid { column-gap: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
