@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700;800;900&family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&display=swap');

/* ── Design tokens ─────────────────────────────────────── */
:root {
  --bv-primary:        #2C5F2D;
  --bv-primary-dark:   #245124;
  --bv-primary-darker: #1c4220;
  --bv-primary-light:  #3a7a3b;
  --bv-secondary:      #97BC62;
  --bv-amber:          #D4830A;
  --bv-amber-light:    #F0A020;
  --bv-amber-pale:     #FFF3DC;
  --bv-bg:             #F2EFE8;
  --bv-bg-alt:         #E8E4DC;
  --bv-surface:        #FFFFFF;
  --bv-text:           #1A1E1A;
  --bv-text-secondary: #556055;
  --bv-border:         #D0CCC4;
  --bv-border-light:   #E0DDD6;
  --bv-shadow-sm:      0 1px 4px rgba(28,66,32,0.10);
  --bv-shadow-md:      0 4px 20px rgba(28,66,32,0.15);
  --bv-shadow-lg:      0 8px 40px rgba(28,66,32,0.18);
  --bv-radius:         0.4rem;
  --bv-radius-lg:      0.75rem;
  --bv-font-display:   'Barlow Condensed', system-ui, sans-serif;
  --bv-font-body:      'DM Sans', system-ui, sans-serif;
  --bv-ease:           cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Accent bar (top of page) ─────────────────────────── */
.kd-accent-bar {
  height: 4px;
  background: linear-gradient(90deg,
    var(--bv-primary) 0%,
    var(--bv-secondary) 40%,
    var(--bv-amber) 70%,
    var(--bv-amber-light) 100%);
  background-size: 300% 100%;
  animation: bv-bar 12s ease-in-out infinite alternate;
}
@keyframes bv-bar {
  0%   { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

/* ── Page content top spacing ─────────────────────────── */
main { padding-top: 1.75rem !important; }

/* ── Base ─────────────────────────────────────────────── */
body {
  background: var(--bv-bg);
  background-image:
    radial-gradient(circle, rgba(44,95,45,0.045) 1px, transparent 1px);
  background-size: 28px 28px;
  color: var(--bv-text);
  font-family: var(--bv-font-body);
  font-size: 1rem;
  line-height: 1.7;
}
.container { max-width: 1200px; }

/* ── Typography ───────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--bv-font-display);
  color: var(--bv-text);
  line-height: 1.15;
  margin-bottom: 0.5em;
  letter-spacing: 0.015em;
}
h1 {
  font-weight: 900;
  font-size: 2.4rem;
  letter-spacing: -0.01em;
}
h2 {
  font-weight: 800;
  font-size: 1.85rem;
  margin-top: 2.75rem;
  padding: 0.5em 0.75em 0.5em 1.1em;
  background: linear-gradient(90deg, rgba(44,95,45,0.05) 0%, transparent 100%);
  border-left: 5px solid var(--bv-amber);
  border-radius: 0 var(--bv-radius) var(--bv-radius) 0;
}
h3 {
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--bv-primary);
  margin-top: 1.75rem;
}
@media (min-width: 992px) {
  h1 { font-size: 3.1rem; }
  h2 { font-size: 2.2rem; }
  h3 { font-size: 1.55rem; }
}
p { margin-bottom: 1em; }

a {
  color: var(--bv-primary);
  text-decoration: underline;
  text-decoration-color: var(--bv-secondary);
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
  transition: color 0.2s var(--bv-ease), text-decoration-color 0.2s var(--bv-ease);
}
a:hover {
  color: var(--bv-primary-dark);
  text-decoration-color: var(--bv-amber);
}

/* ── Navbar ───────────────────────────────────────────── */
.navbar {
  background: #FFFFFF !important;
  border-bottom: none !important;
  padding: 0 !important;
  box-shadow: 0 2px 12px rgba(28,66,32,0.12) !important;
}
.navbar::after {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--bv-primary) 0%, var(--bv-secondary) 50%, var(--bv-amber) 100%);
}
.navbar .navbar-brand img {
  height: 38px;
  width: auto;
}
.navbar .nav-link {
  font-family: var(--bv-font-display);
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bv-primary) !important;
  padding: 0.55rem 0.9rem !important;
  border-radius: var(--bv-radius);
  transition: color 0.18s ease, background 0.18s ease;
  position: relative;
}
.navbar .nav-link::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 0.9rem;
  right: 0.9rem;
  height: 2px;
  background: var(--bv-amber);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s var(--bv-ease);
}
.navbar .nav-link:hover::after,
.navbar .nav-link.active::after {
  transform: scaleX(1);
}
.navbar .nav-link:hover {
  color: var(--bv-primary-darker) !important;
  background: rgba(44, 95, 45, 0.05);
}
.navbar .nav-link.active {
  color: var(--bv-primary-darker) !important;
}
.navbar-toggler {
  border-color: var(--bv-primary) !important;
  margin: 0.5rem 0;
}
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%232C5F2D' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.5' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}
@media (max-width: 991.98px) {
  .navbar-collapse {
    background: #f7f5f0;
    border-radius: 0 0 var(--bv-radius) var(--bv-radius);
    border: 1px solid var(--bv-border);
    border-top: none;
    padding: 0.5rem 0.75rem;
    margin-top: 0;
  }
}

