/* Page structure from the approved mockup B «Tribün»: container, two-tier sticky
 * header (navy bar + sport category band), drawer, sections, footer. */

.container, .wrap {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ── header: navy bar ─────────────────────────────────────────────────── */
.site-head { position: sticky; top: 0; z-index: var(--z-header); transition: box-shadow .3s var(--ease); }
.site-head.is-scrolled { box-shadow: 0 10px 28px rgba(16, 38, 62, .18); }
.bar { position: relative; background: var(--color-navy); color: #fff; height: var(--bar-h); }
.bar > .wrap { height: 100%; display: flex; align-items: center; gap: 20px; }

.logo { display: flex; flex-direction: column; text-decoration: none; color: #fff; line-height: 1; flex: 0 1 auto; min-width: 0; }   /* may shrink on tight bars (390px) */
.logo picture { display: block; line-height: 0; }
.logo-img { display: block; width: 218px; height: auto; max-width: 100%; }   /* width-driven: shrinks with the bar, keeps 783:108 */
.foot-brand .logo-img { width: 261px; }
.logo small { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--on-navy-muted); margin-top: 6px; font-weight: 600; }

.menu { display: flex; gap: 2px; margin: 0 auto 0 12px; padding: 0; }
.menu a {
  position: relative; display: flex; align-items: center; height: 44px; padding: 0 12px; border-radius: 10px;
  color: var(--on-navy); text-decoration: none; font-weight: 600; font-size: 15px;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.menu a:hover { background: var(--color-navy-2); color: #fff; }
.menu a[aria-current="page"] { color: #fff; }
.menu a[aria-current="page"]::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 3px; border-radius: 3px;
  background: var(--color-brand); transform-origin: left; animation: underline .35s var(--ease);
}
@keyframes underline { from { transform: scaleX(0); } }

.bar-tools { display: flex; align-items: center; gap: 10px; flex: none; }
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  border: 1px solid color-mix(in srgb, #fff 18%, transparent); background: transparent; color: #fff; cursor: pointer;
  transition: background-color .2s var(--ease), transform .2s var(--ease);
}
.icon-btn:hover { background: var(--color-navy-2); }
.icon-btn:active { transform: scale(.96); }
.age {
  display: inline-grid; place-items: center; height: 32px; min-width: 40px; padding: 0 8px;
  border-radius: 10px 10px 6px 6px; background: var(--color-amber); color: var(--color-navy); font-weight: 800; font-size: 14px;
  text-decoration: none;
}
.burger { display: none; }
/* account entry: «Giriş» / «Hesabım» — label collapses to the icon on phones */
.head-acc {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; border-radius: 12px;
  border: 1px solid color-mix(in srgb, #fff 18%, transparent); color: #fff; font-weight: 700; font-size: 15px; text-decoration: none;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.head-acc .icon { width: 18px; height: 18px; }
.head-acc:hover { background: var(--color-navy-2); border-color: color-mix(in srgb, #fff 32%, transparent); }
.head-acc:active { transform: scale(.97); }
.head-acc[aria-current="page"] { background: var(--color-brand); border-color: var(--color-brand); }

/* search panel under the bar (GET → /sportsbook?q=, works without JS) */
/* display:none while closed: a hidden field must not be focusable; allow-discrete keeps the fade */
.searchbox {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 2; background: var(--color-navy-2); padding: 12px 0;  /* above the catband chips (positioned, later in DOM) */
  display: none; transform: translateY(-8px); opacity: 0;
  transition: opacity .2s var(--ease), transform .2s var(--ease), display .2s allow-discrete;
}
.searchbox.is-open { display: block; opacity: 1; transform: none; }
@starting-style { .searchbox.is-open { opacity: 0; transform: translateY(-8px); } }
.searchbox form { display: flex; gap: 8px; max-width: 640px; }
.field-search { position: relative; flex: 1; min-width: 0; }
.field-search .icon { position: absolute; left: 14px; top: 12px; color: var(--color-muted); pointer-events: none; }
.field-search input {
  width: 100%; height: 44px; border: 1px solid var(--color-line); border-radius: 12px; padding: 0 14px 0 44px;
  font: 500 16px var(--font); color: var(--color-text); background: #fff;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field-search input:focus { outline: none; border-color: var(--color-brand); box-shadow: var(--focus-ring); }

/* ── header: sport category band (signature: seat-plate counters) ───── */
.catband { background: var(--color-surface); border-bottom: 1px solid var(--color-line); height: var(--band-h); }
.catband > .wrap { height: 100%; display: flex; align-items: center; gap: 12px; }
.catband-label { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--color-muted); flex: none; }
.chips-wrap { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; }
.chips {
  display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none;
  scroll-padding-inline: 44px;   /* snapped chips stop clear of the 36px arrows */
  min-width: 0; flex: 1; padding: 4px 2px; margin: 0;
  mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent);
}
.chips::-webkit-scrollbar { display: none; }
.chips li { scroll-snap-align: start; flex: none; }
/* with JS the fade follows the scroll position, and arrows appear on the side that has more chips */
html.js .chips { mask-image: none; }
html.js .chips-wrap.can-next .chips { mask-image: linear-gradient(90deg, #000 calc(100% - 72px), transparent); }
html.js .chips-wrap.can-prev .chips { mask-image: linear-gradient(90deg, transparent, #000 72px); }
html.js .chips-wrap.can-prev.can-next .chips { mask-image: linear-gradient(90deg, transparent, #000 72px, #000 calc(100% - 72px), transparent); }
.chips-nav {
  position: absolute; top: 50%; z-index: 1; width: 36px; height: 36px; margin-top: -18px;
  display: grid; place-items: center; border-radius: 50%; cursor: pointer;
  background: var(--color-surface); color: var(--color-navy); border: 1px solid var(--color-line);
  box-shadow: 0 4px 12px rgba(16, 38, 62, .14);
  transition: background-color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.chips-nav:hover { border-color: var(--color-brand); color: var(--color-brand); }
.chips-nav:active { transform: scale(.94); }
.chips-nav--prev { left: 0; }
.chips-nav--prev .icon { transform: scaleX(-1); }
.chips-nav--next { right: 0; }

/* ── drawer (kit overlay "menu", styled as the mockup's navy sheet) ── */
.overlay.overlay--menu { place-items: stretch end; padding: 0; background: rgba(16, 38, 62, .5); }
.overlay--menu .drawer {
  width: min(340px, 86vw); height: 100%; max-height: none; border-radius: 0; overflow: auto;
  background: var(--color-navy); color: #fff; padding: 16px;
  display: flex; flex-direction: column; gap: 16px;
  transform: translateX(100%); transition: transform .3s var(--ease);
}
.overlay.overlay--menu.is-open .drawer { transform: none; }
.drawer-top { display: flex; align-items: center; justify-content: space-between; }
.drawer .field-search input { height: 48px; }
.drawer-nav ul { display: grid; gap: 4px; }
.drawer-nav a {
  display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0 12px; border-radius: 12px;
  color: #fff; text-decoration: none; font-weight: 600; border-bottom: 1px solid color-mix(in srgb, #fff 10%, transparent);
  transition: background-color .2s var(--ease);
}
.drawer-nav a:hover, .drawer-nav a[aria-current="page"] { background: var(--color-navy-2); }
.drawer-sub { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--on-navy-muted); margin: 8px 12px 0; }
.drawer-sports { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 4px; }
.drawer-sports a {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 6px 0 12px; border-radius: var(--pill);
  border: 1px solid color-mix(in srgb, #fff 18%, transparent); color: #fff; text-decoration: none; font-size: 14px; font-weight: 600;
}
.drawer-sports .chip-count { background: var(--color-brand); color: #fff; box-shadow: inset 0 -2px 0 rgba(0,0,0,.18); }
.drawer-foot {
  margin-top: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  font-size: 13px; line-height: 20px; color: var(--on-navy);
}

/* ── sections ─────────────────────────────────────────────────────────── */
.sec { padding: var(--sec) 0; position: relative; }
/* anchored sections (#fikstur, #oranlar, #form…) land below the sticky two-tier header */
.sec[id] { scroll-margin-top: calc(var(--head-h) - var(--sec) + 16px); }
.sec--white { background: var(--color-surface); border-top: 1px solid var(--color-line); border-bottom: 1px solid var(--color-line); }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; flex-wrap: wrap; }
.sec-head .lead, .lead { color: var(--color-muted); max-width: 62ch; margin-top: 8px; }
.lead--lg { font-size: var(--fs-lead); line-height: var(--lh-lead); }

/* ── footer ───────────────────────────────────────────────────────────── */
.foot { background: var(--color-navy); color: var(--on-navy); padding: 56px 0 32px; font-size: 15px; line-height: 24px; }
.foot-top { display: grid; grid-template-columns: 1.3fr 3fr; gap: 40px; }
.foot-brand p { margin-top: 14px; max-width: 36ch; }
.foot-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.foot h2 { color: #fff; font-size: 15px; line-height: 22px; margin-bottom: 12px; letter-spacing: 0; }
.foot ul { display: grid; gap: 2px; }
.foot ul a { position: relative; color: var(--on-navy); text-decoration: none; display: inline-flex; min-height: 36px; align-items: center; transition: color .2s var(--ease); }
.foot ul a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.foot-cookie {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; margin-top: 16px; padding: 0 14px; border-radius: 10px;
  border: 1px solid color-mix(in srgb, #fff 22%, transparent); background: transparent; color: #fff; font-weight: 600; font-size: 14px; cursor: pointer;
  transition: background-color .2s var(--ease);
}
.foot-cookie:hover { background: var(--color-navy-2); }
.foot-band {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px;
  margin-top: 40px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .14); font-size: 13px; line-height: 20px;
}
.foot-band > div { display: flex; gap: 10px; align-items: flex-start; }
.foot-band a { color: #fff; }
.foot-legal-data { margin-top: 16px; font-size: 13px; line-height: 20px; color: var(--on-navy-muted); }
.foot-copy { margin-top: 24px; font-size: 13px; color: var(--on-navy-muted); }

/* ── back to top ──────────────────────────────────────────────────────── */
.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: var(--z-header);
  display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 14px 14px 7px 7px;
  background: var(--color-navy-2); color: #fff; cursor: pointer; box-shadow: var(--shadow-lg);
  transition: transform .2s var(--ease), background-color .2s var(--ease);
}
.to-top:hover { background: var(--color-brand); transform: translateY(-2px); }

/* ── responsive ───────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .menu { display: none; }
  .burger { display: inline-grid; }
  .bar > .wrap { justify-content: space-between; }
  .bar-tools { margin-left: auto; }
  .foot-top { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 760px) {
  .logo-img { width: 189px; }
  .logo small { display: none; }
  .bar .demo { display: none; }
  .head-acc { width: 44px; padding: 0; justify-content: center; }
  .head-acc span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .catband-label { display: none; }
  .foot-cols { grid-template-columns: 1fr 1fr; gap: 24px 16px; }
  .sec-head { margin-bottom: 24px; }
}
/* four bar buttons squeeze the logo below 480px — the drawer carries Giriş / Kayıt Ol / Hesabım there */
@media (max-width: 480px) {
  .bar .head-acc { display: none; }
}
@media (max-width: 389px) {
  .bar > .wrap { gap: 8px; }
  .bar-tools { gap: 6px; }
  .bar .icon-btn { width: 40px; height: 40px; }
  .logo-img { width: 152px; }
  .bar .age { min-width: 36px; padding: 0 6px; }
}
