/* elektrostatyka.gig.eu – main stylesheet
   Based on uslugiggs.gig.eu / decyzjesrodowiskowe.gig.eu (same GIG-PIB palette).
   No inline styles anywhere (strict Content-Security-Policy, see .htaccess). */

/* ---------- Fonts (self-hosted Lato, latin + latin-ext for Polish) ---------- */
@font-face { font-family: "Lato"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/lato-400-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Lato"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/lato-400-latin.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: "Lato"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/lato-700-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Lato"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/lato-700-latin.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: "Lato"; font-style: normal; font-weight: 900; font-display: swap; src: url("/assets/fonts/lato-900-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Lato"; font-style: normal; font-weight: 900; font-display: swap; src: url("/assets/fonts/lato-900-latin.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; }

/* ---------- Tokens ---------- */
:root {
  /* palette shared with decyzjesrodowiskowe.gig.eu (GIG-PIB greens) */
  --green: #3eaf7c;          /* brand accent (decoration only) */
  --green-dark: #1c7149;     /* buttons, links: 6:1 on white */
  --green-darker: #135a39;
  --lime: #8cc63f;           /* GIG logo green (decoration only) */
  --ink: #2c3e50;            /* headings */
  --text: #415161;           /* body text */
  --muted: #5d6b79;
  --line: #e2e7ed;
  --bg-soft: #f4f7f5;
  --bg-alt: #edf6f1;
  --white: #fff;
  --footer: #1f2d3a;
  --radius: 0;               /* GIG-PIB logo is angular: no rounded corners */
  --shadow: 0 0.25rem 1.25rem rgb(44 62 80 / 0.08);
  --wrap: 75rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --header-h: 5.5rem;
  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 1rem); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  font-family: "Lato", Arial, Helvetica, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--text);
  background: var(--white);
}
img, svg, video { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.3; margin: 0 0 0.75em; text-wrap: balance; font-weight: 700; }
h1 { font-size: clamp(1.75rem, 1.3rem + 2vw, 2.75rem); font-weight: 900; }
h2 { font-size: clamp(1.4rem, 1.2rem + 0.9vw, 1.9rem); }
h3 { font-size: clamp(1.15rem, 1.05rem + 0.4vw, 1.35rem); }
p, ul, ol, dl { margin: 0 0 1.1em; }
p { text-wrap: pretty; }
a { color: var(--green-dark); text-underline-offset: 0.15em; }
a:hover { color: var(--green-darker); }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }
strong { color: var(--ink); font-weight: 700; }
hr { margin: 2rem 0; border: 0; border-block-start: 1px solid var(--line); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; inset-inline-start: 1rem; inset-block-start: -10rem; z-index: 100;
  padding: 0.75rem 1.25rem; background: var(--ink); color: var(--white); font-weight: 700;
}
.skip-link:focus { inset-block-start: 1rem; color: var(--white); }
[hidden] { display: none !important; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.ico { width: 1.15em; height: 1.15em; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  min-height: 3rem; padding: 0.7rem 1.5rem;
  font: inherit; font-weight: 700; line-height: 1.2; text-align: center; text-decoration: none; text-transform: uppercase; letter-spacing: 0.03em; font-size: 0.95rem;
  color: var(--white); background: var(--green-dark);
  border: 2px solid var(--green-dark); border-radius: var(--radius);
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.btn:hover { color: var(--white); background: var(--green-darker); border-color: var(--green-darker); }
.btn--ghost { color: var(--green-dark); background: var(--white); }
.btn--ghost:hover { color: var(--white); }
.btn--light { color: var(--ink); background: var(--white); border-color: var(--white); }
.btn--light:hover { color: var(--ink); background: var(--bg-alt); border-color: var(--bg-alt); }
.btn--outline-light { color: var(--white); background: transparent; border-color: var(--white); }
.btn--outline-light:hover { color: var(--ink); background: var(--white); border-color: var(--white); }
.btn--small { min-height: 2.25rem; padding: 0.35rem 0.9rem; font-size: 0.75rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; margin-block-start: 1.5rem; }

/* ---------- Top bar (as on the WordPress site: quote button + e-mail, phone, address) ---------- */
.topbar { background: var(--bg-soft); color: var(--text); border-block-end: 1px solid var(--line); font-size: 0.8125rem; }
.topbar__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.4rem 1.5rem; padding-block: 0.45rem; }
.topbar__contact { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; margin: 0; padding: 0; list-style: none; }
.topbar__contact li { display: inline-flex; align-items: center; gap: 0.4em; }
.topbar__contact a { display: inline-flex; align-items: center; gap: 0.4em; color: var(--text); text-decoration: none; }
.topbar__contact a:hover { color: var(--green-dark); text-decoration: underline; }
.topbar__contact .ico { color: var(--green-dark); }
@media (max-width: 52rem) {
  .topbar__address { display: none !important; }
  .topbar__inner { justify-content: center; }
}
@media (max-width: 30rem) { .topbar__cta { display: none; } }

/* ---------- Header + navigation (one <nav>, popover when it does not fit; see main.js) ---------- */
.site-header { position: sticky; inset-block-start: 0; z-index: 50; background: var(--white); box-shadow: 0 1px 0 var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: var(--header-h); padding-block: 0.5rem; }
.header-inner > * { flex-shrink: 0; white-space: nowrap; }
.site-logo { display: flex; align-items: center; }
.site-logo img { width: auto; height: clamp(3.25rem, 2.5rem + 2.2vw, 4.25rem); }

.menu-button {
  anchor-name: --menu-button;
  display: inline-flex; align-items: center; gap: 0.5rem; min-height: 2.75rem; padding: 0.5rem 0.9rem;
  font: inherit; font-weight: 700; color: var(--ink); background: var(--white);
  border: 2px solid var(--line); border-radius: var(--radius); cursor: pointer;
}
.menu-button:hover { border-color: var(--green-dark); }

.site-menu {
  position: fixed; inset: auto;
  inset-block-start: 7.5rem;
  inset-block-start: anchor(--menu-button bottom);
  inset-inline-end: 1rem;
  inline-size: min(85dvw, 22rem); max-inline-size: calc(100dvw - 2rem);
  block-size: fit-content; max-block-size: calc(100dvh - 6rem);
  margin: 0.5rem 0 0; padding: 0.5rem; overflow: auto; list-style: none;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.site-menu[hidden] { display: none; }
.site-menu ul { list-style: none; }
.site-menu a {
  display: block; padding: 0.7rem 1rem;
  color: var(--ink); font-weight: 700; text-decoration: none; white-space: normal;
}
.site-menu a:hover { background: var(--bg-alt); color: var(--green-dark); }
.site-menu a[aria-current="page"] { color: var(--green-dark); box-shadow: inset 4px 0 0 var(--green-dark); }
.site-menu .site-menu__cta a { margin-block-start: 0.25rem; color: var(--white); background: var(--green-dark); text-transform: uppercase; }
.site-menu .site-menu__cta a:hover { color: var(--white); background: var(--green-darker); }
.site-menu::backdrop { background: rgb(31 45 58 / 0.25); }
/* collapsed (phone) menu: sub-pages listed indented under their parent */
.submenu { margin: 0; padding: 0 0 0.25rem 1rem; }
.submenu a { padding-block: 0.45rem; font-weight: 400; }
.site-menu > .has-sub > a { font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

@media (prefers-reduced-motion: no-preference) {
  .site-menu { transition: opacity 0.18s, translate 0.18s, display 0.18s, overlay 0.18s; transition-behavior: allow-discrete; }
  .site-menu:not(:popover-open) { opacity: 0; translate: 0 -0.5rem; }
  @starting-style { .site-menu:popover-open { opacity: 0; translate: 0 -0.5rem; } }
}

.site-header.is-wide .menu-button { display: none; }
.site-header.is-wide .site-menu {
  position: static; display: flex; align-items: center; gap: 0.15rem;
  inline-size: auto; max-inline-size: none; block-size: auto; max-block-size: none;
  overflow: visible; margin: 0; padding: 0; border: 0; background: transparent; box-shadow: none;
  opacity: 1; translate: none; transition: none;
}
.site-header.is-wide .site-menu::backdrop { display: none; }
.site-header.is-wide .site-menu > li > a { padding: 0.6rem 0.85rem; text-transform: uppercase; font-size: 0.95rem; letter-spacing: 0.02em; white-space: nowrap; color: var(--ink); }
.site-header.is-wide .site-menu > li > a[aria-current="page"],
.site-header.is-wide .site-menu > .has-sub.is-active > a { box-shadow: inset 0 -3px 0 var(--lime); }
.site-header.is-wide .site-menu .site-menu__cta { display: none; } /* the top bar has the same button */
.site-header.is-wide .has-sub { position: relative; }
.site-header.is-wide .has-sub > a { display: flex; align-items: center; gap: 0.35rem; }
.site-header.is-wide .has-sub > a::after { content: ""; width: 0.4rem; height: 0.4rem; margin-block-start: -0.2rem; border: solid currentColor; border-width: 0 2px 2px 0; rotate: 45deg; opacity: 0.6; }
.site-header.is-wide .submenu {
  position: absolute; inset-block-start: 100%; inset-inline-start: 0; z-index: 60;
  display: block; visibility: hidden; opacity: 0;
  inline-size: 15rem; margin: 0; padding: 0.4rem; list-style: none;
  background: var(--white); border: 1px solid var(--line); border-block-start: 3px solid var(--green-dark); box-shadow: var(--shadow);
}
.site-header.is-wide .submenu a { padding: 0.5rem 0.75rem; font-size: 0.95rem; font-weight: 400; line-height: 1.4; }
.site-header.is-wide .submenu a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--green-dark); }
.site-header.is-wide .has-sub:hover > .submenu,
.site-header.is-wide .has-sub:focus-within > .submenu { visibility: visible; opacity: 1; }
.site-header.is-wide .has-sub.is-closed > .submenu { visibility: hidden; opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .site-header.is-wide .submenu { transition: opacity 0.15s, visibility 0.15s; }
}
.is-measuring, .is-measuring * { transition: none !important; }
@media (forced-colors: active) {
  .site-menu a[aria-current="page"] { text-decoration: underline; }
}

/* ---------- Hero (home): lab photo with a dark green overlay, as on the WordPress site ---------- */
.hero { position: relative; isolation: isolate; color: var(--white); background: var(--ink); overflow: hidden; }
.hero__img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(70deg, rgb(4 40 20 / 0.92) 0%, rgb(19 90 57 / 0.75) 45%, rgb(31 45 58 / 0.35) 100%); }
.hero__inner { padding-block: clamp(4rem, 12vw, 8.5rem); }
.hero h1 { max-width: 44rem; margin-block-end: 0.5em; color: var(--white); font-size: clamp(1.7rem, 1.2rem + 2.4vw, 3rem); line-height: 1.2; }
.hero__lead { max-width: 40rem; margin: 0; font-size: clamp(1.05rem, 1rem + 0.4vw, 1.3rem); color: #e6f1ea; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; margin: 2rem 0 0; }
.hero .btn--ghost { color: var(--white); background: transparent; border-color: var(--white); }
.hero .btn--ghost:hover { color: var(--ink); background: var(--white); }

/* ---------- Page title band (subpages) ---------- */
.page-title { position: relative; isolation: isolate; color: var(--white); background: linear-gradient(110deg, var(--ink) 0%, #24475a 55%, var(--green-darker) 130%); }
.page-title .wrap { padding-block: clamp(2rem, 5vw, 3.5rem); }
.page-title h1 { color: var(--white); max-width: 56rem; margin: 0; font-size: clamp(1.6rem, 1.25rem + 1.6vw, 2.5rem); }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0 0 0.75rem; padding: 0; list-style: none; font-size: 0.875rem; }
.breadcrumbs li + li::before { content: "›"; margin-inline-end: 0.35rem; opacity: 0.8; }
.breadcrumbs a { color: var(--white); }
.breadcrumbs a:hover { color: var(--lime); }

/* ---------- Sections ---------- */
.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.section--alt { background: var(--bg-soft); }
.split { display: grid; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
@media (min-width: 60rem) { .split { grid-template-columns: 1fr 1fr; } }

/* ---------- Article text (Markdown from content/*.md) ---------- */
.prose { min-width: 0; max-width: 60rem; }
.prose--wide { max-width: none; }
.prose h2 { margin-block-start: 2.25rem; }
.prose h3 { margin-block-start: 1.75rem; }
.prose > :first-child { margin-block-start: 0; }
.prose ul, .prose ol { padding-inline-start: 1.35rem; }
.prose li { margin-block-end: 0.4em; }
.prose li::marker { color: var(--green-dark); }
.prose img { margin-block: 1.5rem; border: 1px solid var(--line); }
.prose a:not(.btn) { color: var(--green-dark); }
.prose .video { width: 100%; margin-block: 1.5rem; background: #000; }
[id] { scroll-margin-top: calc(var(--header-h) + 1rem); }

/* Photo gallery (former FooGallery) – opens in the lightbox, see main.js */
.prose .gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 11rem), 1fr)); gap: 0.75rem; margin: 1.5rem 0 2rem; padding: 0; list-style: none; }
.prose .gallery li { margin: 0; }
.prose .gallery a { display: block; cursor: zoom-in; }
.prose .gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; margin: 0; transition: opacity 0.2s; }
.prose .gallery a:hover img { opacity: 0.85; }

