/* =========================================================================
   politologia.org — Frontend publiczny
   System projektowy spójny z panelem redakcyjnym: granat + limonka.
   ========================================================================= */

:root {
  --navy:        #18478E;
  --navy-dark:   #103061;
  --navy-soft:   #EAF0FA;
  --lime:        #AAD042;
  --lime-dark:   #8FB730;
  --lime-soft:   #F3F9E7;

  --bg:          #FAFBFD;
  --surface:     #FFFFFF;
  --border:      #E4E9F1;
  --text:        #1D2733;
  --text-muted:  #6B7684;

  --container-w: 98vw;
  --container-max: 1440px;
  --radius-sm:   8px;
  --radius-md:   14px;
  --radius-lg:   20px;
  --shadow-soft: 0 6px 28px rgba(24, 71, 142, 0.08);
  --shadow-card: 0 2px 10px rgba(24, 71, 142, 0.06);

  --font-sans: "Montserrat", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Montserrat", Georgia, "Times New Roman", serif;
  --font-heading: "Montserrat", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  max-width: 100vw;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

body { line-height: 1.55; font-size: 16px; font-weight: 300; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul, ol { margin: 0; padding: 0; }
h1, h2, h3, h4, h5, h6 { margin: 0; line-height: 1.25; font-family: var(--font-heading); font-weight: 700; overflow-wrap: break-word; word-break: break-word; }
p { margin: 0 0 1em; }

.page-wrap {
  width: var(--container-w);
  max-width: min(var(--container-max), 100vw);
  margin: 0 auto;
  box-sizing: border-box;
}

.text-muted { color: var(--text-muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* -------------------------------------------------------------------------
   Ikony SVG — rozmiar musi być jawnie ustawiony, inaczej przeglądarka
   renderuje surowy <svg> w jego naturalnym, dużym rozmiarze.
   ------------------------------------------------------------------------- */

.icon { width: 22px; height: 22px; flex: none; }
.icon-sm { width: 16px; height: 16px; }

/* -------------------------------------------------------------------------
   Obrazki, których plik fizycznie nie istnieje na serwerze (np. testowe
   wiersze w `media` bez realnego uploadu) — ukrywamy złamaną ikonę
   przeglądarki i pokazujemy spokojny placeholder zamiast tekstu alt.
   Patrz assets/js/app.js -> onerror.
   ------------------------------------------------------------------------- */

.img-fallback { position: relative; }
.img-fallback::after {
  content: ''; position: absolute; inset: 0; margin: auto; width: 36px; height: 36px;
  background: var(--border);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6'%3E%3Crect x='3.5' y='4.5' width='17' height='15' rx='1.5'/%3E%3Ccircle cx='8.5' cy='9.5' r='1.6'/%3E%3Cpath d='m5 18 5-5.5 3.2 3.2L17 11l3 5'/%3E%3C/svg%3E") center/60% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6'%3E%3Crect x='3.5' y='4.5' width='17' height='15' rx='1.5'/%3E%3Ccircle cx='8.5' cy='9.5' r='1.6'/%3E%3Cpath d='m5 18 5-5.5 3.2 3.2L17 11l3 5'/%3E%3C/svg%3E") center/60% no-repeat;
}
.avatar.img-fallback::after { background: rgba(255,255,255,.7); width: 44%; height: 44%; }

/* -------------------------------------------------------------------------
   Przyciski / odznaki
   ------------------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font-size: 15px; font-weight: 600; cursor: pointer; transition: background .15s ease;
}
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-dark); }
.btn-accent { background: var(--lime); color: var(--navy-dark); }
.btn-accent:hover { background: var(--lime-dark); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text-muted); }
.btn-ghost:hover { border-color: var(--navy); color: var(--navy); }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 999px;
}
.badge-category { background: var(--navy-soft); color: var(--navy); }
.badge-sponsored { background: #FDF3D8; color: #8A6A0B; }
.badge-neutral { background: var(--border); color: var(--text-muted); }
.badge-urgent { background: #FDEEEE; color: #A23B3B; }
.badge-type { background: var(--lime); color: #fff; }
.badge-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }

/* -------------------------------------------------------------------------
   Nagłówek
   ------------------------------------------------------------------------- */

.site-header { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 40; }
.site-header-inner { display: flex; align-items: center; gap: 24px; height: 72px; }

.site-logo { font-size: 22px; font-weight: 800; color: var(--navy-dark); letter-spacing: -.02em; white-space: nowrap; }
.site-logo .dot { color: var(--lime-dark); }

.site-nav { flex: 1; min-width: 0; }
.site-nav ul { display: flex; gap: 4px; list-style: none; overflow-x: auto; justify-content: flex-end; }
.site-nav a {
  display: block; padding: 10px 14px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 15px; color: var(--text); white-space: nowrap;
  transition: background .15s ease, color .15s ease;
}
.site-nav a:hover, .site-nav a.active { background: var(--navy-soft); color: var(--navy); }

.site-search {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 8px 14px; width: 220px;
}
.site-search input { border: none; background: transparent; outline: none; font-size: 14px; width: 100%; color: var(--text); }
.site-search .icon { color: var(--text-muted); flex: none; }

.menu-toggle { display: none; background: none; border: none; padding: 6px; cursor: pointer; color: var(--navy-dark); margin-left: auto; }

/* -------------------------------------------------------------------------
   Okruszki
   ------------------------------------------------------------------------- */

.breadcrumbs { padding: 14px 0; font-size: 13px; color: var(--text-muted); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; list-style: none; gap: 6px; }
.breadcrumbs li:not(:last-child)::after { content: '/'; margin-left: 6px; color: var(--border); }
.breadcrumbs a:hover { color: var(--navy); }
.breadcrumbs [aria-current] { color: var(--text); font-weight: 600; }

/* -------------------------------------------------------------------------
   Sekcje / nagłówki sekcji
   ------------------------------------------------------------------------- */

.section { padding: 40px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 22px; }

.world-columns { display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; align-items: start; }
.world-column h3 { font-size: 16px; padding-bottom: 10px; margin-bottom: 14px; border-bottom: 2px solid var(--lime); }
.world-column h3 a:hover { color: var(--navy); }
.world-column-featured { margin-bottom: 16px; }
.world-column-featured .article-card-media { aspect-ratio: 4/3; border-radius: var(--radius-sm); margin-bottom: 10px; }
.world-column-featured h4 { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.world-column-item { display: block; padding: 12px 0; border-top: 1px solid var(--border); }
.world-column-item h4 { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.world-column h4 a:hover { color: var(--navy); }
.world-column .article-card-meta { font-size: 12px; }
.section-head h2 { font-size: 24px; font-weight: 700; color: var(--navy-dark); }
.section-head .see-all { font-size: 14px; font-weight: 600; color: var(--navy); display: inline-flex; align-items: center; gap: 4px; }
.section-head .see-all:hover { color: var(--navy-dark); }
.section-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--lime-dark); margin-bottom: 6px; display: block; }

/* -------------------------------------------------------------------------
   Karty artykułów
   ------------------------------------------------------------------------- */

.card-grid { display: grid; gap: 24px; grid-template-columns: repeat(3, 1fr); }
.card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.card-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

.article-card { display: flex; flex-direction: column; }
.article-card-media {
  position: relative; display: block; border-radius: var(--radius-md); overflow: hidden;
  aspect-ratio: 16/10; background: var(--navy-soft); margin-bottom: 14px;
}
.article-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.article-card:hover .article-card-media img { transform: scale(1.04); }
.article-card-category {
  position: absolute; top: 12px; left: 12px; background: var(--surface);
  padding: 5px 11px; border-radius: 999px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .03em; color: var(--navy);
}
.article-card h3 { font-size: 19px; font-weight: 700; margin-bottom: 8px; }
.article-card h3 a:hover { color: var(--navy); }
.article-card p.lead { color: var(--text-muted); font-size: 14.5px; margin-bottom: 10px; }
.article-card-meta { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); margin-top: auto; }
.article-card-meta .dot-sep::before { content: '·'; margin: 0 6px; }

/* Hero */
.hero-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 28px; }
.hero-main .article-card-media { aspect-ratio: 16/9; margin-bottom: 18px; }
.hero-main h1, .hero-main h2 { font-size: 34px; font-weight: 700; line-height: 1.15; margin-bottom: 12px; }
.hero-main p.lead { font-size: 17px; color: var(--text-muted); }
.hero-side { display: flex; flex-direction: column; gap: 18px; }
.hero-side-item { display: flex; gap: 14px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.hero-side-item:last-child { border-bottom: none; padding-bottom: 0; }
.hero-side-item .article-card-media { width: 108px; flex: none; aspect-ratio: 4/3; margin-bottom: 0; border-radius: var(--radius-sm); }
.hero-side-item h3 { font-size: 15.5px; margin-bottom: 4px; }

/* -------------------------------------------------------------------------
   Strona główna — hero 5-kolumnowy
   ------------------------------------------------------------------------- */

.home-hero-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(2, 1fr);
  grid-template-areas: "feature feature img1 text1 mission" "feature feature img2 text2 mission";
  gap: 20px;
}

.hero-feature {
  grid-area: feature; position: relative; display: block; border-radius: var(--radius-lg);
  overflow: hidden; min-height: 320px; background: var(--navy-soft);
}
.hero-feature > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-feature-overlay {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 28px;
  background: linear-gradient(to top, rgba(16, 48, 97, .92) 10%, rgba(16, 48, 97, 0) 75%);
  color: #fff;
}
.hero-feature-overlay h2 { font-size: 26px; font-weight: 700; line-height: 1.2; margin: 12px 0 14px; color: #fff; }
.badge-on-image { background: var(--lime); color: #fff; }
.hero-feature-meta { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: rgba(255, 255, 255, .9); min-width: 0; }
.hero-feature-meta .avatar-mini {
  width: 26px; height: 26px; border-radius: 50%; overflow: hidden; background: var(--lime); color: var(--navy-dark);
  display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; flex: none;
}
.hero-feature-meta .avatar-mini img { position: static; width: 100%; height: 100%; object-fit: cover; }
.hero-avatars { display: flex; flex: none; }
.hero-avatars .avatar-mini:not(:first-child) { margin-left: -8px; border: 2px solid var(--navy-dark); }

.hero-sec-img-1, .hero-sec-img-2 {
  display: block; border-radius: var(--radius-md); overflow: hidden; background: var(--navy-soft); min-height: 0;
}
.hero-sec-img-1 { grid-area: img1; }
.hero-sec-img-2 { grid-area: img2; }
.hero-sec-img-1 img, .hero-sec-img-2 img { width: 100%; height: 100%; object-fit: cover; }

.hero-sec-text-1 { grid-area: text1; }
.hero-sec-text-2 { grid-area: text2; }
.hero-sec-text-1, .hero-sec-text-2 { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; min-width: 0; }
.hero-sec-text-1 h3, .hero-sec-text-2 h3 { font-size: 16.5px; font-weight: 700; margin: 8px 0 6px; }
.hero-sec-text-1 h3 a:hover, .hero-sec-text-2 h3 a:hover { color: var(--navy); }

.hero-mission {
  grid-area: mission; background: var(--navy-soft); border-radius: var(--radius-lg);
  padding: 26px; display: flex; flex-direction: column;
}
.hero-mission .eyebrow {
  display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700;
  color: var(--navy); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 12px;
}
.hero-mission .eyebrow::before { content: ''; width: 16px; height: 2px; background: var(--lime-dark); }
.hero-mission h2 { font-size: 21px; font-weight: 700; color: var(--navy-dark); line-height: 1.25; margin-bottom: 12px; }
.hero-mission p { font-size: 14px; color: var(--text-muted); line-height: 1.6; margin-bottom: 20px; }
.hero-mission .btn { margin-top: auto; align-self: flex-start; }

@media (max-width: 1100px) {
  .home-hero-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: none;
    grid-template-areas: "feature feature" "img1 text1" "img2 text2" "mission mission";
  }
  .hero-sec-img-1, .hero-sec-img-2 { aspect-ratio: 4/3; }
}

@media (max-width: 720px) {
  .home-hero-grid {
    grid-template-columns: 1fr;
    grid-template-areas: "feature" "img1" "text1" "img2" "text2" "mission";
  }
  .hero-feature { min-height: 260px; }
}

/* -------------------------------------------------------------------------
   Strona główna — pasek 3 kolumn pod hero (najnowsze / książki / wydarzenia)
   ------------------------------------------------------------------------- */

.home-lower-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; align-items: start; }

.column-feature { min-height: 260px; margin-bottom: 4px; }
.column-feature .hero-feature-overlay h2 { font-size: 19px; margin: 0 0 10px; }
.column-feature .hero-feature-overlay { padding: 18px; }

.book-grid.cols-3 { grid-template-columns: repeat(3, 1fr); gap: 18px; }
.book-card-feature .book-card-cover { width: 100%; max-width: 110px; }
.book-card-feature .book-author { font-size: 12.5px; font-weight: 700; color: var(--text-muted); margin-bottom: 2px; }
.book-card-feature h3 { font-size: 14.5px; margin-bottom: 4px; }
.book-card-feature .book-feature-lead { font-size: 12.5px; color: var(--text-muted); margin-bottom: 8px; }

.text-link { display: inline-flex; align-items: center; gap: 4px; font-size: 13.5px; font-weight: 700; color: var(--navy); }
.text-link:hover { color: var(--navy-dark); }

.event-card { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.event-card:first-child { padding-top: 0; }
.event-date-box {
  width: 58px; height: 58px; border-radius: var(--radius-sm); background: var(--navy); color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none;
}
.event-day { font-size: 19px; font-weight: 800; line-height: 1.1; }
.event-month { font-size: 10.5px; font-weight: 700; letter-spacing: .03em; }
.event-year { font-size: 9.5px; opacity: .75; }
.event-info h3 { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.event-meta { font-size: 13px; color: var(--text-muted); }

/* -------------------------------------------------------------------------
   Strona /wydarzenia — kafle "ostatnio dodane" + kalendarz
   ------------------------------------------------------------------------- */

.event-tile-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.event-tile {
  display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  overflow: hidden; box-shadow: var(--shadow-card);
}
.event-tile-media { aspect-ratio: 16/9; background: var(--navy-soft); }
.event-tile-media img { width: 100%; height: 100%; object-fit: cover; }
.event-tile-date-fallback {
  width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--navy); color: #fff;
}
.event-tile-date-fallback .event-day { font-size: 28px; }
.event-tile-date-fallback .event-month { font-size: 13px; }
.event-tile-body { padding: 18px 20px; }
.event-tile-body h3 { font-size: 16px; margin-bottom: 6px; }
.event-tile:hover h3 { color: var(--navy); }
.event-tile-body .event-meta { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.event-tile-lead { font-size: 13.5px; color: var(--text-muted); line-height: 1.5; margin: 0; }

.event-calendar { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }
.event-calendar-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.event-calendar-header h2 { font-size: 19px; color: var(--navy-dark); }
.event-calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.event-calendar-dow { text-align: center; font-size: 12px; font-weight: 700; color: var(--text-muted); padding-bottom: 8px; text-transform: uppercase; }
.event-calendar-cell {
  min-height: 88px; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 6px;
  display: flex; flex-direction: column; gap: 3px; background: var(--bg);
}
.event-calendar-cell.is-empty { border: none; background: transparent; }
.event-calendar-cell.is-today { border-color: var(--lime-dark); background: var(--lime-soft); }
.event-calendar-cell .day-num { font-size: 12.5px; font-weight: 700; color: var(--text-muted); }
.event-calendar-cell.is-today .day-num { color: var(--navy-dark); }
.event-pill {
  display: block; font-size: 11px; font-weight: 600; background: var(--navy); color: #fff;
  border-radius: 4px; padding: 2px 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.event-pill:hover { background: var(--navy-dark); }

.event-header-fallback {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--navy); color: #fff;
}
.event-header-fallback .event-day { font-size: 40px; }
.event-header-fallback .event-month { font-size: 15px; text-transform: uppercase; letter-spacing: .04em; }

@media (max-width: 900px) {
  .home-lower-grid { grid-template-columns: 1fr; gap: 32px; }
  .event-tile-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .event-calendar { padding: 16px; }
  .event-calendar-grid { gap: 4px; }
  .event-calendar-cell { min-height: 56px; padding: 4px; }
  .event-pill { font-size: 0; padding: 0; width: 6px; height: 6px; border-radius: 50%; }
}

/* Lista pozioma (najpopularniejsze, autor, tag) */
.article-row-list { list-style: none; }
.article-row {
  display: flex; align-items: center; gap: 18px; padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.article-row:first-child { padding-top: 0; }
.article-row-rank { font-size: 26px; font-weight: 800; color: var(--navy-soft); width: 36px; flex: none; }
.article-row-content { min-width: 0; flex: 1; }
.article-row-media { width: 110px; aspect-ratio: 4/3; border-radius: var(--radius-sm); overflow: hidden; flex: none; background: var(--navy-soft); }
.article-row-media img { width: 100%; height: 100%; object-fit: cover; }
.article-row h3 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }

/* -------------------------------------------------------------------------
   Kategorie na stronie głównej / kafle
   ------------------------------------------------------------------------- */

.category-tile {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--navy); color: #fff; border-radius: var(--radius-md);
  padding: 16px 20px; margin-bottom: 22px;
}
.category-tile h2 { font-size: 20px; font-weight: 700; }
.category-tile a { color: var(--lime); font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }

.author-strip { display: flex; gap: 18px; overflow-x: auto; padding-bottom: 6px; }
.author-chip { flex: none; text-align: center; width: 96px; }
.author-chip .avatar {
  width: 68px; height: 68px; border-radius: 50%; margin: 0 auto 10px; overflow: hidden;
  background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 20px;
}
.author-chip .avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-chip .name { font-size: 13px; font-weight: 700; }
.author-chip .count { font-size: 12px; color: var(--text-muted); }

/* -------------------------------------------------------------------------
   Strona "Nasi autorzy"
   ------------------------------------------------------------------------- */

.editor-feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 24px; }
.editor-feature-card {
  display: flex; gap: 22px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-card);
}
.editor-feature-card .avatar {
  width: 96px; height: 96px; border-radius: 50%; overflow: hidden; flex: none;
  background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 28px;
}
.editor-feature-card .avatar img { width: 100%; height: 100%; object-fit: cover; }
.editor-feature-body h2 { font-size: 21px; margin: 10px 0 2px; }
.editor-feature-body h2 a:hover { color: var(--navy); }
.editor-feature-body .position { font-size: 14px; color: var(--text-muted); margin-bottom: 10px; }
.editor-feature-body .bio { font-size: 14.5px; line-height: 1.6; margin-bottom: 16px; }

.author-directory-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 24px; }
.author-directory-card {
  text-align: center; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 26px 18px;
}
.author-directory-card .avatar {
  width: 76px; height: 76px; border-radius: 50%; overflow: hidden; margin: 0 auto 14px;
  background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 22px;
}
.author-directory-card .avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-directory-card h3 { font-size: 15.5px; margin-bottom: 4px; }
.author-directory-card h3 a:hover { color: var(--navy); }
.author-directory-card .position { font-size: 13px; color: var(--text-muted); margin-bottom: 14px; min-height: 18px; }

