/* EcoKid.se — Grundstil */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green:      #3a7d44;
  --green-dark: #2c5f33;
  --green-pale: #e8f5ea;
  --brown:      #7c5c3a;
  --text:       #2d2d2d;
  --muted:      #666;
  --border:     #dde8dd;
  --bg:         #fafdf9;
  --white:      #ffffff;
  --font:       'Lato', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-head:  'Nunito', 'Segoe UI', system-ui, sans-serif;
  --radius:     8px;
  --max-w:      1100px;
}

body {
  font-family: var(--font);
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 700;
}

a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header */
.site-header {
  background: var(--white);
  border-bottom: 2px solid var(--green);
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.logo {
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.15em;
}
.logo-leaf { font-size: 1.2rem; margin-right: 0.1em; }
.logo-eco { color: var(--green); }
.logo-kid { color: var(--brown); }
.logo-dot { color: var(--muted); font-size: 0.95rem; font-weight: 600; }
.main-nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.main-nav a { color: var(--text); font-size: 0.92rem; }
.main-nav a:hover { color: var(--green); text-decoration: none; }

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--green-pale) 0%, #d4edda 100%);
  padding: 3.5rem 0 3rem;
  text-align: center;
}
.hero h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); color: var(--green-dark); margin-bottom: 0.5rem; }
.hero-lead { font-size: 1.15rem; color: var(--muted); }

/* Kategorier */
.categories { padding: 3rem 0; }
.categories h2, .latest-articles h2 { font-size: 1.4rem; margin-bottom: 1.25rem; color: var(--green-dark); }

.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem 1rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  gap: 0.4rem;
  transition: box-shadow 0.2s, border-color 0.2s;
  text-decoration: none;
  color: var(--text);
}
.cat-card:hover { box-shadow: 0 4px 12px rgba(58,125,68,.15); border-color: var(--green); text-decoration: none; }
.cat-icon { font-size: 2rem; }
.cat-card strong { color: var(--green-dark); font-size: 1.05rem; }
.cat-card span { font-size: 0.85rem; color: var(--muted); }

/* Artiklar — startsida */
.latest-articles { padding: 2rem 0 3rem; }
.article-list { display: grid; gap: 1rem; }
.article-card {
  display: block;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  text-decoration: none;
  color: var(--text);
  transition: box-shadow 0.2s, border-color 0.2s;
}
.article-card:hover { box-shadow: 0 4px 12px rgba(58,125,68,.12); border-color: var(--green); text-decoration: none; }
.article-card-meta { font-size: 0.8rem; color: var(--muted); margin-bottom: 0.3rem; text-transform: uppercase; letter-spacing: 0.03em; }
.article-card h3 { font-size: 1.1rem; color: var(--green-dark); margin-bottom: 0.4rem; }
.article-card p { font-size: 0.9rem; color: var(--muted); margin-bottom: 0.5rem; }
.read-more { font-size: 0.88rem; color: var(--green); font-weight: 600; }