/* Accordions (native <details>) */
.prose details { margin-block-end: 0.75rem; background: var(--white); border: 1px solid var(--line); border-inline-start: 4px solid var(--green-dark); }
.prose summary { padding: 0.85rem 1.1rem; font-weight: 700; color: var(--ink); cursor: pointer; }
.prose summary:hover { color: var(--green-dark); }
.prose details[open] summary { border-block-end: 1px solid var(--line); }
.prose details > :not(summary) { margin-inline: 1.1rem; }
.prose details > :nth-child(2) { margin-block-start: 1rem; }

/* Home: service tiles */
.home .section:first-child { padding-block-start: clamp(2.5rem, 6vw, 4rem); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); gap: 1.25rem; margin-block: 2rem 0; }
.tile { position: relative; display: flex; flex-direction: column; padding: 1.5rem 1.5rem 1.25rem; background: var(--white); border: 1px solid var(--line); border-block-start: 4px solid var(--green-dark); box-shadow: var(--shadow); transition: border-color 0.2s, translate 0.2s; }
.tile::before {
  content: ""; display: block; width: 2.75rem; height: 2.75rem; margin-block-end: 1rem;
  background: var(--bg-alt) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231c7149' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 2 4 14h7l-1 8 9-12h-7z'/%3E%3C/svg%3E") center / 1.5rem no-repeat;
}
.tile h3 { margin: 0 0 0.5rem; font-size: 1.15rem; }
.tile h3 a { color: var(--ink); text-decoration: none; }
.tile h3 a::after { content: ""; position: absolute; inset: 0; } /* whole tile clickable */
.tile p { margin: 0; font-size: 0.95rem; line-height: 1.65; }
.tile:hover { border-color: var(--green-dark); }
.tile:hover h3 a { color: var(--green-dark); }
.tile:focus-within { outline: 3px solid var(--lime); outline-offset: 3px; }
.tile a:focus-visible { outline: none; }
@media (prefers-reduced-motion: no-preference) { .tile:hover { translate: 0 -3px; } }
.badges { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; margin-block: 1.5rem; }
.badges img { height: 5rem; width: auto; margin: 0; border: 0; }

