*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue: #185FA5;
  --blue-light: #E6F1FB;
  --text: #1a1a1a;
  --text-muted: #666;
  --border: rgba(0,0,0,0.1);
  --bg: #fff;
  --bg-secondary: #f7f7f5;
  --radius: 12px;
}

body {
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }

/* ── Topbar ── */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 0.5px solid var(--border);
}
.header-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.site-name {
  font-family: 'Source Serif 4', serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}
nav { display: flex; gap: 2px; flex-wrap: wrap; }
nav a {
  font-size: 13px;
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}
nav a:hover { background: var(--bg-secondary); color: var(--text); }
nav a[aria-current="page"] { background: var(--blue-light); color: var(--blue); }
.header-social { display: flex; gap: 6px; }
.header-social a {
  font-size: 12px;
  color: var(--text-muted);
  padding: 5px 10px;
  border: 0.5px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.15s, color 0.15s;
}
.header-social a:hover { border-color: var(--blue); color: var(--blue); }

/* ── Main ── */
main { max-width: 900px; margin: 0 auto; padding: 0 1.5rem 4rem; }

/* ── Hero ── */
.hero {
  position: relative;
  margin: 1.5rem 0 2rem;
  border-radius: var(--radius);
  overflow: hidden;
  height: 400px;
  background: #c8d8e8;
}
.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.hero-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 2rem 2rem 1.75rem;
  background: linear-gradient(to top, rgba(0,0,0,0.68) 0%, transparent 100%);
}
.hero-overlay h1 {
  font-family: 'Source Serif 4', serif;
  font-size: 32px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}
.hero-overlay .role {
  font-size: 15px;
  color: rgba(255,255,255,0.8);
  margin-bottom: 1rem;
}
.btn {
  display: inline-block;
  font-size: 13px;
  padding: 9px 20px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s;
}
.btn:hover { opacity: 0.85; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-outline {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.5);
  margin-left: 8px;
}

/* ── Section title ── */
.section-title {
  font-family: 'Source Serif 4', serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
}

/* ── News grid ── */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin-bottom: 1rem;
}
.news-card {
  background: var(--bg);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.news-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
.news-card > a { display: flex; flex-direction: column; height: 100%; }
.news-card:hover h3 { color: var(--blue); }
.news-band { height: 4px; }
.news-body { padding: 14px; }
.news-meta .source { font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; }
.news-empty { grid-column: 1 / -1; font-size: 14px; color: var(--text-muted); }
.news-empty a { color: var(--blue); }
.news-meta { font-size: 11px; color: var(--text-muted); margin-bottom: 6px; letter-spacing: 0.02em; }
.news-body h3 {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.45;
}
.show-more {
  display: block;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  padding: 11px;
  border: 0.5px solid var(--border);
  border-radius: 8px;
  margin-bottom: 2.5rem;
  transition: background 0.15s, color 0.15s;
}
.show-more:hover { background: var(--bg-secondary); color: var(--text); }

/* ── About strip ── */
.about-strip {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
  margin-bottom: 2.5rem;
  border: 0.5px solid var(--border);
}
.about-strip p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.75;
  max-width: 640px;
}
.about-strip p + p { margin-top: 0.75rem; }

/* ── Subpage header ── */
.page-head { padding: 2.5rem 0 1.75rem; }
.page-head h1 {
  font-family: 'Source Serif 4', serif;
  font-size: 32px;
  font-weight: 600;
  margin-bottom: 6px;
}
.page-head p { color: var(--text-muted); font-size: 15px; max-width: 62ch; }

/* ── Luottamustoimet ── */
.role-group { margin-bottom: 2rem; }
.role-group h2 {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}
.role-list {
  list-style: none;
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.role-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 13px 18px;
  font-size: 15px;
}
.role-list li + li { border-top: 0.5px solid var(--border); }
.role-list .years { color: var(--text-muted); font-size: 13px; white-space: nowrap; }
.role-list.past li { color: var(--text-muted); }
.role-list.past { background: var(--bg-secondary); }

/* ── Galleria ── */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
.gallery a {
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-secondary);
}
.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s;
}
.gallery a:hover img { transform: scale(1.04); }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.88);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 6px; }

/* ── Uutisvirta ── */
.news-list { list-style: none; }
.news-list li + li { margin-top: 8px; }
.news-list a {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 13px 16px;
  border: 0.5px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.45;
  transition: box-shadow 0.2s;
}
.news-list a:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
.news-list a:hover .news-title { color: var(--blue); }
.source-tag {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  padding: 2px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.news-time { flex-shrink: 0; margin-left: auto; color: var(--text-muted); font-size: 12px; white-space: nowrap; }
.news-note { color: var(--text-muted); font-size: 13px; margin-top: 1.5rem; }
.news-note a { color: var(--blue); }

/* ── Footer ── */
footer {
  border-top: 0.5px solid var(--border);
  padding-top: 2rem;
  margin-top: 1rem;
}
.footer-inner { max-width: 900px; margin: 0 auto; padding: 0 1.5rem 2rem; }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-grid h4 {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.footer-grid p, .footer-grid a {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.8;
  display: block;
}
.footer-grid a:hover { color: var(--blue); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0 0;
  border-top: 0.5px solid var(--border);
  flex-wrap: wrap;
  gap: 8px;
}
.footer-bottom span { font-size: 12px; color: var(--text-muted); }

/* ── Responsive ── */
@media (max-width: 700px) {
  .header-inner { padding: 8px 1rem; flex-wrap: wrap; gap: 4px 1rem; }
  .header-social { display: none; }
  nav { width: 100%; margin: 0 -8px; }
  nav a { padding: 6px 8px; font-size: 12.5px; }
}
@media (max-width: 600px) {
  .hero { height: 280px; }
  .hero-overlay h1 { font-size: 24px; }
  main { padding: 0 1rem 3rem; }
  .footer-inner { padding: 0 1rem 2rem; }
  .about-strip { padding: 1.25rem; }
  .page-head h1 { font-size: 26px; }
  .role-list li { flex-direction: column; gap: 2px; }
  .news-list a { flex-wrap: wrap; gap: 6px 10px; }
  .news-title { width: 100%; order: 2; }
  .news-time { margin-left: 0; order: 3; }
}
