/* ==========================================================================
   Fruit-Flies.com – main stylesheet
   Palette: fresh petrol/teal (clean, hygienic, "fresh kitchen") with a warm
   tangerine accent, coral/rust for warnings, on a soft warm-cream base.
   Serif headings give an editorial, trustworthy feel; sans in body text and
   UI for airy, easy-to-read pages.
   Voice: friendly, practical, tidy and reliable.
   ========================================================================== */

:root {
  --brand:        #0F8A8A;   /* petrol / teal */
  --brand-d:      #0A6060;
  --brand-l:      #35A8A8;
  --brand-soft:   #E1F3F3;
  --accent:       #F5893E;   /* warm tangerine (CTA / accent) */
  --accent-d:     #D46B1E;
  --accent-soft:  #FCE7D2;
  --sage:         #2E9E6B;   /* positive / "clean" */
  --sage-soft:    #E2F4EC;
  --rust:         #E0552E;   /* warning / danger */
  --rust-soft:    #FBE5DC;
  --ink:          #123536;   /* deep teal-charcoal (headings) */
  --text:         #2F4344;
  --text-light:   #5F7375;
  --muted:        #5F7375;
  --bg:           #F7F6F1;   /* warm cream */
  --bg-2:         #EEEEE6;
  --white:        #FFFFFF;
  --border:       #E0E2DC;

  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --sans: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;

  --r-sm: 8px;
  --r:    14px;
  --r-lg: 22px;
  --r-pill: 999px;
  --shadow: 0 2px 6px rgba(18,53,54,.06), 0 10px 26px rgba(18,53,54,.08);
  --shadow-lg: 0 16px 48px rgba(18,53,54,.16);
  --maxw: 1150px;

  /* Colour tones for flat page-heros + icon cards (tone-1..6) */
  --t1a:#0F8A8A; --t1b:#0A5F5F;   /* teal (about) */
  --t2a:#E86B3E; --t2b:#C4501E;   /* tangerine/coral (remove) */
  --t3a:#4763B0; --t3b:#2E4585;   /* indigo (traps – tools) */
  --t4a:#A24D77; --t4b:#7A335A;   /* plum/berry (sources – breeding) */
  --t5a:#5B9E43; --t5b:#3F7A2A;   /* green/lime (prevention) */
  --t6a:#4E6A6E; --t6b:#33474B;   /* slate (FAQ / overview) */
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--sans); color: var(--text); background: var(--bg); line-height: 1.65; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; transition: color .15s; }
a:hover { color: var(--accent-d); }

h1,h2,h3,h4 { font-family: var(--serif); font-weight: 700; line-height: 1.2; color: var(--ink); letter-spacing: -0.01em; }
h1 { font-size: clamp(1.95rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.45rem, 3vw, 2.0rem); }
h3 { font-size: 1.24rem; }
p  { margin-bottom: 1rem; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.2rem; }
.narrow { max-width: 740px; }

.section { padding: 3.4rem 0; }
.section.alt { background: var(--bg-2); }
.section-head { text-align: center; max-width: 660px; margin: 0 auto 2.4rem; }
.section-head .eyebrow { color: var(--brand); font-weight: 800; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; font-family: var(--sans); }
.section-head h2 { margin: .4rem 0 .6rem; }
.section-head p { color: var(--text-light); font-size: 1.06rem; }

