/*
Theme Name:   IGKM
Description:  Motyw potomny Kadence dla portalu Izby Gospodarczej Komunikacji Miejskiej.
Author:       IT Magic Robert Piłka
Template:     kadence
Version:      0.6.0
Text Domain:  igkm-child
*/

/* ---------- Fonty (hostowane lokalnie) ---------- */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("assets/fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("assets/fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("assets/fonts/manrope-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("assets/fonts/manrope-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

/* ---------- Tokeny ---------- */
:root {
  --igkm-primary: #0038a8; --igkm-primary-dark: #002a7f; --igkm-accent: #f2a900;
  --igkm-ink: #0f1b2d; --igkm-ink-2: #1d2b44; --igkm-muted: #4a5872; --igkm-line: #e2e7ef; --igkm-field: #cfd8e6;
  --igkm-bg: #f4f6fa; --igkm-surface: #ffffff; --igkm-soft: #eef2f8; --igkm-tint: #e6edf9; --igkm-link: #0038a8;
  --igkm-night: #0f1b2d; --igkm-night-2: #0a1322;
  --igkm-font-head: "Manrope", "Inter", system-ui, sans-serif;
  --igkm-font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --igkm-shadow: 0 1px 2px rgba(15,27,45,.06), 0 8px 24px rgba(15,27,45,.08);
  /* Kadence */
  --global-palette1: #0038a8; --global-palette2: #002a7f; --global-palette3: #0f1b2d; --global-palette4: #1d2b44;
  --global-palette5: #4a5872; --global-palette6: #8a96a8; --global-palette7: #eef2f8; --global-palette8: #f4f6fa; --global-palette9: #ffffff;
  --global-body-font-family: var(--igkm-font-body);
  --global-heading-font-family: var(--igkm-font-head);
  --global-content-width: 1280px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --igkm-ink: #e8edf5; --igkm-ink-2: #d2dae6; --igkm-muted: #a9b5c8; --igkm-line: #263449; --igkm-field: #3a4a63;
    --igkm-bg: #0b1220; --igkm-surface: #121b2c; --igkm-soft: #1b2639; --igkm-tint: #182a4d; --igkm-link: #9dbcff;
    --igkm-night: #070d18; --igkm-night-2: #050a13;
    --igkm-shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
    --global-palette3: #e8edf5; --global-palette4: #d2dae6; --global-palette5: #a9b5c8; --global-palette6: #6f7c90;
    --global-palette7: #1b2639; --global-palette8: #0b1220; --global-palette9: #121b2c;
  }
  .igkm-logo-badge { background: #fff; }
}

/* ---------- Baza ---------- */
body { font-family: var(--igkm-font-body); color: var(--igkm-ink); background: var(--igkm-surface); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5, h6 { font-family: var(--igkm-font-head); color: var(--igkm-ink); }
a { color: var(--igkm-link); }
:focus-visible { outline: 3px solid var(--igkm-accent); outline-offset: 2px; }
.screen-reader-text:focus { clip: auto; clip-path: none; width: auto; height: auto; }
.igkm-skip { position: absolute; left: 12px; top: -60px; z-index: 10000; background: var(--igkm-accent); color: #0f1b2d; padding: 12px 16px; border-radius: 8px; font-weight: 700; }
.igkm-skip:focus { top: 12px; }
.igkm-container { max-width: 1280px; margin: 0 auto; padding: 0 32px; box-sizing: border-box; }

/* ---------- Górny pasek ---------- */
.igkm-topbar { background: var(--igkm-night); color: #c4cede; font-size: 13px; }
.igkm-topbar .igkm-container { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 20px; min-height: 40px; align-items: center; }
.igkm-topbar ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 20px; }
.igkm-topbar a { color: #e4e9f1; text-decoration: none; display: inline-block; padding: 10px 0; }
.igkm-topbar a:hover { color: #fff; text-decoration: underline; }

/* ---------- Nagłówek ---------- */
.igkm-header { position: sticky; top: 0; z-index: 100; background: var(--igkm-surface); border-bottom: 1px solid var(--igkm-line); transition: box-shadow .2s ease; }
.admin-bar .igkm-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .igkm-header { top: 0; } }
.igkm-header.is-stuck { box-shadow: var(--igkm-shadow); }
.igkm-header__inner { display: flex; align-items: center; gap: 16px 28px; min-height: 84px; transition: min-height .2s ease; }
.igkm-header.is-stuck .igkm-header__inner { min-height: 64px; }
.igkm-brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--igkm-ink); flex: none; }
.igkm-brand img { width: 58px; height: auto; display: block; transition: width .2s ease; }
.igkm-header.is-stuck .igkm-brand img { width: 46px; }
.igkm-brand__name { font-family: var(--igkm-font-head); font-weight: 700; font-size: 16px; line-height: 1.25; }
.igkm-nav { flex: 1 1 auto; }
.igkm-nav > ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px; }
.igkm-nav li { position: relative; }
.igkm-nav a { display: block; padding: 12px 14px; border-radius: 8px; font-size: 15px; font-weight: 600; color: var(--igkm-ink); text-decoration: none; }
.igkm-nav a:hover, .igkm-nav .current-menu-item > a, .igkm-nav .current-menu-ancestor > a { background: var(--igkm-tint); color: var(--igkm-link); }
.igkm-nav .menu-item-has-children > a::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-3px) rotate(45deg); }
.igkm-nav .sub-menu { list-style: none; margin: 0; padding: 8px; position: absolute; left: 0; top: 100%; min-width: 260px; background: var(--igkm-surface);
  border: 1px solid var(--igkm-line); border-radius: 12px; box-shadow: var(--igkm-shadow); opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .15s, transform .15s, visibility .15s; z-index: 10; }