/* Footer */
.site-footer {
  background: var(--green-dark);
  color: #c8e6c9;
  padding: 2.5rem 0 1.5rem;
  margin-top: 3rem;
}
.footer-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}
.site-footer strong { color: var(--white); display: block; margin-bottom: 0.5rem; }
.site-footer ul { list-style: none; }
.site-footer ul li { margin-bottom: 0.3rem; }
.site-footer a { color: #a5d6a7; font-size: 0.9rem; }
.site-footer a:hover { color: var(--white); }
.site-footer p { font-size: 0.9rem; }
.footer-copy { border-top: 1px solid rgba(255,255,255,.15); padding-top: 1rem; color: #81c784; font-size: 0.8rem; }

/* ── Artikel-layout ────────────────────────────────────────── */
.article-wrap {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2.5rem;
  align-items: start;
  padding-top: 1.5rem;
  padding-bottom: 3rem;
}
@media (max-width: 800px) {
  .article-wrap { grid-template-columns: 1fr; }
  .article-sidebar { order: 2; }
}

.breadcrumb { font-size: 0.83rem; color: var(--muted); margin-bottom: 1.25rem; grid-column: 1 / -1; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--green); }

.article-header { margin-bottom: 1.5rem; }
.article-header h1 { font-size: clamp(1.4rem, 3.5vw, 2rem); color: var(--green-dark); line-height: 1.3; }
.article-meta { color: var(--muted); font-size: 0.85rem; margin-top: 0.5rem; display: flex; gap: 1rem; flex-wrap: wrap; }
.reading-time::before { content: '· '; }
.article-intro { font-size: 1.05rem; color: var(--text); margin-top: 0.75rem; font-style: italic; border-left: 3px solid var(--green); padding-left: 0.85rem; }

.article-content h2 { font-size: 1.25rem; color: var(--green-dark); margin: 2rem 0 0.6rem; }
.article-content h3 { font-size: 1.05rem; color: var(--brown); margin: 1.5rem 0 0.4rem; }
.article-content p { margin-bottom: 1rem; }
.article-content ul, .article-content ol { margin: 0.25rem 0 1rem 1.5rem; }
.article-content li { margin-bottom: 0.3rem; }
.article-content strong { color: var(--green-dark); }

.article-tags { margin-top: 2rem; display: flex; gap: 0.4rem; flex-wrap: wrap; }
.tag { background: var(--green-pale); color: var(--green-dark); font-size: 0.78rem; padding: 0.2rem 0.65rem; border-radius: 99px; }

/* Affiliate-knappar */
.btn-affiliate {
  display: inline-block;
  background: var(--green);
  color: var(--white) !important;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  margin: 0.5rem 0 1.25rem;
  text-decoration: none !important;
  transition: background 0.2s;
}
.btn-affiliate:hover { background: var(--green-dark); }
.btn-secondary {
  display: inline-block;
  border: 1px solid var(--green);
  color: var(--green) !important;
  padding: 0.45rem 1rem;
  border-radius: var(--radius);
  font-size: 0.88rem;
  text-decoration: none !important;
}
.btn-secondary:hover { background: var(--green-pale); }

/* Affiliate-not */
.affiliate-note {
  background: var(--green-pale);
  border-left: 3px solid var(--green);
  padding: 0.75rem 1rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-top: 2rem;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Sidebar */
.article-sidebar { position: sticky; top: 80px; }
.sidebar-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.sidebar-box h3 { font-size: 1rem; color: var(--green-dark); margin-bottom: 0.5rem; }
.sidebar-box p { font-size: 0.88rem; color: var(--muted); margin-bottom: 0.75rem; }

/* Tabeller i artiklar */
.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.92rem;
}
.article-content th {
  background: var(--green-pale);
  color: var(--green-dark);
  font-weight: 600;
  text-align: left;
  padding: 0.6rem 0.85rem;
  border-bottom: 2px solid var(--border);
}
.article-content td {
  padding: 0.55rem 0.85rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.article-content tr:last-child td { border-bottom: none; }
.article-content tr:nth-child(even) td { background: #f5fbf5; }
@media (max-width: 640px) {
  .article-content table { display: block; overflow-x: auto; }
}

/* ── Kategorisida ───────────────────────────────────────── */
.cat-hero {
  background: linear-gradient(135deg, var(--green-pale) 0%, #d4edda 100%);
  padding: 2.5rem 0 2rem;
}
.cat-hero-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.cat-hero-icon { font-size: 3rem; line-height: 1; }
.cat-hero h1 { font-size: clamp(1.4rem, 3.5vw, 2rem); color: var(--green-dark); }
.cat-hero-desc { color: var(--muted); margin-top: 0.3rem; font-size: 1.05rem; }

.cat-articles { padding: 2rem 0 3rem; }
.cat-count { font-size: 0.85rem; color: var(--muted); margin-bottom: 1rem; }
.cat-empty {
  padding: 3rem 0;
  text-align: center;
  color: var(--muted);
}
.cat-empty p { margin-bottom: 1rem; }
.muted-text { color: var(--muted); font-size: 0.9rem; }

/* ── Statiska sidor (om-oss, integritetspolicy, affiliateinformation) ── */
.page-wrap {
  max-width: 780px;
  padding-top: 2.5rem;
  padding-bottom: 3.5rem;
}
.page-content h1 {
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  color: var(--green-dark);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--green-pale);
}
.page-content h2 {
  font-size: 1.2rem;
  color: var(--green-dark);
  margin: 2rem 0 0.6rem;
}
.page-content p { margin-bottom: 1rem; }
.page-content ul, .page-content ol { margin: 0.25rem 0 1rem 1.5rem; }
.page-content li { margin-bottom: 0.4rem; }
.page-content a { color: var(--green); }
.page-lead {
  font-size: 1.08rem;
  color: var(--text);
  font-style: italic;
  border-left: 3px solid var(--green);
  padding-left: 0.85rem;
  margin-bottom: 1.75rem;
}

/* Responsivt */
@media (max-width: 640px) {
  .main-nav { gap: 0.75rem; }
  .main-nav a { font-size: 0.85rem; }
  .cat-hero-icon { font-size: 2rem; }
}