@media (max-width: 720px) {
  .editor-feature-card { flex-direction: column; text-align: center; }
  .editor-feature-card .avatar { margin: 0 auto; }
}

/* -------------------------------------------------------------------------
   Książki (recenzje)
   ------------------------------------------------------------------------- */

.book-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.related-books-grid { grid-template-columns: repeat(6, 1fr); }

/* Wariant użyty na stronie głównej — okładki o połowę mniejsze, wyśrodkowane */
.book-grid-compact .book-card { align-items: center; text-align: center; }
.book-grid-compact .book-card-cover { max-width: 50%; margin: 0 auto 14px; }
.book-grid-compact .book-card .btn { align-self: center; }
.book-card { display: flex; flex-direction: column; }
.book-card-cover {
  position: relative; display: block; aspect-ratio: 2/3; border-radius: var(--radius-md);
  overflow: hidden; background: var(--navy-soft); margin-bottom: 14px;
}
.book-card-cover img { width: 100%; height: 100%; object-fit: cover; }
.book-card-rating {
  position: absolute; top: 10px; right: 10px; background: var(--navy); color: #fff;
  font-size: 13px; font-weight: 800; padding: 4px 9px; border-radius: 999px;
}
.book-card h3 { font-size: 16.5px; font-weight: 700; margin-bottom: 4px; }
.book-card .book-author { font-size: 13.5px; color: var(--text-muted); margin-bottom: 8px; }
.book-card .btn { margin-top: auto; align-self: flex-start; padding: 8px 16px; font-size: 13.5px; }

