/* ==========================================================================
   Naturskolen – delt stilark
   ========================================================================== */

:root{
  --green:        #5a9e2f;
  --green-dark:   #4a7d27;
  --green-bright: #7cb342;
  --green-soft:   #eef6e1;
  --green-line:   #cdddb4;
  --orange:       #f5a623;
  --orange-dark:  #e08e0b;
  --ink:          #313a2b;
  --muted:        #6b7363;
  --page-bg:      #d9ddd4;
  --max:          1000px;
}

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

html{ scroll-behavior:smooth; }

body{
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  font-size:15px;
  line-height:1.65;
  color:var(--ink);
  background:var(--page-bg);
}

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

img{ max-width:100%; display:block; }

.page{
  max-width:var(--max);
  margin:0 auto;
  background:#fff;
  box-shadow:0 0 18px rgba(0,0,0,.12);
}

/* ---------- Skip link (tilgjengelighet) ---------- */
.skip{
  position:absolute; left:-9999px; top:0;
  background:var(--green); color:#fff; padding:8px 14px; z-index:50;
}
.skip:focus{ left:8px; top:8px; }

/* ---------- HEADER ---------- */
.site-header{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:space-between;
  background:#fff;
  padding:14px 24px;
  border-bottom:4px solid var(--green-bright);
  overflow:hidden;
}
.site-header .brand{ display:flex; align-items:center; gap:12px; z-index:2; }
.site-header .brand img{ height:64px; }
.site-header .brand .tagline{
  font-size:12px; color:var(--muted); letter-spacing:.5px; text-transform:uppercase;
}
.site-header .hero-art{
  height:120px; align-self:flex-end; margin-bottom:-4px; opacity:.95;
}
.header-search{ display:flex; gap:6px; align-items:center; margin:0 18px 0 auto; z-index:2; }
.header-search input{
  padding:8px 11px; border:1px solid #b9cda0; border-radius:4px;
  font-size:13px; min-width:170px; font-family:inherit;
}
.header-search input:focus{ outline:2px solid var(--green-bright); border-color:var(--green-bright); }
.header-search .btn{ padding:8px 16px; }

/* ---------- NAV ---------- */
.mainnav{ background:var(--green); }
.mainnav ul{
  list-style:none;
  display:flex;
  flex-wrap:wrap;
  max-width:var(--max);
  margin:0 auto;
}
.mainnav a{
  display:block;
  color:#fff;
  font-weight:600;
  padding:12px 18px;
  font-size:14px;
}
.mainnav a:hover{ background:var(--green-dark); text-decoration:none; }
.mainnav a.active{ background:var(--green-dark); }

/* ---------- BREADCRUMB ---------- */
.breadcrumb{
  font-size:12.5px; color:var(--muted);
  padding:10px 24px; background:var(--green-soft);
  border-bottom:1px solid var(--green-line);
}
.breadcrumb a{ color:var(--green-dark); }

/* ---------- LAYOUT ---------- */
.layout{ display:flex; align-items:flex-start; }
.col-left { width:215px; flex-shrink:0; padding:18px 12px 40px; }
.col-main { flex:1; padding:22px 24px 40px; min-width:0; }
.col-right{ width:230px; flex-shrink:0; padding:18px 14px 40px 0; }
.col-main.wide{ padding-right:24px; }

.content-narrow{ max-width:760px; }

/* ---------- HEADINGS ---------- */
h1{ font-size:27px; color:var(--green-dark); margin-bottom:14px; line-height:1.2; }
h2{ font-size:21px; color:var(--green-dark); margin:26px 0 12px; }
h3{ font-size:17px; color:var(--ink); margin:18px 0 8px; }
p{ margin-bottom:14px; }
ul.bullets, ol.num{ margin:0 0 16px 22px; }
ul.bullets li, ol.num li{ margin-bottom:6px; }

