/* Illyrian Elite — public site
   Structure modelled on the reference curve site: banner header, full-width menu,
   three columns (left info boxes · news feed · right match boxes). */

/* Always dark: pitch-black header band around the banner, dark-grey page below */
:root {
  color-scheme: dark;
  --primary: #1c1c1c;        /* match cards */
  --deep: #000000;           /* header band beside the banner — pitch black */
  --accent: #d90b16;         /* red lines & highlights */
  --accent-soft: #ff6b73;    /* link hover */
  --page: #0a0a0a;           /* page background */
  --card: #161616;           /* news cards & side boxes */
  --text: #f3f3f3;
  --text-on-dark: #f3f3f3;
  --muted: #a0a0a0;
  --nav-bg: #000000;
  --nav-text: #f3f3f3;
  --shadow: none;
  --head: 'Bitter', Georgia, serif;
  --body: 'Roboto', Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: var(--body);
  font-size: .95rem;
  line-height: 1.5;
  -webkit-font-smoothing: subpixel-antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1rem; }
h1, h2, h3 { font-family: var(--head); font-weight: 700; letter-spacing: .025em; margin: 0; }
h1, h2 { font-size: 1.5rem; line-height: 1.15; text-transform: uppercase; overflow-wrap: anywhere; }
h3 { font-size: 1rem; }