/* ── Cards ────────────────────────────────────────────── */
.card {
  background: var(--bv-surface);
  border: 1px solid var(--bv-border-light);
  border-radius: var(--bv-radius-lg);
  box-shadow: var(--bv-shadow-sm);
  transition: box-shadow 0.3s var(--bv-ease), transform 0.3s var(--bv-ease);
  overflow: hidden;
}
.card:hover {
  box-shadow: var(--bv-shadow-md);
  transform: translateY(-4px);
}
.card .card-title {
  font-family: var(--bv-font-display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.01em;
}
.card .card-text { color: var(--bv-text-secondary); font-size: 0.95rem; line-height: 1.6; }

/* Hero / article image: no blank space */
.hero-image { margin-bottom: 2rem !important; }
.hero-image img {
  border-radius: var(--bv-radius-lg);
  box-shadow: var(--bv-shadow-lg);
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: cover;
  display: block;
}

/* Product card images — <picture> is the real container, use it as a
   fixed-height flex box to center the img inside */
.card picture {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 190px;
  overflow: hidden;
  background: transparent;
}
.card-img-top {
  display: block;
  width: auto;
  height: auto;
  max-width: calc(100% - 2rem);
  max-height: 170px;
  object-fit: contain;
  background: transparent;
}

/* ── Product list cards (toplist) ─────────────────────── */
#topplistan .card,
#utvalda-produkter .card {
  border-top: 3px solid var(--bv-amber);
  border-left: none;
}
#topplistan .card picture,
#utvalda-produkter .card picture {
  height: 190px;
}
.card h3 {
  font-size: 1.1rem;
  margin-top: 0.5rem;
  color: var(--bv-text);
}

/* ── Badges ───────────────────────────────────────────── */
.badge {
  font-family: var(--bv-font-display);
  font-weight: 700;
  letter-spacing: 0.05em;
  font-size: 0.72rem;
  text-transform: uppercase;
  border-radius: 3px;
}
.badge.bg-primary,
.badge-affiliate {
  background: var(--bv-amber) !important;
  color: #1A1E1A !important;
}

/* ── Buttons ──────────────────────────────────────────── */
.btn-primary {
  background: var(--bv-amber);
  border-color: var(--bv-amber);
  color: #1A1E1A !important;
  font-family: var(--bv-font-display);
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  font-size: 0.9rem;
  border-radius: var(--bv-radius);
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
  box-shadow: 0 2px 8px rgba(212,131,10,0.3);
}
.btn-primary:hover,
.btn-primary:focus {
  background: #BF7008;
  border-color: #BF7008;
  color: #1A1E1A !important;
  box-shadow: 0 4px 16px rgba(212,131,10,0.45);
  transform: translateY(-1px);
}
.btn-primary:active {
  background: #A85E06;
  border-color: #A85E06;
  transform: translateY(0);
}
/* Secondary/outline variant */
.btn-outline-primary {
  border-color: var(--bv-primary) !important;
  color: var(--bv-primary) !important;
}
.btn-outline-primary:hover {
  background: var(--bv-primary) !important;
  color: #fff !important;
}
/* SE ERBJUDANDEN in dark containers */
.affiliate-box .btn-primary,
.bg-primary .btn-primary,
[style*="background"] .btn-primary {
  background: var(--bv-amber-light) !important;
  border-color: var(--bv-amber-light) !important;
  color: #1A1E1A !important;
}

