/*
Theme Name: II LO Narutowicz
Theme URI: https://2lo-lodz.pl
Description: Motyw strony II Liceum Ogólnokształcącego im. Gabriela Narutowicza w Łodzi. Aktualności (wpisy z kategoriami), klasy, oś historii szkoły i ustawienia w Customizerze. Projektowany pod WCAG 2.1 AA.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: iilo
*/

:root {
  --ink: #15213B;
  --ink-2: #2C3850;
  --ink-deep: #0F1830;
  --muted: #4A5468;
  --muted-dark: #C9CFDB;
  --accent: #C8341F;
  --accent-soft: #F2A493;
  --paper: #FFFFFF;
  --sand: #F3F1EC;
  --line: #E4E1DA;
  --line-dark: #3A4766;
  --serif: 'Newsreader', Georgia, serif;
  --sans: 'Inter Tight', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --jp: 'Noto Serif JP', serif;
  --wrap: 1280px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.1; margin: 0; }

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
.skip-link { position: absolute; left: 16px; top: -100px; z-index: 100; background: var(--accent); color: #fff; padding: 12px 20px; border-radius: 8px; font-weight: 600; }
.skip-link:focus { top: 16px; color: #fff; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: 32px; padding-right: 32px; }
@media (max-width: 640px) { .wrap { padding-left: 20px; padding-right: 20px; } }

.kicker { font-family: var(--sans); font-size: 14px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.on-dark .kicker { color: var(--accent-soft); }
.h2 { font-size: clamp(34px, 4vw, 52px); }
.lead { font-size: 19px; line-height: 1.55; color: var(--muted); margin: 0; }

/* Przyciski */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 14px 26px; border-radius: 999px; font-weight: 600; font-size: 17px; text-decoration: none; border: 1.5px solid transparent; cursor: pointer; font-family: var(--sans); line-height: 1.2; }
.btn--ink { background: var(--ink); color: #fff; }
.btn--ink:hover { background: var(--ink-2); color: #fff; }
.btn--accent { background: var(--accent); color: #fff; }
.btn--accent:hover { background: #A82A18; color: #fff; }
.btn--line { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--line:hover { background: var(--ink); color: #fff; }
.btn--white { background: #fff; color: var(--ink); }
.btn--white:hover { background: var(--sand); color: var(--ink); }
.btn--line-white { border-color: #fff; color: #fff; }
.btn--line-white:hover { background: #fff; color: var(--ink); }
.btns { display: flex; flex-wrap: wrap; gap: 14px; }

/* Pasek górny */
.topbar { background: var(--ink); color: #fff; font-size: 14px; }
.topbar .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; align-items: center; padding-top: 10px; padding-bottom: 10px; }
.topbar ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 20px; }
.topbar a { color: #fff; text-decoration: none; }
.topbar a:hover { text-decoration: underline; color: #fff; }

/* Nagłówek */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); }
.site-header .wrap { display: flex; flex-wrap: wrap; gap: 16px 24px; justify-content: space-between; align-items: center; padding-top: 18px; padding-bottom: 18px; }
.brand { display: flex; gap: 14px; align-items: center; text-decoration: none; color: var(--ink); }
.brand__mark { width: 52px; height: 52px; flex: none; border-radius: 50%; border: 2px solid var(--ink); display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 24px; font-weight: 600; }
.brand .custom-logo { width: auto; max-height: 56px; }
.brand__text { display: flex; flex-direction: column; line-height: 1.2; }
.brand__name { font-family: var(--serif); font-size: 21px; font-weight: 600; }
.brand__sub { font-size: 14px; color: var(--muted); }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 28px; align-items: center; font-weight: 500; }
.main-nav a { text-decoration: none; display: inline-block; padding: 10px 0; }
.main-nav .current-menu-item > a, .main-nav .current_page_item > a, .main-nav a[aria-current="page"] { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }
.main-nav .menu-cta > a { background: var(--accent); color: #fff; padding: 12px 20px; border-radius: 999px; font-weight: 600; box-shadow: none; }
.main-nav .menu-cta > a:hover { background: #A82A18; color: #fff; }
.nav-toggle { display: none; min-height: 44px; padding: 10px 18px; border-radius: 999px; border: 1.5px solid var(--ink); background: transparent; font: 600 16px var(--sans); color: var(--ink); cursor: pointer; }
@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; align-items: center; gap: 8px; }
  .main-nav { width: 100%; display: none; }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 0; border-top: 1px solid var(--line); }
  .main-nav li { border-bottom: 1px solid var(--line); }
  .main-nav a { padding: 14px 0; width: 100%; }
  .main-nav .menu-cta { border: 0; padding-top: 14px; }
  .main-nav .menu-cta > a { text-align: center; }
  .no-js .main-nav { display: block; }
  .no-js .nav-toggle { display: none; }
}

/* Hero */
.hero { padding: 72px 0 56px; }
.hero .wrap { display: flex; flex-wrap: wrap; gap: 56px; align-items: stretch; }
.hero__text { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 28px; }
.hero__title { font-size: clamp(42px, 6vw, 80px); line-height: 1.02; letter-spacing: -.02em; }
.hero__lead { font-size: 20px; line-height: 1.55; color: var(--muted); max-width: 560px; margin: 0; }
.hero__tiles { flex: 1 1 480px; min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.tile-year { grid-column: span 2; background: var(--sand); border-radius: 20px; padding: 28px 32px; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; min-height: 200px; }
.tile-year__num { font-family: var(--serif); font-size: clamp(88px, 11vw, 150px); line-height: .85; font-weight: 500; letter-spacing: -.04em; }
.tile-year__txt { font-size: 15px; line-height: 1.45; color: var(--muted); max-width: 200px; text-align: right; }
.tile-class { text-decoration: none; color: #fff; border-radius: 20px; padding: 24px; display: flex; flex-direction: column; justify-content: space-between; gap: 20px; min-height: 240px; }
.tile-class:hover { color: #fff; filter: brightness(1.08); }
.tile-class__sym { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; opacity: .92; }
.tile-class__name { font-family: var(--serif); font-size: 26px; line-height: 1.1; }
.tile-class__glyph { font-family: var(--jp); font-size: 88px; line-height: 1; font-weight: 600; }
.bg-accent { background: var(--accent); }
.bg-ink { background: var(--ink); }
.shapes { display: grid; grid-template-columns: repeat(3, var(--s, 28px)); gap: 6px; align-content: start; }
.shapes span { width: var(--s, 28px); height: var(--s, 28px); display: block; }
.shapes .c { border-radius: 50%; }
.shapes .f-w { background: #fff; } .shapes .f-a { background: var(--accent); } .shapes .o { border: 2px solid #fff; }
.shapes .tr { border-radius: 0 var(--s, 28px) 0 0; } .shapes .tl { border-radius: var(--s, 28px) 0 0 0; } .shapes .br { border-radius: 0 0 var(--s, 28px) 0; } .shapes .bl { border-radius: 0 0 0 var(--s, 28px); }
@media (max-width: 480px) { .hero__tiles { grid-template-columns: minmax(0, 1fr); } .tile-year { grid-column: auto; } }

/* Liczby */
.stats { padding-bottom: 72px; }
.stats__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); margin: 0; padding: 0; list-style: none; }
.stats__item { padding: 28px 24px 28px 0; display: flex; flex-direction: column; gap: 6px; }
.stats__num { font-family: var(--serif); font-size: 48px; line-height: 1; }
.stats__label { font-size: 15px; color: var(--muted); }

/* Sekcje */
.section { padding: 88px 0; }
.section--sand { background: var(--sand); }
.section--ink { background: var(--ink); color: #fff; }
.section--ink a:not(.btn) { color: #fff; }
.section__head { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: flex-end; margin-bottom: 36px; }
.section__head > div { display: flex; flex-direction: column; gap: 10px; max-width: 760px; }

/* Filtr i karty aktualności */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chip { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 18px; border-radius: 999px; border: 1.5px solid var(--ink); background: transparent; color: var(--ink); font: 500 15px var(--sans); cursor: pointer; text-decoration: none; }
.chip:hover { background: var(--paper); color: var(--ink); }
.chip[aria-pressed="true"], .chip[aria-selected="true"], .chip.is-current { background: var(--ink); color: #fff; }
.no-js .js-only { display: none !important; }
.tile-class__sym, .tile-class__name { display: block; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.card { background: var(--paper); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; position: relative; }
.section:not(.section--sand) .card, .archive-list .card { border: 1px solid var(--line); }
.card[hidden] { display: none; }
.card__media { height: 200px; display: flex; align-items: flex-end; padding: 20px 22px; color: #fff; background: var(--ink); }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__media.has-img { padding: 0; }
.card__media--1 { background: var(--accent); } .card__media--2 { background: var(--ink); } .card__media--3 { background: #E9E4D8; color: var(--ink); } .card__media--4 { background: var(--ink-2); }
.card__mark { font-family: var(--serif); font-size: 48px; line-height: .95; font-weight: 600; }
.card__body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card__meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.card__cat { color: var(--accent); }
.card__date { color: var(--muted); }
.card__title { font-size: 24px; line-height: 1.2; }
.card__title a { text-decoration: none; }
.card__title a::after { content: ""; position: absolute; inset: 0; }
.card__title a:focus-visible { outline: none; }
.card:focus-within { outline: 3px solid var(--accent); outline-offset: 3px; }
.card__excerpt { font-size: 16px; line-height: 1.55; color: var(--muted); margin: 0; }
.card__more { margin-top: auto; padding-top: 8px; font-weight: 600; font-size: 15px; text-decoration: underline; }
.center { display: flex; justify-content: center; margin-top: 36px; }
.empty-note { padding: 24px; background: var(--paper); border-radius: 18px; color: var(--muted); }

/* Klasy */
.classes-featured { display: flex; flex-wrap: wrap; gap: 24px; }
.class-card { flex: 1 1 540px; min-width: 0; border-radius: 24px; overflow: hidden; display: flex; flex-direction: column; border: 1px solid var(--line); }
.class-card__top { color: #fff; padding: 36px; display: flex; justify-content: space-between; gap: 24px; min-height: 240px; }
.class-card__top > div { display: flex; flex-direction: column; justify-content: space-between; gap: 24px; }
.class-card__sym { font-size: 14px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.class-card__name { font-size: 40px; line-height: 1.05; }
.class-card__glyph { font-family: var(--jp); font-size: 150px; line-height: .85; font-weight: 600; }
.class-card__body { padding: 32px 36px 36px; display: flex; flex-direction: column; gap: 20px; flex: 1; }
.class-card__body p { margin: 0; font-size: 17px; line-height: 1.6; color: var(--ink-2); }
.class-card__body .btn { margin-top: auto; align-self: flex-start; }
.tags { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { padding: 8px 14px; background: var(--sand); border-radius: 999px; font-size: 14px; font-weight: 500; }
.class-ext { font-size: 15px; color: var(--muted); }
.class-ext strong { color: var(--ink); }
.classes-small { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; margin-top: 24px; }
.class-row { border: 1px solid var(--line); border-radius: 20px; padding: 28px 32px; display: flex; justify-content: space-between; align-items: center; gap: 20px; position: relative; }
.class-row h3 { font-size: 26px; line-height: 1.15; }
.class-row h3 a { text-decoration: none; }
.class-row h3 a::after { content: ""; position: absolute; inset: 0; }
.class-row:focus-within { outline: 3px solid var(--accent); outline-offset: 3px; }
.class-row__sym { font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.arrow-btn { flex: none; width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid var(--ink); display: flex; align-items: center; justify-content: center; }
@media (max-width: 560px) { .class-card__top { padding: 28px; } .class-card__glyph { font-size: 96px; } .class-card__name { font-size: 32px; } .class-card__body { padding: 24px 28px 28px; } }

/* Oś historii — zajawka */
.timeline-strip { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); border-top: 1px solid var(--line-dark); }
.timeline-strip li { padding: 24px 20px 0 0; display: flex; flex-direction: column; gap: 10px; }
.timeline-strip .dot { width: 12px; height: 12px; border-radius: 50%; background: #fff; margin-top: -30px; }
.timeline-strip li:first-child .dot, .timeline-strip li:last-child .dot { background: var(--accent); }
.timeline-strip .yr { font-family: var(--serif); font-size: 36px; }
.timeline-strip .txt { font-size: 15px; line-height: 1.5; color: var(--muted-dark); }
.section--ink .lead { color: var(--muted-dark); }

/* Patron */
.patron .wrap { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.patron__img { flex: 1 1 340px; min-width: 0; max-width: 440px; aspect-ratio: 4 / 5; background: var(--sand); border-radius: 24px; overflow: hidden; display: flex; align-items: center; justify-content: center; color: var(--muted); text-align: center; padding: 0; }
.patron__img img { width: 100%; height: 100%; object-fit: cover; }
.patron__text { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.patron__text p { margin: 0; font-size: 18px; line-height: 1.6; color: var(--ink-2); }

/* Rekrutacja */
.cta-band { background: var(--accent); color: #fff; border-radius: 28px; padding: 56px; display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; align-items: center; }
.cta-band .kicker { color: #fff; }
.cta-band h2 { font-size: clamp(30px, 3.6vw, 46px); line-height: 1.08; }
.cta-band p { margin: 0; font-size: 18px; }
.cta-band > div:first-child { display: flex; flex-direction: column; gap: 12px; max-width: 640px; }
@media (max-width: 640px) { .cta-band { padding: 36px 28px; } }

/* Stopka */
.site-footer { background: var(--ink-deep); color: #fff; }
.site-footer .wrap { padding-top: 72px; padding-bottom: 40px; }
.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 40px; }
.footer-cols h2 { font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-soft); margin-bottom: 12px; }
.footer-cols ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-cols a { color: #fff; }
.footer-cols a:hover { color: var(--accent-soft); }
.footer-name { font-family: var(--serif); font-size: 24px; font-weight: 600; display: block; margin-bottom: 12px; }
.footer-addr { color: var(--muted-dark); font-style: normal; line-height: 1.6; }
.footer-bottom { border-top: 1px solid #2A3654; margin-top: 48px; padding-top: 24px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: 14px; color: var(--muted-dark); }

/* Podstrony */
.page-hero { padding: 64px 0 48px; }
.page-hero .wrap { display: flex; flex-direction: column; gap: 20px; }
.breadcrumbs { font-size: 14px; color: var(--muted); }
.breadcrumbs a { color: var(--muted); }
.page-title { font-size: clamp(40px, 5.5vw, 72px); line-height: 1.04; letter-spacing: -.02em; }
.entry { max-width: 760px; }
.entry > * + * { margin-top: 1.1em; }
.entry h2 { font-size: 34px; margin-top: 1.6em; }
.entry h3 { font-size: 26px; margin-top: 1.4em; }
.entry img { border-radius: 16px; }
.entry blockquote { margin-left: 0; padding-left: 24px; border-left: 3px solid var(--accent); font-family: var(--serif); font-size: 24px; }
.entry a { color: var(--accent); }
.entry-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.entry-meta a { color: var(--accent); text-decoration: none; }
.single-thumb { margin: 0 0 40px; border-radius: 24px; overflow: hidden; }
.single-thumb img { width: 100%; max-height: 560px; object-fit: cover; }
.post-nav { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--line); }
.pagination { margin-top: 48px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.pagination .page-numbers { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 14px; border: 1.5px solid var(--ink); border-radius: 999px; text-decoration: none; }
.pagination .current { background: var(--ink); color: #fff; }
.archive-filters { margin-bottom: 32px; }

/* Historia */
.history-hero h1 { font-size: clamp(64px, 10vw, 152px); line-height: .9; letter-spacing: -.03em; }
.history-hero h1 span { color: var(--accent); }
.history-hero .row { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-end; justify-content: space-between; }
.history-hero p { flex: 0 1 440px; font-size: 20px; line-height: 1.55; color: var(--muted); margin: 0; }
.addresses { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin: 24px 0 0; padding: 0; list-style: none; }
.addresses li { background: var(--sand); border-radius: 20px; padding: 28px; display: flex; flex-direction: column; gap: 10px; }
.addresses li:last-child { background: var(--ink); color: #fff; }
.addresses li:last-child .a-txt, .addresses li:last-child .a-when { color: var(--muted-dark); }
.a-when { font-size: 14px; color: var(--muted); }
.a-street { font-family: var(--serif); font-size: 30px; line-height: 1.1; }
.a-txt { font-size: 15px; line-height: 1.5; color: var(--muted); }
.eras { display: flex; flex-wrap: wrap; gap: 48px; }
.eras__nav { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.eras__tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.eras__tabs .chip { text-align: left; }
.eras__panels { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.era { background: var(--paper); border-radius: 24px; padding: 40px 44px; }
.era[hidden] { display: none; }
.era__range { font-size: 14px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.era__title { font-size: 36px; margin: 8px 0 20px; }
.era__desc { color: var(--ink-2); margin: 0 0 16px; }
.era ol { margin: 0; padding: 0; list-style: none; }
.era li { display: flex; gap: 24px; padding: 18px 0; border-top: 1px solid var(--line); }
.era .when { flex: none; width: 120px; font-family: var(--serif); font-size: 24px; line-height: 1.2; color: var(--accent); }
.era .what { font-size: 17px; line-height: 1.55; color: var(--ink-2); }
.era .what p { margin: 0; }
.era .what img { margin-top: 12px; border-radius: 12px; max-width: 320px; }
@media (max-width: 560px) { .era { padding: 28px 24px; } .era li { flex-direction: column; gap: 4px; } .era .when { width: auto; } }
.quote-row .wrap { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.quote-row blockquote { margin: 0; flex: 1 1 600px; min-width: 0; font-family: var(--serif); font-size: clamp(28px, 3.4vw, 46px); line-height: 1.2; }
.quote-row aside { flex: 1 1 320px; min-width: 0; padding-top: 20px; border-top: 2px solid var(--accent); color: var(--muted); }
.traditions { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.tradition { border: 1px solid var(--line-dark); border-radius: 20px; padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.tradition .big { font-family: var(--serif); font-size: 40px; color: var(--accent-soft); }
.tradition h3 { font-family: var(--sans); font-size: 20px; font-weight: 600; }
.tradition p { margin: 0; font-size: 16px; color: var(--muted-dark); }
.box-cta { border: 1.5px solid var(--ink); border-radius: 28px; padding: 48px; display: flex; flex-wrap: wrap; gap: 28px; justify-content: space-between; align-items: center; }
.box-cta h2 { font-size: clamp(28px, 3.2vw, 42px); }
.box-cta p { margin: 8px 0 0; color: var(--muted); font-size: 18px; }

/* WordPress */
.alignwide { max-width: 1100px; }
.alignfull { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); }
.wp-caption-text, figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; }
.search-form { display: flex; gap: 8px; flex-wrap: wrap; }
.search-form input[type="search"] { min-height: 48px; padding: 10px 16px; border: 1.5px solid var(--ink); border-radius: 999px; font: 16px var(--sans); min-width: 240px; }
