/* ============================================================================
   Szkoła Muzyczna I stopnia we Włodawie
   Arkusz główny serwisu. Sekcja 1 to styl przeniesiony 1:1 z zatwierdzonego
   projektu graficznego (eksport HTML). Sekcje 2+ to rozszerzenia potrzebne
   podstronom, którym projekt nie towarzyszył, oraz realnym trybom dostępności.
   Fonty (Lora, Work Sans) ładowane są przez <link> w <head>.
   ========================================================================== */

/* =========================================================== 1. PROJEKT ==== */

html { box-sizing: border-box; }
body { margin: 0; background: oklch(97% 0.012 85); }

.page {
  --navy: oklch(21% 0.045 262);
  --navy-deep: oklch(15% 0.04 262);
  --navy-mid: oklch(27% 0.05 262);
  --burgundy: oklch(28% 0.09 18);
  --orange: #f98d00;
  --orange-deep: #a35200;
  --orange-dark-bg: #6b3900;
  --orange-pale: #fdece0;
  --ivory: oklch(97% 0.012 85);
  --ivory-2: oklch(93.5% 0.015 82);
  --ink: oklch(22% 0.02 262);
  --ink-soft: oklch(42% 0.02 262);
  --on-dark: oklch(96% 0.01 85);
  --on-dark-soft: oklch(79% 0.02 55);   /* podniesione z 74% – 4.10:1 nie spełniało WCAG 1.4.3 */
  --hair: oklch(85% 0.02 82);
  --field-border: oklch(60% 0.02 82); /* obramowania pól i przycisków: 3.6:1 wobec tła */
  font-family: 'Work Sans', system-ui, sans-serif;
  color: var(--ink);
  background: var(--ivory);
  position: relative;
  overflow: hidden;
  margin: 0 auto;
}
.page * { box-sizing: border-box; }
.serif { font-family: 'Lora', Georgia, serif; }
.page a { color: inherit; text-decoration: none; }
.page .navlink { color: var(--ink-soft); font-size: 15px; font-weight: 500; padding: 8px 4px; border-bottom: 2px solid transparent; }
.navlink:hover { color: var(--navy); border-bottom-color: var(--orange-deep); }
.page .footlink { color: var(--on-dark-soft); font-size: 14px; }
.footlink:hover { color: var(--on-dark); }
.page .btn-orange { background: var(--orange); color: var(--navy); font-weight: 600; }
.btn-orange:hover { background: var(--orange-deep); color: var(--on-dark); }
.page .btn-ghost { border: 1.5px solid var(--navy); color: var(--navy); }
.btn-ghost:hover { border-color: var(--orange-deep); color: var(--orange-deep); }
.skip-link { position: absolute; left: -999px; top: auto; }
.skip-link:focus { left: 24px; top: 24px; z-index: 999; background: var(--orange); color: var(--navy); padding: 10px 16px; border-radius: 6px; font-weight: 600; }
.page a:focus-visible, .page button:focus-visible { outline: 2.5px solid var(--navy); outline-offset: 2px; }
.page .chrome-dark a:focus-visible, .page .chrome-dark button:focus-visible { outline-color: var(--on-dark); }
.icard { transition: transform .15s ease; }
.icard:hover { transform: translateY(-3px); }
.acard { transition: transform .15s ease; }
.acard:hover { transform: translateY(-3px); }
.ph-tile { transition: opacity .15s ease; }

/* --- Responsive layout --- */
.page .wrap { padding-left: 96px; padding-right: 96px; }
.page .nav-toggle {
  display: none; position: absolute; top: 26px; right: 96px; z-index: 5;
  appearance: none; -webkit-appearance: none; width: 44px; height: 44px;
  border-radius: 8px; border: 1.5px solid var(--field-border); background-color: var(--ivory);
  background-repeat: no-repeat; background-position: center; background-size: 20px 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cg stroke='%231c2440' stroke-width='1.8' stroke-linecap='round'%3E%3Cline x1='2' y1='5' x2='18' y2='5'/%3E%3Cline x1='2' y1='10' x2='18' y2='10'/%3E%3Cline x1='2' y1='15' x2='18' y2='15'/%3E%3C/g%3E%3C/svg%3E");
  cursor: pointer;
}
.page .nav-toggle:checked {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cg stroke='%231c2440' stroke-width='1.8' stroke-linecap='round'%3E%3Cline x1='3' y1='3' x2='17' y2='17'/%3E%3Cline x1='17' y1='3' x2='3' y2='17'/%3E%3C/g%3E%3C/svg%3E");
}
.page .mobile-menu { display: none; }
.page .mobile-menu a { display: flex; align-items: center; min-height: 48px; font-size: 16px; font-weight: 500; color: var(--ink); border-top: 1px solid var(--hair); }