.book-row {
  display: flex; gap: 20px; padding: 22px 0; border-bottom: 1px solid var(--border); align-items: flex-start;
}
.book-row:first-child { padding-top: 0; }
.book-row .book-card-cover { width: 100px; flex: none; margin-bottom: 0; }
.book-row .about { font-size: 14.5px; color: var(--text-muted); margin-bottom: 10px; }

/* -------------------------------------------------------------------------
   Lista /ksiazki — 2 w rzędzie, okładka + opis, koło oceny na okładce
   ------------------------------------------------------------------------- */

.book-row-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 36px 40px; }

.book-row-card { display: flex; gap: 22px; padding-bottom: 32px; border-bottom: 1px solid var(--border); }

.book-row-cover {
  display: block; flex: none; width: 140px; aspect-ratio: 2/3;
  border-radius: var(--radius-md); overflow: hidden; background: var(--navy-soft);
  box-shadow: 0 14px 28px -10px rgba(16, 48, 97, .3);
}
.book-row-cover img { width: 100%; height: 100%; object-fit: cover; }

.book-row-info { min-width: 0; flex: 1; }
.book-row-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.book-row-title-row h3 { font-size: 18px; margin-bottom: 4px; }
.book-row-title-row h3 a:hover { color: var(--navy); }

.book-row-rating { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: none; }
.book-row-rating-circle {
  width: 40px; height: 40px; border-radius: 50%; background: var(--navy); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800;
  box-shadow: 0 4px 10px rgba(16, 48, 97, .35);
}
.book-row-rating .star-rating { font-size: 10px; letter-spacing: 1px; margin-top: 0; }
.book-row-rating .star-rating::before { color: var(--lime); }

