/* ============================================
   Apotekergruppen – stilark
   Farger hentet fra logoen: blå #123885, rød #BB141A
   ============================================ */

:root {
  --blue-900: #0b2257;
  --blue-700: #123885;   /* logoens hovedblå */
  --blue-600: #1a4699;
  --blue-500: #2a59b0;
  --blue-100: #e7edf8;
  --blue-50:  #f4f7fc;
  --red:      #bb141a;   /* logoens røde – brukes sparsomt som aksent */
  --ink:      #1d2433;
  --ink-soft: #4c5566;
  --paper:    #ffffff;
  --line:     #dfe5ef;
  --radius:   14px;
  --shadow:   0 6px 24px rgba(11, 34, 87, 0.08);
  --maxw:     1080px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  font-size: 17px;
}

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

a { color: var(--blue-600); }

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

/* ---------- Toppbanner / navigasjon ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 24px;
  max-width: var(--maxw);
  margin: 0 auto;
}

.brand { display: flex; align-items: center; text-decoration: none; }

.brand-logo {
  height: 52px;
  width: auto;
}

.main-nav ul {
  display: flex;
  gap: 6px;
  list-style: none;
  flex-wrap: wrap;
}

.main-nav a {
  display: block;
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.main-nav a:hover { background: var(--blue-50); color: var(--blue-700); }

.main-nav a.active { background: var(--blue-100); color: var(--blue-900); }

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

/* ---------- Hero ---------- */

.hero {
  background: linear-gradient(160deg, var(--blue-900) 0%, var(--blue-700) 55%, var(--blue-500) 100%);
  color: #fff;
  padding: 88px 0 96px;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -120px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
}

.hero::before {
  content: "";
  position: absolute;
  right: 60px;
  bottom: -180px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
}

.hero .container { position: relative; z-index: 1; }

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 1.15;
  font-weight: 800;
  max-width: 18ch;
  margin-bottom: 18px;
}

.hero p {
  font-size: 1.15rem;
  max-width: 56ch;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 32px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  font-size: 1rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: #fff;
  color: var(--blue-900);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}

.btn-ghost {
  border: 2px solid rgba(255, 255, 255, 0.7);
  color: #fff;
}

.btn-solid {
  background: var(--blue-700);
  color: #fff;
}

/* ---------- Sideoverskrift (undersider) ---------- */

.page-hero {
  background: linear-gradient(160deg, var(--blue-900), var(--blue-600));
  color: #fff;
  padding: 56px 0;
}

.page-hero h1 {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 800;
}

.page-hero p {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.85);
  max-width: 60ch;
}

/* ---------- Seksjoner ---------- */

section.block { padding: 64px 0; }

section.block.alt { background: var(--blue-50); }

.block h2 {
  font-size: 1.7rem;
  color: var(--blue-900);
  margin-bottom: 16px;
}

/* rød aksentstrek under seksjonsoverskrifter – som taglinen i logoen */
.container > h2::after,
.container.prose > h2:first-child::after {
  content: "";
  display: block;
  width: 44px;
  height: 3px;
  border-radius: 2px;
  background: var(--red);
  margin-top: 10px;
}

.block .lead {
  font-size: 1.12rem;
  color: var(--ink-soft);
  max-width: 64ch;
  margin-bottom: 12px;
}

.prose p { margin-bottom: 16px; max-width: 70ch; }

.prose ul { margin: 0 0 16px 22px; max-width: 70ch; }

.prose li { margin-bottom: 8px; }

/* ---------- Kort ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
  margin-top: 34px;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
  box-shadow: var(--shadow);
}

.card .icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--blue-100);
  color: var(--blue-700);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.card .icon svg { width: 22px; height: 22px; }

.card h3 { color: var(--blue-900); margin-bottom: 8px; font-size: 1.15rem; }

.card p { color: var(--ink-soft); font-size: 0.97rem; }

.card a.more {
  display: inline-block;
  margin-top: 12px;
  font-weight: 700;
  text-decoration: none;
}

/* ---------- Nøkkeltall ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 22px;
  text-align: center;
}

.stat .num {
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--blue-700);
  line-height: 1.1;
}

.stat .label { color: var(--ink-soft); font-weight: 600; }

/* ---------- Apotekoversikt (medlemmer) ---------- */