/* ── TLDR / Snabba svaret box ─────────────────────────── */
.tldr-box {
  background: var(--bv-amber-pale);
  border: 1px solid rgba(212,131,10,0.25);
  border-left: 5px solid var(--bv-amber);
  border-radius: var(--bv-radius-lg);
  padding: 1.5rem 1.75rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}
.tldr-box::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 80px; height: 80px;
  background: radial-gradient(circle at 100% 0%, rgba(212,131,10,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.tldr-box .text-uppercase {
  font-family: var(--bv-font-display);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--bv-amber);
}
.tldr-box p {
  font-family: var(--bv-font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--bv-text);
  margin-bottom: 0.6em;
}
.tldr-box p:last-child { margin-bottom: 0; }
.tldr-box a {
  color: var(--bv-primary-dark);
  font-weight: 600;
  text-decoration-color: var(--bv-amber);
}
.tldr-box a:hover { color: var(--bv-primary-darker); }

/* ── Decision framework ───────────────────────────────── */
#decision-framework .card {
  background: linear-gradient(135deg, #EFF4E8 0%, #FAFAF8 100%);
  border-color: var(--bv-secondary);
  border-top: 3px solid var(--bv-primary);
}
#decision-framework .card-header {
  background: var(--bv-primary);
  color: #fff;
  font-family: var(--bv-font-display);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

/* ── TOC ──────────────────────────────────────────────── */
#toc.card {
  border-top: 4px solid var(--bv-primary);
  background: var(--bv-surface);
  position: sticky;
  top: 1rem;
}
#toc .card-header {
  font-family: var(--bv-font-display);
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bv-primary);
  background: transparent;
  border-bottom: 1px solid var(--bv-border);
  padding: 0.7rem 1rem;
}
#toc .list-group-item {
  background: transparent;
  border-color: var(--bv-border-light);
  padding: 0.45rem 1rem;
  transition: background 0.15s ease, padding-left 0.15s ease;
}
#toc .list-group-item:hover {
  background: rgba(44, 95, 45, 0.05);
  padding-left: 1.25rem;
}
#toc .list-group-item a {
  text-decoration: none;
  font-weight: 500;
  font-size: 0.88rem;
  color: var(--bv-text);
}
#toc .list-group-item a:hover { color: var(--bv-primary); }

/* ── Affiliate / disclaimer box ───────────────────────── */
.affiliate-box {
  background: linear-gradient(135deg, var(--bv-primary) 0%, var(--bv-primary-darker) 100%);
  color: rgba(255, 255, 255, 0.92);
  border-radius: var(--bv-radius-lg);
  padding: 1.6rem 2rem;
  margin: 2.5rem 0;
  position: relative;
  overflow: hidden;
}
.affiliate-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--bv-amber), var(--bv-amber-light));
}
.affiliate-box::after {
  content: '';
  position: absolute;
  bottom: -30px; right: -30px;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  pointer-events: none;
}
.affiliate-box a {
  color: var(--bv-amber-light);
  text-decoration-color: rgba(240,160,32,0.4);
  font-weight: 600;
}
.affiliate-box a:hover { color: #fff; text-decoration-color: #fff; }
.affiliate-box .btn-primary {
  background: var(--bv-amber-light) !important;
  border-color: var(--bv-amber-light) !important;
  color: #1A1E1A !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25) !important;
}
.affiliate-box .btn-primary:hover {
  background: var(--bv-amber) !important;
  border-color: var(--bv-amber) !important;
}

/* ── Partner / "bra val" cards in dark containers ──────── */
.bg-primary .btn,
.bg-primary .btn-primary,
[class*="bg-dark"] .btn-primary {
  background: var(--bv-amber-light) !important;
  border-color: var(--bv-amber-light) !important;
  color: #1A1E1A !important;
}

/* ── Footer ───────────────────────────────────────────── */
.footer {
  background: var(--bv-primary-darker) !important;
  color: rgba(255, 255, 255, 0.88) !important;
  margin-top: 5rem;
  border-top: none !important;
  position: relative;
}
.footer::before {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--bv-amber) 0%, var(--bv-secondary) 50%, var(--bv-primary-light) 100%);
}
.footer .text-body-secondary,
.footer p,
.footer .small,
.footer span,
.footer div {
  color: rgba(255, 255, 255, 0.72) !important;
}
.footer a {
  color: rgba(255, 255, 255, 0.88) !important;
  text-decoration: none;
  transition: color 0.2s var(--bv-ease);
}
.footer a:hover {
  color: var(--bv-amber-light) !important;
  text-decoration: underline;
}
.footer .footer-nav-link {
  font-family: var(--bv-font-display);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65) !important;
  padding: 0.4rem 0.8rem;
  transition: color 0.2s ease;
}
.footer .footer-nav-link:hover { color: var(--bv-amber-light) !important; }
.footer .list-inline-item:not(:last-child)::after {
  content: '·';
  margin: 0 0.5rem;
  color: rgba(255, 255, 255, 0.28);
}
/* Hide logo in footer — doesn't contrast well on dark green */
.footer img { display: none !important; }

