/* Medisch Centrum Nijverdal – stijlen (mobiel eerst) */

:root {
  --red: #e00000;          /* merkrood (origineel: red) */
  --red-text: #c00000;     /* rood voor tekst/links, AA-contrast op lichte vlakken */
  --bg: #fbfcfe;
  --ink: #000;
  --card: #6b6b6b;         /* origineel: rgba(0,0,0,.5) */
  --card-light: #e6e6e6;   /* origineel: rgba(255,255,255,.8) op de kaart */
  --nav: rgba(0, 0, 0, .78);
  --topbar-h: 56px;
  --hero-h: 402px;
  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar-h) + 60px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.43;
}

img { max-width: 100%; }
a { color: var(--red-text); }
p { margin: 0; }

.container {
  width: 100%;
  max-width: 1170px;
  margin: 0 auto;
  padding: 0 16px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.sprite { display: none; }

.skip-link {
  position: absolute;
  left: 8px; top: -100px;
  z-index: 100;
  padding: 8px 14px;
  background: #fff;
  color: var(--red-text);
}
.skip-link:focus { top: 8px; }

:focus-visible { outline: 3px solid #1a73e8; outline-offset: 2px; }

/* ---------- Topbalk met merknaam en zoekveld ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, .95);
}

.topbar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  min-height: var(--topbar-h);
  padding-top: 6px;
  padding-bottom: 6px;
}

.brand {
  flex: 1 1 auto;
  color: var(--red);
  font-size: 20px;
  font-weight: 500;
  text-decoration: none;
}

.search {
  position: relative;
  order: 3;
  display: flex;
  flex: 1 1 100%;
  min-width: 0;
}

.search-label {
  display: flex;
  align-items: center;
  padding: 0 10px 0 16px;
  border-radius: 0;
  background: var(--red-text);
  color: #fff;
  font-size: 13px;
  white-space: nowrap;
}

.search-input {
  flex: 1;
  width: 100%;
  min-width: 0;
  padding: 7px 12px;
  border: 1px solid #ddd;
  border-left: 0;
  border-radius: 0;
  background: #fff;
  font: inherit;
  font-size: 14px;
}

.search-count {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: none;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(0, 0, 0, .75);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}
.searching .search-count { display: block; }
.search-count.is-error { background: var(--red-text); }

.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
}
.nav-toggle .bar { display: block; width: 22px; height: 2px; background: #888; }

/* ---------- Fotocarrousel ---------- */

.hero, .hero-welcome, .dots { display: none; }

/* ---------- Hoofdmenu ---------- */

.mainnav {
  position: sticky;
  top: var(--topbar-h);
  z-index: 35;
  background: var(--nav);
}

.nav-list {
  display: none;
  margin: 0 auto;
  padding-top: 4px;
  padding-bottom: 8px;
  list-style: none;
}
.mainnav.is-open .nav-list { display: block; }

.nav-list a {
  display: block;
  padding: 8px 4px;
  color: #fff;
  text-decoration: none;
}
.nav-list a:hover, .nav-list a:focus { color: rgba(255, 255, 255, .8); }
.nav-list > li > a.is-active { color: #fff; font-weight: 700; }

.sub { display: none; }

/* ---------- Categorieën ---------- */

main { padding-bottom: 20px; }

.category { padding-top: 40px; }

.section-title {
  position: relative;
  margin: 0 0 34px;
  padding: 0 0 5px 54px;
  border-bottom: 1px dotted var(--red);
  color: var(--red-text);
  font-size: 30px;
  font-weight: 200;
  line-height: 30px;
}

.section-icon {
  position: absolute;
  left: 2px;
  bottom: -6px;
  width: 44px;
  height: 44px;
  padding: 7px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
}

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 30px;
  align-items: start;
}

/* Categoriekop zoals het origineel: zwart met klein icoon */
.category-title {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0 0 12px;
  font-size: 30px;
  font-weight: 500;
  line-height: 1.1;
}

.category-icon {
  flex: none;
  width: 32px;
  height: 32px;
}

/* ---------- Kaart zorgaanbieder ---------- */

.card {
  margin-bottom: 30px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--card);
  color: #fff;
}

.searching .card:not(.is-match),
.searching .category:not(.has-match) { display: none; }

.card-title {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 92px;
  margin: 0 0 15px;
  padding: 10px 20px;
  background: var(--card-light);
  color: #000;
  font-size: 28px;
  font-weight: 500;
  line-height: 32px;
}
.card-title small {
  color: #333;
  font-size: 16px;
  font-weight: 300;
  line-height: 20px;
}
.card-title span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card address {
  padding: 0 20px;
  font-style: normal;
}
.card address p { line-height: 1.6; }
.card address strong { font-weight: 700; }

.card-rows, .card-people {
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--card-light);
  color: #000;
}

.card-rows { margin-top: 15px; }

.card-rows li {
  position: relative;
  padding: 6px 12px 6px 40px;
  border-bottom: 1px solid #000;
  overflow-wrap: anywhere;
}
.card-rows li:last-child { border-bottom: 0; }

.card-rows a, .card-people a {
  color: var(--red-text);
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
}
.card-rows a:hover { border-bottom-style: solid; }

.icon {
  position: absolute;
  left: 12px;
  top: 9px;
  width: 16px;
  height: 16px;
}

.card-people {
  position: relative;
  margin-top: 2px;
  padding: 2px 0 6px;
}