/* ---------- Top nav ---------- */
.site-nav { position: sticky; top: 0; z-index: 100; background: rgba(247,246,241,.95); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.nav-inner { max-width: var(--maxw); margin: 0 auto; padding: .55rem 1.2rem; display: flex; align-items: center; gap: 1rem; }
.nav-logo { display: flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.22rem; color: var(--ink); letter-spacing: -.02em; font-family: var(--serif); white-space: nowrap; flex: 0 0 auto; }
.nav-logo:hover { color: var(--ink); }
.nav-logo-icon { width: 38px; height: 38px; border-radius: 11px; overflow: hidden; display: block; box-shadow: 0 3px 8px rgba(15,138,138,.30); flex: 0 0 auto; }
.nav-logo-icon svg { width: 100%; height: 100%; display: block; }
.nav-logo-text span { color: var(--brand); }
.nav-menu { display: flex; align-items: center; gap: .05rem; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.nav-link { padding: .5rem .5rem; border-radius: var(--r-pill); font-size: .87rem; font-weight: 700; color: var(--text); cursor: pointer; white-space: nowrap; font-family: var(--sans); }
.nav-link:hover { background: var(--brand-soft); color: var(--brand-d); }
.nav-cta { background: var(--accent); color: #4a2a00 !important; box-shadow: 0 4px 12px rgba(245,137,62,.4); margin-left: .3rem; }
.nav-cta:hover { background: var(--accent-d); color: #fff !important; }

.nav-dropdown { position: relative; }
.dropdown-menu { position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(8px); background: var(--white); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow-lg); padding: 1rem 1.1rem; display: grid; grid-template-columns: 1fr; gap: .1rem; min-width: 290px; opacity: 0; visibility: hidden; transition: .18s; }
.dropdown-menu.mega { min-width: 460px; }
.dropdown-group { margin-bottom: .55rem; }
.dropdown-group:last-child { margin-bottom: 0; }
.dropdown-group > .grp { display: block; font-family: var(--sans); font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--text-light); padding: .3rem .5rem .15rem; }
.dropdown-menu a { font-weight: 600; padding: .4rem .6rem; border-radius: var(--r-sm); font-size: .9rem; display: block; color: var(--text); }
.dropdown-menu a:hover { background: var(--brand-soft); color: var(--brand-d); }
.dropdown-menu a.more { margin-top: .35rem; border-top: 1px solid var(--border); border-radius: 0; padding-top: .6rem; color: var(--brand); font-weight: 800; }
.nav-dropdown:hover .dropdown-menu, .nav-dropdown:focus-within .dropdown-menu { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.nav-dropdown:nth-last-child(-n+3) .dropdown-menu { left: auto; right: 0; transform: translateX(0) translateY(8px); }
.nav-dropdown:nth-last-child(-n+3):hover .dropdown-menu { transform: translateX(0) translateY(0); }

.btn-search-icon { background: none; border: none; padding: .45rem; cursor: pointer; color: var(--text-light); font-size: 1.15rem; border-radius: var(--r-sm); line-height: 1; }
.btn-search-icon:hover { background: var(--brand-soft); color: var(--brand); }
.nav-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--ink); padding: .2rem .4rem; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .85rem 1.6rem; border-radius: var(--r-pill); font-weight: 800; font-size: .98rem; cursor: pointer; border: 2px solid transparent; transition: .15s; font-family: var(--sans); }
.btn-primary { background: var(--accent); color: #4a2a00 !important; }
.btn-primary:hover { background: var(--accent-d); color:#fff !important; transform: translateY(-1px); box-shadow: 0 8px 22px rgba(245,137,62,.45); }
.btn-brand { background: var(--brand); color: #fff !important; }
.btn-brand:hover { background: var(--brand-d); transform: translateY(-1px); box-shadow: 0 8px 22px rgba(15,138,138,.4); }
.btn-ghost { background: var(--white); color: var(--brand) !important; border-color: var(--border); }
.btn-ghost:hover { border-color: var(--brand); background: var(--brand-soft); }
.btn-lg { padding: 1rem 2rem; font-size: 1.05rem; }

/* ---------- Home hero ---------- */
.hero { position: relative; background: radial-gradient(1200px 600px at 12% -10%, var(--brand-l) 0%, var(--brand) 48%, var(--brand-d) 100%); color: #fff; overflow: hidden; }
.hero::before { content:""; position:absolute; inset:0;
  background-image: radial-gradient(rgba(255,255,255,.10) 1.5px, transparent 1.6px);
  background-size: 26px 26px; opacity:.7; }
.hero::after { content:""; position:absolute; right:-60px; top:-60px; width:340px; height:340px; border-radius:50%;
  background: radial-gradient(circle, rgba(245,137,62,.32), transparent 70%); }
.hero-inner { position: relative; z-index: 2; max-width: var(--maxw); margin: 0 auto; padding: 4.4rem 1.2rem 4.6rem; display: grid; grid-template-columns: 1.05fr .95fr; gap: 3rem; align-items: center; }
.hero h1 { color: #fff; margin-bottom: 1rem; }
.hero p.lead { font-size: 1.18rem; color: rgba(255,255,255,.94); margin-bottom: 1.7rem; max-width: 34rem; font-family: var(--sans); }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; }
.hero .pill { background: rgba(255,255,255,.18); color:#fff; margin-bottom: 1.1rem; }

.quick-card { background: var(--white); color: var(--text); border-radius: var(--r-lg); padding: 1.5rem 1.6rem 1.3rem; box-shadow: var(--shadow-lg); }
.quick-card h3 { font-size: 1.12rem; display:flex; align-items:center; gap:.5rem; margin-bottom: .2rem; }
.quick-card .sub { font-size: .85rem; color: var(--text-light); margin-bottom: 1rem; }
.quick-rows { display: grid; gap: .5rem; }
.quick-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .8rem; padding: .6rem .8rem; background: var(--bg); border-radius: var(--r-sm); }
.quick-row:hover { background: var(--brand-soft); }
.quick-row .age { font-weight: 700; color: var(--ink); font-size: .92rem; }
.quick-row .amt { font-weight: 800; color: var(--brand); font-size: .85rem; font-family: var(--sans); }

/* ---------- Page header for articles/hubs ---------- */
.page-hero { position: relative; min-height: 0; display: flex; align-items: flex-end; color: #fff; }
.page-hero .inner { position: relative; z-index: 2; max-width: var(--maxw); margin: 0 auto; width: 100%; padding: 2.6rem 1.2rem; }
.page-hero .kicker { display:inline-block; background: rgba(255,255,255,.2); color:#fff; font-weight: 800; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; padding: .3rem .85rem; border-radius: var(--r-pill); margin-bottom: .85rem; font-family: var(--sans); }
.page-hero h1 { color: #fff; margin: 0 0 .5rem; max-width: 26ch; }
.page-hero p { color: rgba(255,255,255,.95); font-size: 1.1rem; max-width: 56ch; margin: 0; font-family: var(--sans); }
.page-hero.has-bg { min-height: 280px; }
.hero.has-bg::before { opacity: .35; }
/* No dark veil over hero images: text shadow keeps text legible */
.hero.has-bg h1, .hero.has-bg p.lead, .hero.has-bg .pill {
  text-shadow: 0 1px 3px rgba(0,0,0,.6), 0 3px 18px rgba(0,0,0,.5); }
.page-hero.has-bg h1, .page-hero.has-bg p, .page-hero.has-bg .kicker {
  text-shadow: 0 1px 3px rgba(0,0,0,.65), 0 3px 16px rgba(0,0,0,.5); }

/* Colour tones */
.tone-1 { background: linear-gradient(125deg, var(--t1a), var(--t1b)); }
.tone-2 { background: linear-gradient(125deg, var(--t2a), var(--t2b)); }
.tone-3 { background: linear-gradient(125deg, var(--t3a), var(--t3b)); }
.tone-4 { background: linear-gradient(125deg, var(--t4a), var(--t4b)); }
.tone-5 { background: linear-gradient(125deg, var(--t5a), var(--t5b)); }
.tone-6 { background: linear-gradient(125deg, var(--t6a), var(--t6b)); }

/* ---------- Breadcrumb ---------- */
.breadcrumb { background: var(--bg-2); border-bottom: 1px solid var(--border); font-size: .85rem; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; padding: .7rem 0; align-items: center; }
.breadcrumb li { color: var(--text-light); }
.breadcrumb li a { color: var(--text-light); }
.breadcrumb li a:hover { color: var(--brand); }
.breadcrumb li::after { content: "›"; margin-left: .4rem; color: var(--border); }
.breadcrumb li:last-child::after { content: ""; }
.breadcrumb li:last-child { color: var(--ink); font-weight: 700; }

/* ---------- Section cards (home) ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px,1fr)); gap: 1.2rem; }
.scard { background: var(--white); border: 1px solid var(--border); border-radius: var(--r); padding: 1.6rem; box-shadow: var(--shadow); transition: .18s; display: block; position: relative; overflow: hidden; }
.scard::before { content:""; position:absolute; left:0; top:0; bottom:0; width:5px; background: var(--brand); }
.scard:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.scard .ico { font-size: 1.6rem; margin-bottom: .6rem; display:inline-flex; width:54px; height:54px; align-items:center; justify-content:center; border-radius: 13px; background: var(--brand-soft); }
.scard h3 { margin-bottom: .35rem; }
.scard p { font-size: .9rem; color: var(--text-light); margin: 0; }
.scard:nth-child(6n+2)::before { background: var(--t2a); } .scard:nth-child(6n+2) .ico { background: #FBE0D3; }
.scard:nth-child(6n+3)::before { background: var(--t3a); } .scard:nth-child(6n+3) .ico { background: #DEE3F5; }
.scard:nth-child(6n+4)::before { background: var(--t4a); } .scard:nth-child(6n+4) .ico { background: #F2E0EB; }
.scard:nth-child(6n+5)::before { background: var(--t5a); } .scard:nth-child(6n+5) .ico { background: #E4F1DB; }
.scard:nth-child(6n+6)::before { background: var(--accent); } .scard:nth-child(6n+6) .ico { background: var(--accent-soft); }

/* ---------- Cards in grid (hub) ---------- */
.dest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px,1fr)); gap: 1.2rem; margin: .4rem 0 2.4rem; }
.dest-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); transition: .18s; display: flex; flex-direction: column; }
.dest-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.dest-card .body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; flex: 1; }
.dest-card h3 { font-size: 1.1rem; margin-bottom: .3rem; }
.dest-card .desc { font-size: .9rem; color: var(--text-light); flex: 1; margin: 0; font-family: var(--sans); }

.section .wrap > h2 { margin: 1.6rem 0 .2rem; }
.section .wrap > h2:first-child { margin-top: 0; }
.section .wrap > h2[id] { scroll-margin-top: 80px; }

/* ---------- Article content ---------- */
.article { max-width: 740px; margin: 0 auto; padding: 2.6rem 1.2rem 3.5rem; }
.article p, .article ul, .article ol { font-size: 1.07rem; color: var(--text); }
.article ul, .article ol { margin: 0 0 1.2rem 1.3rem; }
.article li { margin-bottom: .45rem; }
.article h2 { margin: 2.1rem 0 .8rem; padding-bottom: .25rem; border-bottom: 2px solid var(--accent-soft); }
.article h3 { margin: 1.6rem 0 .5rem; }
.lead { font-size: 1.2rem; line-height: 1.55; color: var(--ink); font-family: var(--serif); }
.article .lead { margin-bottom: 1.2rem; }
.article strong { color: var(--ink); }
.article a { text-decoration: underline; text-decoration-color: rgba(245,137,62,.7); text-underline-offset: 2px; }
.article a:hover { text-decoration-color: var(--accent-d); }

/* Legacy note (preserved, improved Joomla article) */
.arv-note { display: flex; gap: .8rem; align-items: flex-start; background: var(--sage-soft); border: 1px solid #C6E6D5; border-radius: var(--r); padding: .9rem 1.1rem; margin: 0 0 1.6rem; font-size: .93rem; font-family: var(--sans); color: #245C41; }
.arv-note .ico { font-size: 1.2rem; line-height: 1.3; }
.arv-note strong { color: var(--brand-d); }
.arv-note p { margin: 0; }

/* Callouts */
.callout { background: var(--accent-soft); border-left: 5px solid var(--accent); border-radius: var(--r-sm); padding: 1.1rem 1.4rem; margin: 1.6rem 0; }
.callout.green, .callout.mint { background: var(--sage-soft); border-color: var(--sage); }
.callout.blue { background: var(--brand-soft); border-color: var(--brand); }
.callout.warn { background: var(--rust-soft); border-color: var(--rust); }
.callout p:last-child { margin: 0; }
.callout strong { color: var(--ink); }

/* Fact box */
.factbox { background: var(--white); border: 1px solid var(--border); border-top: 4px solid var(--brand); border-radius: var(--r); padding: 1.3rem 1.5rem; margin: 1.8rem 0; box-shadow: var(--shadow); }
.factbox h3 { margin: 0 0 .7rem; font-size: 1.1rem; color: var(--brand-d); }
.factbox dl { display: grid; grid-template-columns: auto 1fr; gap: .45rem 1.1rem; margin: 0; }
.factbox dt { font-weight: 800; color: var(--ink); font-family: var(--sans); font-size: .94rem; }
.factbox dd { margin: 0; color: var(--text); font-size: .98rem; }

/* Pros / cons */
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; margin: 1.8rem 0; }
.pros, .cons { border-radius: var(--r); padding: 1.1rem 1.3rem; border: 1px solid var(--border); }
.pros { background: var(--sage-soft); border-color: #BFE0CD; }
.cons { background: var(--rust-soft); border-color: #EFC9BC; }
.pros h4, .cons h4 { font-family: var(--sans); font-size: .95rem; text-transform: uppercase; letter-spacing: .04em; margin-bottom: .5rem; }
.pros h4 { color: #2F6147; } .cons h4 { color: #9C3C26; }
.pros ul, .cons ul { margin: 0 0 0 1.1rem; }
.pros li, .cons li { font-size: .96rem; }

/* Step-by-step */
ol.steps { list-style: none; counter-reset: step; margin: 1.6rem 0 !important; padding: 0; }
ol.steps > li { position: relative; counter-increment: step; padding: 0 0 1rem 3rem; margin: 0; }
ol.steps > li::before { content: counter(step); position: absolute; left: 0; top: -2px; width: 2rem; height: 2rem; background: var(--brand); color: #fff; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-family: var(--sans); font-size: .95rem; }
ol.steps > li::after { content: ""; position: absolute; left: .97rem; top: 2.1rem; bottom: -.2rem; width: 2px; background: var(--brand-soft); }
ol.steps > li:last-child::after { display: none; }
ol.steps > li strong { display: block; color: var(--ink); }

/* Checklist */
ul.checklist { list-style: none; margin-left: 0 !important; }
ul.checklist li { position: relative; padding-left: 1.9rem; margin-bottom: .6rem; }
ul.checklist li::before { content: "✓"; position: absolute; left: 0; top: -1px; width: 1.35rem; height: 1.35rem; background: var(--sage); color: #fff; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: .82rem; font-weight: 800; }

/* Table */
table.age-table { width: 100%; border-collapse: collapse; margin: 1.6rem 0; background: var(--white); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; font-size: .98rem; }
table.age-table thead th { background: var(--brand); color: #fff; text-align: left; padding: .7rem .9rem; font-family: var(--sans); font-size: .9rem; }
table.age-table td { padding: .65rem .9rem; border-top: 1px solid var(--border); }
table.age-table tbody tr:nth-child(even) { background: var(--bg); }

/* Sources box */
.kilder { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--r); padding: 1.3rem 1.5rem; margin: 2.4rem 0 0; }
.kilder h3 { font-size: 1.05rem; margin: 0 0 .6rem; color: var(--ink); }
.kilder ul { margin: 0 0 .8rem 1.2rem; }
.kilder li { font-size: .95rem; margin-bottom: .3rem; }
.kilder .muted { font-size: .85rem; margin: 0; }

/* ---------- Internal linking ---------- */
.related { background: var(--bg-2); border-top: 1px solid var(--border); }
.related h2 { text-align: center; margin-bottom: 1.5rem; }
.chips { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; }
.chip { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-pill); padding: .5rem 1.1rem; font-size: .88rem; font-weight: 700; color: var(--brand); font-family: var(--sans); }
.chip:hover { border-color: var(--brand); background: var(--brand-soft); }

/* ---------- Cluster grid on pillar pages ---------- */
.cluster { background: var(--bg-2); border-top: 1px solid var(--border); }

/* ---------- Cookie / consent banner ---------- */
.cookie-banner {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 1000;
  max-width: 760px; margin: 0 auto; background: var(--white);
  border: 1px solid var(--border); border-radius: var(--r);
  box-shadow: 0 12px 40px rgba(0,0,0,.18); padding: 1.1rem 1.3rem; }
.cookie-banner[hidden] { display: none; }
.cookie-inner { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem 1.4rem; }
.cookie-inner p { margin: 0; flex: 1 1 320px; font-size: .92rem; color: var(--text); }
.cookie-inner a { color: var(--brand); font-weight: 700; text-decoration: underline; }
.cookie-btns { display: flex; gap: .6rem; flex: 0 0 auto; margin-left: auto; }
.cookie-btns .btn { padding: .6rem 1.2rem; font-size: .9rem; }
@media (max-width: 540px) {
  .cookie-btns { width: 100%; }
  .cookie-btns .btn { flex: 1; justify-content: center; }
}

/* ---------- Byline (E-E-A-T) ---------- */
.article .byline {
  font-size: .9rem; color: var(--muted); margin: 0 0 1.4rem;
  padding-bottom: 1rem; border-bottom: 1px solid var(--border); font-family: var(--sans); }
.article .byline a { color: var(--brand); font-weight: 700; }
.article .byline a:hover { text-decoration: underline; }

/* ---------- Table of contents ---------- */
.article .toc {
  background: var(--brand-soft); border: 1px solid var(--border); border-left: 4px solid var(--brand);
  border-radius: var(--r); padding: 1.1rem 1.3rem 1.1rem 1.4rem; margin: 0 0 2rem; }
.article .toc .toc-tittel {
  font-weight: 800; color: var(--brand-d); margin: 0 0 .6rem;
  font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; font-family: var(--sans); }
.article .toc ol { margin: 0; padding-left: 1.2rem; columns: 2; column-gap: 2rem; }
.article .toc li { margin: .25rem 0; break-inside: avoid; }
.article .toc a { color: var(--text); font-weight: 600; font-size: .94rem; font-family: var(--sans); }
.article .toc a:hover { color: var(--brand); text-decoration: underline; }
.article h2 { scroll-margin-top: 1.5rem; }
@media (max-width: 560px) { .article .toc ol { columns: 1; } }

/* ---------- Photo figures ---------- */
figure.article-foto, figure.hero-foto, figure.home-foto { margin: 0 0 1.8rem; }
figure.article-foto img, figure.hero-foto img, figure.home-foto img {
  width: 100%; height: auto; border-radius: var(--r); box-shadow: var(--shadow); display: block;
  max-height: 460px; object-fit: cover; }
figure.article-foto figcaption, figure.home-foto figcaption { font-size: .82rem; color: var(--text-light); font-family: var(--sans); margin-top: .5rem; text-align: center; }
figure.home-foto img { max-height: 380px; }
.hero-foto { margin-bottom: 2rem; }

/* ---------- A–Z index / glossary ---------- */
.emne-az { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 2rem; position: sticky; top: 56px; background: var(--bg); padding: .7rem 0; z-index: 5; border-bottom: 1px solid var(--border); }
.emne-az a { display: inline-flex; align-items: center; justify-content: center; min-width: 2.1rem; height: 2.1rem; border-radius: var(--r-sm); background: var(--brand-soft); color: var(--brand-d); font-weight: 800; font-size: .9rem; font-family: var(--sans); }
.emne-az a:hover { background: var(--brand); color: #fff; }
.emne-group { margin-bottom: 2rem; scroll-margin-top: 110px; }
.emne-group h2 { display: inline-flex; align-items: center; justify-content: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: linear-gradient(125deg, var(--t1a), var(--t1b)); color: #fff; margin-bottom: 1rem; font-size: 1.3rem; }
.emne-list { list-style: none; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: .4rem 1.4rem; }
.emne-list li { margin: 0; padding: .35rem 0; border-bottom: 1px solid var(--border); }
.emne-list a { font-weight: 700; color: var(--ink); }
.emne-list a:hover { color: var(--brand); }
.emne-list .kat { display: block; font-size: .78rem; color: var(--text-light); font-weight: 600; font-family: var(--sans); }

/* Glossary */
.ordliste dl { margin: 1.5rem 0; }
.ordliste dt { font-family: var(--serif); font-weight: 700; color: var(--ink); font-size: 1.12rem; margin-top: 1.4rem; scroll-margin-top: 110px; }
.ordliste dd { margin: .3rem 0 0; color: var(--text); }

/* ---------- Footer ---------- */
.site-footer { background: #0C2321; color: rgba(255,255,255,.78); padding: 3.2rem 0 1.6rem; margin-top: 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(4, 1fr); gap: 1.6rem; }
.footer-brand { grid-column: span 1; }
.footer-brand .nav-logo { color: #fff; margin-bottom: .9rem; }
.footer-brand .nav-logo-text span { color: var(--accent); }
.footer-brand p { font-size: .86rem; color: rgba(255,255,255,.65); max-width: 23rem; margin-bottom: .7rem; }
.footer-brand .more { color: var(--accent); font-weight: 800; font-size: .86rem; }
.footer-col h4 { color: #fff; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .8rem; font-family: var(--sans); }
.footer-col a { display: block; color: rgba(255,255,255,.72); font-size: .88rem; padding: .2rem 0; }
.footer-col a:hover { color: var(--accent); }
.footer-col a.more { color: var(--accent); font-weight: 700; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.14); margin-top: 2.4rem; padding-top: 1.3rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: .6rem; font-size: .82rem; color: rgba(255,255,255,.55); }

/* ---------- Search modal ---------- */
.search-modal { position: fixed; inset: 0; background: rgba(18,53,54,.55); backdrop-filter: blur(3px); z-index: 200; display: none; padding: 8vh 1rem 0; }
.search-modal.open { display: block; }
.search-box { max-width: 600px; margin: 0 auto; background: var(--white); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); overflow: hidden; }
.search-box-head { display: flex; align-items: center; padding: .5rem .5rem .5rem 1.3rem; border-bottom: 1px solid var(--border); }
.search-box input { flex: 1; border: none; outline: none; font-size: 1.05rem; padding: .85rem .5rem; background: transparent; color: var(--text); }
.search-box .close { background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--text-light); padding: .5rem .8rem; }
.search-res { max-height: 52vh; overflow-y: auto; padding: .6rem; }
.search-res a { display: block; padding: .65rem .9rem; border-radius: var(--r-sm); }
.search-res a:hover, .search-res a.sel { background: var(--brand-soft); }
.search-res .t { font-weight: 700; color: var(--ink); }
.search-res .s { font-size: .8rem; color: var(--text-light); }
.search-res .empty { padding: 1rem; color: var(--text-light); font-size: .9rem; }

/* ---------- Helpers ---------- */
.center { text-align: center; }
.muted { color: var(--text-light); }
.pill { display:inline-block; background: var(--brand-soft); color: var(--brand-d); font-weight: 800; font-size: .78rem; padding: .3rem .8rem; border-radius: var(--r-pill); font-family: var(--sans); }
.velkomst h2, .velkomst h3 { color: var(--ink); }
.velkomst h3 { margin-top: 1.8rem; }

/* ---------- Accessibility ---------- */
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 300;
  background: var(--brand); color: #fff !important; padding: .7rem 1.1rem;
  border-radius: 0 0 var(--r-sm) 0; font-weight: 800; font-family: var(--sans); }
.skip-link:focus { left: 0; }
a:focus-visible, button:focus-visible, .btn:focus-visible, input:focus-visible, .vopt:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px; }

/* Subtle bottom gradient behind text on section heros with an image */
.page-hero.has-bg::after { content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to top, rgba(7,26,26,.66) 0%, rgba(7,26,26,.30) 30%, transparent 60%); }

/* ---------- Seasonal banner (Aug–Oct) ---------- */
.sesongbanner { background: linear-gradient(120deg, var(--t2a), var(--t2b)); color: #fff; }
.sesong-inner { display: flex; align-items: center; gap: 1rem; padding: .7rem 1.2rem; flex-wrap: wrap; }
.sesong-inner span { flex: 1 1 300px; font-size: .95rem; }
.sesong-inner strong { color: #fff; }
.sesong-inner .btn { padding: .5rem 1.1rem; font-size: .9rem; background: #fff; color: var(--t2b) !important; }
.sesong-inner .btn:hover { background: var(--accent-soft); }
.sesong-x { background: none; border: none; color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer; padding: 0 .3rem; }

/* ---------- "Next step" CTA ---------- */
.neste-steg { padding: 0 0 3rem; }
.ns-card { background: linear-gradient(125deg, var(--brand-soft), #fff); border: 1px solid var(--border);
  border-left: 5px solid var(--brand); border-radius: var(--r); padding: 1.4rem 1.6rem; text-align: center; }
.ns-card h2 { border: none; margin: 0 0 .3rem; font-size: 1.3rem; }
.ns-card p { color: var(--text-light); margin: 0 0 1rem; }
.ns-btns { display: flex; gap: .7rem; justify-content: center; flex-wrap: wrap; }
.ns-btns .btn { padding: .7rem 1.3rem; }

/* ---------- Wizard ---------- */
.veiviser { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow); padding: 1.8rem; margin: 1.6rem 0; }
.vq { font-family: var(--serif); font-size: 1.3rem; color: var(--ink); font-weight: 700; margin: 0 0 1.1rem; display: flex; align-items: center; gap: .6rem; }
.vnum { display: inline-flex; width: 2rem; height: 2rem; flex: 0 0 auto; align-items: center; justify-content: center;
  background: var(--brand); color: #fff; border-radius: 50%; font-size: 1rem; font-family: var(--sans); }
.vopts { display: grid; gap: .7rem; }
.vopt { text-align: left; background: var(--bg); border: 2px solid var(--border); border-radius: var(--r);
  padding: 1rem 1.2rem; font-size: 1.02rem; font-weight: 600; color: var(--text); cursor: pointer;
  font-family: var(--sans); transition: .15s; }
.vopt:hover { border-color: var(--brand); background: var(--brand-soft); transform: translateY(-2px); }
.vopt.valgt { border-color: var(--brand); background: var(--brand-soft); }
.vback { margin-top: 1.1rem; background: none; border: none; color: var(--brand); font-weight: 700; cursor: pointer; font-family: var(--sans); font-size: .95rem; }
.vresult { text-align: center; padding: .5rem; }
.vr-emoji { font-size: 3rem; line-height: 1; }
.vresult h2 { border: none; margin: .5rem 0; }
.vresult p { color: var(--text); max-width: 46ch; margin: 0 auto 1.3rem; }
.vr-links { display: flex; gap: .7rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1.2rem; }
.vreset { background: none; border: none; color: var(--text-light); font-weight: 700; cursor: pointer; font-family: var(--sans); }
.vreset:hover { color: var(--brand); }
.nav-verktoy { color: var(--brand-d); }

/* ---------- Custom SVG figures ---------- */
.figur-graf { margin: 1.8rem 0; background: var(--white); border: 1px solid var(--border);
  border-radius: var(--r); padding: 1.3rem; box-shadow: var(--shadow); }
.figur-graf svg { width: 100%; height: auto; display: block; }
.figur-graf figcaption { font-size: .85rem; color: var(--text-light); text-align: center; margin-top: .6rem; font-family: var(--sans); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; gap: 1.4rem; }
  .footer-brand { grid-column: 1 / -1; }
  .pros-cons { grid-template-columns: 1fr; }
}
@media (max-width: 1240px) {
  .nav-menu { position: fixed; inset: 58px 0 auto 0; background: var(--bg); flex-direction: column; flex-wrap: nowrap; align-items: stretch; justify-content: flex-start; padding: 1rem; gap: .2rem; border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg); display: none; max-height: calc(100vh - 58px); overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .nav-menu.open { display: flex; }
  .nav-dropdown { width: 100%; }
  .nav-link { padding: .8rem; border-radius: var(--r-sm); }
  .nav-cta { text-align:center; margin-top:.3rem; }
  .dropdown-menu, .dropdown-menu.mega { position: static; transform: none; opacity: 1; visibility: visible; box-shadow: none; border: none; padding: .3rem 0 .6rem 1rem; min-width: 0; width: 100%; display: block; }
  .nav-dropdown:hover .dropdown-menu { transform: none; }
  .nav-toggle { display: block; margin-left: auto; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .section { padding: 2.6rem 0; }
  .hero-inner { padding: 3rem 1.2rem; }
  .factbox dl { grid-template-columns: 1fr; gap: .15rem .5rem; }
  .factbox dd { margin-bottom: .5rem; }
}

/* ==========================================================================
   Dark mode — variable overrides. Applies when the visitor's OS prefers dark
   (unless they've toggled light), or when they toggle dark explicitly.
   ========================================================================== */
:root[data-theme="dark"] {
  --brand:#3BB6B6; --brand-d:#2A9A9A; --brand-l:#4FC7C7; --brand-soft:#123130;
  --accent:#F5893E; --accent-d:#FF9E5A; --accent-soft:#3A2A1C;
  --sage:#3FB07C; --sage-soft:#12312A; --rust:#E86B4A; --rust-soft:#3A211A;
  --ink:#E8EFEF; --text:#C4D0D0; --text-light:#93A3A3; --muted:#93A3A3;
  --bg:#0E1B1C; --bg-2:#132727; --white:#16292A; --border:#25403F;
  --shadow: 0 2px 6px rgba(0,0,0,.30), 0 10px 26px rgba(0,0,0,.36);
  --shadow-lg: 0 16px 48px rgba(0,0,0,.5);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand:#3BB6B6; --brand-d:#2A9A9A; --brand-l:#4FC7C7; --brand-soft:#123130;
    --accent:#F5893E; --accent-d:#FF9E5A; --accent-soft:#3A2A1C;
    --sage:#3FB07C; --sage-soft:#12312A; --rust:#E86B4A; --rust-soft:#3A211A;
    --ink:#E8EFEF; --text:#C4D0D0; --text-light:#93A3A3; --muted:#93A3A3;
    --bg:#0E1B1C; --bg-2:#132727; --white:#16292A; --border:#25403F;
    --shadow: 0 2px 6px rgba(0,0,0,.30), 0 10px 26px rgba(0,0,0,.36);
    --shadow-lg: 0 16px 48px rgba(0,0,0,.5);
  }
}
:root[data-theme="dark"] .site-nav { background: rgba(14,27,28,.95); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .site-nav { background: rgba(14,27,28,.95); }
}
:root[data-theme="dark"] .article strong,
:root[data-theme="dark"] .factbox dt { color: var(--ink); }

/* Theme toggle button in the nav */
.theme-toggle { background: none; border: none; cursor: pointer; font-size: 1.15rem;
  padding: .45rem; border-radius: var(--r-sm); line-height: 1; color: var(--text-light); }
.theme-toggle:hover { background: var(--brand-soft); color: var(--brand); }

/* Language switcher (nav top bar) */
.lang-switch { display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .6rem;
  border: 1px solid var(--border); border-radius: var(--r-pill); font-size: .82rem; font-weight: 800;
  color: var(--text); font-family: var(--sans); line-height: 1; white-space: nowrap; }
.lang-switch:hover { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-d); }
.lang-switch span { letter-spacing: .02em; }
.lang-switch-group { display: inline-flex; gap: .35rem; }
/* On smaller screens the top bar gets crowded once the language pills are added,
   which can push the brand text onto a second line. Compact the bar: flags-only
   language pills, tighter spacing, a slightly smaller logo. */
@media (max-width: 620px) {
  .nav-inner { gap: .4rem; padding-left: .6rem; padding-right: .6rem; }
  .nav-logo { font-size: 1rem; gap: .45rem; }
  .nav-logo-icon { width: 30px; height: 30px; }
  .lang-switch span { display: none; }
  .lang-switch { padding: .3rem .4rem; font-size: .95rem; }
  .lang-switch-group { gap: .25rem; }
  .btn-search-icon, .theme-toggle { padding: .35rem .3rem; font-size: 1.05rem; }
  .nav-toggle { padding: .2rem .2rem; }
}
@media (max-width: 340px) { .nav-logo-text { display: none; } }

/* ==========================================================================
   Quick answer box (featured-snippet oriented TL;DR)
   ========================================================================== */
.quick-answer { background: var(--sage-soft); border: 1px solid var(--border);
  border-left: 5px solid var(--sage); border-radius: var(--r); padding: 1.1rem 1.4rem;
  margin: 0 0 1.8rem; }
.quick-answer .qa-label { display: inline-flex; align-items: center; gap: .4rem;
  font-family: var(--sans); font-size: .72rem; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: var(--sage); margin-bottom: .4rem; }
.quick-answer p { margin: 0; color: var(--text); font-size: 1.04rem; }
.quick-answer p strong { color: var(--ink); }

/* ==========================================================================
   Tool pages: trap picker (reuses .veiviser/.vopt) + timeline calculator
   ========================================================================== */
.calc { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow); padding: 1.8rem; margin: 1.6rem 0; }
.calc .field { margin-bottom: 1.3rem; }
.calc label { display: block; font-family: var(--sans); font-weight: 700; color: var(--ink);
  margin-bottom: .5rem; font-size: 1rem; }
.calc select, .calc input[type="date"], .calc input[type="number"] {
  width: 100%; padding: .8rem 1rem; border: 2px solid var(--border); border-radius: var(--r);
  background: var(--bg); color: var(--text); font-size: 1rem; font-family: var(--sans); }
.calc select:focus, .calc input:focus { outline: none; border-color: var(--brand); }
.calc .seg { display: flex; gap: .5rem; flex-wrap: wrap; }
.calc .seg button { flex: 1 1 auto; min-width: 90px; padding: .7rem .8rem; border: 2px solid var(--border);
  background: var(--bg); color: var(--text); border-radius: var(--r); font-weight: 700; cursor: pointer;
  font-family: var(--sans); transition: .15s; }
.calc .seg button:hover { border-color: var(--brand); }
.calc .seg button.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-d); }
.calc-result { margin-top: 1.4rem; border-top: 1px solid var(--border); padding-top: 1.4rem; text-align: center; }
.calc-result .big { font-family: var(--serif); font-size: 2.2rem; font-weight: 700; color: var(--brand); line-height: 1.1; }
.calc-result .big.warn { color: var(--rust); }
.calc-result p { color: var(--text); max-width: 46ch; margin: .6rem auto 0; }
.calc-result .cr-links { display: flex; gap: .7rem; justify-content: center; flex-wrap: wrap; margin-top: 1.1rem; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); gap: 1.2rem; margin: 1.2rem 0; }