@media (max-width: 1024px) {
  .page .nav-links-desktop { display: none !important; }
  .page .nav-cta { display: none !important; }
  .page .nav-toggle { display: block !important; }
  .page .nav-toggle:checked ~ .mobile-menu { display: flex !important; }
}

@media (max-width: 980px) {
  .page .wrap { padding-left: 48px; padding-right: 48px; }
  .page .nav-toggle { right: 48px; }
  .page .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
  .page .grid-3 { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
  .page .footer-grid { grid-template-columns: 1fr 1fr !important; row-gap: 32px !important; }
}

@media (max-width: 760px) {
  .page .about-row { flex-direction: column !important; gap: 32px !important; }
  .page .about-photo { flex: 0 0 auto !important; width: 100% !important; height: 220px !important; }
  .page .mkidn-row { flex-direction: column !important; align-items: flex-start !important; text-align: left !important; }
  .page .hero-deco { display: none !important; }
  .page .hero { height: auto !important; padding: 64px 0 !important; }
  .page .hero-h1 { font-size: 34px !important; }
  .page .news-head { flex-direction: column !important; align-items: flex-start !important; gap: 16px !important; }
  .page .steps-row { flex-wrap: wrap !important; gap: 28px !important; }
}

@media (max-width: 600px) {
  .page .wrap { padding-left: 20px; padding-right: 20px; }
  .page .nav-toggle { right: 20px; }
  .page .grid-4 { grid-template-columns: 1fr !important; }
  .page .grid-3 { grid-template-columns: 1fr !important; }
  .page .footer-grid { grid-template-columns: 1fr !important; }
  .page .bottombar { flex-direction: column !important; gap: 12px !important; align-items: flex-start !important; }
  .page .util-decor { display: none !important; }
  .page .util-links { display: none !important; }
  .page .hero-ctas { flex-wrap: wrap !important; }
  .page .nav-logo-title { font-size: 15px !important; }
  .page .nav-logo-sub { font-size: 10px !important; }
}

@media (max-width: 400px) {
  .page .nav-logo-text { max-width: 125px !important; }
  .page .nav-logo-title { font-size: 14.5px !important; white-space: normal !important; line-height: 1.2 !important; }
  .page .nav-logo-sub { display: none !important; }
}

/* ============================================ 2. ELEMENTY PODSTRON ======== */

/* Tylko dla czytników ekranu */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* Nagłówek podstrony (pasek pod nawigacją) */
.page .page-head { background: linear-gradient(115deg, var(--ivory) 0%, var(--ivory) 58%, var(--orange-pale) 100%); padding: 56px 0 52px; border-bottom: 1px solid var(--hair); }
.page .page-head h1 { font-size: 42px; line-height: 1.15; font-weight: 700; color: var(--navy); margin: 0 0 14px; }
.page .page-head p { font-size: 16.5px; line-height: 1.65; color: var(--ink-soft); margin: 0; }
.page .eyebrow { color: var(--orange-deep); font-size: 13px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 12px; }

/* Okruszki */
.page .crumbs { font-size: 13px; color: var(--ink-soft); margin-bottom: 18px; }
.page .crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.page .crumbs li + li::before { content: "›"; color: var(--orange-deep); margin-right: 8px; }
.page .crumbs a { border-bottom: 1px solid transparent; }
.page .crumbs a:hover { border-bottom-color: var(--orange-deep); color: var(--navy); }
.page .crumbs [aria-current="page"] { color: var(--navy); font-weight: 600; }

/* Filtry kategorii */
.page .chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px;
  padding: 8px 18px; border-radius: 999px; border: 1.5px solid var(--field-border);
  background: var(--ivory); color: var(--ink-soft); font-size: 14px; font-weight: 500;
  transition: border-color .15s ease, color .15s ease;
}
.page .chip:hover { border-color: var(--orange-deep); color: var(--orange-deep); }
.page .chip-active { background: var(--orange); border-color: var(--orange); color: var(--navy); font-weight: 600; }
.page .chip-active:hover { background: var(--orange-deep); border-color: var(--orange-deep); color: var(--on-dark); }
.page .chip-count { font-size: 12px; opacity: .75; }