/* ── Article byline ───────────────────────────────────── */
.article-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  padding: 0.75rem 1rem;
  background: rgba(44,95,45,0.04);
  border-radius: var(--bv-radius);
  border: 1px solid var(--bv-border-light);
  font-size: 0.875rem;
  line-height: 1;
  margin-bottom: 1.5rem !important;
}
/* address has Bootstrap d-inline — override to inline-flex so img+name align */
.article-byline address {
  display: inline-flex !important;
  align-items: center;
  margin-bottom: 0;
  font-style: normal;
}
.article-byline address a {
  display: inline-flex !important;
  align-items: center;
  gap: 0.45rem;
  line-height: 1;
}
.article-byline address img {
  flex-shrink: 0;
  display: block;
}
.article-byline time {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  line-height: 1;
  color: var(--bv-text-secondary);
  white-space: nowrap;
}
.article-byline a { color: var(--bv-primary) !important; text-decoration: none; font-weight: 500; }
.article-byline a:hover { color: var(--bv-amber) !important; }

/* ── Section callouts / highlighted content ───────────── */
.alert-info, .callout-box {
  background: rgba(44,95,45,0.06);
  border-left: 4px solid var(--bv-secondary);
  border-radius: 0 var(--bv-radius) var(--bv-radius) 0;
  border-top: none; border-right: none; border-bottom: none;
  color: var(--bv-text);
}

/* ── Tables ───────────────────────────────────────────── */
.table {
  font-size: 0.9rem;
}
.table thead th {
  font-family: var(--bv-font-display);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bv-primary);
  background: rgba(44,95,45,0.05);
  border-bottom: 2px solid var(--bv-secondary);
}
.table-striped > tbody > tr:nth-of-type(odd) > * {
  background: rgba(44,95,45,0.025);
}

/* ── Misc ─────────────────────────────────────────────── */
.text-muted { color: var(--bv-text-secondary) !important; }
.text-warning { color: var(--bv-amber) !important; }
.text-body-secondary { color: var(--bv-text-secondary) !important; }

/* Star ratings */
.text-warning .bi-star-fill,
.text-warning .bi-star-half { color: var(--bv-amber) !important; }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 767.98px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; padding: 0.4em 0.6em 0.4em 0.9em; margin-top: 2rem; }
  h3 { font-size: 1.2rem; }
  .tldr-box { padding: 1.25rem; }
  .affiliate-box { padding: 1.25rem 1.5rem; }
  .hero-image img { max-height: 280px; }
  .card picture { height: 150px; }
  .card-img-top { max-height: 130px; }
  #topplistan .card picture,
  #utvalda-produkter .card picture { height: 160px; }
  body {
    background-size: 20px 20px;
  }
}
@media (max-width: 575.98px) {
  .btn-primary { font-size: 0.85rem; padding: 0.5rem 1rem; }
  .article-byline { flex-direction: column; align-items: flex-start; }
}
