/* ==========================================================================
   insekthotel.dk – fælles stylesheet
   ========================================================================== */

:root {
  --color-bg: #faf6ee;
  --color-bg-alt: #f1e9d8;
  --color-surface: #ffffff;
  --color-text: #2c2418;
  --color-text-muted: #5a5142;
  --color-primary: #4c6b3a;
  --color-primary-dark: #384f2a;
  --color-primary-light: #7a9c63;
  --color-accent: #d97a2b;
  --color-accent-dark: #b3611f;
  --color-border: #e4d9c0;
  --color-honey: #e8b23d;

  --font-heading: 'Georgia', 'Iowan Old Style', 'Times New Roman', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;

  --radius: 14px;
  --shadow: 0 4px 18px rgba(44, 36, 24, 0.08);
  --max-width: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--color-primary-dark); text-decoration: underline; text-decoration-color: rgba(76,107,58,0.35); }
a:hover { color: var(--color-accent-dark); }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-primary-dark);
  line-height: 1.25;
  margin-top: 0;
}

h1 { font-size: clamp(2rem, 4vw, 2.9rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 0.6em; }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1.1em; }

ul, ol { padding-left: 1.3em; }
li { margin-bottom: 0.5em; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--color-primary-dark);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  z-index: 1000;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
}

/* ---------- Top bar ---------- */
.topbar {
  background: var(--color-primary-dark);
  color: #f1ead9;
  font-size: 0.85rem;
  padding: 6px 0;
}
.topbar .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; }
.topbar a { color: #f1ead9; text-decoration: none; }
.topbar a:hover { text-decoration: underline; }

/* ---------- Header / nav ---------- */
header.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  gap: 16px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: bold;
  color: var(--color-primary-dark);
  text-decoration: none;
}
.logo img { width: 40px; height: 40px; }
.logo:hover { color: var(--color-accent-dark); }

nav.main-nav ul {
  list-style: none;
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
nav.main-nav a {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.97rem;
  font-weight: 500;
}
nav.main-nav a:hover,
nav.main-nav a[aria-current="page"] {
  background: var(--color-bg-alt);
  color: var(--color-primary-dark);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 1.1rem;
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-block; }
  nav.main-nav {
    display: none;
    width: 100%;
  }
  nav.main-nav.open { display: block; }
  nav.main-nav ul { flex-direction: column; gap: 2px; }
  .header-inner { flex-wrap: wrap; }
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--color-bg-alt), var(--color-bg));
  padding: 56px 0;
  border-bottom: 1px solid var(--color-border);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}