.lead{ font-size:17px; color:#4a523f; }

/* ---------- GREEN NAV BLOCKS (left) ---------- */
.navlist{ list-style:none; margin-bottom:24px; }
.navlist li{ margin-bottom:5px; }
.navlist a{
  display:block; background:var(--green-bright); color:#fff;
  font-weight:600; padding:10px 14px; border-radius:3px; font-size:14px;
}
.navlist a:hover{ background:var(--green); text-decoration:none; }
.navlist a.active{ background:var(--green-dark); }

.grass{
  height:24px; margin:4px 2px 18px;
  background:radial-gradient(ellipse 7px 13px at 50% 100%, #bcd49a 60%, transparent 62%) 0 0/13px 24px repeat-x;
}

/* ---------- TOOL BOXES ---------- */
.box{ background:var(--green-soft); border-radius:3px; margin-bottom:22px; overflow:hidden; }
.box-title{ background:var(--green-bright); color:#fff; font-weight:700; font-size:14px; padding:9px 14px; }
.box-body{ padding:13px 14px; font-size:13.5px; }
.box-body p{ margin-bottom:10px; }
.box-body label{ display:block; font-weight:600; font-size:12.5px; margin-bottom:3px; }
.box-body select,
.box-body input{
  width:100%; padding:7px; margin-bottom:9px;
  border:1px solid #b9cda0; background:#fff; font-size:13px; border-radius:2px;
}
.btn{
  display:inline-block;
  background:linear-gradient(180deg,var(--green-bright),var(--green));
  color:#fff; border:1px solid var(--green-dark);
  padding:8px 22px; border-radius:4px; font-size:14px; cursor:pointer; font-weight:600;
}
.btn:hover{ filter:brightness(1.06); text-decoration:none; }
.btn.orange{ background:linear-gradient(180deg,#f9b94a,var(--orange)); border-color:var(--orange-dark); }
.btn-row{ margin:18px 0; }

/* ---------- ARTICLE CARDS ---------- */
.article{ border:1px solid var(--green-line); border-radius:3px; margin-bottom:18px; background:#fff; }
.article h2{
  background:var(--green-bright); color:#fff; font-size:16px;
  padding:9px 13px; margin:0; font-weight:700;
}
.article h2 a{ color:#fff; }
.article .body{ padding:12px 13px; }
.article .body p{ margin-bottom:10px; color:#46503c; }
.article .more{ color:var(--green); font-weight:700; }
.article .date{ color:#9aa090; font-size:12px; margin-left:8px; }
.article .thumb{ height:150px; object-fit:cover; width:100%; border-bottom:1px solid var(--green-line); }

/* ---------- CARD GRID ---------- */
.grid{ display:grid; gap:16px; }
.grid.cols-2{ grid-template-columns:repeat(2,1fr); }
.grid.cols-3{ grid-template-columns:repeat(3,1fr); }
.card{
  background:#fff; border:1px solid var(--green-line); border-radius:5px;
  overflow:hidden; display:flex; flex-direction:column;
}
.card .card-img{ height:120px; display:flex; align-items:center; justify-content:center; font-size:38px; }
.card .card-pad{ padding:12px 14px; }
.card h3{ margin:0 0 6px; font-size:16px; }
.card p{ font-size:13.5px; color:var(--muted); margin-bottom:10px; }
.card .card-foot{ margin-top:auto; padding:0 14px 14px; }

/* ---------- LÆREMIDLER cards (right rail) ---------- */
.laeremidler{ background:var(--green-soft); border-radius:3px; padding-bottom:12px; }
.lm-head{
  color:var(--green-bright); font-style:italic; font-weight:800; font-size:21px;
  padding:11px 12px 7px; border-bottom:2px solid var(--green-line);
}
.lm-card{ position:relative; margin:28px 12px 0; background:#fff; border:1px solid var(--green-line); border-radius:3px; }
.lm-icon{
  position:absolute; top:-20px; left:10px; width:44px; height:44px; border-radius:50%;
  background:#fff; box-shadow:0 1px 4px rgba(0,0,0,.22);
  display:flex; align-items:center; justify-content:center; font-size:22px;
}
.lm-title{ background:var(--green-bright); color:#fff; font-weight:700; text-align:right; padding:8px 12px; font-size:14px; }
.lm-body{ padding:9px 12px; font-size:12.5px; color:#46503c; }
.lm-body a{ display:inline-block; margin-top:5px; font-weight:700; }

/* ---------- HERO BANNER (home) ---------- */
.hero{
  background:linear-gradient(120deg,#6aa82a,#4a7d27);
  color:#fff; padding:30px 26px; border-radius:5px; margin-bottom:22px;
  position:relative; overflow:hidden;
}
.hero h1{ color:#fff; font-size:28px; }
.hero p{ font-size:17px; max-width:560px; margin-bottom:18px; opacity:.96; }

/* ---------- TABLE ---------- */
table.data{ width:100%; border-collapse:collapse; margin:14px 0 20px; font-size:14px; }
table.data th, table.data td{ border:1px solid var(--green-line); padding:9px 11px; text-align:left; }
table.data th{ background:var(--green-soft); }
table.data tr:nth-child(even) td{ background:#fafdf5; }

/* ---------- FORM ---------- */
.form-grid{ max-width:560px; }
.form-grid label{ display:block; font-weight:600; margin:12px 0 4px; }
.form-grid input, .form-grid textarea, .form-grid select{
  width:100%; padding:9px; border:1px solid #b9cda0; border-radius:3px; font-size:14px; font-family:inherit;
}
.form-grid textarea{ min-height:120px; resize:vertical; }

/* ---------- NOTE / CALLOUT ---------- */
.callout{
  background:#fff8e8; border-left:4px solid var(--orange);
  padding:12px 16px; border-radius:0 4px 4px 0; margin:18px 0;
}
.tag{ display:inline-block; background:var(--green-soft); color:var(--green-dark);
  font-size:11.5px; font-weight:700; padding:2px 9px; border-radius:20px; margin-right:6px; }

/* ---------- BYLINE (forfatter + dato) ---------- */
.byline{
  display:flex; align-items:center; gap:9px; flex-wrap:wrap;
  font-size:13px; color:var(--muted);
  margin:0 0 18px; padding-bottom:14px; border-bottom:1px solid var(--green-line);
}
.byline img{ width:34px; height:34px; border-radius:50%; object-fit:cover; display:block; flex-shrink:0; }
.byline a{ color:var(--green-dark); font-weight:700; }
.byline .sep{ color:var(--green-line); }

/* ---------- FOOTER ---------- */
.site-footer{ background:var(--green-dark); color:#d6ebbf; }
.footer-cols{
  max-width:var(--max); margin:0 auto;
  display:grid; grid-template-columns:repeat(4,1fr); gap:24px;
  padding:28px 24px;
}
.footer-cols h4{ color:#fff; font-size:14px; margin-bottom:10px; text-transform:uppercase; letter-spacing:.5px; }
.footer-cols ul{ list-style:none; }
.footer-cols li{ margin-bottom:6px; }
.footer-cols a{ color:#d6ebbf; font-size:13.5px; }
.footer-cols a:hover{ color:#fff; }
.footer-bar{
  background:#3c671f; color:#bcd9a0; text-align:center;
  padding:12px; font-size:12.5px;
}
.footer-bar a{ color:#fff; }

/* ---------- RESPONSIVE ---------- */
@media (max-width:880px){
  .layout{ flex-direction:column; }
  .col-left, .col-right{ width:100%; padding:16px 24px; }
  .grid.cols-3{ grid-template-columns:repeat(2,1fr); }
  .footer-cols{ grid-template-columns:repeat(2,1fr); }
  .site-header .hero-art{ display:none; }
}
@media (max-width:880px){
  .header-search{ display:none; }
}
@media (max-width:560px){
  .grid.cols-2, .grid.cols-3{ grid-template-columns:1fr; }
  .footer-cols{ grid-template-columns:1fr; }
  .mainnav a{ padding:10px 13px; font-size:13px; }
}

/* ---------- PRINT (for «lag PDF») ---------- */
@media print{
  body{ background:#fff; }
  .page{ box-shadow:none; max-width:none; }
  .mainnav, .site-footer, .col-left, .col-right,
  .breadcrumb, .header-search, .skip, .btn-row{ display:none !important; }
  .site-header{ border-bottom:2px solid #5a9e2f; }
  .col-main{ padding:0; }
  a{ color:#000; text-decoration:none; }
}
