/*
Theme Name: MedicX
Theme URI: https://medicx.nl
Description: Schoon, toegankelijk WordPress theme voor huisartsenpraktijk MedicX. 13 talen, responsive, WCAG AA compliant.
Author: MedicX Team
Author URI: https://medicx.nl
Version: 1.0.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: medicx
Domain Path: /languages
Requires at least: 5.9
Requires PHP: 7.4
*/

/* ===== ROOT COLOR PALETTE ===== */
:root {
  --ink: #17282b;
  --ink-soft: #3c5054;
  --teal: #0d5e63;
  --teal-dark: #0a474b;
  --teal-tint: #e4f2f1;
  --sand: #f7f9f8;
  --white: #ffffff;
  --spoed: #b0351f;
  --spoed-tint: #fdeeea;
  --line: #d5e3e2;
  --radius: 14px;
}

/* ===== GLOBAL STYLES ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

body {
  font-family: "Atkinson Hyperlegible", system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--sand);
}

body.groot {
  font-size: 1.2rem;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Sora", system-ui, sans-serif;
  line-height: 1.25;
  color: var(--teal-dark);
  font-weight: 600;
}

h1 {
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  font-weight: 700;
  margin-bottom: 0.9rem;
}

h2 {
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 0.9rem;
}

a {
  color: var(--teal);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--teal-dark);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ===== SKIP LINK ===== */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--teal-dark);
  color: #fff;
  padding: 0.7rem 1.2rem;
  z-index: 100;
  border-radius: 0 0 8px 0;
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  left: 0;
}

/* ===== TOPBAR ===== */
.medicx-topbar {
  background: var(--teal-dark);
  color: #fff;
  font-size: 0.95em;
  padding: 0.5rem 0;
}

.medicx-topbar-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 2rem;
  padding: 0.5rem 1.25rem;
  max-width: 1100px;
  margin: 0 auto;
}

.medicx-topbar a {
  color: #fff;
  text-decoration: none;
}

.medicx-topbar a:hover {
  text-decoration: underline;
}

.medicx-topbar span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

/* ===== HEADER ===== */
header.site {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.8rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.logo {
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--teal-dark);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.logo .mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--teal);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
}

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

nav.main a {
  display: block;
  padding: 0.55rem 0.9rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 0.98em;
}

nav.main a:hover {
  background: var(--teal-tint);
  color: var(--teal-dark);
}

.werkbalk {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
}

.lettergrootte,
.taal select {
  background: var(--white);
  border: 2px solid var(--line);
  border-radius: 10px;
  padding: 0.5rem 0.9rem;
  font-family: inherit;
  font-size: 1em;
  font-weight: 700;
  color: var(--teal-dark);
  cursor: pointer;
}

.lettergrootte:hover,
.taal select:hover {
  border-color: var(--teal);
}

.taal {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.taal label {
  margin: 0;
  font-weight: 700;
}

/* ===== HERO SECTION ===== */
.hero {
  background: linear-gradient(160deg, var(--teal-tint) 0%, var(--sand) 70%);
  padding: 3rem 1.25rem 2.5rem;
}

.hero .wrap {
  max-width: 1100px;
  margin: 0 auto;
}

.hero p.intro {
  font-size: 1.15em;
  max-width: 46ch;
  color: var(--ink-soft);
  margin: 0.9rem 0 1.4rem;
}

.melding {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--white);
  border: 1.5px solid var(--line);
  border-inline-start: 6px solid var(--spoed);
  padding: 0.7rem 1.1rem;
  border-radius: 10px;
  font-weight: 700;
  margin-bottom: 1.2rem;
}

.hero .acties {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

/* ===== MAIN CONTENT ===== */
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

section {
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--line);
}

section:last-of-type {
  border-bottom: none;
}

/* ===== CARDS ===== */
.kaarten {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.2rem;
  margin-top: 1rem;
}

.kaart {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
}

.kaart.accent {
  background: var(--teal-tint);
  border-color: var(--teal);
}

.kaart.spoed {
  background: var(--spoed-tint);
  border-color: var(--spoed);
}

.kaart.spoed h3 {
  color: var(--spoed);
}

.kaart h3 {
  color: var(--teal-dark);
}

.kaart p {
  margin-bottom: 0.9rem;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  background: var(--teal);
  color: #fff !important;
  font-weight: 700;
  padding: 0.75rem 1.4rem;
  border-radius: 10px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-size: 1em;
  font-family: inherit;
}

.btn:hover {
  background: var(--teal-dark);
}

.btn.secundair {
  background: var(--white);
  color: var(--teal-dark) !important;
  border: 2px solid var(--teal);
}

.btn.secundair:hover {
  background: var(--teal-tint);
}

.acties {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

/* ===== LISTS ===== */
ul.lijst {
  padding-inline-start: 1.2rem;
  margin-bottom: 0.9rem;
}

ul.lijst li {
  margin-bottom: 0.45rem;
}

/* ===== BELL TIMES DISPLAY ===== */
.beltijd {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 0.7rem;
  flex-wrap: wrap;
}

.beltijd .tijd {
  font-family: "Sora", sans-serif;
  font-weight: 600;
  background: var(--teal-dark);
  color: #fff;
  border-radius: 8px;
  padding: 0.25rem 0.7rem;
  white-space: nowrap;
  font-size: 0.95em;
}

/* ===== CONTACT LISTS ===== */
dl.contact div {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

dl.contact dt {
  font-weight: 700;
  min-width: 7.5rem;
}

dl.contact dd {
  margin: 0;
}

/* ===== FORMS ===== */
form {
  display: grid;
  gap: 1rem;
  max-width: 620px;
}

label {
  font-weight: 700;
  display: block;
  margin-bottom: 0.3rem;
}

.hint {
  font-weight: 400;
  color: var(--ink-soft);
  font-size: 0.92em;
  display: block;
}

input[type="text"],
input[type="date"],
textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-family: inherit;
  font-size: 1em;
  background: var(--white);
  color: var(--ink);
}

textarea {
  min-height: 110px;
  resize: vertical;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-weight: 400;
}

.check input {
  width: 1.3rem;
  height: 1.3rem;
  margin-top: 0.2rem;
  accent-color: var(--teal);
}

.waarschuwing {
  font-weight: 700;
  color: var(--spoed);
}

/* ===== FOOTER ===== */
footer {
  background: var(--teal-dark);
  color: #fff;
  margin-top: 2rem;
}

footer .wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
}

footer a {
  color: #fff;
}

footer h3 {
  color: #fff;
}

footer ul {
  list-style: none;
}

footer li {
  margin-bottom: 0.4rem;
}

.naar-boven {
  display: inline-block;
  margin-top: 1rem;
}

/* ===== RTL SUPPORT ===== */
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] body {
  font-family: system-ui, "Segoe UI", Tahoma, sans-serif;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 700px) {
  nav.main ul {
    flex-direction: column;
    width: 100%;
  }
  .header-inner {
    align-items: flex-start;
  }
  .hero .acties {
    flex-direction: column;
  }
  .hero .acties .btn {
    width: 100%;
    text-align: center;
  }
  .medicx-topbar-inner {
    flex-direction: column;
    gap: 0.5rem;
  }
}