.book-row-info .book-author { font-size: 13.5px; font-weight: 700; color: var(--text-muted); margin-bottom: 10px; }
.book-row-about { font-size: 14.5px; color: var(--text-muted); line-height: 1.6; margin-bottom: 14px; }

@media (max-width: 720px) {
  .book-row-grid { grid-template-columns: 1fr; }
  .book-row-card { gap: 16px; }
  .book-row-cover { width: 110px; }
}

/* -------------------------------------------------------------------------
   Strona pojedynczej książki (recenzji)
   ------------------------------------------------------------------------- */

.book-page { padding: 28px 0 0; }

/* Wspólna siatka 3-kolumnowa dla górnej i dolnej części strony — dzięki
   temu okładka (kolumna A) i pusta kolumna pod nią leżą dokładnie w tym
   samym miejscu co treść recenzji i box "Dla kogo?" niżej. */
.book-grid-3col { display: grid; grid-template-columns: 310px 1fr 310px; gap: 36px; align-items: start; }
.book-grid-3col-bottom { margin-top: 8px; }

.book-cover-large {
  width: 100%; max-width: 250px; aspect-ratio: 2/3; border-radius: var(--radius-md); overflow: hidden;
  background: var(--navy-soft); margin: 0 auto;
  box-shadow: 0 22px 40px -14px rgba(16, 48, 97, .38), 0 8px 18px -6px rgba(16, 48, 97, .22);
}
.book-cover-large img { width: 100%; height: 100%; object-fit: cover; }

.book-reviewer { display: flex; align-items: center; gap: 12px; margin-top: 18px; min-width: 0; }
.book-reviewer .avatar {
  width: 44px; height: 44px; border-radius: 50%; overflow: hidden; flex: none;
  background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.book-reviewer .avatar img { width: 100%; height: 100%; object-fit: cover; }
.book-reviewer .reviewer-name { font-weight: 700; font-size: 14px; }
.book-reviewer .reviewer-meta { font-size: 12.5px; color: var(--text-muted); }
.book-reviewer .reviewer-meta .icon { width: 13px; height: 13px; vertical-align: -2px; }

.book-title-col h1 { font-size: 32px; font-weight: 700; color: var(--navy-dark); line-height: 1.2; margin: 10px 0 8px; }
.book-title-col .lead { font-size: 17px; color: var(--text-muted); margin-bottom: 0; }

.book-meta-rating-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 24px; }

.book-meta-table { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin-bottom: 24px; }
.book-meta-table dt { font-size: 14px; color: var(--text-muted); }
.book-meta-table dd { font-size: 14px; font-weight: 600; margin: 0; }

.book-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.book-rating-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 20px; text-align: left;
}
.book-rating-card h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); margin-bottom: 10px; }
.book-rating-card .rating-number { font-size: 34px; font-weight: 800; color: var(--navy-dark); line-height: 1; }
.book-rating-card .rating-number span { font-size: 16px; font-weight: 600; color: var(--text-muted); }
.book-rating-card .rating-note { font-size: 13px; font-style: italic; color: var(--text-muted); margin-top: 10px; }

.star-rating { position: relative; display: inline-block; font-size: 20px; line-height: 1; letter-spacing: 3px; color: var(--border); margin-top: 8px; }
.star-rating::before {
  content: '★★★★★'; position: absolute; inset: 0; width: var(--fill, 0%); overflow: hidden;
  white-space: nowrap; color: var(--lime-dark);
}

.book-divider { border: none; border-top: 1px solid var(--border); margin: 32px 0; }

.book-side-combo h4:not(:first-child) { margin-top: 20px; }

.article-body h2:first-child { margin-top: 0; }