/* Paginacja */
.page .pager { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; }
.page .pagelink {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px; padding: 0 14px; border-radius: 8px;
  border: 1.5px solid var(--field-border); background: var(--ivory);
  color: var(--ink-soft); font-size: 14.5px; font-weight: 600;
}
.page .pagelink:hover { border-color: var(--orange-deep); color: var(--orange-deep); }
.page .pagelink-active { background: var(--orange); border-color: var(--orange); color: var(--navy); }
.page .pagelink-disabled { opacity: .4; pointer-events: none; }
.page .pager-dots { color: var(--ink-soft); padding: 0 4px; }

/* Treść artykułów i podstron */
.page .prose { max-width: none; }
.page .prose-p { font-size: 16.5px; line-height: 1.8; color: var(--ink-soft); margin: 0 0 20px; }
.page .prose-h2 { font-size: 26px; font-weight: 700; color: var(--navy); margin: 40px 0 16px; line-height: 1.3; }
.page .prose-h3 { font-size: 20px; font-weight: 600; color: var(--navy); margin: 32px 0 12px; line-height: 1.35; }
.page .prose-list { margin: 0 0 22px; padding-left: 22px; }
.page .prose-list li { font-size: 16.5px; line-height: 1.75; color: var(--ink-soft); margin-bottom: 10px; }
.page .prose-list li::marker { color: var(--orange-deep); }
.page .prose-a { color: var(--orange-deep); border-bottom: 1.5px solid var(--orange-deep); font-weight: 500; }
.page .prose-a:hover { color: var(--navy); border-bottom-color: var(--navy); }
.page .prose > *:first-child { margin-top: 0; }

/* Ramka informacyjna */
.page .note { background: var(--orange-pale); border-left: 5px solid var(--orange); border-radius: 0 10px 10px 0; padding: 22px 26px; margin: 0 0 28px; }
.page .note .serif { color: var(--navy); font-size: 17px; font-weight: 700; margin: 0 0 8px; display: block; }
.page .note p { font-size: 15px; line-height: 1.7; color: var(--ink-soft); margin: 0; }

/* Karty ogólnego przeznaczenia */
.page .card { background: var(--ivory); border: 1px solid var(--hair); border-radius: 12px; padding: 28px; }
.page .card-title { font-size: 18px; font-weight: 700; color: var(--navy); margin: 0 0 10px; }
.page .card p { font-size: 14.5px; line-height: 1.7; color: var(--ink-soft); margin: 0; }
.page .grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }

/* Lista dokumentów do pobrania */
.page .doclist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.page .doclist a {
  display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 14px 20px;
  background: var(--ivory); border: 1px solid var(--field-border); border-radius: 10px;
  font-size: 15px; font-weight: 500; color: var(--navy);
}
.page .doclist a:hover { border-color: var(--orange-deep); }
.page .doclist .doc-meta { margin-left: auto; font-size: 12.5px; color: var(--ink-soft); font-weight: 400; }

/* Tabela (plan zajęć, kalendarz) */
.page .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.page table.data { width: 100%; border-collapse: collapse; background: var(--ivory); font-size: 15px; min-width: 520px; }
.page table.data caption { text-align: left; font-size: 14px; color: var(--ink-soft); padding-bottom: 12px; }
.page table.data th, .page table.data td { padding: 14px 16px; border-bottom: 1px solid var(--hair); text-align: left; vertical-align: top; }
.page table.data thead th { background: var(--ivory-2); color: var(--navy); font-weight: 600; font-size: 14px; letter-spacing: 0.02em; }
.page table.data tbody tr:last-child td { border-bottom: none; }
.page table.data td { color: var(--ink-soft); line-height: 1.6; }
.page table.data td:first-child { color: var(--navy); font-weight: 600; white-space: nowrap; }