.card-people ul { margin: 0; padding: 0; list-style: none; }
.card-people li {
  padding: 6px 12px 3px 40px;
  border-top: 1px solid #d4d4d4;
  line-height: 1.25;
}
.card-people li:first-child { border-top: 0; }
.card-people strong { font-weight: 700; }
.card-people .role {
  display: block;
  font-size: 12px;
}

.icon-people { top: 9px; left: 11px; width: 18px; height: 18px; }

/* ---------- Routeplanner ---------- */

.route { padding-top: 50px; }

.route-panel {
  padding: 30px 0;
  background:
    linear-gradient(rgba(0, 0, 0, .55), rgba(0, 0, 0, .55)),
    url("/images/ARF_4253-1.jpg") center 40% / cover no-repeat;
}

.route-card {
  max-width: 360px;
  padding: 16px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .95);
}
.route-card > p { margin-bottom: 12px; }

.route-form label { font-size: 14px; }

.route-input {
  display: block;
  width: 100%;
  margin: 4px 0 10px;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font: inherit;
}

.route-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 0 0 12px;
  padding: 0;
  border: 0;
}

.btn {
  padding: 8px 20px;
  border: 0;
  border-radius: 20px;
  background: var(--red-text);
  color: #fff;
  font: inherit;
  cursor: pointer;
}
.btn:hover, .btn:focus { background: #900; }

/* ---------- Footer ---------- */

.site-footer {
  min-height: 100px;
  padding: 35px 0;
  border-top: 5px solid var(--red);
  background: #333;
}
.site-footer p {
  padding: 6px 0;
  color: #b3b3b3;
  font-size: 13px;
  line-height: 3em;
}

/* ---------- Tablet ---------- */

@media (min-width: 768px) {
  .cards { grid-template-columns: repeat(2, 1fr); }

  .section-title {
    margin-bottom: 70px;
    padding-left: 64px;
  }
  .section-icon {
    left: -12px;
    bottom: -16px;
    width: 60px;
    height: 60px;
    padding: 9px;
  }

  .route-panel { padding: 60px 0; }
}

/* ---------- Desktop: carrousel en horizontaal menu ---------- */

@media (min-width: 992px) {
  :root { --topbar-h: 70px; }

  .cards { grid-template-columns: repeat(3, 1fr); }

  .site-header { position: relative; }

  .topbar {
    position: fixed;
    left: 0; right: 0;
    top: 20px;
    background: rgba(255, 255, 255, .9);
  }
  .topbar-inner { flex-wrap: nowrap; }
  .brand { font-size: 34px; }
  .search { order: 0; flex: 0 1 500px; }
  .search-label { font-size: 12px; border-radius: 16px 0 0 16px; }
  .search-input { font-size: 12px; border-color: #fff; border-radius: 0 16px 16px 0; }
  .nav-toggle { display: none; }

  .hero {
    display: block;
    position: relative;
    height: var(--hero-h);
    overflow: hidden;
    background: #ccc;
  }
  .slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity .6s ease;
  }
  .slide.is-active { opacity: 1; }
  .slide.brighter { filter: brightness(140%); }

  .hero-welcome {
    display: block;
    position: absolute;
    left: 0; right: 0;
    top: 197px;
    pointer-events: none;
  }
  .welcome {
    display: inline-block;
    padding: 0 90px 0 35px;
    border-radius: 50px;
    background: rgba(224, 0, 0, .85);
    color: #fff;
    font-size: 50px;
    font-weight: 100;
    line-height: 80px;
  }

  .dots {
    display: flex;
    gap: 4px;
    position: absolute;
    right: 20px;
    top: 320px;
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .dots button {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 1px solid #fff;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
  }
  .dots button.is-active { background: #fff; }

  .mainnav {
    margin-top: -50px;
    border-bottom: 10px solid #fff;
  }
  .nav-list {
    display: flex;
    padding-top: 0;
    padding-bottom: 0;
  }
  .nav-list > li { position: relative; }
  .nav-list > li > a {
    padding: 15px 10px;
    font-size: 16px;
    line-height: 20px;
  }
  .nav-list > li > a.is-active {
    margin-top: -6px;
    padding-top: 21px;
    background: #fff;
    color: #555;
    font-weight: 300;
  }

  .has-sub > a::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 100%;
    margin-left: -6px;
    border: 6px solid transparent;
    border-top-color: var(--nav);
  }

  .sub {
    position: absolute;
    left: 0;
    top: 100%;
    min-width: 260px;
    margin: 0;
    padding: 5px 0;
    list-style: none;
    background: #fff;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, .18);
  }
  .has-sub:hover .sub,
  .has-sub:focus-within .sub { display: block; }
  .sub a {
    padding: 4px 20px;
    color: #333;
    font-size: 18px;
    white-space: nowrap;
  }
  .sub a:hover, .sub a:focus { background: #f5f5f5; color: #262626; }

  .route-card { width: 320px; }
}

@media (min-width: 1200px) {
  .nav-list > li > a { padding-left: 15px; padding-right: 15px; font-size: 18px; }
  .welcome { margin-left: -30px; }
}

@media print {
  .topbar, .mainnav, .hero, .dots, .route-panel { display: none !important; }
}

/* ---------- 404 ---------- */

.topbar--static { position: static !important; }
.notfound { padding: 60px 0 80px; }
.notfound .section-title { padding-left: 0; margin-bottom: 30px; }
.notfound p { margin-bottom: 20px; }
.notfound .btn { display: inline-block; text-decoration: none; }