.igkm-nav li:hover > .sub-menu, .igkm-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.igkm-nav .sub-menu a { font-weight: 500; }
.igkm-icon-btn { width: 48px; height: 48px; flex: none; border-radius: 12px; border: 1.5px solid var(--igkm-field); background: var(--igkm-surface); color: var(--igkm-ink);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.igkm-icon-btn:hover { border-color: var(--igkm-primary); }
.igkm-menu-toggle { display: none; }

/* Wyszukiwarka */
.igkm-search { border-top: 1px solid var(--igkm-line); background: var(--igkm-surface); }
.igkm-search[hidden] { display: none; }
.igkm-search form { display: flex; gap: 10px; padding: 16px 0; }
.igkm-search input[type="search"] { flex: 1; min-height: 52px; border-radius: 10px; border: 1.5px solid var(--igkm-field); padding: 0 16px; font: inherit; font-size: 17px; background: var(--igkm-surface); color: var(--igkm-ink); }
.igkm-search button { min-height: 52px; padding: 0 22px; border-radius: 10px; border: 0; background: var(--igkm-primary); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.igkm-search__results { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 4px; }
.igkm-search__results a { display: block; padding: 10px 12px; border-radius: 8px; text-decoration: none; color: var(--igkm-ink); }
.igkm-search__results a:hover, .igkm-search__results a:focus { background: var(--igkm-tint); }
.igkm-search__results small { display: block; color: var(--igkm-muted); }

/* Ticker */
.igkm-ticker { background: var(--igkm-primary); color: #fff; overflow: hidden; }
.igkm-ticker .igkm-container { display: flex; align-items: center; gap: 20px; min-height: 48px; }
.igkm-ticker__label { flex: none; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; background: var(--igkm-accent); color: #0f1b2d; padding: 6px 10px; border-radius: 6px; }
.igkm-ticker__viewport { overflow: hidden; flex: 1; min-width: 0; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.igkm-ticker__track { display: flex; gap: 48px; width: max-content; white-space: nowrap; animation: igkm-tick 60s linear infinite; font-size: 14px; font-weight: 500; }
.igkm-ticker__track:hover, .igkm-ticker__track:focus-within { animation-play-state: paused; }
.igkm-ticker a { color: #fff; text-decoration: none; }
.igkm-ticker a:hover { text-decoration: underline; }
@keyframes igkm-tick { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Pasek postępu czytania */
.igkm-progress { position: fixed; left: 0; top: 0; height: 4px; width: 100%; z-index: 1000; background: transparent; pointer-events: none; }
.igkm-progress span { display: block; height: 100%; width: 100%; background: var(--igkm-accent); transform-origin: 0 50%; transform: scaleX(0); }

/* ---------- Stopka ---------- */
.igkm-footer { background: var(--igkm-night-2); color: #c4cede; font-size: 15px; margin-top: 0; }
.igkm-footer a { color: #c4cede; }
.igkm-footer a:hover { color: #fff; }
.igkm-footer__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; padding-top: 48px; padding-bottom: 24px; }
.igkm-footer__title { color: #fff; font-weight: 700; margin: 0 0 12px; font-size: 15px; font-family: var(--igkm-font-body); }
.igkm-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.igkm-footer address { font-style: normal; line-height: 1.6; }
.igkm-logo-badge { width: 56px; height: auto; background: #fff; border-radius: 8px; padding: 6px; display: block; margin-bottom: 12px; }
.igkm-footer__bottom { border-top: 1px solid #1f2b3f; padding-top: 16px; padding-bottom: 28px; font-size: 13px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.igkm-social { display: flex; gap: 12px; }

/* ---------- Telefon ---------- */
@media (max-width: 1024px) {
  .igkm-menu-toggle { display: inline-flex; }
  .igkm-nav { position: fixed; inset: 0 0 0 auto; width: min(360px, 88vw); background: var(--igkm-surface); box-shadow: -12px 0 32px rgba(0,0,0,.2);
    padding: 88px 20px 24px; overflow-y: auto; clip-path: inset(0 0 0 100%); transition: clip-path .25s ease, visibility .25s; z-index: 200; visibility: hidden; }
  .igkm-nav.is-open { clip-path: inset(0); visibility: visible; }
  .igkm-nav > ul { flex-direction: column; }
  .igkm-nav .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 0 12px; min-width: 0; }
  .igkm-nav .menu-item-has-children > a::after { display: none; }
  .igkm-nav__close { position: absolute; top: 20px; right: 20px; }
  .igkm-header__inner { justify-content: space-between; }
  .igkm-header__actions { display: flex; gap: 8px; }
  body.igkm-menu-open { overflow: hidden; }
}
@media (min-width: 1025px) { .igkm-nav__close { display: none; } }
@media (max-width: 640px) {
  .igkm-container { padding: 0 16px; }
  .igkm-brand__name { font-size: 14px; }
  .igkm-brand img { width: 48px; }
}

/* ---------- Przejścia między stronami (View Transitions) ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .25s; }

@media (prefers-reduced-motion: reduce) {
  .igkm-ticker__track { animation: none; }
  .igkm-ticker__viewport { overflow-x: auto; mask-image: none; }
  .igkm-header, .igkm-header__inner, .igkm-brand img, .igkm-nav, .igkm-nav .sub-menu { transition: none; }
  @view-transition { navigation: none; }
}

/* Bez poziomego przewijania (menu mobilne poza ekranem, szerokie elementy) */
html, body { overflow-x: clip; }
.screen-reader-text { border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute !important; width: 1px; word-wrap: normal !important; }
.igkm-linkbtn { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