/* Formularze */
.page .field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 20px; }
.page .field label { font-size: 14px; font-weight: 600; color: var(--navy); }
.page .field .hint { font-size: 12.5px; color: var(--ink-soft); }
.page .field .req { color: var(--orange-deep); }
.page input[type="text"], .page input[type="email"], .page input[type="tel"],
.page input[type="url"], .page input[type="password"], .page input[type="date"],
.page input[type="number"], .page input[type="search"], .page select, .page textarea {
  font-family: inherit; font-size: 15.5px; color: var(--ink);
  background: var(--ivory); border: 1.5px solid var(--field-border); border-radius: 8px;
  padding: 12px 14px; min-height: 48px; width: 100%;
}
.page textarea { min-height: 160px; line-height: 1.6; resize: vertical; }
.page input:focus-visible, .page select:focus-visible, .page textarea:focus-visible {
  outline: 2.5px solid var(--navy); outline-offset: 1px; border-color: var(--navy);
}
.page .field-error input, .page .field-error textarea, .page .field-error select { border-color: #a3160b; }
.page .error-text { font-size: 13px; color: #a3160b; font-weight: 600; }
.page .check { display: flex; gap: 11px; align-items: flex-start; font-size: 14px; line-height: 1.6; color: var(--ink-soft); }
.page .check input[type="checkbox"] { width: 20px; height: 20px; min-height: 0; flex: none; margin-top: 2px; accent-color: var(--orange-deep); }
.page button.btn-orange, .page input[type="submit"] {
  font-family: inherit; font-size: 15.5px; border: none; border-radius: 8px;
  padding: 15px 28px; cursor: pointer; min-height: 48px;
}
.page .hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Komunikaty */
.page .alert { border-radius: 10px; padding: 18px 22px; margin-bottom: 26px; font-size: 15px; line-height: 1.65; border-left: 5px solid; }
.page .alert-ok { background: #edf7ed; border-color: #1c6b1f; color: #10400f; }
.page .alert-err { background: #fdeceb; border-color: #a3160b; color: #6d0d06; }
.page .alert-info { background: var(--orange-pale); border-color: var(--orange); color: #5a3100; }
.page .alert strong { display: block; margin-bottom: 4px; }

/* Galeria */
.page .gal-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.page .gal-item { position: relative; display: block; border-radius: 10px; overflow: hidden; border: 1px solid var(--hair); background: var(--ivory-2); }
.page .gal-item img { display: block; width: 100%; height: 230px; object-fit: cover; }
.page .gal-cap { padding: 12px 14px; font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; }
@media (max-width: 980px) { .page .gal-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } .page .grid-2 { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .page .gal-grid { grid-template-columns: 1fr; } .page .page-head h1 { font-size: 30px; } }

/* Zdjęcie w kafelku aktualności i w artykule */
.page .acard-thumb { height: 180px; overflow: hidden; }
.page .acard-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.page .article-figure { margin: 0 0 32px; text-align: center; }
.page .article-figure img { display: block; width: auto; max-width: 100%; max-height: 620px; border-radius: 12px; margin: 0 auto; }
.page .article-figure figcaption { font-size: 13px; color: var(--ink-soft); margin-top: 10px; font-style: italic; }

/* Kadra */
.page .staff { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 20px; }
.page .staff-card { background: var(--ivory); border: 1px solid var(--hair); border-radius: 12px; padding: 24px; }
.page .staff-role { font-size: 12.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--orange-deep); margin-bottom: 8px; }
.page .staff-name { font-size: 17px; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.page .staff-desc { font-size: 14px; color: var(--ink-soft); line-height: 1.6; }
@media (max-width: 980px) { .page .staff { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 600px) { .page .staff { grid-template-columns: 1fr; } }

/* Mapa */
.page .map-frame { width: 100%; height: 380px; border: 1px solid var(--hair); border-radius: 12px; display: block; }

/* ==================================== 3. DOSTĘPNOŚĆ: ROZMIAR TEKSTU ======= */
/* Skalowanie całego dokumentu. zoom na elemencie html przelicza również
   viewport, dzięki czemu układ przepływa tak jak przy powiększeniu przeglądarki
   i nie powstaje poziomy pasek przewijania. Klasa jest ustawiana po stronie
   serwera na podstawie ciasteczka, więc strona nie „mruga” przy wczytaniu.  */
html.fs--1 { zoom: 0.9; }
html.fs-1  { zoom: 1.12; }
html.fs-2  { zoom: 1.25; }
html.fs-3  { zoom: 1.4; }

/* Stan przycisków paska dostępności */
.page .a11y-btn { background: none; border: none; color: var(--on-dark-soft); cursor: pointer; padding: 2px 5px; font-family: inherit; min-width: 28px; }
.page .a11y-btn:hover { color: var(--on-dark); }
.page .a11y-btn[aria-pressed="true"] { color: var(--on-dark); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.page .a11y-toggle { background: none; border: 1px solid oklch(96% 0.01 85 / 0.4); border-radius: 4px; color: var(--on-dark); cursor: pointer; font-size: 11.5px; padding: 3px 7px; margin-left: 4px; font-family: inherit; }
.page .a11y-toggle[aria-pressed="true"] { background: var(--on-dark); color: var(--orange-dark-bg); font-weight: 700; }

/* ============================== 4. DOSTĘPNOŚĆ: WYSOKI KONTRAST ============ */
/* Projekt jest oparty na zmiennych CSS, więc tryb kontrastowy sprowadza się
   w większości do podmiany tokenów. Reszta reguł prostuje miejsca, w których
   dwa tokeny spotykały się na jednym elemencie (przyciski, kafelki, gradienty). */
html.hc, html.hc body { background: #000; }
html.hc .page {
  --navy: #ffffff;
  --navy-deep: #000000;
  --navy-mid: #000000;
  --burgundy: #000000;
  --orange: #ffdd00;
  --orange-deep: #ffdd00;
  --orange-dark-bg: #000000;
  --orange-pale: #000000;
  --ivory: #000000;
  --ivory-2: #000000;
  --ink: #ffffff;
  --ink-soft: #ffffff;
  --on-dark: #ffffff;
  --on-dark-soft: #ffffff;
  --hair: #ffdd00;
  --field-border: #ffdd00;
  background: #000;
}
html.hc .page,
html.hc .page * { background-image: none !important; box-shadow: none !important; }
html.hc .page .btn-orange,
html.hc .page button.btn-orange { background: #ffdd00 !important; color: #000 !important; border: 2px solid #ffdd00; }
html.hc .page .btn-orange:hover { background: #000 !important; color: #ffdd00 !important; }
html.hc .page .btn-ghost { border: 2px solid #ffdd00; color: #ffdd00; }
html.hc .page .chip-active,
html.hc .page .pagelink-active { background: #ffdd00 !important; color: #000 !important; border-color: #ffdd00; }
html.hc .page .chip, html.hc .page .pagelink { border-color: #ffdd00; color: #ffdd00; }
html.hc .page .ph-tile,
html.hc .page .acard-thumb,
html.hc .page .about-photo { border: 1px solid #ffdd00; background: #000 !important; }
html.hc .page .navlink,
html.hc .page .footlink,
html.hc .page .prose-a { color: #ffdd00; }
html.hc .page .navlink:hover, html.hc .page .footlink:hover { color: #fff; }
html.hc .page a:focus-visible,
html.hc .page button:focus-visible,
html.hc .page input:focus-visible,
html.hc .page select:focus-visible,
html.hc .page textarea:focus-visible { outline: 3px solid #ffdd00 !important; outline-offset: 2px; }
html.hc .page .alert { background: #000; color: #fff; border-color: #ffdd00; }
html.hc .page .note { background: #000; border-color: #ffdd00; }
html.hc .page .a11y-toggle[aria-pressed="true"] { background: #ffdd00; color: #000; }
html.hc .page input, html.hc .page select, html.hc .page textarea { background: #000; color: #fff; border-color: #ffdd00; }
html.hc .page img { filter: grayscale(20%) contrast(115%); }
html.hc .page .hero-deco { opacity: .45; }
html.hc .page svg [stroke="var(--navy)"] { stroke: #000; }

/* ============================================ 5. RUCH I DRUK ============== */
@media (prefers-reduced-motion: reduce) {
  .page *, .page *::before, .page *::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important; scroll-behavior: auto !important;
  }
  .icard:hover, .acard:hover { transform: none; }
}

@media print {
  .page .chrome-dark, .page .nav-toggle, .page .mobile-menu,
  .page .hero-deco, .page .pager, .skip-link { display: none !important; }
  .page { overflow: visible; }
  .page .wrap { padding-left: 0 !important; padding-right: 0 !important; }
  .page a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 11px; }
  body { background: #fff; }
}

/* ============================================ 6. PODGLĄD ZDJĘCIA ========== */
dialog.lightbox { border: none; padding: 0; background: transparent; max-width: min(1100px, 92vw); max-height: 92vh; }
dialog.lightbox::backdrop { background: rgba(10, 12, 20, 0.88); }
dialog.lightbox figure { margin: 0; background: oklch(97% 0.012 85); border-radius: 12px; overflow: hidden; }
dialog.lightbox img { display: block; max-width: 100%; max-height: 74vh; margin: 0 auto; }
dialog.lightbox figcaption { font-family: 'Work Sans', system-ui, sans-serif; font-size: 14px; line-height: 1.6; color: oklch(42% 0.02 262); padding: 16px 20px; }
dialog.lightbox .lightbox-nav { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 14px; }
dialog.lightbox .lightbox-nav.single .lightbox-btn { display: none; }
dialog.lightbox .lightbox-btn {
  font-family: 'Work Sans', system-ui, sans-serif; font-size: 20px; font-weight: 600;
  min-width: 52px; min-height: 44px; border-radius: 8px; cursor: pointer;
  border: 1.5px solid oklch(96% 0.01 85 / 0.6); background: transparent; color: #fff;
}
dialog.lightbox .lightbox-btn:hover { background: oklch(96% 0.01 85 / 0.15); }
dialog.lightbox .lightbox-btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
dialog.lightbox .lb-count { color: oklch(42% 0.02 262); white-space: nowrap; }
html.hc dialog.lightbox .lightbox-btn { border-color: #ffdd00; color: #ffdd00; }
dialog.lightbox .lightbox-close {
  display: block; margin: 0; font-family: 'Work Sans', system-ui, sans-serif;
  font-size: 14.5px; font-weight: 600; min-height: 44px; padding: 10px 22px;
  border: none; border-radius: 8px; background: #f98d00; color: oklch(21% 0.045 262); cursor: pointer;
}
dialog.lightbox .lightbox-close:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
html.hc dialog.lightbox figure { background: #000; border: 1px solid #ffdd00; }
html.hc dialog.lightbox figcaption { color: #fff; }
html.hc dialog.lightbox .lightbox-close { background: #ffdd00; color: #000; }

/* ======================================== 7. LOGO MKiDN (księga znaku) ==== */
/* Zasady ministerstwa: logo na białym tle, bez zmiany proporcji i kolorów –
   dlatego białe pole zostaje też w trybie wysokiego kontrastu, a filtr
   kolorów nakładany na zdjęcia w tym trybie nie obejmuje logo. */
@media (max-width: 400px) { .page .mkidn-logo { width: 100% !important; max-width: 260px; } }
html.hc .page .mkidn-logo { background: #fff !important; border: 2px solid #ffdd00; }
html.hc .page .mkidn-logo img { filter: none; }

/* ================================ 8. ODDZIELENIE BANERU OD TREŚCI ======== */
/* Baner strony głównej przechodził płynnie w jasną sekcję „O szkole” (to samo
   tło). Cienka pomarańczowa linia (kolor marki) + bardzo miękki cień padający w dół zaznaczają granicę,
   nie zmieniając charakteru projektu. Ten sam zabieg na nagłówkach podstron. */
.page .hero,
.page .page-head {
  position: relative;
  z-index: 1;
  border-bottom: 2px solid var(--orange);
  box-shadow: 0 10px 24px -18px oklch(21% 0.045 262 / 0.35);
}


/* ======================================== 9. ALBUMY I ZDJĘCIA WE WPISACH == */
.page .album-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 24px; }
.page .album-card { display: flex; flex-direction: column; background: var(--ivory); border: 1px solid var(--hair); border-radius: 14px; overflow: hidden; transition: transform .15s ease; }
.page .album-card:hover { transform: translateY(-3px); }
.page .album-cover { height: 220px; background: var(--ivory-2); overflow: hidden; }
.page .album-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.page .album-body { padding: 20px 22px 22px; }
.page .album-meta { font-size: 12.5px; font-weight: 600; color: var(--orange-deep); letter-spacing: 0.04em; margin-bottom: 8px; }
.page .album-title { font-size: 18px; font-weight: 700; color: var(--navy); line-height: 1.35; margin: 0; }
.page .gal-item img { height: 230px; }
@media (max-width: 980px) { .page .album-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 600px) { .page .album-grid { grid-template-columns: 1fr; } }

/* Zdjęcia w treści wpisu */
.page .post-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin: 8px 0 28px; }
.page .post-gallery a { display: block; border-radius: 8px; overflow: hidden; border: 1px solid var(--hair); background: var(--ivory-2); }
.page .post-gallery img { display: block; width: 100%; height: 170px; object-fit: cover; }
.page .post-figure { margin: 8px 0 28px; text-align: center; }
.page .post-figure a { display: inline-block; }
.page .post-figure img { display: block; max-width: 100%; max-height: 560px; border-radius: 10px; margin: 0 auto; }
.page .post-gallery a:focus-visible, .page .post-figure a:focus-visible { outline: 2.5px solid var(--navy); outline-offset: 2px; }

/* Nagranie audio we wpisie */
.page .post-audio { margin: 8px 0 28px; background: var(--ivory-2); border: 1px solid var(--hair); border-radius: 10px; padding: 16px 18px; }
.page .post-audio audio { display: block; width: 100%; }
.page .post-audio figcaption { margin-top: 10px; font-size: 14px; }
html.hc .page .post-audio { background: #000; border-color: #ffdd00; }
html.hc .page .ph-tile span { background: #000 !important; color: #fff; }
.page .file-meta { color: var(--ink-soft); font-weight: 400; font-size: .92em; }

/* ======================================= 10. PRZYCISKI Z STRZAŁKĄ ========= */
/* Wspólna podstawa dla wszystkich odnośników „dalej / wstecz”. Kolory biorą się
   z istniejących klas projektu (.btn-orange, .btn-ghost), więc kontrast i tryb
   wysokiego kontrastu działają bez dodatkowych reguł. Strzałka jest ozdobnikiem
   (aria-hidden) i przesuwa się lekko po najechaniu. */
.page .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 12px 22px; border-radius: 8px;
  font-family: inherit; font-size: 15px; font-weight: 600; line-height: 1.2;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.page .btn.btn-ghost { background: transparent; }
.page .btn.btn-ghost:hover { background: var(--ivory); }
.page .btn-sm { min-height: 42px; padding: 9px 18px; font-size: 14px; }
.page .btn-arrow { display: inline-block; transition: transform .15s ease; }
.page .btn:hover .btn-arrow-next, .page .nav-card:hover .btn-arrow-next { transform: translateX(3px); }
.page .btn:hover .btn-arrow-prev, .page .nav-card:hover .btn-arrow-prev { transform: translateX(-3px); }

/* Nawigacja „poprzedni / następny” (wpisy, albumy) – dwuwierszowy przycisk-karta */
.page .nav-cards { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page .nav-card {
  display: flex; flex-direction: column; gap: 6px; flex: 1 1 280px; max-width: 380px;
  padding: 16px 20px; border: 1.5px solid var(--field-border); border-radius: 10px;
  background: var(--ivory); color: var(--navy); font-size: 15px; font-weight: 600; line-height: 1.4;
  transition: border-color .15s ease, background-color .15s ease;
}
.page .nav-card:hover { border-color: var(--orange-deep); background: var(--ivory-2); }
.page .nav-card-next { text-align: right; margin-left: auto; }
.page .nav-card-label { color: var(--orange-deep); font-size: 12.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }

@media (max-width: 600px) {
  .page .btn { white-space: normal; }
  .page .nav-card { max-width: none; }
}
@media (prefers-reduced-motion: reduce) { .page .btn-arrow { transition: none; } }

/* ============================== 11. SIATKA 5 KOLUMN (10 KAFELKÓW) ======== */
.page .grid-5 { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 20px; }
@media (max-width: 1180px) { .page .grid-5 { gap: 16px; } }
@media (max-width: 980px)  { .page .grid-5 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 600px)  { .page .grid-5 { grid-template-columns: 1fr; } }