/* ---------- header: banner + menu ---------- */
.site-header { position: relative; background: var(--deep); color: #fff; text-align: center; border-top: 3px solid var(--accent); }
.lang-switch { position: absolute; top: 10px; right: 16px; z-index: 5; display: flex; border: 1px solid #333; }
.lang-switch button {
  background: transparent; color: #bdbdbd; border: 0; padding: 4px 10px; cursor: pointer;
  font-family: var(--head); font-weight: 700; font-size: .8rem; letter-spacing: .08em;
}
.lang-switch button:hover { color: #fff; }
.lang-switch button.active { background: var(--accent); color: #fff; }
.brandbar { display: flex; align-items: center; justify-content: center; min-height: 7.5rem; padding: 12px 16px; }
.brandbar a { display: inline-flex; align-items: center; justify-content: center; width: 100%; max-width: 1024px; }
.banner-img { width: 100%; max-height: 320px; object-fit: contain; }
.wordmark { display: inline-flex; align-items: center; gap: 16px; }
.wordmark img { height: 84px; width: auto; }
.wordmark span { font-family: var(--head); font-weight: 700; text-transform: uppercase; font-size: clamp(1.6rem, 6vw, 3rem); letter-spacing: .06em; line-height: 1; }

.menu-toggle { display: none; width: 100%; height: 2.25rem; border: 0; border-top: 1px solid #222; background: #000; cursor: pointer; }
.burger, .burger::before, .burger::after { display: block; width: 30px; height: 3px; background: #f3f3f3; margin: 0 auto; transition: transform .3s; content: ''; }
.burger { position: relative; }
.burger::before { position: absolute; top: -8px; left: 0; }
.burger::after { position: absolute; top: 8px; left: 0; }
.menu-toggle[aria-expanded="true"] .burger { background: transparent; }
.menu-toggle[aria-expanded="true"] .burger::before { transform: translateY(8px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .burger::after { transform: translateY(-8px) rotate(-45deg); }

.nav-wrap { max-width: 1024px; margin: 0 auto; }
.nav ul {
  list-style: none; margin: 0; padding: 0; display: flex;
  background: var(--nav-bg); border-top: 3px solid var(--accent);
  font-family: var(--head); font-weight: 700; text-transform: uppercase; font-size: 1.125rem;
}
/* grey frame around the menu (sides + bottom) and between items, same tone as the page background */
.nav ul { border-left: 3px solid var(--page); border-right: 3px solid var(--page); border-bottom: 3px solid var(--page); }
.nav li { flex: 1; }
.nav li + li { border-left: 3px solid var(--page); }
.nav li a { display: block; padding: .5rem; color: var(--nav-text); letter-spacing: .05em; border-top: 3px solid var(--primary); }
.nav li a:hover, .nav li.is-selected a { background: var(--accent); color: #fff; border-top-color: var(--accent); }
.mobile-side { display: none; }

/* ---------- three-column shell ---------- */
.shell { max-width: 1024px; margin: 0 auto; display: flex; align-items: flex-start; padding-top: 1rem; min-height: 100vh; background: var(--deep); /* pitch black behind the content */ }
.side { width: 20%; flex: none; }
.side-left { order: 1; }
#app { order: 2; flex: 1 1 auto; min-width: 0; }
.side-right { order: 3; }

/* ---------- cards ("articles") ---------- */
.card { background: var(--card); color: var(--text); box-shadow: var(--shadow); margin-bottom: 1rem; padding: 1.5rem 1rem .25rem; border: 1px solid #1f1f1f; }
.card.dark { background: var(--primary); color: var(--text-on-dark); border-left: 3px solid var(--accent); }
.card h2 a:hover, .card h3 a:hover { color: var(--accent); }
.card.dark h2 a:hover, .card.dark h3 a:hover, .card.dark a:hover { color: var(--accent-soft); }
.card-title { margin-bottom: 1rem; }
.card-title h3 { margin-top: .25rem; font-size: 1rem; }
.card h2 { margin-bottom: 1rem; }
.card-title h2 { margin-bottom: 0; }
.card .text a { color: var(--accent); text-decoration: underline; }
.card.dark .text a { color: var(--accent-soft); }
.more-link { display: inline-block; margin-bottom: 1rem; font-weight: 700; color: var(--accent); }
.card.dark .more-link { color: var(--accent-soft); }

/* side boxes */
.side .card { margin-left: 1rem; margin-right: 1rem; padding: 1rem .75rem; font-size: .85rem; letter-spacing: 0; }
.side .card h3 { text-transform: uppercase; margin-bottom: .5rem; }
.side .card p:last-child { margin-bottom: 0; }
.side .card a.u { color: var(--accent); text-decoration: underline; overflow-wrap: anywhere; }
.next-match { text-align: center; }
.next-match .date { font-size: 1.5rem; margin-bottom: .75rem; }
.next-match .teams { display: flex; gap: 6px; align-items: stretch; }
.next-match .team { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: .85rem; }
.crest {
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: var(--primary); color: #fff; font-family: var(--head); font-weight: 700; font-size: 1.1rem; border: 2px solid var(--accent);
}
.next-match .when { margin-top: .75rem; color: var(--muted); }
.last-match h2 { font-size: 1.1rem; margin: .25rem 0 .75rem; }
.last-match img { width: 100%; aspect-ratio: 3/2; object-fit: cover; }
.last-match .score { font-family: var(--head); font-size: 1.4rem; margin-bottom: .5rem; }

/* ---------- photo grids ---------- */
.thumbs { display: flex; flex-wrap: wrap; margin: 0 -.25rem .5rem; }
.thumbs figure { margin: 0; padding: 0 .25rem; margin-bottom: .5rem; width: 25%; }
.thumbs figure.full, .thumbs.cols-1 figure { width: 100%; }
.thumbs.cols-2 figure { width: 50%; }
.thumbs.cols-3 figure { width: 33.333%; }
.card h2 .yr { color: var(--accent); }
.thumbs a { display: block; position: relative; overflow: hidden; background: #000; }
.thumbs img { width: 100%; aspect-ratio: 3/2; object-fit: cover; transition: opacity .2s; }
.thumbs figure.full img { aspect-ratio: auto; max-height: 640px; }
.thumbs a:hover img { opacity: .85; }
.thumbs .plus { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.6); color: #fff; font-family: var(--head); font-size: 1.3rem; }
.thumbs figcaption { font-size: .8rem; color: var(--muted); padding-top: 4px; }
.card.dark .thumbs figcaption { color: #bdbdbd; }

/* ---------- lists (matches, tabs) ---------- */
.link-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 1rem; }
.link-list a { border: 2px solid var(--accent); padding: .25rem .75rem; font-family: var(--head); font-weight: 700; text-transform: uppercase; font-size: .85rem; }
.link-list a:hover, .link-list a.is-selected { background: var(--accent); border-color: var(--accent); color: #fff; }
.rows { margin-bottom: 1rem; }
.rows a { display: flex; gap: 12px; padding: .55rem 0; border-top: 1px solid rgba(128,128,128,.25); align-items: baseline; }
.rows a:first-child { border-top: 0; }
.rows a:hover .t { color: var(--accent); }
.card.dark .rows a:hover .t { color: var(--accent-soft); }
.rows .d { width: 6.5rem; flex: none; color: var(--muted); font-size: .85rem; }
.card.dark .rows .d { color: #bdbdbd; }
.rows .t { flex: 1; font-family: var(--head); font-weight: 700; text-transform: uppercase; }
.rows .s { font-family: var(--head); font-weight: 700; }
.rows .c { font-size: .75rem; color: var(--muted); text-transform: uppercase; }
.empty { color: var(--muted); padding-bottom: 1.25rem; }
.loading { text-align: center; padding: 1rem; color: var(--muted); font-family: var(--head); text-transform: uppercase; letter-spacing: .1em; }
.load-more { display: block; width: 100%; padding: .75rem; border: 1px solid #2a2a2a; background: var(--primary); color: #fff; font-family: var(--head); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; cursor: pointer; margin-bottom: 1rem; }
.load-more:hover { background: var(--accent); }
.socials a { display: block; color: var(--accent); text-decoration: underline; }

/* ---------- lightbox ---------- */
.lb { position: fixed; inset: 0; background: #000; z-index: 100; display: none; align-items: center; justify-content: center; }
.lb.open { display: flex; }
.lb figure { margin: 0; display: flex; flex-direction: column; align-items: center; }
.lb img { max-width: 96vw; max-height: 86vh; object-fit: contain; }
.lb figcaption { margin-top: 10px; color: #ddd; text-align: center; font-size: .9rem; padding: 0 16px; }
.lb button { position: absolute; background: rgba(255,255,255,.1); border: 0; color: #fff; font-size: 1.8rem; width: 48px; height: 48px; border-radius: 50%; cursor: pointer; }
.lb button:hover { background: var(--accent); }
.lb .x { top: 14px; right: 14px; }
.lb .prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb .next { right: 12px; top: 50%; transform: translateY(-50%); }
.lb .count { position: absolute; top: 24px; left: 20px; color: #aaa; font-family: var(--head); }

/* ---------- small screens: one column, side boxes move into the menu ---------- */
@media (max-width: 959px) {
  .side { display: none; }
  .shell { max-width: 640px; padding: 1rem 16px 0; }
  .brandbar { min-height: 4.5rem; }
  .wordmark img { height: 56px; }
  .menu-toggle { display: block; }
  .nav { display: none; background: #000; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; border-top: 0; background: #000; }
  .nav li + li { border-left: 0; }
  .nav li a { color: #f3f3f3; border-top: 1px solid rgba(255,255,255,.08); }
  .nav li.is-selected a, .nav li a:hover { background: var(--accent); }
  .mobile-side { display: block; max-width: 20rem; margin: 0 auto; padding: 1.5rem 1rem 2rem; text-align: left; color: #f3f3f3; }
  .mobile-side .card { background: transparent; color: #f3f3f3; box-shadow: none; padding: 0 0 1rem; font-size: .85rem; }
  .mobile-side .card h3 { text-transform: uppercase; margin-bottom: .5rem; }
  .mobile-side .next-match .when { color: #bdbdbd; }
}
@media (max-width: 699px) {
  .lang-switch { position: static; justify-content: flex-end; border: 0; padding: 8px 12px 0; }
  .lang-switch button { border: 1px solid #333; }
  .brandbar { min-height: 0; padding-top: 4px; }
  .shell { padding-left: 0; padding-right: 0; }
  .thumbs figure, .thumbs.cols-3 figure { width: 50%; }
}
@media (min-width: 700px) and (max-width: 959px) {
  .thumbs figure { width: 33.333%; }
}