/* Contact cards */
.contact-grid { display: grid; gap: 1.25rem; margin-block: 1.5rem 2.5rem; }
@media (min-width: 48rem) { .contact-grid { grid-template-columns: 1.6fr 1fr 1fr; } }
.contact-box { padding: 1.5rem; background: var(--white); border: 1px solid var(--line); border-block-start: 4px solid var(--green-dark); box-shadow: var(--shadow); }
.contact-box h2 { margin: 0 0 0.6rem; font-size: 1.1rem; }
.contact-box p { margin: 0; }

/* ---------- Tables (data/tables/*.csv) ---------- */
.table-search { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin-block: 1.5rem 0.75rem; }
.table-search label { font-weight: 700; color: var(--ink); }
.table-search input {
  flex: 1 1 16rem; max-inline-size: 26rem; min-height: 2.75rem; padding: 0.5rem 0.85rem;
  font: inherit; color: var(--ink); background: var(--white); border: 2px solid var(--line); border-radius: var(--radius);
}
.table-search input:focus-visible { border-color: var(--green-dark); outline-offset: 1px; }
.table-count { flex-basis: 100%; margin: 0; min-height: 1.5em; font-size: 0.875rem; color: var(--muted); }
.table-wrap { overflow-x: auto; margin-block: 1rem 2.5rem; }
.data-table { inline-size: 100%; border-collapse: collapse; font-size: 0.925rem; line-height: 1.6; }
.data-table caption { padding-block-end: 0.75rem; text-align: start; font-size: 1.15rem; font-weight: 700; color: var(--ink); }
.data-table th, .data-table td { padding: 0.75rem 0.9rem; border: 1px solid var(--line); vertical-align: top; text-align: start; }
.data-table th { color: var(--white); background: var(--green-dark); font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; }
.data-table tbody tr:nth-child(odd) td { background: var(--bg-soft); }
.data-table td p { margin: 0 0 0.6em; }
.data-table td p:last-child { margin: 0; }
.data-table td hr { margin: 0.75rem 0; border-color: #cfd8df; }
.data-table td strong { color: var(--ink); }
.data-table .col-wide { min-inline-size: 18rem; }
@media (min-width: 40.01rem) { .data-table .col-nowrap { white-space: nowrap; } }
/* phones: every row becomes a card, the column name is shown next to each value */
@media (max-width: 40rem) {
  .data-table, .data-table caption, .data-table tbody, .data-table tr, .data-table td { display: block; inline-size: 100%; }
  .data-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .data-table tr { margin-block-end: 1rem; border: 1px solid var(--line); border-block-start: 3px solid var(--green-dark); }
  .data-table td { border: 0; border-block-end: 1px solid var(--line); }
  .data-table td:last-child { border-block-end: 0; }
  .data-table tbody tr:nth-child(odd) td { background: transparent; }
  .data-table td::before { content: attr(data-label); display: block; margin-block-end: 0.2rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--green-dark); }
}

