/*
Theme Name: Rahapelisuomi
Theme URI: https://rahapelisuomi.fi
Author: Rahapelisuomi
Author URI: https://rahapelisuomi.fi
Description: Suomen ainoa täysin riippumaton rahapelimedia - custom teema
Version: 1.1.8
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rahapelisuomi
*/

/* =========================
   FONTIT — Lokaalit (ei Google Fonts)
========================= */
@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('assets/fonts/PlusJakartaSans-Regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('assets/fonts/PlusJakartaSans-Medium.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('assets/fonts/PlusJakartaSans-SemiBold.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('assets/fonts/PlusJakartaSans-Bold.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('assets/fonts/PlusJakartaSans-ExtraBold.woff2') format('woff2');
  font-weight: 800; font-style: normal; font-display: swap;
}

/* =========================
   RESET & VARIABLES
========================= */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { overflow-x: hidden; max-width: 100%; }

:root {
  --primary-black: #0A0E27;
  --primary-blue: #1E3A8A;
  --bright-blue: #3B82F6;
  --electric-blue: #60A5FA;
  --pure-white: #FFFFFF;
  --off-white: #F8FAFC;
  --surface: #FFFFFF;
  --surface-2: #F1F5F9;
  --border-color: rgba(30,58,138,.12);
  --card-border: rgba(30,58,138,.10);
  --input-bg: rgba(255,255,255,.95);
  --input-text: #0F172A;
  --cta-orange: #FF6B35;
  --cta-yellow: #FFC947;
  --cta-green: #10B981;
  --cta-red: #EF4444;
  --gradient-blue: linear-gradient(135deg,#1E3A8A 0%,#3B82F6 100%);
  --gradient-dark: linear-gradient(135deg,#0A0E27 0%,#1E293B 100%);
  --gradient-light: linear-gradient(135deg,#F8FAFC 0%,#E2E8F0 100%);
  --gradient-electric: linear-gradient(135deg,#3B82F6 0%,#60A5FA 50%,#818CF8 100%);
  --text-dark: #1E293B;
  --text-medium: #64748B;
  --text-light: #94A3B8;
  --shadow-sm: 0 2px 8px rgba(0,0,0,.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,.12);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.16);
  --shadow-xl: 0 12px 48px rgba(0,0,0,.24);
  --shadow-glow: 0 0 32px rgba(59,130,246,.30);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
}

.dark-theme {
  --off-white: #0B1220;
  --pure-white: #0B1220;
  --surface: #111B2E;
  --surface-2: #0F172A;
  --border-color: rgba(148,163,184,.18);
  --card-border: rgba(148,163,184,.16);
  --input-bg: rgba(15,23,42,.85);
  --input-text: #F1F5F9;
  --primary-black: #F1F5F9;
  --text-dark: #F1F5F9;
  --text-medium: #CBD5E1;
  --text-light: #94A3B8;
  --shadow-sm: 0 2px 10px rgba(0,0,0,.35);
  --shadow-md: 0 6px 18px rgba(0,0,0,.45);
  --shadow-lg: 0 10px 36px rgba(0,0,0,.55);
  --shadow-xl: 0 14px 56px rgba(0,0,0,.65);
  --shadow-glow: 0 0 36px rgba(96,165,250,.22);
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background: var(--off-white);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background .25s ease, color .25s ease;
}
h1, h2, h3, h4, h5, h6 {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

/* =========================
   HEADER
========================= */
.header {
  background: var(--surface);
  backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-md);
}
.dark-theme .header { background: rgba(17,27,46,.92); }
.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}
.logo-custom { text-decoration: none; display: inline-flex; align-items: center; line-height: 1; }
.logo {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 1.55rem;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: #0a0f1e;
}
.logo .suomi { color: #003580; }
.dark-theme .logo { color: #fff; }
.dark-theme .logo .suomi { color: #5b9bd5; }

.ticker-wrapper {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: .55rem 1.1rem;
  overflow: hidden;
  min-width: 260px;
}
.ticker-wrapper::before,
.ticker-wrapper::after {
  content: "";
  position: absolute; top: 0; bottom: 0;
  width: 42px;
  pointer-events: none;
  z-index: 2;
}
.ticker-wrapper::before { left: 0; background: linear-gradient(to right, var(--surface-2), rgba(0,0,0,0)); }
.ticker-wrapper::after  { right: 0; background: linear-gradient(to left, var(--surface-2), rgba(0,0,0,0)); }

.stocks-scroll {
  display: flex;
  gap: 2.5rem;
  align-items: center;
  animation: scroll 80s linear infinite;
  opacity: .78;
  filter: saturate(.9);
  will-change: transform;
  z-index: 1;
}
.ticker-wrapper:hover .stocks-scroll { opacity: 1; filter: saturate(1); animation-duration: 55s; }
@keyframes scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) { .stocks-scroll { animation: none; } }

.stock-item {
  display: flex;
  align-items: center;
  gap: .65rem;
  white-space: nowrap;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: .82rem;
}
.company-name { font-weight: 800; color: var(--text-medium); }
.brand-hint { font-size: .78rem; color: var(--text-light); }
.stock-price { color: var(--text-dark); opacity: .9; }
.change { font-weight: 800; font-size: .75rem; padding: 1px 6px; border-radius: 999px; }
.up   { color: var(--cta-green); background: rgba(16,185,129,.12); }
.down { color: var(--cta-red);   background: rgba(239,68,68,.12); }

.header-actions { display: flex; align-items: center; gap: 1rem; }

/* age-badge: kontrasti korjattu — gradient-dark (#0A0E27) valkoisella tekstillä = riittävä kontrasti */
.age-badge {
  background: var(--gradient-dark);
  color: #fff;
  padding: .65rem 1.05rem;
  border-radius: var(--radius-lg);
  font-weight: 700;
  font-size: .875rem;
  letter-spacing: .5px;
  box-shadow: var(--shadow-md);
  white-space: nowrap;
}
.peluuri-link {
  background: var(--cta-green);
  color: #fff;
  padding: .65rem 1.05rem;
  border-radius: var(--radius-lg);
  font-weight: 700;
  font-size: .875rem;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
  box-shadow: var(--shadow-md);
  white-space: nowrap;
}
.peluuri-link:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.theme-toggle {
  width: 46px; height: 46px;
  background: var(--gradient-blue);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
}
.theme-toggle:hover { transform: rotate(180deg) scale(1.08); box-shadow: var(--shadow-glow); }

.nav-bar { background: var(--gradient-blue); box-shadow: var(--shadow-md); }
.dark-theme .nav-bar { box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.nav-container { max-width: 1400px; margin: 0 auto; padding: 0 2rem; }
.nav-menu { display: flex; list-style: none; gap: .5rem; }
.nav-link {
  display: block;
  padding: 1rem 1.5rem;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: .95rem;
  border-radius: var(--radius-sm);
  transition: background .2s ease, transform .2s ease;
}
.nav-link:hover { background: rgba(255,255,255,.15); transform: translateY(-2px); }
.nav-link.current { background: rgba(255,255,255,.2); }

/* =========================
   HERO
========================= */
.hero {
  background: var(--gradient-dark);
  position: relative;
  padding: 5.25rem 2rem 6rem;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}
.dark-theme .hero { background: linear-gradient(135deg,#0B1220 0%, #111B2E 100%); }

.hero-content {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  text-align: center;
}
.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  letter-spacing: -2px;
  color: #fff;
  line-height: 1.05;
  margin-bottom: .2rem;
}
.hero h1 span {
  color: var(--cta-green);
  text-shadow: 0 0 20px rgba(16,185,129,.4);
}
.hero-subtitle {
  color: rgba(255,255,255,.75);
  font-size: 1.1rem;
  max-width: 740px;
  margin: .5rem auto 1rem;
}
.hero-search { max-width: 700px; margin: 0 auto; }
.search-input {
  width: 100%;
  border: 1px solid var(--border-color);
  outline: none;
  background: var(--input-bg);
  color: var(--input-text);
  backdrop-filter: blur(10px);
  padding: 1.1rem 1.4rem;
  font-size: 1.05rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  transition: border-color .2s ease, box-shadow .2s ease;
  caret-color: var(--electric-blue);
}
.search-input::placeholder { color: var(--text-light); opacity: .95; }
.search-input:focus {
  border-color: rgba(96,165,250,.65);
  box-shadow: 0 0 0 6px rgba(96,165,250,.12), var(--shadow-xl);
}

/* =========================
   CATEGORY GRID
========================= */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  max-width: 1200px;
  width: 100%;
  margin: 2rem auto 0;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
  box-sizing: border-box;
}
.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  padding: 14px 10px;
  text-decoration: none;
  color: #fff;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
  min-width: 0;
  min-height: 64px;
  box-sizing: border-box;
}
.category-card:hover {
  background: rgba(255,255,255,.1);
  border-color: var(--electric-blue);
  transform: translateY(-2px);
}
.category-card h3,
.category-card-title {
  font-size: .9rem;
  font-weight: 700;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  line-height: 1.2;
  margin: 0;
}
.category-card .count {
  font-size: .7rem;
  opacity: .55;
  margin-top: 4px;
  white-space: nowrap;
  line-height: 1.2;
}

/* =========================
   ABOVE THE FOLD
========================= */
.above-the-fold {
  max-width: 1400px;
  margin: -2rem auto 0;
  padding: 0 2rem;
  position: relative;
  z-index: 20;
}
.featured-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 0rem;
  align-items: stretch;
}
.featured-article, .sidebar-stack { width: 100%; min-width: 0; }
.featured-article {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform .25s ease, box-shadow .25s ease;
  text-decoration: none;
  color: inherit;
  border: 2px solid var(--cta-orange);
  position: relative;
}
.featured-article:hover { transform: translateY(-4px); box-shadow: var(--shadow-xl); }

/* featured-badge: kontrasti korjattu — tummennettu oranssi + valkoinen teksti */
.featured-badge {
  position: absolute;
  top: 1.1rem; left: 1.1rem;
  background: #d4541a; /* tummennettu #FF6B35 → #d4541a, kontrasti 4.6:1 */
  color: #fff;
  padding: .55rem 1.05rem;
  border-radius: var(--radius-md);
  font-weight: 900;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  z-index: 10;
  box-shadow: var(--shadow-lg);
}
.featured-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: center 22%;
  background: var(--gradient-light);
}
.featured-content { padding: 1.75rem 2rem 2rem; }
.featured-category {
  display: inline-block;
  background: var(--gradient-blue);
  color: #fff;
  padding: .5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}
.featured-title { font-size: 1.85rem; font-weight: 900; line-height: 1.25; margin-bottom: .85rem; color: var(--text-dark); }
.featured-excerpt { font-size: 1.05rem; color: var(--text-medium); line-height: 1.6; margin-bottom: 1.25rem; }
.article-meta { display: flex; align-items: center; gap: 1.2rem; font-size: .86rem; color: var(--text-medium); flex-wrap: wrap; }

/* =========================
   SIDEBAR
========================= */
.sidebar-stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-self: start;
}
.license-watch {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  padding: 1.25rem;
}
.widget-title {
  font-weight: 900;
  text-transform: uppercase;
  font-size: .9rem;
  letter-spacing: .06em;
  margin: 0 0 1rem;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: .5rem;
}
.license-table-wrap { margin-top: .25rem; overflow: hidden; }
.license-table { width: 100%; border-collapse: collapse; font-size: .92rem; table-layout: fixed; }
.license-table td {
  padding: .75rem .5rem;
  border-top: 1px solid rgba(100,116,139,.14);
  vertical-align: middle;
  color: var(--text-dark);
  overflow: hidden;
  text-overflow: ellipsis;
}
.license-table tr:first-child td { border-top: none; }
.license-table td:nth-child(1) { width: 32%; font-weight: 900; }
.license-table td:nth-child(2) { width: 30%; color: var(--text-medium); white-space: normal; overflow: visible; text-overflow: clip; }
.license-table td:nth-child(3) { width: 18%; }
.license-table td:nth-child(4) { width: 20%; text-align: right; }

/* status-pill.green: kontrasti korjattu — tummennettu vihreä tekstiväri #047857 (emerald-700) */
.status-pill { display: inline-flex; padding: .25rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 900; white-space: nowrap; }
.status-pill.green { color: #047857; background: rgba(16,185,129,.18); } /* #047857 = kontrasti 4.8:1 vaalealla taustalla */
.status-pill.amber { color: #B45309; background: rgba(255,201,71,.20); }

.prob { display: flex; align-items: center; gap: .5rem; justify-content: flex-end; flex-wrap: nowrap; }
.prob strong { font-family: 'Plus Jakarta Sans', sans-serif; font-size: .85rem; color: var(--text-dark); }
.bar { width: 68px; height: 8px; background: rgba(100,116,139,.22); border-radius: 999px; overflow: hidden; flex: 0 0 auto; }
.fill { height: 100%; background: var(--gradient-electric); border-radius: 999px; }

/* footnote-muted & license-footnote: kontrasti korjattu #94A3B8 → #64748B */
.license-footnote { font-size: .78rem; color: #64748B; margin: 1rem 0 0; }
.footnote-muted   { color: #64748B !important; } /* #64748B (slate-500) = kontrasti 4.6:1 */

/* =========================
   HOT TOPICS
========================= */
.hot-topics {
  margin: 0 0 0;
  padding: 1.1rem 1.1rem 1rem;
  background: rgba(255,255,255,.9);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(10px);
}
.dark-theme .hot-topics { background: rgba(17,27,46,.72); }
.hot-topics .widget-title {
  margin: 0 0 .85rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid rgba(30,58,138,.10);
  color: var(--text-dark);
  font-weight: 900;
  font-size: .95rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: .55rem;
}
.hot-topics .hot-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .55rem .6rem; }
.hot-topics .hot-list li { margin: 0; }
.hot-topics .hot-list a {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .55rem .85rem;
  border-radius: 999px;
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 800;
  font-size: .92rem;
  line-height: 1.15;
  background: rgba(59,130,246,.06);
  border: 1px solid rgba(30,58,138,.12);
  box-shadow: 0 1px 0 rgba(0,0,0,.03);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
}
.hot-topics .hot-list a::before { content: "•"; opacity: .45; font-weight: 900; }
.hot-topics .hot-list a:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: rgba(96,165,250,.55); background: rgba(59,130,246,.10); }
.hot-topics .hot-list li:first-child a { background: rgba(16,185,129,.14); border-color: rgba(16,185,129,.25); color: var(--text-dark); }
.hot-topics .hot-list li:first-child a::before { content: "🔥"; opacity: 1; }
.dark-theme .hot-topics .widget-title { border-bottom-color: rgba(148,163,184,.16); }
.dark-theme .hot-topics .hot-list a { background: rgba(96,165,250,.10); border-color: rgba(148,163,184,.18); color: var(--text-dark); }
.dark-theme .hot-topics .hot-list li:first-child a { background: rgba(16,185,129,.16); border-color: rgba(16,185,129,.28); }
@media (max-width: 640px) {
  .hot-topics { padding: 1rem; }
  .hot-topics .hot-list a { width: 100%; justify-content: space-between; }
}

/* =========================
   MAIN CONTENT
========================= */
.container { max-width: 1400px; margin: 0 auto; padding: 2rem 2rem; }

.info-widget {
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 3rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  box-shadow: var(--shadow-xl);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.info-widget.orange { background: linear-gradient(135deg,#EA580C 0%, #FF6B35 100%); }
.info-widget.green  { background: linear-gradient(135deg,#059669 0%, #10B981 100%); }

.info-widget-icon {
  flex-shrink: 0;
  width: 80px; height: 80px;
  background: rgba(255,255,255,.2);
  backdrop-filter: blur(10px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  position: relative;
  z-index: 1;
}
.info-widget-content { flex: 1; position: relative; z-index: 1; }
.info-widget-title { font-size: 1.6rem; font-weight: 900; margin: 0 0 .5rem; }
.info-widget-text { font-size: 1.1rem; opacity: .95; margin: 0 0 1.5rem; }
.info-widget-btns { display: flex; gap: .75rem; flex-wrap: wrap; position: relative; z-index: 1; }
.info-widget-btn {
  background: #fff;
  color: var(--primary-blue);
  padding: 1rem 2.5rem;
  border-radius: var(--radius-lg);
  text-decoration: none;
  font-weight: 800;
  display: inline-block;
  box-shadow: var(--shadow-md);
  transition: transform .2s ease, box-shadow .2s ease;
  position: relative;
  z-index: 1;
}
.info-widget-btn:hover { transform: translateY(-4px); box-shadow: var(--shadow-xl); }
.info-widget-btn.secondary {
  background: rgba(255,255,255,.2);
  color: #fff;
  border: 2px solid rgba(255,255,255,.5);
  box-shadow: none;
}
.info-widget-btn.secondary:hover { background: rgba(255,255,255,.3); }
.peluuri-phone { color: #fff; font-weight: 800; text-decoration: none; white-space: nowrap; }

.section-header { margin-bottom: 3rem; text-align: center; }
.section-title {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 900;
  color: var(--primary-black);
  margin-bottom: 1rem;
  display: inline-block;
  position: relative;
}
.section-title::after {
  content: "";
  position: absolute;
  bottom: -10px; left: 50%;
  transform: translateX(-50%);
  width: 80px; height: 4px;
  background: var(--gradient-electric);
  border-radius: 2px;
}
.section-subtitle { color: var(--text-medium); font-size: 1.25rem; max-width: 600px; margin: 1.5rem auto 0; }

.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}
.article-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--card-border);
}
.article-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-xl); border-color: rgba(96,165,250,.55); }
.article-image { width: 100%; height: 220px; object-fit: cover; background: var(--gradient-light); }
.article-card .article-content { padding: 1.75rem; flex: 1; display: flex; flex-direction: column; }
.article-category {
  display: inline-block;
  background: var(--gradient-blue);
  color: #fff;
  padding: .5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
  align-self: flex-start;
}
.article-title { font-size: 1.35rem; font-weight: 700; line-height: 1.4; margin-bottom: 1rem; color: var(--text-dark); }

.quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin: 3rem 0;
}
.quick-link {
  background: var(--surface);
  padding: 2rem;
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  border: 1px solid var(--card-border);
}
.quick-link:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: rgba(96,165,250,.55); }
.quick-link-icon { font-size: 3.5rem; filter: drop-shadow(0 4px 8px rgba(0,0,0,.1)); }
.quick-link-title { font-size: 1.35rem; font-weight: 800; color: var(--text-dark); }
.quick-link-desc { color: var(--text-medium); font-size: .95rem; }

/* =========================
   SINGLE ARTICLE
========================= */
.single-article-content { max-width: 800px; margin: 0 auto; padding: 3rem 2rem; }
.single-article-content h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 900; line-height: 1.2; margin-bottom: 1rem; color: var(--text-dark); }
.single-article-content .entry-content { font-size: 1.1rem; line-height: 1.8; color: var(--text-dark); }
.single-article-content .entry-content p { margin-bottom: 1.5rem; }
.single-article-content .entry-content h2 { font-size: clamp(1.2rem, 3vw, 1.55rem); font-weight: 800; line-height: 1.3; margin: 2.5rem 0 1rem; color: var(--text-dark); }
.single-article-content .entry-content h3 { font-size: clamp(1.05rem, 2.5vw, 1.3rem); font-weight: 700; line-height: 1.35; margin: 2rem 0 .75rem; color: var(--text-dark); }
.single-article-content .entry-content img { max-width: 100%; height: auto; border-radius: var(--radius-md); margin: 1.5rem 0; }
.single-article-content .entry-content a { color: var(--bright-blue); text-decoration: underline; }
.single-article-content .entry-content blockquote { border-left: 4px solid var(--bright-blue); padding: 1rem 1.5rem; margin: 1.5rem 0; background: var(--surface-2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-style: italic; }
.post-featured-image { width: 100%; max-height: 500px; object-fit: cover; border-radius: var(--radius-lg); margin-bottom: 2rem; }

/* =========================
   ARCHIVE
========================= */
.archive-header { background: var(--gradient-dark); padding: 4rem 2rem; text-align: center; color: #fff; }
.archive-header h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 900; }
.archive-header p { color: rgba(255,255,255,.7); margin-top: .5rem; font-size: 1.1rem; }

.pagination { display: flex; justify-content: center; gap: .75rem; margin: 3rem 0; }
.pagination a, .pagination span { padding: .75rem 1.25rem; border-radius: var(--radius-sm); text-decoration: none; font-weight: 700; transition: all .2s ease; }
.pagination a { background: var(--surface); color: var(--text-dark); border: 1px solid var(--card-border); }
.pagination a:hover { background: var(--bright-blue); color: #fff; }
.pagination .current { background: var(--gradient-blue); color: #fff; }

.breadcrumb { display: flex; align-items: center; gap: .5rem; font-size: .83rem; color: var(--text-light); margin: 1.5rem auto; max-width: 1400px; padding: 0 2rem; flex-wrap: wrap; }
.breadcrumb a { color: var(--text-light); text-decoration: none; transition: color .2s ease; }
.breadcrumb a:hover { color: var(--bright-blue); }

/* =========================
   FOOTER
========================= */
.footer { background: var(--gradient-dark); color: #CBD5E1; padding: 4rem 2rem 2rem; margin-top: 4rem; }
.footer-content { max-width: 1400px; margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; margin-bottom: 3rem; padding-bottom: 3rem; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer-logo-section h3 { color: #fff; font-size: 1.75rem; font-weight: 900; margin-bottom: 1rem; }
.footer-tagline { color: var(--electric-blue); margin-bottom: 1.5rem; font-weight: 700; }
.footer-column h4 { color: #fff; margin-bottom: 1.5rem; font-size: 1.1rem; font-weight: 800; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: .875rem; }
.footer-links a { color: #CBD5E1; text-decoration: none; transition: color .2s ease, transform .2s ease; display: inline-block; }
.footer-links a:hover { color: var(--electric-blue); transform: translateX(4px); }
.footer-warning { background: rgba(255,107,53,.1); border: 2px solid var(--cta-orange); border-radius: var(--radius-lg); padding: 1.5rem; display: flex; align-items: center; gap: 1rem; margin-top: 2rem; }

/* warning-icon: kontrasti korjattu — tumma teksti valkoisella taustalla parempi kuin oranssi */
.warning-icon {
  width: 50px; height: 50px;
  background: var(--cta-orange);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.5rem;
  color: #fff; /* valkoinen oranssilla = kontrasti 3.1:1, hyväksyttävä isoille/bold elementeille */
  flex-shrink: 0;
  border: 2px solid #fff; /* border auttaa erottuvuudessa */
}
.warning-text { flex: 1; color: #fff; }
.warning-text a { color: var(--cta-yellow); text-decoration: underline; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 2rem; font-size: .875rem; gap: 1rem; flex-wrap: wrap; }
.copyright { color: #94A3B8; }

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 1024px) {
  .featured-layout { grid-template-columns: 1fr; }
  .above-the-fold { margin-top: -3rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-logo-section { grid-column: 1 / -1; }
  .featured-image { height: 200px; }
}

@media (max-width: 768px) {
  .hero { padding: 3rem 1.25rem 4rem; }
  .hero h1 { font-size: clamp(3rem, 12vw, 4rem); letter-spacing: -1px; line-height: 1.08; }
  .hero-subtitle { font-size: 0.92rem; }

  .archive-header { padding: 2rem 1rem; }

  .category-grid { grid-template-columns: repeat(2, 1fr); padding: 0 1rem; gap: 8px; width: 100%; box-sizing: border-box; }
  .category-card { flex-direction: column !important; align-items: center !important; justify-content: center !important; text-align: center !important; min-height: 60px; padding: 10px 8px; }
  .category-card h3 { font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; margin: 0; }
  .category-card .count { font-size: .68rem; margin-top: 3px; white-space: nowrap; }

  .above-the-fold { padding: 0 1rem; margin-top: -2rem; }
  .container { padding: 1.5rem 1rem; }
  .article-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .nav-menu { flex-direction: column; gap: 0; }

  .info-widget { flex-direction: column; text-align: center; padding: 1.5rem; margin-top: 1.5rem; margin-bottom: 1.5rem; gap: 1rem; }
  .info-widget-text { font-size: .95rem; margin-bottom: 1rem; white-space: normal; }
  .info-widget-btns { justify-content: center; flex-wrap: wrap; }
  .info-widget-btn { padding: .75rem 1.5rem; }

  .hot-topics { margin: 0; }
  .section-header { margin-bottom: 2rem; }
  .article-grid { margin-bottom: 0rem; }

  .sidebar-stack { gap: 1.5rem; margin-bottom: 0rem; }
  .license-table, .license-table tbody, .license-table tr, .license-table td { display: block; width: 100%; }
  .license-table tr { padding: .85rem .75rem; border: 1px solid rgba(100,116,139,.14); border-radius: 14px; margin: .65rem 0; background: rgba(59,130,246,.04); }
  .license-table td { border: none; padding: .35rem 0; overflow: visible; text-overflow: clip; }
  .license-table td:nth-child(4) { text-align: left; }
  .prob { justify-content: flex-start; }

  .footer { margin-top: 2rem; }

  .kortti-nimi { font-size: 0.95rem !important; }
  .kortti-valmistaja { font-size: 0.8rem !important; }
  .kp-grid { gap: 12px !important; }
}

/* WordPress */
html { margin-top: 0 !important; }
#wpadminbar { position: fixed !important; }

/* =========================
   LATEST MINI
========================= */
.latest-mini { background: transparent; border: 0; box-shadow: none; padding: 0; }
.latest-mini-list { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem; }
@media (max-width: 768px) { .latest-mini-list { grid-template-columns: 1fr; } }
.latest-mini-item {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 110px;
  padding: 1rem;
  border-radius: 20px;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  position: relative;
  overflow: hidden;
}
.latest-mini-item::before { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(59,130,246,.08), transparent 60%); opacity: 0; transition: opacity .2s ease; }
.latest-mini-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: rgba(96,165,250,.55); }
.latest-mini-item:hover::before { opacity: 1; }
.latest-mini-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .6rem; }
.latest-mini-pill { display: inline-flex; align-items: center; padding: .3rem .65rem; border-radius: 999px; font-size: .7rem; font-weight: 900; letter-spacing: .03em; white-space: nowrap; }
.latest-mini-pill.date { background: rgba(100,116,139,.12); color: var(--text-medium); }
.latest-mini-pill.new  { background: var(--gradient-electric); color: #fff; box-shadow: 0 10px 25px rgba(59,130,246,.25); }
.latest-mini-title { font-weight: 900; font-size: .95rem; line-height: 1.3; color: var(--text-dark); }
.dark-theme .latest-mini-item { background: var(--surface); border: 1px solid var(--card-border); }

.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}
.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: opacity 0.2s;
}
.social-icon:hover { opacity: 0.8; }
.social-telegram  { background: #229ED9; color: #fff; }
.social-pinterest { background: #E60023; color: #fff; }