.checklist { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.checklist li { display: flex; align-items: flex-start; gap: 10px; font-size: 14.5px; }
.check-circle {
  width: 20px; height: 20px; border-radius: 50%; background: var(--lime);
  display: flex; align-items: center; justify-content: center; flex: none; margin-top: 1px;
}
.check-circle .icon { width: 12px; height: 12px; color: #fff; }

/* -------------------------------------------------------------------------
   Oceny i komentarze czytelników pod książką
   ------------------------------------------------------------------------- */

.book-review-list { display: flex; flex-direction: column; gap: 20px; margin-bottom: 32px; }
.book-review { padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.book-review:last-child { border-bottom: none; padding-bottom: 0; }
.book-review-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.book-review-rating {
  background: var(--navy); color: #fff; font-size: 12.5px; font-weight: 800;
  padding: 3px 10px; border-radius: 999px; flex: none;
}
.book-review-author { font-weight: 700; font-size: 14px; }
.book-review-date { font-size: 13px; color: var(--text-muted); }
.book-review-comment { font-size: 15px; line-height: 1.6; margin: 0; }

.book-review-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; }
.book-review-form h3 { font-size: 18px; margin-bottom: 18px; }
.book-review-form .field { margin-bottom: 18px; }
.book-review-form .field:last-of-type { margin-bottom: 20px; }
.book-review-form label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.book-review-form select,
.book-review-form textarea,
.book-review-form input[type="text"] {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 15px; font-family: inherit; outline: none; background: var(--bg);
}
.book-review-form select:focus,
.book-review-form textarea:focus,
.book-review-form input[type="text"]:focus { border-color: var(--navy); box-shadow: 0 0 0 3px var(--navy-soft); background: var(--surface); }
.book-review-form textarea { resize: vertical; min-height: 100px; }
.book-review-form .field-hint { font-size: 13px; color: var(--text-muted); margin-top: 14px; margin-bottom: 0; }

.alert-success-box, .alert-error-box {
  padding: 14px 18px; border-radius: var(--radius-sm); font-size: 14.5px; margin-bottom: 20px;
}
.alert-success-box { background: var(--lime-soft); color: #3d5a17; border: 1px solid var(--lime); }
.alert-error-box { background: #FDEEEE; color: #A23B3B; border: 1px solid #f0c7c7; }

@media (max-width: 720px) {
  .related-books-grid { grid-template-columns: 1fr; justify-items: center; }
  .related-books-grid > *:not(:first-child) { display: none; }
  .related-books-grid .book-card-cover { max-width: 50%; margin: 0 auto 14px; }
  .book-review-form { padding: 20px; }
}

/* -------------------------------------------------------------------------
   Reklamy
   ------------------------------------------------------------------------- */

.ad-slot { display: flex; justify-content: center; padding: 18px 0; }
.ad-slot-header, .ad-slot-below-menu, .ad-slot-footer { background: var(--surface); border-bottom: 1px solid var(--border); }

/* -------------------------------------------------------------------------
   Artykuł — layout i typografia
   ------------------------------------------------------------------------- */

.article-header { padding: 32px 0 50px; }
.article-header-grid { display: grid; grid-template-columns: 1fr 380px; gap: 36px; align-items: start; }
.article-header-text { min-width: 0; }
.article-header h1 { font-size: 32px; font-weight: 700; line-height: 1.2; margin-bottom: 16px; color: var(--navy-dark); }
.article-header .lead { font-size: 18px; color: var(--text-muted); margin-bottom: 18px; }

.article-byline-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-top: 18px; }
.article-byline-info { display: flex; align-items: center; gap: 12px; min-width: 0; }
.article-byline-info .avatar {
  width: 46px; height: 46px; border-radius: 50%; background: var(--navy); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; overflow: hidden; flex: none;
}
.article-byline-info .avatar img { width: 100%; height: 100%; object-fit: cover; }
.byline-avatars { display: flex; flex: none; }
.byline-avatars .avatar:not(:first-child) { margin-left: -12px; border: 2px solid var(--surface); }
.article-byline-info .author-name { color: var(--navy); font-weight: 700; font-size: 15px; }
.article-byline-info .author-name:hover { text-decoration: underline; }
.byline-meta { font-size: 13.5px; color: var(--text-muted); margin-top: 2px; }
.byline-meta .icon { width: 14px; height: 14px; vertical-align: -2px; }
.byline-actions { display: flex; gap: 10px; }

.btn-sm { padding: 9px 16px; font-size: 13.5px; }
.btn.saved { background: var(--navy); color: #fff; border-color: var(--navy); }

.article-header-media { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4/3; background: var(--navy-soft); }
.article-header-media img { width: 100%; height: 100%; object-fit: cover; }
.article-header-media figcaption { font-size: 12.5px; color: var(--text-muted); margin-top: 8px; line-height: 1.5; }

.article-layout { display: grid; grid-template-columns: 56px minmax(0, 1fr) 380px; gap: 32px; align-items: start; }

.article-share-rail { position: sticky; top: 96px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.article-share-rail .rail-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); writing-mode: horizontal-tb; }
.article-share-rail a {
  width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--navy-soft); color: var(--navy);
}
.article-share-rail a:hover { background: var(--navy); color: #fff; }

.numbered-list { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.numbered-list li { display: flex; align-items: flex-start; gap: 12px; font-size: 14px; line-height: 1.45; }
.numbered-list .num {
  width: 24px; height: 24px; border-radius: 50%; background: var(--lime); color: var(--navy-dark);
  font-weight: 800; font-size: 12.5px; display: flex; align-items: center; justify-content: center; flex: none;
}
.numbered-list.navy .num { background: var(--navy); color: #fff; }
.numbered-list a { color: var(--text); }
.numbered-list a:hover { color: var(--navy); }

.sidebar-widget-title { font-size: 17px; font-weight: 800; color: var(--navy-dark); margin-bottom: 16px; }

.article-body { font-size: 18px; line-height: 1.75; }
.article-body > p:first-child::first-letter {
  font-family: var(--font-serif); font-size: 62px; font-weight: 800; float: left;
  line-height: .8; padding: 6px 8px 0 0; color: var(--navy);
}
.article-body .article-lead { font-size: 20px; font-weight: 600; color: var(--text); margin-bottom: 1.2em; }
.article-body h2 { font-size: 26px; font-weight: 700; margin: 1.6em 0 .6em; color: var(--navy-dark); }
.article-body h3 { font-size: 21px; font-weight: 700; margin: 1.4em 0 .5em; }
.article-body h4, .article-body h5, .article-body h6 { font-size: 18px; font-weight: 700; margin: 1.2em 0 .5em; }
.article-body .article-list { margin: 0 0 1.2em; padding-left: 1.4em; }
.article-body .article-list li { margin-bottom: .4em; }
.article-body a { color: var(--navy); text-decoration: underline; text-decoration-color: var(--navy-soft); }

.quote-block {
  margin: 1.8em 0; padding: 20px 26px; border-left: 4px solid var(--lime);
  background: var(--lime-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 19px; font-style: italic; color: var(--navy-dark);
}
.quote-highlight { font-size: 24px; font-weight: 700; border-left-color: var(--navy); background: var(--navy-soft); font-style: normal; }
.quote-block cite { display: block; font-size: 14px; font-style: normal; color: var(--text-muted); margin-top: 10px; }

.table-wrap { overflow-x: auto; margin: 1.6em 0; }
.article-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.article-table th, .article-table td { border: 1px solid var(--border); padding: 10px 14px; text-align: left; }
.article-table th { background: var(--navy-soft); font-weight: 700; }

.article-figure { margin: 1.8em 0; }
.article-figure img { border-radius: var(--radius-md); width: 100%; }
.article-figure figcaption { font-size: 13.5px; color: var(--text-muted); margin-top: 8px; text-align: center; }
.article-figure.align-left { float: left; width: 45%; margin-right: 24px; }
.article-figure.align-right { float: right; width: 45%; margin-left: 24px; }
.article-figure.align-full { width: 100vw; max-width: var(--container-max); margin-left: 50%; transform: translateX(-50%); }

.article-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 1.6em 0 .4em; border-radius: var(--radius-md); overflow: hidden; }
.article-gallery img { aspect-ratio: 1/1; object-fit: cover; }
.gallery-caption { font-size: 13.5px; color: var(--text-muted); text-align: center; margin-bottom: 1.6em; }

.article-video video, .article-audio audio { width: 100%; border-radius: var(--radius-md); }
.article-video figcaption, .article-audio figcaption { font-size: 13.5px; color: var(--text-muted); margin-top: 8px; }

.pdf-download {
  display: inline-flex; align-items: center; gap: 8px; margin: 1.4em 0;
  padding: 12px 18px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-weight: 700; color: var(--navy); background: var(--navy-soft);
}

.article-embed { margin: 1.8em 0; }
.article-iframe iframe { width: 100%; border-radius: var(--radius-md); }
.article-divider { border: none; border-top: 2px dotted var(--border); margin: 2.2em 0; }
.article-cta { text-align: center; margin: 2em 0; }

.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 2.4em 0; }
.article-tags a {
  padding: 7px 14px; border-radius: 999px; background: var(--bg); border: 1px solid var(--border);
  font-size: 13.5px; font-weight: 600; color: var(--text-muted);
}
.article-tags a:hover { color: var(--navy); border-color: var(--navy); }

.article-share { display: none; gap: 10px; margin: 1.6em 0; }
.article-share a {
  width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--navy-soft); color: var(--navy);
}
.article-share a:hover { background: var(--navy); color: #fff; }

.author-box {
  display: flex; gap: 18px; padding: 24px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); margin: 2em 0;
}
.author-box > div { min-width: 0; }
.author-box .avatar { width: 64px; height: 64px; border-radius: 50%; flex: none; overflow: hidden; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.author-box .avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-box h4 { font-size: 17px; margin-bottom: 6px; }
.author-box p { font-size: 14.5px; color: var(--text-muted); }
.author-box .socials { display: flex; gap: 8px; margin-top: 8px; }
.author-box .socials a { color: var(--text-muted); }
.author-box .socials a:hover { color: var(--navy); }

.article-aside { display: flex; flex-direction: column; gap: 28px; }
.aside-widget { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 22px; }
.aside-widget h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin-bottom: 16px; }

/* -------------------------------------------------------------------------
   Strony statyczne / autor / kategoria / tag / wyszukiwarka
   ------------------------------------------------------------------------- */

.page-header { padding: 36px 0 28px; }
.page-header h1 { font-size: 30px; font-weight: 700; color: var(--navy-dark); }
.page-header .desc { color: var(--text-muted); font-size: 16px; margin-top: 8px; max-width: 720px; }

.static-content { font-size: 17px; line-height: 1.75; padding-bottom: 60px; max-width: 760px; }
.static-content h2 { font-size: 24px; margin: 1.4em 0 .6em; color: var(--navy-dark); }

.author-hero { display: flex; gap: 24px; align-items: flex-start; padding: 36px 0; }
.author-hero > div { min-width: 0; }
.author-hero .avatar {
  width: 96px; height: 96px; border-radius: 50%; flex: none; overflow: hidden; background: var(--navy);
  color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 30px;
}
.author-hero .avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-hero h1 { font-size: 26px; margin-bottom: 4px; }
.author-hero .position { color: var(--text-muted); margin-bottom: 8px; }
.author-hero .bio { font-size: 15px; color: var(--text); line-height: 1.6; margin-bottom: 10px; max-width: 640px; }

.search-form-full { display: flex; gap: 10px; margin-bottom: 28px; max-width: 560px; }
.search-form-full input {
  flex: 1; padding: 13px 18px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 15px; outline: none;
}
.search-form-full input:focus { border-color: var(--navy); box-shadow: 0 0 0 3px var(--navy-soft); }
.search-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.search-filters select { padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state .icon { width: 40px; height: 40px; margin: 0 auto 16px; color: var(--border); }

.pagination { display: flex; justify-content: center; gap: 6px; padding: 30px 0 50px; }
.pagination a, .pagination span {
  min-width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; color: var(--text-muted);
}
.pagination a:hover { background: var(--navy-soft); color: var(--navy); }
.pagination .current { background: var(--navy); color: #fff; }

/* -------------------------------------------------------------------------
   Stopka
   ------------------------------------------------------------------------- */

.site-footer { background: var(--navy-dark); color: rgba(255,255,255,.82); margin-top: 40px; }
.site-footer .site-logo { color: #fff; }
.site-footer-inner { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; padding: 48px 0 32px; }
.footer-col h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: rgba(255,255,255,.55); margin-bottom: 16px; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: rgba(255,255,255,.82); font-size: 14.5px; }
.footer-links a:hover { color: var(--lime); }
.footer-col-html { font-size: 14.5px; color: rgba(255, 255, 255, .82); line-height: 1.6; }
.footer-col-html a { color: rgba(255, 255, 255, .82); }
.footer-col-html a:hover { color: var(--lime); }
.footer-col-html p:last-child { margin-bottom: 0; }
.footer-social { display: flex; gap: 10px; margin-top: 16px; }
.footer-social a { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.08); display: flex; align-items: center; justify-content: center; }
.footer-social a:hover { background: var(--lime); color: var(--navy-dark); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 18px 0; font-size: 13px; color: rgba(255,255,255,.55); }

/* -------------------------------------------------------------------------
   Responsywność
   ------------------------------------------------------------------------- */

@media (max-width: 1100px) {
  .article-layout { grid-template-columns: 1fr; }
  .article-share-rail { display: none; }
  .article-share { display: flex; }
  .article-aside { flex-direction: row; overflow-x: auto; }
  .aside-widget { min-width: 280px; }
  .article-header-grid { grid-template-columns: 1fr 260px; gap: 24px; }
  .world-columns { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .book-grid { grid-template-columns: repeat(2, 1fr); }
  .book-grid-3col { grid-template-columns: 160px 1fr; }
  .book-grid-3col-bottom { grid-template-columns: 1fr; }
  .book-empty-col { display: none; }
  .book-meta-rating-row { grid-template-columns: 1fr; }
  .book-rating-card { max-width: 260px; }
  .site-footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .page-wrap { padding-left: 18px; padding-right: 18px; }
  .section-head { margin-top: 15px; }
  .menu-toggle { display: block; }
  .site-nav {
    position: fixed; inset: 72px 0 0 0; background: var(--surface); padding: 20px var(--container-w, 98vw);
    padding: 20px calc((100vw - var(--container-w)) / 2); transform: translateY(-8px); opacity: 0;
    pointer-events: none; transition: opacity .15s ease, transform .15s ease; overflow-y: auto;
  }
  .site-nav.open { opacity: 1; pointer-events: auto; transform: translateY(0); }
  .site-nav ul { flex-direction: column; justify-content: flex-start; }
  .site-nav a { padding: 14px 6px; font-size: 17px; border-bottom: 1px solid var(--border); }
  .site-search { display: none; }
  .card-grid { grid-template-columns: 1fr; }
  .card-grid.cols-4 { grid-template-columns: 1fr; }
  .book-grid { grid-template-columns: 1fr 1fr; }
  .book-row { flex-direction: row; }
  .article-header-grid { grid-template-columns: 1fr; }
  .article-header-media { order: -1; aspect-ratio: 16/9; max-width: 100%; }
  .article-header { padding-bottom: 30px; }
  .article-header h1 { font-size: 27px; }
  .article-body { font-size: 17px; }
  .article-figure.align-left, .article-figure.align-right { float: none; width: 100%; margin: 1.8em 0; }
  .article-gallery { grid-template-columns: repeat(2, 1fr); }
  .site-footer-inner { grid-template-columns: 1fr; }
  .hero-side-item .article-card-media { width: 84px; }
  .article-row-media { display: none; }
  .article-row { gap: 0; }
  .book-grid-3col { grid-template-columns: 1fr; }
  .book-cover-large { max-width: 200px; width: 100%; margin: 10px auto; }
  .book-reviewer { justify-content: center; }
  .book-empty-col { display: none; }
  .world-columns { grid-template-columns: repeat(2, 1fr); }
}

/* -------------------------------------------------------------------------
   Wybory na świecie — mapa + tabela
   ------------------------------------------------------------------------- */

.status-badge {
  display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600;
  padding: 5px 12px 5px 8px; border-radius: 999px;
}
.status-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; }
.status-green  { background: var(--lime-soft); color: #4C6B1F; }
.status-green::before  { background: #6FA020; }
.status-blue   { background: #EAF1FC; color: var(--navy); }
.status-blue::before   { background: var(--navy); }
.status-orange { background: #FDF2E3; color: #B4711A; }
.status-orange::before { background: #E39A34; }

.election-hero {
  background: linear-gradient(120deg, var(--navy-dark) 0%, var(--navy) 60%);
  color: #fff; padding: 48px 0 90px;
}
.election-hero h1 { font-size: 34px; margin-bottom: 12px; color: #fff; }
.election-hero p { max-width: 640px; font-size: 15.5px; line-height: 1.6; color: rgba(255,255,255,.85); }

.election-map-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; position: relative; }
#election-world-map { width: 100%; overflow-x: auto; }
#election-world-map svg { width: 100%; height: auto; display: block; }
.election-map-mini-legend {
  position: absolute; left: 30px; bottom: 30px; background: rgba(255,255,255,.92); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 14px; display: flex; flex-direction: column; gap: 6px;
  font-size: 12px; color: var(--text-muted); box-shadow: 0 6px 16px -6px rgba(16,48,97,.25);
}
.election-map-mini-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

.election-layout { display: grid; grid-template-columns: 240px 1fr 220px; gap: 20px; align-items: start; }
.election-map-col { min-width: 0; }
.election-sidebar, .election-stats-col { display: flex; flex-direction: column; gap: 16px; }
.election-sidebar-block {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 18px;
  box-shadow: 0 10px 24px -16px rgba(16,48,97,.18);
}
.election-sidebar-block h3 { font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); margin-bottom: 14px; }
.election-sidebar-block .btn { margin-bottom: 8px; justify-content: flex-start; }
.election-sidebar-block .btn:last-child { margin-bottom: 0; }
.btn-block { display: flex; width: 100%; }
.field-label { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--text-muted); margin-bottom: 8px; }
.election-filter-form select {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; background: var(--bg); margin-bottom: 4px;
}
.search-input-wrap { position: relative; }
.search-input-wrap .icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-muted); width: 15px; height: 15px; }
.search-input-wrap input {
  width: 100%; padding: 9px 12px 9px 34px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; background: var(--bg);
}
.election-filter-form .checkbox-row { font-size: 13.5px; margin-bottom: 6px; }
.election-legend-list { display: flex; flex-direction: column; gap: 10px; font-size: 13.5px; color: var(--text-muted); }
.election-legend-list i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 8px; vertical-align: -1px; flex: none; }

.election-stat-card {
  display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 16px 18px; box-shadow: 0 10px 24px -16px rgba(16,48,97,.18);
}
.election-stat-icon {
  width: 40px; height: 40px; border-radius: 50%; background: var(--navy-soft); color: var(--navy);
  display: flex; align-items: center; justify-content: center; flex: none;
}
.election-stat-icon .icon { width: 20px; height: 20px; }
.election-stat-card strong { display: block; font-size: 22px; color: var(--navy-dark); line-height: 1.1; }
.election-stat-card span { font-size: 12.5px; color: var(--text-muted); }

.election-recent-list { display: flex; flex-direction: column; gap: 2px; }
.election-recent-list li { list-style: none; }
.election-recent-list a {
  display: flex; align-items: center; gap: 8px; padding: 8px 0; font-size: 13.5px; font-weight: 600;
  border-bottom: 1px solid var(--border);
}
.election-recent-list li:last-child a { border-bottom: none; }
.election-recent-list a .text-muted { font-weight: 400; font-size: 12px; margin-left: auto; }
.election-recent-list a .icon { width: 13px; height: 13px; color: var(--text-muted); flex: none; }

.election-featured-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 24px; }
.election-featured-card {
  display: grid; grid-template-columns: 240px 1fr; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-card);
}
.election-featured-media { background: var(--navy-soft) left center/cover no-repeat; min-height: 240px; }
.election-featured-body { padding: 24px; }
.election-featured-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.election-featured-flag { width: 42px; height: auto; border-radius: 3px; margin-bottom: 10px; display: block; box-shadow: 0 2px 6px rgba(16,48,97,.2); }
.election-featured-top h2 { font-size: 22px; margin-bottom: 4px; }
.election-featured-meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.election-featured-meta span { font-size: 13.5px; color: var(--text); display: block; }
.election-featured-meta .icon { color: var(--navy); margin-bottom: 4px; width: 16px; height: 16px; }
.election-featured-meta strong { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .02em; color: var(--text-muted); font-weight: 700; margin-top: 2px; }
.election-featured-desc { font-size: 14.5px; line-height: 1.6; color: var(--text); margin-bottom: 20px; }
.election-featured-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.country-info-card {
  display: flex; gap: 22px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 26px;
}
.country-info-flag { width: 76px; height: auto; border-radius: 4px; flex: none; box-shadow: 0 4px 10px rgba(16,48,97,.15); }
.country-info-card h2 { font-size: 21px; margin-bottom: 10px; }
.country-info-stats { display: flex; gap: 20px; flex-wrap: wrap; font-size: 14px; color: var(--text-muted); }
.country-info-stats strong { color: var(--text); font-weight: 600; }

.election-result-list { display: flex; flex-direction: column; gap: 16px; }
.election-result-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px; }
.election-result-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; font-size: 15px; }
.election-result-card p { font-size: 14.5px; line-height: 1.6; color: var(--text); margin-bottom: 10px; }
.election-result-card a { font-size: 13.5px; font-weight: 600; }