/* CTA band (end of every subpage) */
.cta-band { color: var(--white); background: linear-gradient(120deg, var(--green-darker), var(--green-dark) 60%, #2a8a5c); }
.cta-band .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; padding-block: clamp(2.25rem, 5vw, 3.25rem); }
.cta-band h2 { color: var(--white); margin-block-end: 0.3em; }
.cta-band p { margin: 0; max-width: 40rem; }

/* ---------- Footer ---------- */
.site-footer { color: #d5dde4; background: var(--footer); font-size: 0.9rem; }
.site-footer a { color: var(--white); }
.site-footer a:hover { color: var(--lime); }
.footer-grid { display: grid; gap: 2rem; padding-block: 3rem; }
@media (min-width: 48rem) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer h2 { color: var(--white); font-size: 0.95rem; letter-spacing: 0.08em; text-transform: uppercase; margin-block-end: 1rem; }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li { margin-block-end: 0.5rem; }
.footer-logo { display: inline-block; margin-block-end: 1.25rem; padding: 0.75rem 1rem; background: var(--white); }
.footer-logo img { width: auto; height: 4.25rem; }
.footer-contact li { display: flex; gap: 0.6rem; align-items: flex-start; }
.footer-contact .ico { margin-block-start: 0.3em; color: var(--lime); }
.bottom-bar { border-block-start: 1px solid rgb(255 255 255 / 0.12); font-size: 0.85rem; }
.bottom-bar .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem; padding-block: 1.25rem; }
.bottom-bar p { margin: 0; }
.bottom-bar ul { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.bottom-bar li { margin: 0; }
.social { display: flex; gap: 0.5rem; }
.social-link { display: grid; place-items: center; inline-size: 2.5rem; block-size: 2.5rem; color: var(--white); background: rgb(255 255 255 / 0.08); border: 1px solid rgb(255 255 255 / 0.2); transition: background-color 0.2s, color 0.2s; }
.site-footer .social-link:hover { color: var(--footer); background: var(--lime); border-color: var(--lime); }
.social-ico { width: 1.25rem; height: 1.25rem; }

/* ---------- 404 ---------- */
.error-page { padding-block: clamp(3rem, 8vw, 6rem); text-align: center; }
.error-page__code {
  margin: 0 0 0.5rem;
  font-size: clamp(6rem, 4rem + 12vw, 11rem); font-weight: 900; line-height: 1;
  color: var(--green-dark);
  background: linear-gradient(120deg, var(--green-darker), var(--green) 55%, var(--lime));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.error-page__lead { max-width: 36rem; margin-inline: auto; }
.error-page__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem 1rem; }
.error-page__links { margin-block-start: 2.5rem; }
.error-page__links h2 { font-size: 1.1rem; }
.error-page__links ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.error-page__links a { display: inline-block; padding: 0.4rem 0.9rem; text-decoration: none; font-weight: 700; border: 1px solid var(--line); }
.error-page__links a:hover { border-color: var(--green-dark); }
@media (prefers-reduced-motion: no-preference) {
  .error-page__code { animation: float-in 0.7s ease-out both; }
  @keyframes float-in { from { opacity: 0; translate: 0 1rem; } }
}

/* ---------- Lightbox (gallery photos, see main.js) ---------- */
.lightbox {
  inline-size: 100dvw; block-size: 100dvh; max-inline-size: none; max-block-size: none;
  margin: 0; padding: 3.5rem clamp(0.5rem, 6vw, 5rem) 1rem; border: 0;
  color: #e9eef2; background: rgb(15 24 32 / 0.96); overflow: hidden;
}
.lightbox[open] { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.lightbox::backdrop { background: rgb(15 24 32 / 0.6); }
.lightbox__figure { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.75rem; min-block-size: 0; margin: 0; flex: 1; inline-size: 100%; }
.lightbox__figure img { max-inline-size: 100%; max-block-size: calc(100dvh - 10rem); inline-size: auto; block-size: auto; object-fit: contain; background: var(--white); box-shadow: 0 0.5rem 2rem rgb(0 0 0 / 0.4); }
.lightbox__figure figcaption { max-inline-size: 52rem; font-size: 0.9rem; line-height: 1.5; text-align: center; }
.lightbox__counter { margin: 0.5rem 0 0; font-size: 0.8rem; letter-spacing: 0.05em; opacity: 0.8; }
.lightbox__btn {
  position: absolute; display: grid; place-items: center; inline-size: 3rem; block-size: 3rem; padding: 0;
  color: var(--white); background: rgb(255 255 255 / 0.1); border: 1px solid rgb(255 255 255 / 0.3); cursor: pointer;
}
.lightbox__btn:hover { background: var(--green-dark); border-color: var(--green-dark); }
.lightbox__btn .ico { width: 1.5rem; height: 1.5rem; }
.lightbox__close { inset-block-start: 0.5rem; inset-inline-end: 0.5rem; }
.lightbox__prev, .lightbox__next { inset-block-start: 50%; translate: 0 -50%; }
.lightbox__prev { inset-inline-start: 0.5rem; }
.lightbox__next { inset-inline-end: 0.5rem; }
@media (max-width: 40rem) {
  .lightbox__prev, .lightbox__next { inset-block-start: auto; inset-block-end: 0.5rem; translate: none; }
  .lightbox { padding-block-end: 4rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .lightbox[open] { animation: lb-in 0.18s ease-out; }
  @keyframes lb-in { from { opacity: 0; } }
}

/* ---------- Print ---------- */
@media print {
  .topbar, .site-header, .cta-band, .site-footer, .skip-link, .table-search { display: none !important; }
  .page-title, .hero { color: #000; background: none; }
  .page-title h1, .hero h1, .hero__lead, .breadcrumbs a { color: #000; }
  .hero__img, .hero::before { display: none; }
  .data-table th { color: #000; background: none; }
  .table-wrap { overflow: visible; }
  .data-table tr { break-inside: avoid; }
}