@media (max-width: 780px) {
  .hero-inner { grid-template-columns: 1fr; }
}
.hero p.lead {
  font-size: 1.15rem;
  color: var(--color-text-muted);
  max-width: 55ch;
}
.hero-art { background: var(--color-surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; }

.page-hero {
  background: var(--color-bg-alt);
  padding: 40px 0;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
}
.page-hero p { color: var(--color-text-muted); max-width: 65ch; }

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 14px;
}
.breadcrumb a { color: var(--color-text-muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--color-accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 3px 10px rgba(217,122,43,0.35);
  border: none;
  cursor: pointer;
  font-size: 0.98rem;
}
.btn:hover { background: var(--color-accent-dark); color: #fff; }
.btn.btn-outline {
  background: transparent;
  color: var(--color-primary-dark);
  border: 2px solid var(--color-primary-dark);
  box-shadow: none;
  padding: 10px 20px;
}
.btn.btn-outline:hover { background: var(--color-primary-dark); color: #fff; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }

/* ---------- Sections ---------- */
section { padding: 52px 0; }
section.alt { background: var(--color-bg-alt); }
section.tight { padding: 32px 0; }

.section-intro { max-width: 70ch; color: var(--color-text-muted); }

/* ---------- Card grid ---------- */
.grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid { grid-template-columns: 1fr; } }

.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 700px) { .grid.cols-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.card h3 { margin-bottom: 0.4em; }
.card img.card-icon { width: 52px; height: 52px; margin-bottom: 12px; }

/* ---------- Table ---------- */
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
th, td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.95rem;
}
th { background: var(--color-bg-alt); color: var(--color-primary-dark); }
tr:last-child td { border-bottom: none; }

/* ---------- Steps ---------- */
.steps { counter-reset: step; list-style: none; padding-left: 0; }
.steps li {
  position: relative;
  padding: 18px 18px 18px 60px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 18px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-family: var(--font-heading);
}

/* ---------- Callout / info box ---------- */
.callout {
  background: #f4ecd8;
  border-left: 5px solid var(--color-honey);
  border-radius: 10px;
  padding: 18px 20px;
  margin: 24px 0;
}
.callout.warn { border-left-color: var(--color-accent); background: #fbeee0; }
.callout.green { border-left-color: var(--color-primary); background: #eef3e8; }
.callout h4 { margin-top: 0; margin-bottom: 6px; }

/* ---------- FAQ ---------- */
details.faq {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 4px 18px;
  margin-bottom: 10px;
}
details.faq summary {
  cursor: pointer;
  font-weight: 600;
  padding: 12px 0;
  color: var(--color-primary-dark);
}
details.faq[open] summary { border-bottom: 1px solid var(--color-border); }
details.faq p { padding-top: 10px; }

/* ---------- Ad slots ---------- */
.ad-slot {
  background: var(--color-surface);
  border: 1px dashed var(--color-border);
  border-radius: 10px;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 32px 0;
  padding: 10px;
  text-align: center;
}
.ad-slot.leaderboard { min-height: 90px; }
.ad-slot.rectangle { min-height: 250px; max-width: 336px; margin-left: auto; margin-right: auto; }
.ad-slot.in-article { min-height: 120px; }

/* ---------- Affiliate box ---------- */
.affiliate-box {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
  background: var(--color-surface);
  box-shadow: var(--shadow);
  display: flex;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.affiliate-box img { width: 90px; height: 90px; border-radius: 10px; background: var(--color-bg-alt); padding: 8px; }
.affiliate-box .price { font-weight: bold; color: var(--color-accent-dark); font-size: 1.1rem; }
.affiliate-box .placeholder-tag {
  display: inline-block;
  font-size: 0.72rem;
  background: var(--color-bg-alt);
  color: var(--color-text-muted);
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 6px;
}

/* ---------- Footer ---------- */
footer.site-footer {
  background: var(--color-primary-dark);
  color: #e7e3d5;
  padding: 44px 0 20px;
  margin-top: 40px;
}
footer.site-footer a { color: #e7e3d5; }
footer.site-footer a:hover { color: var(--color-honey); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
  margin-bottom: 30px;
}
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 { color: #fff; font-family: var(--font-heading); margin-bottom: 10px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 6px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 16px;
  font-size: 0.82rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  color: #cfc9b6;
}

/* ---------- Cookie banner ---------- */
#cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--color-surface);
  border-top: 2px solid var(--color-primary);
  box-shadow: 0 -6px 24px rgba(0,0,0,0.15);
  padding: 18px 20px;
  z-index: 1000;
  display: none;
}
#cookie-banner.visible { display: block; }
.cookie-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.cookie-text { max-width: 68ch; font-size: 0.92rem; color: var(--color-text-muted); margin: 0; }
.cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cookie-actions button {
  border-radius: 999px;
  padding: 9px 18px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9rem;
  border: 2px solid var(--color-primary-dark);
}
#cookie-accept { background: var(--color-primary-dark); color: #fff; }
#cookie-reject { background: transparent; color: var(--color-primary-dark); }
#cookie-settings-link { background: none; border: none; text-decoration: underline; color: var(--color-text-muted); padding: 9px 4px; }

.small-note { font-size: 0.82rem; color: var(--color-text-muted); }

/* Utility */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.badge {
  display: inline-block;
  background: var(--color-bg-alt);
  color: var(--color-primary-dark);
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 10px;
}
