/*
Theme Name: TRW Portal Branżowy
Theme URI: https://technologie-relacje-wiedza.pl/
Author: Redakcja technologie-relacje-wiedza.pl
Description: Szybki szablon wielotematycznego portalu dla technologie-relacje-wiedza.pl
Version: 2.0.0
Text Domain: trwportal
*/
:root {
  --bg: #f3f5f9;
  --card: #ffffff;
  --primary: #1e293b;
  --accent: #2563eb;
  --border: #cbd5e1;
  --text: #1e232a;
  --muted: #5a6577;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'IBM Plex Sans', sans-serif;
  line-height: 1.72;
  font-size: 17px;
}
a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
a:hover { color: var(--primary); }
.trw-wrap { max-width: 1080px; margin: 0 auto; padding: 0 22px; }
.trw-header {
  background: var(--primary);
  color: #fff;
  padding: 20px 0;
  border-bottom: 4px solid var(--accent);
}
.trw-header-in { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.trw-brand { color: #fff; text-decoration: none; font-family: 'Space Grotesk', sans-serif; font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; }
.trw-brand:hover { color: #fff; opacity: 0.92; }
.trw-nav { display: flex; gap: 20px; flex-wrap: wrap; }
.trw-nav a { color: rgba(255,255,255,0.9); text-decoration: none; font-size: 0.95rem; font-weight: 500; }
.trw-nav a:hover { color: #fff; text-decoration: underline; }
.trw-hero {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 44px 0;
  margin-bottom: 36px;
}
.trw-badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 11px;
  border-radius: 4px;
  margin-bottom: 12px;
}
h1, h2, h3 { font-family: 'Space Grotesk', sans-serif; color: var(--primary); line-height: 1.28; }
h1 { font-size: clamp(1.75rem, 3.2vw, 2.45rem); margin-bottom: 14px; }
h2 { font-size: 1.45rem; margin: 28px 0 12px; }
h3 { font-size: 1.18rem; margin: 18px 0 8px; }
p { margin-bottom: 16px; }
ul, ol { margin: 0 0 20px 24px; }
li { margin-bottom: 8px; }
.trw-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}
.trw-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}
.trw-card h2 { font-size: 1.25rem; margin: 8px 0 12px; }
.trw-card h2 a { color: var(--primary); text-decoration: none; }
.trw-card h2 a:hover { color: var(--accent); }
.trw-meta { font-size: 0.83rem; color: var(--muted); }
.trw-readmore { margin-top: 14px; display: inline-block; font-size: 0.92rem; }
.trw-article {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: clamp(24px, 4vw, 46px);
  margin: 34px 0 48px;
}
.trw-footer {
  background: var(--primary);
  color: rgba(255,255,255,0.82);
  padding: 32px 0;
  font-size: 0.9rem;
  margin-top: 48px;
}
.trw-footer a { color: #fff; }

table { width: 100%; border-collapse: collapse; margin: 22px 0 28px; font-size: 0.95rem; }
th, td { border: 1px solid var(--border); padding: 12px 14px; text-align: left; vertical-align: top; }
th { background: var(--primary); color: #fff; font-weight: 600; }
tr:nth-child(even) td { background: rgba(0,0,0,0.02); }

/* === 2-Column Portal Layout & Sidebar (v2.2) === */
.lorg-container, .lbz-container, .linf-container, .tvs-wrap, .trw-wrap, .grn-wrap {
  max-width: 1240px !important;
}
.portal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
}
@media (max-width: 960px) {
  .portal-layout {
    grid-template-columns: 1fr;
  }
}
.portal-sidebar {
  position: sticky;
  top: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.sb-widget {
  background: #ffffff;
  border: 1px solid #d1dbd5;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}
.sb-widget-title {
  font-size: 1.02rem !important;
  font-weight: 800 !important;
  margin: 0 0 14px 0 !important;
  padding-bottom: 10px !important;
  border-bottom: 2px solid #e2e8f0 !important;
  color: #0f172a !important;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sb-list {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
.sb-list li {
  margin: 0 0 10px 0 !important;
  padding: 0 0 10px 0 !important;
  border-bottom: 1px dashed #e2e8f0;
  font-size: 0.92rem;
  line-height: 1.45;
}
.sb-list li:last-child {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
  border-bottom: none;
}
.sb-list a {
  text-decoration: none !important;
  font-weight: 600;
  display: block;
}
.sb-list a:hover {
  text-decoration: underline !important;
}
.sb-list li.is-current a {
  font-weight: 800;
  color: #0f172a !important;
  background: #f1f5f9;
  padding: 6px 10px;
  border-radius: 6px;
  border-left: 3px solid #0284c7;
}
.sb-rank-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px;
  border-radius: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  margin-bottom: 10px;
  font-size: 0.9rem;
  line-height: 1.4;
}
.sb-rank-item:last-child { margin-bottom: 0; }
.sb-rank-badge {
  background: #0284c7;
  color: #fff;
  font-weight: 800;
  font-size: 0.8rem;
  padding: 3px 8px;
  border-radius: 4px;
  flex-shrink: 0;
}
.sb-rank-badge.gold { background: #15803d; }
.sb-rank-badge.silver { background: #1d4ed8; }
.sb-rank-badge.bronze { background: #b45309; }
.sb-rank-desc {
  display: block;
  font-size: 0.82rem;
  color: #475569;
  margin-top: 2px;
  font-weight: 400;
}
