/* ==========================================================================
   IEEE GRSS Poland Chapter – arkusz stylów (mobile-first, bez frameworków)
   Breakpointy: 640 / 960 / 1200 px
   Rozmiar bazowy: 17 px (html 106.25 %), od 1200 px 18 px – wszystko w rem skaluje się proporcjonalnie.
   ========================================================================== */

/* ---- Fonty (self-hosted, subset latin + latin-ext) ---- */
@font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/open-sans-400.woff2') format('woff2'); }
@font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/open-sans-600.woff2') format('woff2'); }
@font-face { font-family: 'Open Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/open-sans-700.woff2') format('woff2'); }
@font-face { font-family: 'Roboto'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/roboto-400.woff2') format('woff2'); }
@font-face { font-family: 'Roboto'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/roboto-700.woff2') format('woff2'); }

/* ---- Zmienne ---- */
:root {
  --c-primary: #00629B;        /* niebieski IEEE */
  --c-primary-dark: #004c79;
  --c-accent: #00843D;         /* zielony */
  --c-accent-dark: #006a31;
  --c-text: #4a4a4a;           /* zamiast #7A7A7A (kontrast 9.7:1) */
  --c-muted: #5c6670;          /* 5.6:1 na bieli */
  --c-heading: #00629B;
  --c-bg: #ffffff;
  --c-tint: #eaf2f8;           /* jasnoniebieskie tło sekcji */
  --c-tint-2: #cfe0ee;         /* pasek okruszków */
  --c-border: #d6dfe6;
  --c-input-border: #8a97a3;
  --c-error: #b3261e;
  --c-footer: #00629B;
  --font-head: 'Open Sans', 'Segoe UI', Arial, sans-serif;
  --font-body: 'Roboto', 'Segoe UI', Arial, sans-serif;
  --container: 1100px;
  --gutter: 16px;
  --measure: 36em;             /* szerokość kolumny tekstu (~80 znaków) */
  --radius: 6px;
  --radius-img: 8px;
  --frame: 1px solid rgba(0, 98, 155, .25);   /* delikatna ramka zdjęć i kart */
  --shadow: 0 2px 10px rgba(0, 40, 80, .10);
  --shadow-lg: 0 8px 28px rgba(0, 40, 80, .16);
  --header-h: 72px;            /* wysokość przyklejonego nagłówka (po zmniejszeniu) */
  --t-hover: transform .25s ease, box-shadow .25s ease, background-color .2s ease, border-color .2s ease, color .2s ease;
}

/* ---- Reset / podstawy ---- */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 106.25%; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); scroll-behavior: smooth; }
html.nav-locked { overflow: hidden; }
body {
  margin: 0;
  font: 400 1rem/1.65 var(--font-body);
  color: var(--c-text);
  background: var(--c-bg);
  overflow-wrap: break-word;
}
img, svg, video { max-width: 100%; height: auto; }
img { display: block; }
svg { display: inline-block; vertical-align: -0.15em; }
a { color: var(--c-primary); text-decoration-thickness: 1px; text-underline-offset: 2px; transition: color .2s ease, background-color .2s ease; }
a:hover { color: var(--c-primary-dark); }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--c-heading); line-height: 1.25; margin: 0 0 .6em; text-wrap: balance; }
h1 { font-size: 2rem; font-weight: 700; }
h2 { font-size: 1.6rem; font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 1.1em; }
button { font: inherit; }
:focus { outline: none; }
:focus-visible { outline: 2px solid #fff; box-shadow: 0 0 0 4px var(--c-primary); border-radius: 2px; }
::selection { background: var(--c-primary); color: #fff; }

.container { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 8px; top: -100px; z-index: 1000; padding: .6em 1em; background: #fff; color: var(--c-primary); font-weight: 700; border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.skip-link:focus { top: 8px; }
main:focus { outline: none; }

/* ---- Animacje: pojawianie się przy wjeżdżaniu w widok (klasa .reveal) ----
   Bez JS wszystko jest widoczne; skrypt w <head> dodaje html.js-reveal (tylko gdy jest
   IntersectionObserver i brak prefers-reduced-motion), site.js dodaje .is-visible. */
.reveal { transition: opacity .45s ease, translate .45s ease, var(--t-hover); }
html.js-reveal .reveal:not(.is-visible) { opacity: 0; translate: 0 12px; }

/* ---- Przyciski ---- */
.btn {
  display: inline-block; padding: .65em 1.4em; border: 0; border-radius: 4px; cursor: pointer;
  background: var(--c-primary); color: #fff; font: 600 1rem/1.3 var(--font-head);
  text-decoration: none; text-align: center; transition: var(--t-hover);
}
.btn:hover, .btn:focus-visible { background: var(--c-primary-dark); color: #fff; transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0, 40, 80, .22); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn-accent { background: var(--c-accent); }
.btn-accent:hover, .btn-accent:focus-visible { background: var(--c-accent-dark); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.5em 0 0; }

/* ---- Nagłówek (przyklejony) ---- */
.site-header { position: sticky; top: 0; background: #fff; border-bottom: 1px solid var(--c-border); z-index: 50; transition: box-shadow .25s ease; }
.site-header.is-scrolled { box-shadow: 0 2px 14px rgba(0, 40, 80, .14); }
.header-inner { display: flex; align-items: center; justify-content: flex-start; gap: 12px; min-height: 80px; padding-block: 8px; transition: min-height .25s ease, padding .25s ease; }
.is-scrolled .header-inner { min-height: var(--header-h); padding-block: 4px; }
.brand { display: inline-flex; flex-shrink: 0; }
.brand-logo { width: 120px; height: auto; transition: width .25s ease; }
.is-scrolled .brand-logo { width: 100px; }
.nav-toggle {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--c-border); border-radius: 4px;
  background: #fff; color: var(--c-primary); font: 600 1rem var(--font-head); cursor: pointer; transition: var(--t-hover);
}
.nav-toggle:hover { background: var(--c-tint); }
.nav-toggle svg { font-size: 1.4rem; }
.nav-toggle svg + svg { display: none; }
.nav-open .nav-toggle svg:first-child { display: none; }
.nav-open .nav-toggle svg + svg { display: inline-block; }
.site-nav {
  display: none; position: absolute; left: 0; right: 0; top: 100%;
  background: #fff; border-bottom: 1px solid var(--c-border); box-shadow: var(--shadow-lg);
  max-height: calc(100vh - 80px); overflow-y: auto;
}
.nav-open .site-nav { display: block; }
.nav-list, .submenu, .social-list { list-style: none; margin: 0; padding: 0; }
.nav-list { padding: 8px 0; }
.nav-item > a {
  display: block; padding: 12px var(--gutter); font: 600 1.05rem var(--font-head); color: var(--c-primary); text-decoration: none;
  border-left: 4px solid transparent; transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.nav-item > a:hover, .nav-item > a.is-active { border-left-color: var(--c-primary); background: var(--c-tint); }
.submenu-toggle { display: none; }
.submenu a { display: block; padding: 10px var(--gutter) 10px calc(var(--gutter) + 20px); color: var(--c-text); text-decoration: none; font-size: .98rem; }
.submenu a:hover, .submenu a[aria-current] { color: var(--c-primary); background: var(--c-tint); }
.social-list { display: flex; gap: 6px; padding: 8px var(--gutter) 16px; }
.social-list a { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 50%; color: var(--c-primary); font-size: 1.25rem; transition: var(--t-hover); }
.social-list a:hover { background: var(--c-tint); transform: translateY(-2px); }

/* Przełącznik języka PL | EN – na telefonie w pasku nagłówka, obok przycisku Menu */
.lang-switch { margin-left: auto; flex-shrink: 0; }
.lang-switch ul { list-style: none; display: flex; align-items: center; gap: 2px; margin: 0; padding: 0; font: 600 .9rem var(--font-head); }
.lang-switch a { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 32px; padding: 0 6px; border-radius: 4px; color: var(--c-primary); text-decoration: none; transition: var(--t-hover); }
.lang-switch a:not([aria-current]):hover { background: var(--c-tint); }
.lang-switch a[aria-current] { background: var(--c-primary); color: #fff; }
.lang-sep { color: var(--c-border); font-weight: 400; }

/* ---- Pasek IEEE ---- */
.ieee-bar { font-size: .8rem; }
.ieee-bar--dark { background: var(--c-primary); color: #fff; }
.ieee-bar--light { background: var(--c-tint-2); color: var(--c-primary); }
.ieee-bar-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 18px; padding-block: 6px; }
.ieee-bar-logo { display: inline-flex; align-items: center; }
.ieee-bar-logo img { width: 112px; height: auto; }
.ieee-links { display: flex; flex-wrap: wrap; justify-content: center; list-style: none; margin: 0; padding: 0; gap: 4px 0; }
.ieee-links li { display: flex; align-items: center; }
.ieee-links li + li::before { content: '|'; opacity: .6; margin: 0 .7em; }
.ieee-links a { color: inherit; text-decoration: none; white-space: nowrap; }
.ieee-links a:hover { text-decoration: underline; }
.ieee-bar--dark :focus-visible { outline-color: var(--c-primary); box-shadow: 0 0 0 4px #fff; }

/* ---- Hero (strona główna) ---- */
.hero { position: relative; isolation: isolate; min-height: 380px; display: flex; align-items: center; color: #fff; overflow: hidden; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0, 30, 60, .35), rgba(0, 30, 60, .55)); }
.hero-inner { text-align: center; padding-block: 48px; }
.hero-title { color: #fff; text-wrap: balance; font-size: clamp(1.9rem, 6vw, 3.4rem); font-weight: 700; text-shadow: 0 2px 10px rgba(0, 0, 0, .7), 0 0 2px rgba(0, 0, 0, .9); margin-bottom: .6em; }
.hero-buttons { justify-content: center; gap: 14px; }
.hero-buttons .btn { font-size: 1.1rem; padding: .8em 1.6em; box-shadow: 0 4px 14px rgba(0, 0, 0, .3); }
.hero :focus-visible { outline-color: #fff; box-shadow: 0 0 0 4px rgba(0, 0, 0, .6); }

/* ---- Intro ---- */
.intro { padding-block: 48px; }
.intro-inner { display: grid; gap: 32px; align-items: center; }
.intro-media img { width: 100%; border: var(--frame); border-radius: var(--radius-img); box-shadow: var(--shadow); }

/* ---- Sekcje / nagłówki sekcji ---- */
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 24px; }
.section-head h2 { margin: 0; font-size: 1.9rem; }
.section-link { font: 600 1rem var(--font-head); text-decoration: none; }
.section-link:hover { text-decoration: underline; }

/* ---- Kalendarz wydarzeń (strona główna) ---- */
.home-calendar { padding-block: 48px; border-top: 1px solid var(--c-border); }
.calendar-layout { display: grid; gap: 28px; align-items: start; }
.calendar-subhead { font-size: 1.15rem; margin-bottom: .8em; }
.calendar-empty { margin-top: 0; }
.event-mini-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.event-mini-link { display: flex; gap: 16px; align-items: flex-start; padding: 14px 16px; border: var(--frame); border-radius: var(--radius-img); background: #fff; color: var(--c-text); text-decoration: none; transition: var(--t-hover); }
.event-mini-link:hover { background: var(--c-tint); transform: translateY(-2px); box-shadow: var(--shadow); color: var(--c-text); }
.event-mini .event-date { flex-direction: column; align-items: center; justify-content: center; gap: 0; min-width: 58px; padding: 6px 8px; background: var(--c-tint); border-radius: var(--radius); }
.event-mini .event-day { font-size: 1.6rem; }
.event-mini .event-month { font-size: .8rem; }
.event-mini-body { display: block; min-width: 0; }
.event-mini-title { display: block; font: 600 1.05rem/1.3 var(--font-head); color: var(--c-primary); margin-bottom: 6px; }
.event-mini-link:hover .event-mini-title { text-decoration: underline; }
.event-mini-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .9rem; color: var(--c-muted); }
.event-mini-venue svg { color: var(--c-primary); margin-right: 4px; }
.calendar { padding: 18px 18px 16px; border: var(--frame); border-radius: var(--radius-img); background: #fff; }
.cal-grid { width: 100%; border-collapse: collapse; table-layout: fixed; text-align: center; font-family: var(--font-head); }
.cal-caption { caption-side: top; text-align: left; padding: 0 0 10px; font: 700 1.2rem var(--font-head); color: var(--c-primary); }
.cal-grid th { padding: 6px 0; font-size: .75rem; font-weight: 600; color: var(--c-muted); text-transform: uppercase; letter-spacing: .04em; }
.cal-grid abbr { text-decoration: none; border: 0; }
.cal-grid td { padding: 3px; }
.cal-day > a, .cal-day > span { display: flex; align-items: center; justify-content: center; width: 100%; max-width: 42px; aspect-ratio: 1; margin: 0 auto; border-radius: 50%; font-size: .95rem; color: var(--c-text); text-decoration: none; }
.cal-day.is-today > * { box-shadow: inset 0 0 0 2px var(--c-primary); color: var(--c-primary); font-weight: 700; }
.cal-day.has-event > a { background: var(--c-primary); color: #fff; font-weight: 700; transition: var(--t-hover); }
.cal-day.has-event > a:hover { background: var(--c-primary-dark); transform: scale(1.08); }
.cal-day.is-today.has-event > a { box-shadow: inset 0 0 0 2px #fff, 0 0 0 2px var(--c-primary); }
.cal-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 12px 0 0; padding: 0; font-size: .85rem; color: var(--c-muted); }
.cal-swatch { display: inline-block; width: 14px; height: 14px; border-radius: 50%; margin-right: 6px; vertical-align: -2px; }
.cal-swatch--event { background: var(--c-primary); }
.cal-swatch--today { box-shadow: inset 0 0 0 2px var(--c-primary); }
.cal-empty-note { margin: 10px 0 0; font-size: .9rem; color: var(--c-muted); }

/* ---- Aktualności: kafelki (home) i karty (lista) ---- */
.news { background: var(--c-tint); padding-block: 48px; }
.news-grid { display: grid; gap: 20px; }
.post-card { display: grid; gap: 14px; }
.post-card-media { display: block; overflow: hidden; border: var(--frame); border-radius: var(--radius-img); background: var(--c-tint-2); aspect-ratio: 16 / 10; }
.post-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.post-card:hover .post-card-media img { transform: scale(1.03); }
.post-card-date { display: block; font: 600 .85rem var(--font-head); color: var(--c-muted); letter-spacing: .02em; margin-bottom: 4px; }
.post-card-title { margin: 0 0 .4em; }
.post-card-title a { color: var(--c-primary); text-decoration: none; }
.post-card-title a:hover { text-decoration: underline; }
.post-card-excerpt { margin: 0 0 .6em; }
.post-card-more { font: 600 .95rem var(--font-head); text-decoration: none; }
.post-card-more:hover { text-decoration: underline; }
.post-card--tile { background: #fff; border: var(--frame); border-radius: var(--radius-img); box-shadow: var(--shadow); gap: 0; overflow: hidden; }
.post-card--tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.post-card--tile .post-card-media { border: 0; border-bottom: var(--frame); border-radius: 0; }
.post-card--tile .post-card-body { padding: 16px 18px 20px; }
.post-card--tile .post-card-title { font-size: 1.1rem; }
.post-card--tile .post-card-excerpt { font-size: .95rem; }
.post-list { display: grid; gap: 20px; }
.post-card--row { padding: 18px; border: var(--frame); border-radius: var(--radius-img); background: #fff; }
.post-card--row:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.post-card--row .post-card-title { font-size: 1.35rem; }
.list-intro { margin-bottom: 32px; }
.list-feed { margin-top: 32px; font-size: .9rem; }

/* ---- Okruszki (wyśrodkowane) ---- */
.breadcrumbs { background: var(--c-tint-2); font-size: .9rem; }
.breadcrumbs ol { list-style: none; margin: 0; padding: 8px 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; text-align: center; }
.breadcrumbs li { display: inline-flex; align-items: center; color: var(--c-text); }
.breadcrumbs li + li::before { content: '›'; margin: 0 .55em; color: var(--c-muted); }
.breadcrumbs a { color: var(--c-primary); text-decoration: none; font-weight: 600; display: inline-flex; align-items: center; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs svg { font-size: 1.2em; }

/* ---- Baner podstrony ---- */
.page-banner { position: relative; isolation: isolate; min-height: 150px; display: flex; align-items: center; overflow: hidden; }
.page-banner-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.page-banner::before { content: ''; position: absolute; inset: 0; z-index: -1; background: rgba(0, 30, 60, .45); }
.page-banner-inner { text-align: center; padding-block: 28px; }
.page-banner-title { color: #fff; margin: 0; text-wrap: balance; font-size: clamp(1.6rem, 5vw, 2.8rem); text-shadow: 0 2px 8px rgba(0, 0, 0, .7), 0 0 2px rgba(0, 0, 0, .9); }
.page-banner-sub { color: #fff; margin: .4em 0 0; text-shadow: 0 1px 4px rgba(0, 0, 0, .8); }
.page-content { padding-block: 36px 64px; }
/* Kolumna tekstu: czytelna długość linii (~80 znaków), wyśrodkowana */
.page-content { container-type: inline-size; }
.page-content > .prose, .page-content > .post, .page-content > .pager, .page-content > .form-status, .page-content > .contact-form, .page-content > .list-intro { max-width: var(--measure); margin-inline: auto; }
/* Bloki szerokie (siatki, tabele, CTA) wychodzą z kolumny tekstu na pełną szerokość kontenera (jednostki cqw) */
.page-content > .prose > .grid-2, .page-content > .prose > .grid-3, .page-content > .prose > .table-wrap, .page-content > .prose > .cta,
.page-content > .post > .post-body > .grid-2, .page-content > .post > .post-body > .grid-3, .page-content > .post > .post-body > .table-wrap, .page-content > .post > .post-body > .cta { width: 100cqw; max-width: 100cqw; margin-left: calc(50% - 50cqw); }

/* ---- Treść (body_html) ---- */
.prose > :first-child { margin-top: 0; }
.prose h2 { margin-top: 1.8em; }
.prose h3 { margin-top: 1.5em; }
.prose p, .prose ul, .prose ol { margin-bottom: 1.1em; }
.prose p:not(.lead):not(.btn-row), .post-body p { text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
.prose ul, .prose ol { padding-left: 1.5em; }
.prose li { margin-bottom: .35em; }
.prose li > ul, .prose li > ol { margin-top: .35em; margin-bottom: 0; }
.prose img { border: var(--frame); border-radius: var(--radius-img); }
.prose blockquote { margin: 1.5em 0; padding: 14px 20px; border-left: 4px solid var(--c-primary); background: var(--c-tint); border-radius: 0 var(--radius) var(--radius) 0; font-style: italic; }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose hr { border: 0; border-top: 1px solid var(--c-border); margin: 2.5em 0; }
.prose strong { font-weight: 700; color: #333; }
.table-wrap { overflow-x: auto; margin: 1.5em 0; -webkit-overflow-scrolling: touch; }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.prose th, .prose td { padding: 10px 12px; border: 1px solid var(--c-border); text-align: left; vertical-align: top; }
.prose th { background: var(--c-tint); color: var(--c-primary); font-family: var(--font-head); font-weight: 600; }
.prose tbody tr:nth-child(even) { background: #f6f9fb; }
.figure { margin: 2em 0; }
.figure img { width: 100%; border: var(--frame); border-radius: var(--radius-img); }
.figure figcaption { margin-top: .6em; font-size: .9rem; color: var(--c-muted); text-align: center; }
.grid-2, .grid-3 { display: grid; gap: 24px; margin: 1.5em 0; }
.grid-2 > *, .grid-3 > * { min-width: 0; }
.grid-2 img, .grid-3 img { width: 100%; }
.prose .btn { text-decoration: none; margin: .2em .4em .4em 0; }
.cta { margin: 2.5em 0; padding: 32px 24px; background: var(--c-primary); color: #fff; border-radius: var(--radius); text-align: center; }
.cta h2, .cta h3 { color: #fff; margin-top: 0; }
.cta p { text-align: center; hyphens: manual; }
.cta p:last-child { margin-bottom: 0; }
.cta a { color: #fff; }
.cta .btn { background: #fff; color: var(--c-primary); }
.cta .btn:hover { background: var(--c-tint); }
.cta .btn-accent { background: var(--c-accent); color: #fff; }
.cta .btn-accent:hover { background: var(--c-accent-dark); }
.cta :focus-visible { outline-color: var(--c-primary); box-shadow: 0 0 0 4px #fff; }
.lead { font-size: 1.2rem; line-height: 1.6; color: var(--c-muted); }
.notice { margin: 1.5em 0; padding: 14px 20px; border-left: 4px solid var(--c-accent); background: #edf7f0; border-radius: 0 var(--radius) var(--radius) 0; text-align: left; }
.notice p:last-child { margin-bottom: 0; }

/* ---- Wpis ---- */
.post-meta { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-bottom: 1.2em; font: 600 .95rem var(--font-head); color: var(--c-muted); }
.post-meta svg { color: var(--c-primary); margin-right: 4px; }
.post-author::before { content: '✎'; margin-right: 6px; color: var(--c-primary); }
.post-featured { margin: 0 0 2em; }
.post-featured img { width: 100%; border: var(--frame); border-radius: var(--radius-img); box-shadow: var(--shadow); }
.tag-list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 2em 0 0; padding: 0; }
.tag-list li { padding: 3px 10px; border: 1px solid var(--c-border); border-radius: 99px; font-size: .85rem; color: var(--c-muted); }
.tag-list li::before { content: '#'; opacity: .6; }
.share { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 2.5em; padding-top: 1.5em; border-top: 1px solid var(--c-border); }
.share-label { font: 600 1rem var(--font-head); color: var(--c-primary); text-transform: uppercase; letter-spacing: .04em; }
.share-list { list-style: none; display: flex; gap: 10px; margin: 0; padding: 0; }
.share-list a { display: inline-flex; width: 42px; height: 42px; align-items: center; justify-content: center; border-radius: 50%; background: var(--c-primary); color: #fff; font-size: 1.25rem; transition: var(--t-hover); }
.share-list a:hover { background: var(--c-primary-dark); transform: translateY(-2px); box-shadow: var(--shadow); }
.pager { display: grid; gap: 12px; margin-top: 2.5em; }
.pager-link { display: block; padding: 14px 16px; border: 1px solid var(--c-border); border-radius: var(--radius); text-decoration: none; color: var(--c-text); transition: var(--t-hover); }
.pager-link:hover { border-color: var(--c-primary); background: var(--c-tint); transform: translateY(-2px); box-shadow: var(--shadow); color: var(--c-text); }
.pager-dir { display: block; font: 600 .85rem var(--font-head); color: var(--c-primary); margin-bottom: 4px; }
.pager-next { text-align: right; }
.pager-title { display: block; font-weight: 700; }

/* ---- Wydarzenia ---- */
.event-section { margin-bottom: 48px; }
.event-section h2 { padding-bottom: .4em; border-bottom: 2px solid var(--c-primary); }
.event-card { display: grid; gap: 16px; padding: 24px 0; border-bottom: 1px solid var(--c-border); scroll-margin-top: calc(var(--header-h) + 24px); }
.event-card:target { background: var(--c-tint); box-shadow: 0 0 0 12px var(--c-tint); border-radius: var(--radius); }
.event-date { display: flex; align-items: baseline; gap: 6px; font-family: var(--font-head); color: var(--c-primary); }
.event-day { font-size: 1.9rem; font-weight: 700; line-height: 1; }
.event-month { font-size: .9rem; font-weight: 600; text-transform: uppercase; }
.badge { display: inline-block; padding: 2px 10px; margin-bottom: 8px; border: 1px solid var(--c-primary); border-radius: 99px; font: 600 .75rem var(--font-head); color: var(--c-primary); text-transform: uppercase; letter-spacing: .04em; }
.event-title { margin-bottom: .5em; font-size: 1.3rem; }
.event-title a { color: var(--c-primary); text-decoration: none; }
.event-title a:hover { text-decoration: underline; }
.event-meta { list-style: none; margin: 0 0 1em; padding: 0; display: grid; gap: 6px; font-size: .95rem; }
.event-meta li { display: flex; gap: 8px; align-items: baseline; }
.event-meta svg { flex-shrink: 0; color: var(--c-primary); position: relative; top: .1em; }
.event-desc { margin-top: .5em; }
.event-desc > .prose > :last-child, .event-desc.prose > :last-child { margin-bottom: 0; }
details.event-desc summary { cursor: pointer; font: 600 .95rem var(--font-head); color: var(--c-primary); }
details.event-desc[open] summary { margin-bottom: .6em; }
.event-media img { width: 100%; border: var(--frame); border-radius: var(--radius-img); box-shadow: var(--shadow); }

/* ---- Zarząd (zdjęcia w kółkach – bez ramki prostokątnej) ---- */
.board-term { font: 700 1.4rem var(--font-head); color: var(--c-primary); text-align: center; margin-bottom: 1.5em; }
.board-grid { list-style: none; margin: 0 0 32px; padding: 0; display: grid; gap: 32px 24px; justify-content: center; }
.board-grid.board-grid--lead { grid-template-columns: minmax(0, 320px); }
.member { text-align: center; }
.member p { margin: 0; }
.member-photo-wrap { width: 180px; height: 180px; margin: 0 auto 14px; border-radius: 50%; overflow: hidden; border: 4px solid var(--c-tint-2); background: var(--c-tint); transition: var(--t-hover); }
.member:hover .member-photo-wrap { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--c-primary); }
.member--lead .member-photo-wrap { width: 230px; height: 230px; }
.member-photo { width: 100%; height: 100%; object-fit: cover; border: 0; border-radius: 0; }
.member-role { font: 600 1.25rem var(--font-head); color: var(--c-primary); margin-bottom: 8px !important; }
.member-name { font-weight: 700; color: #333; }
.member-affiliation { color: var(--c-muted); }
.member-grade { color: var(--c-muted); font-style: italic; }

/* ---- Formularz ---- */
.contact-form { max-width: 720px; margin-top: 1.5em; }
.form-hint { font-size: .9rem; color: var(--c-muted); }
.req { color: var(--c-error); font-weight: 700; }
.form-field { margin: 0 0 20px; }
.form-field label { display: block; margin-bottom: 6px; font: 600 .95rem var(--font-head); color: #333; }
.form-field input[type="text"], .form-field input[type="email"], .form-field textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--c-input-border); border-radius: 4px; background: #fff; color: #222; font: inherit; transition: border-color .2s ease, box-shadow .2s ease;
}
.form-field textarea { min-height: 160px; resize: vertical; }
.form-field input:focus-visible, .form-field textarea:focus-visible { border-color: var(--c-primary); outline: none; box-shadow: 0 0 0 3px rgba(0, 98, 155, .3); }
.form-field--checkbox { display: flex; gap: 10px; align-items: flex-start; }
.form-field--checkbox input { width: 20px; height: 20px; margin: 3px 0 0; flex-shrink: 0; accent-color: var(--c-primary); }
.form-field--checkbox label { margin: 0; font-weight: 400; font-family: var(--font-body); font-size: 1rem; color: var(--c-text); }
.form-field--hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.form-actions .btn { min-width: 180px; font-size: 1.1rem; }
.form-status { margin: 1.5em auto; padding: 14px 20px; border-left: 4px solid; border-radius: 0 var(--radius) var(--radius) 0; font-weight: 700; }
.form-status--ok { background: #edf7f0; border-color: var(--c-accent); color: #16522e; }
.form-status--error { background: #fdefee; border-color: var(--c-error); color: #7a1a14; }

/* ---- Stopka ---- */
.site-footer { background: var(--c-footer); color: #fff; padding-block: 40px; margin-top: auto; }
.site-footer a { color: #fff; }
.footer-inner { display: grid; gap: 24px; justify-items: center; text-align: center; }
.footer-logo img { width: 150px; height: auto; }
.footer-ieee img { width: 140px; height: auto; }
.footer-text p { margin: 0 0 .5em; font-size: .95rem; }
.footer-note { font-size: .85rem !important; opacity: .9; }
.footer-links { font-size: .9rem; }
.footer-social { justify-content: center; padding: 8px 0 0; }
.footer-social a { color: #fff; }
.footer-social a:hover { background: rgba(255, 255, 255, .15); }
.site-footer :focus-visible { outline-color: var(--c-primary); box-shadow: 0 0 0 4px #fff; }

/* ---- Strona 404 ---- */
.error-page { text-align: center; padding-block: 48px; }
.error-page h1 { font-size: 3rem; }
.error-page .lead { text-align: center; }

/* ==========================================================================
   Breakpointy
   ========================================================================== */
@media (min-width: 640px) {
  :root { --gutter: 24px; }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .board-grid { grid-template-columns: repeat(2, minmax(0, 320px)); }
  .pager { grid-template-columns: 1fr 1fr; }
  .event-card { grid-template-columns: 72px 1fr; }
  .event-date { flex-direction: column; align-items: center; gap: 2px; padding-top: 4px; }
  .event-day { font-size: 2.2rem; }
  .page-banner { min-height: 190px; }
  .hero { min-height: 420px; }
  .calendar-layout { grid-template-columns: 1fr minmax(280px, 360px); }
  .post-card--row { grid-template-columns: 260px 1fr; gap: 22px; align-items: start; }
}

@media (min-width: 960px) {
  :root { --header-h: 80px; }
  .header-inner { min-height: 100px; gap: 16px; }
  .brand-logo { width: 150px; }
  .is-scrolled .brand-logo { width: 120px; }
  .nav-toggle { display: none; }
  .site-nav { display: flex; align-items: center; gap: 12px; margin-left: auto; position: static; background: none; border: 0; box-shadow: none; max-height: none; overflow: visible; }
  .lang-switch { margin-left: 4px; }
  .nav-list { display: flex; align-items: center; gap: 2px; padding: 0; }
  .nav-item { position: relative; display: flex; align-items: center; }
  .nav-item > a { position: relative; padding: 8px 9px; font-size: .92rem; border-left: 0; border-radius: 0; background: none; }
  /* płynne podkreślenie linków w menu */
  .nav-item > a::after { content: ''; position: absolute; left: 9px; right: 9px; bottom: 0; height: 3px; background: var(--c-primary); border-radius: 2px; transform: scaleX(0); transform-origin: left; transition: transform .25s ease; }
  .nav-item > a:hover, .nav-item > a.is-active { background: none; border-left-color: transparent; }
  .nav-item > a:hover::after, .nav-item > a.is-active::after, .nav-item > a:focus-visible::after { transform: scaleX(1); }
  .submenu-toggle {
    display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; margin-left: -6px;
    border: 0; border-radius: 50%; background: none; color: var(--c-primary); cursor: pointer; font-size: 1.1rem; transition: background-color .2s ease;
  }
  .submenu-toggle:hover { background: var(--c-tint); }
  .submenu-toggle svg { transition: transform .2s; }
  .has-children.open .submenu-toggle svg { transform: rotate(180deg); }
  .submenu {
    display: none; position: absolute; top: 100%; left: 0; min-width: 220px; padding: 6px 0;
    background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius); box-shadow: var(--shadow-lg); z-index: 60;
  }
  .has-children:hover .submenu, .has-children:focus-within .submenu, .has-children.open .submenu { display: block; }
  .submenu a { padding: 10px 16px; }
  .social-list { padding: 0; margin-left: 4px; gap: 2px; }
  .social-list a { width: 36px; height: 36px; font-size: 1.15rem; }
  .ieee-bar-inner { justify-content: flex-start; padding-block: 5px; }
  .ieee-links { margin-left: auto; }
  .hero { min-height: 460px; }
  .hero-inner { padding-block: 64px; }
  .intro { padding-block: 64px; }
  .intro-inner { grid-template-columns: 1.2fr 1fr; gap: 56px; }
  .home-calendar { padding-block: 64px; }
  .calendar-layout { grid-template-columns: 1.4fr 1fr; gap: 40px; }
  .news { padding-block: 64px; }
  .post-card--row { grid-template-columns: 320px 1fr; gap: 28px; }
  .page-banner { min-height: 220px; }
  .page-content { padding-block: 48px 80px; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .board-grid { grid-template-columns: repeat(3, minmax(0, 320px)); }
  .event-card { grid-template-columns: 72px 1fr 240px; }
  .event-media { grid-column: 3; }
  .footer-inner { grid-template-columns: auto 1fr auto; align-items: center; text-align: center; }
}

@media (min-width: 1200px) {
  html { font-size: 112.5%; }
  .brand-logo { width: 165px; }
  .is-scrolled .brand-logo { width: 130px; }
  .nav-list { gap: 4px; }
  .nav-item > a { padding: 8px 12px; font-size: 1rem; }
  .nav-item > a::after { left: 12px; right: 12px; }
  .site-nav { gap: 16px; }
  .social-list { margin-left: 8px; gap: 6px; }
  .social-list a { width: 40px; height: 40px; font-size: 1.25rem; }
  .lang-switch { margin-left: 8px; }
  .news-grid { grid-template-columns: repeat(4, 1fr); }
  .hero { min-height: 520px; }
  .hero-title { font-size: 3.6rem; }
}

/* ---- Ograniczony ruch: żadnych animacji ani przejść ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .reveal, html.js-reveal .reveal:not(.is-visible) { opacity: 1 !important; translate: none !important; }
  .btn:hover, .post-card--tile:hover, .post-card--row:hover, .event-mini-link:hover, .social-list a:hover, .share-list a:hover, .pager-link:hover, .member:hover .member-photo-wrap, .cal-day.has-event > a:hover { transform: none !important; }
  .post-card:hover .post-card-media img { transform: none !important; }
}

@media print {
  .site-header, .ieee-bar, .breadcrumbs, .site-footer, .share, .pager, .skip-link, .lang-switch { display: none !important; }
  .page-banner, .hero { min-height: 0; }
  .page-banner-img, .hero-img { display: none; }
  .page-banner-title, .hero-title { color: #000; text-shadow: none; }
  a { color: inherit; }
  .reveal { opacity: 1 !important; translate: none !important; }
}