.apotek-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
  margin-top: 34px;
}

.apotek-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.apotek-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(11, 34, 87, 0.13);
}

.apotek-bilde {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--blue-100), var(--blue-50));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue-500);
}

.apotek-bilde svg { width: 36px; height: 36px; }

.apotek-bilde img { width: 100%; height: 100%; object-fit: cover; }

.apotek-info { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }

.apotek-info h3 { color: var(--blue-900); font-size: 1.1rem; margin-bottom: 2px; }

.apotek-info .sted { color: var(--ink-soft); font-size: 0.92rem; margin-bottom: 12px; }

.apotek-info .more {
  margin-top: auto;
  font-weight: 700;
  text-decoration: none;
  font-size: 0.95rem;
}

/* ---------- Apotekside (presentasjon) ---------- */

.foto-placeholder {
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  background: var(--blue-50);
  aspect-ratio: 21 / 9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--ink-soft);
  font-weight: 600;
  margin-bottom: 36px;
}

.foto-placeholder svg { width: 38px; height: 38px; color: var(--blue-500); }

.apotek-fakta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px;
  margin-top: 24px;
}

/* ---------- Ansatte ---------- */

.ansatte-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 22px;
  margin-top: 30px;
}

.ansatt-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 22px;
  text-align: center;
}

.ansatt-card .avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--blue-100);
  color: var(--blue-500);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  overflow: hidden;
}

.ansatt-card .avatar svg { width: 36px; height: 36px; }

.ansatt-card .avatar img { width: 100%; height: 100%; object-fit: cover; }

.ansatt-card h3 { color: var(--blue-900); font-size: 1.05rem; margin-bottom: 2px; }

.ansatt-card .stilling { color: var(--ink-soft); font-size: 0.9rem; }

/* ---------- Kontaktkort ---------- */

.styre-tittel {
  margin-top: 36px;
  color: var(--blue-700);
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.styre-tittel + .contact-grid { margin-top: 14px; }

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 22px;
  margin-top: 30px;
}

.contact-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}

.contact-card h3 { color: var(--blue-900); margin-bottom: 4px; }

.contact-card .role {
  display: inline-block;
  background: var(--blue-100);
  color: var(--blue-700);
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 12px;
  margin-bottom: 12px;
}

.contact-card .role.leder {
  background: #f9e7e8;
  color: var(--red);
}

.contact-card p { font-size: 0.95rem; color: var(--ink-soft); margin-bottom: 4px; }

.contact-card a { word-break: break-all; }

/* ---------- CTA-stripe ---------- */

.cta-strip {
  background: linear-gradient(135deg, var(--blue-700), var(--blue-500));
  color: #fff;
  border-radius: var(--radius);
  padding: 44px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.cta-strip h2 { color: #fff; margin-bottom: 6px; }

.cta-strip p { color: rgba(255, 255, 255, 0.85); }

/* ---------- Bunntekst ---------- */

.site-footer {
  background: var(--blue-900);
  color: rgba(255, 255, 255, 0.8);
  padding: 48px 0 32px;
  margin-top: 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  margin-bottom: 32px;
}

.site-footer h4 { color: #fff; margin-bottom: 12px; font-size: 1rem; }

.site-footer ul { list-style: none; }

.site-footer li { margin-bottom: 8px; }

.site-footer a { color: rgba(255, 255, 255, 0.8); text-decoration: none; }

.site-footer a:hover { color: #fff; text-decoration: underline; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 20px;
  font-size: 0.88rem;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- Responsivt ---------- */

@media (max-width: 860px) {
  .nav-toggle { display: block; }

  .brand-logo { height: 40px; }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }

  .main-nav.open { display: block; }

  .main-nav ul { flex-direction: column; padding: 12px 20px; }

  .main-nav a { border-radius: 10px; }

  .hero { padding: 60px 0 68px; }
}