.election-upcoming-band { background: var(--navy-soft); padding: 32px 0; margin-bottom: 12px; }
.election-upcoming-band h2 { font-size: 19px; margin-bottom: 18px; }
.election-mini-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.election-mini-card {
  display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 14px; font-size: 13px;
}
.election-mini-card img { width: 34px; height: auto; border-radius: 3px; flex: none; }
.election-mini-card > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.election-mini-card strong { font-size: 13.5px; }
.election-mini-date { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); }
.election-mini-date i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: none; }
.election-mini-card > .icon { color: var(--text-muted); width: 14px; height: 14px; flex: none; }

.election-table-wrap { overflow-x: auto; }
.election-table { width: 100%; border-collapse: collapse; }
.election-table th {
  text-align: left; font-size: 12.5px; text-transform: uppercase; letter-spacing: .03em;
  color: var(--text-muted); padding: 10px 14px; border-bottom: 2px solid var(--border); white-space: nowrap;
}
.election-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 14.5px; vertical-align: middle; }
.election-table tr:hover td { background: var(--bg); }
.election-pagination-row { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; flex-wrap: wrap; gap: 12px; font-size: 13.5px; }

@media (max-width: 1100px) {
  .election-layout { grid-template-columns: 220px 1fr; }
  .election-stats-col { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
  .election-stats-col > * { flex: 1; min-width: 200px; }
  .election-mini-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .election-layout { grid-template-columns: 1fr; }
  .election-sidebar { flex-direction: row; flex-wrap: wrap; }
  .election-sidebar-block { flex: 1; min-width: 220px; }
  .election-featured-row { grid-template-columns: 1fr; }
  .election-featured-card { grid-template-columns: 1fr; }
  .election-featured-media { min-height: 160px; }
}

@media (max-width: 720px) {
  .election-hero { padding: 36px 0 70px; }
  .election-hero h1 { font-size: 26px; }
  .election-map-wrap { padding: 14px; }
  .election-table th, .election-table td { padding: 8px 10px; font-size: 13px; }
  .country-info-card { flex-direction: column; }
  .election-featured-meta { grid-template-columns: repeat(2, 1fr); }
  .election-mini-grid { grid-template-columns: 1fr 1fr; }
}


/* -------------------------------------------------------------------------
   Profil kraju (/kraj/{slug})
   ------------------------------------------------------------------------- */

.country-profile-head { display: grid; grid-template-columns: 1fr 380px; gap: 32px; align-items: start; }
.country-profile-flag { width: 56px; height: auto; border-radius: 3px; box-shadow: 0 2px 8px rgba(16,48,97,.2); margin-bottom: 14px; }
.country-profile-head h1 { font-size: 34px; margin-bottom: 4px; }
.country-profile-subtitle { font-size: 16px; color: var(--text-muted); margin-bottom: 20px; }
.country-profile-stats-row { display: flex; gap: 28px; flex-wrap: wrap; }
.country-profile-stats-row span { font-size: 14px; color: var(--text); }
.country-profile-stats-row .icon { color: var(--navy); width: 16px; height: 16px; margin-bottom: 4px; display: block; }
.country-profile-stats-row strong { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .02em; color: var(--text-muted); font-weight: 700; margin-top: 2px; }
.country-profile-cover { border-radius: var(--radius-lg); background: var(--navy-soft) center/cover no-repeat; min-height: 200px; }

.country-tabs {
  display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 6px; margin: 32px 0 28px; overflow-x: auto;
}
.country-tabs button {
  border: none; background: none; padding: 10px 18px; border-radius: var(--radius-sm); font-size: 14.5px;
  font-weight: 600; color: var(--text-muted); cursor: pointer; white-space: nowrap; font-family: inherit;
}
.country-tabs button.active { background: var(--navy); color: #fff; }
.country-tabs button:hover:not(.active) { background: var(--bg); }

.country-grid-3 { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.country-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px;
  box-shadow: var(--shadow-card);
}
.country-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.country-card-head .icon { color: var(--navy); width: 20px; height: 20px; }
.country-card-head h2 { font-size: 17px; }
.country-card-head-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.country-card-head-row .country-card-head { margin-bottom: 0; }
.country-card-clamp { font-size: 14px; line-height: 1.6; max-height: 130px; overflow: hidden; margin-bottom: 12px; }
.country-tab-link { background: none; border: none; padding: 0; color: var(--navy); font-weight: 600; font-size: 13.5px; cursor: pointer; font-family: inherit; display: inline-flex; align-items: center; gap: 4px; }
.country-card-map { display: flex; align-items: center; justify-content: center; padding: 12px; }
.country-mini-map svg { width: 100%; height: auto; max-height: 220px; }
.country-mini-map path, .country-mini-map g { fill: #E3E7EF; stroke: #fff; stroke-width: .4; }

.country-kv-list { display: flex; flex-direction: column; gap: 10px; }
.country-kv-list > div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.country-kv-list > div:last-child { border-bottom: none; padding-bottom: 0; }
.country-kv-list dt { color: var(--text-muted); }
.country-kv-list dd { font-weight: 600; text-align: right; }

.country-countdown-date { font-size: 20px; font-weight: 700; color: var(--navy-dark); margin-bottom: 4px; }
.country-countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.country-countdown > div { background: var(--bg); border-radius: var(--radius-sm); padding: 10px 6px; text-align: center; }
.country-countdown strong { display: block; font-size: 20px; color: var(--navy-dark); }
.country-countdown span { font-size: 11px; color: var(--text-muted); text-transform: uppercase; }

.election-results-bar { display: flex; height: 30px; border-radius: 6px; overflow: hidden; margin-bottom: 14px; }
.election-results-bar span { display: block; height: 100%; }
.election-results-legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--text-muted); }
.election-results-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

.country-history-list { display: flex; flex-direction: column; gap: 2px; }
.country-history-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 8px;
}
.country-history-row strong { display: block; font-size: 15px; }
.country-history-row .text-muted { font-size: 13px; }
.country-history-row .icon { color: var(--text-muted); flex: none; }

.country-other-list { display: flex; flex-direction: column; gap: 2px; }
.country-other-list a { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); font-weight: 600; font-size: 14px; }
.country-other-list a:last-child { border-bottom: none; }
.country-other-list img { width: 22px; height: auto; border-radius: 2px; }
.country-other-list a .icon { margin-left: auto; color: var(--text-muted); width: 14px; height: 14px; }

@media (max-width: 1100px) {
  .country-grid-3 { grid-template-columns: 1fr 1fr; }
  .country-card-map { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .country-profile-head { grid-template-columns: 1fr; }
  .country-profile-cover { min-height: 160px; }
}

@media (max-width: 720px) {
  .country-grid-3 { grid-template-columns: 1fr; }
  .country-profile-head h1 { font-size: 26px; }
  .country-countdown { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .country-history-row { flex-wrap: wrap; }
}
