/* WeGroup brand tokens + layout tightening, layered on top of mkdocs-material. */

/* Montserrat for UI chrome (buttons, nav, tabs). Figtree is loaded by mkdocs-material via Google Fonts. */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&display=swap');

/* Tighter overall scale: shrink the base font from mkdocs's default 0.8rem-ish
   so headings, body and chrome all read smaller. */
:root {
  --md-text-font: 'Figtree', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --wg-font-ui: 'Montserrat', system-ui, sans-serif;
}

html {
  font-size: 16px;
}

@media (min-width: 76.25em) {
  html {
    font-size: 16.5px;
  }
}

/* Cap the outer grid at the common 1280 px standard (Stripe, GitHub, Tailwind docs)
   instead of mkdocs-material's default 1408 px. Content column gets the remainder
   after the two sidebars. */
.md-grid {
  max-width: 80rem; /* 1280 px */
}

.md-content {
  max-width: 56rem; /* ~896 px reading column with images */
  margin: 0 auto;   /* centred in the grid column even when sidebars are hidden */
}

.md-content__inner {
  margin: 0 auto;
  padding-top: 1.2rem;
  padding-bottom: 1.6rem;
}

/* When the page hides nav and toc (e.g. the home page), the .md-main__inner
   is a flex container with only .md-content inside. Centre that content
   horizontally and give it a bit more breathing room. */
.md-main__inner:has(> .md-sidebar--primary[hidden]) {
  justify-content: center;
}

.md-main__inner:has(> .md-sidebar--primary[hidden]) > .md-content,
.md-main__inner:has(> .md-sidebar--secondary[hidden]):has(> .md-sidebar--primary[hidden]) > .md-content {
  max-width: 64rem;
  margin-left: auto;
  margin-right: auto;
}

/* Sidebar widths sized to the wider grid. */
.md-sidebar {
  width: 12.1rem;
}

@media (min-width: 76.25em) {
  .md-sidebar--secondary {
    width: 11.5rem;
  }
}


:root {
  --md-primary-fg-color: #FF8000;
  --md-primary-fg-color--light: #FFA040;
  --md-primary-fg-color--dark: #E67300;

  --md-accent-fg-color: #FF8000;
  --md-accent-fg-color--transparent: rgba(255, 128, 0, 0.10);

  /* Light scheme (warm white surface, brown-grey text). */
  --md-default-bg-color: #FCFAF8;
  --md-default-fg-color: #1D140C;
  --md-default-fg-color--light: #5A4D3F;
  --md-default-fg-color--lighter: #A17345;
  --md-default-fg-color--lightest: #E6D7C6;

  --md-typeset-color: #1D140C;
  --md-typeset-a-color: #FF8000;

  --md-code-bg-color: #FFF4E8;
  --md-code-fg-color: #1D140C;

  --wg-border: #F0E8DE;
  --wg-surface: #FFFFFF;
  --wg-surface-2: #FDF7F0;
}

[data-md-color-scheme="default"] {
  --md-footer-bg-color: #1D140C;
  --md-footer-bg-color--dark: #11141C;
}

[data-md-color-scheme="slate"] {
  --md-default-bg-color: #11141C;
  --md-default-fg-color: #F4EFEA;
  --md-typeset-color: #F4EFEA;

  --md-primary-fg-color: #FF8000;
  --md-accent-fg-color: #FF8000;

  --md-code-bg-color: #1A1F2B;
  --md-code-fg-color: #F4EFEA;

  --wg-border: #252B36;
  --wg-surface: #161B24;
  --wg-surface-2: #1E2530;
}

/* Header: solid WeGroup orange. */
.md-header {
  background: var(--md-primary-fg-color);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.md-header[data-md-state="shadow"] {
  box-shadow: 0 4px 14px rgba(29, 20, 12, 0.12);
}

[data-md-color-scheme="slate"] .md-header {
  background: var(--md-primary-fg-color);
}

/* Tabs bar: subtle warm white in light mode, dark navy in slate. */
.md-tabs {
  background: #FFFAF3;
  border-bottom: 1px solid var(--wg-border);
  color: var(--md-default-fg-color);
}

.md-tabs__link {
  color: var(--md-default-fg-color--light);
  opacity: 1;
  font-size: 0.78rem;
  font-weight: 600;
}

.md-tabs__link[href="../print_page/"],
.md-tabs__link[href="print_page/"] {
  color: var(--md-primary-fg-color--dark);
  font-weight: 700;
}

.md-tabs__link:hover,
.md-tabs__link--active {
  color: var(--md-primary-fg-color);
}

[data-md-color-scheme="slate"] .md-tabs {
  background: #1A1F2B;
  border-bottom: 1px solid #252B36;
}

[data-md-color-scheme="slate"] .md-tabs__link {
  color: rgba(244, 239, 234, 0.72);
}

[data-md-color-scheme="slate"] .md-tabs__link:hover,
[data-md-color-scheme="slate"] .md-tabs__link--active {
  color: var(--md-primary-fg-color);
}

/* Search bar in the header: solid white pill with orange focus ring. */
.md-search__form {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 0.5rem;
  transition: background 0.15s ease;
}

.md-search__form:hover {
  background: rgba(255, 255, 255, 0.26);
}

.md-search__form:focus-within {
  background: white;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.45);
}

.md-search__form:focus-within .md-search__input,
.md-search__form:focus-within .md-search__icon {
  color: var(--md-default-fg-color);
}

.md-search__input::placeholder {
  color: rgba(255, 255, 255, 0.85);
}

/* Logo. */
.md-header__button.md-logo {
  margin: 0.2rem 0.5rem 0.2rem 0;
  padding: 0;
}

.md-header__button.md-logo img,
.md-header__button.md-logo svg {
  height: 1.6rem;
  width: auto;
}

/* Dot divider after the WeGroup logo, before the site title. */
.md-header__title {
  position: relative;
  padding-left: 0.875rem;
}

.md-header__title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 1.1rem;
  background: rgba(255, 255, 255, 0.4);
}

.md-header__topic:first-child {
  font-weight: 700;
  letter-spacing: -0.005em;
}

/* Typography. */
.md-typeset h1,
.md-typeset h2,
.md-typeset h3 {
  font-family: 'Figtree', system-ui, sans-serif;
  letter-spacing: -0.005em;
}

/* Montserrat for buttons, nav items and tabs — matching help.wegroup.nl. */
.md-button,
.md-tabs__link,
.md-nav,
.md-nav__title,
.md-search__input,
label {
  font-family: var(--wg-font-ui);
}

.md-typeset h1 {
  font-weight: 800;
  color: var(--md-default-fg-color);
}

.md-typeset h2 {
  font-weight: 800;
  margin-top: 2em;
  border-bottom: 1px solid var(--wg-border);
  padding-bottom: 0.3em;
}

.md-typeset h3 {
  font-weight: 700;
}

/* Tables match the helpcentrum design. */
.md-typeset table:not([class]) {
  border: 1px solid var(--wg-border);
  border-radius: 0.5rem;
  overflow: hidden;
  font-size: 0.85rem;
}

.md-typeset table:not([class]) th {
  background: var(--md-accent-fg-color--transparent);
  color: var(--md-default-fg-color);
  font-weight: 700;
}

[data-md-color-scheme="slate"] .md-typeset table:not([class]) th {
  background: rgba(255, 128, 0, 0.16);
}

/* Numbered ordered list shows bigger orange numerals like the original helpcentrum. */
.md-typeset ol li {
  margin-bottom: 0.4em;
}

.md-typeset ol li::marker {
  color: var(--md-primary-fg-color);
  font-weight: 700;
}

/* Admonitions: tighten the colour palette. */
.md-typeset .admonition,
.md-typeset details {
  border-left-width: 0.2rem;
  border-radius: 0.5rem;
  font-size: 0.8rem;
}

.md-typeset .admonition.tip > .admonition-title,
.md-typeset details.tip > summary {
  background: var(--md-accent-fg-color--transparent);
}

.md-typeset .admonition.tip,
.md-typeset details.tip {
  border-color: var(--md-primary-fg-color);
}

/* Image styling: rounded corners + subtle border. */
.md-typeset img {
  border-radius: 0.5rem;
  border: 1px solid var(--wg-border);
  max-width: 100%;
}

/* Responsive 16:9 video frame for raw YouTube embeds. */
.md-typeset .video-embed {
  position: relative;
  width: 100%;
  margin: 1.25rem 0 0.5rem;
}

.md-typeset .video-embed iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--wg-border);
  border-radius: 0.5rem;
  background: #000;
  display: block;
}

.md-typeset .video-embed .video-fallback {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.78rem;
  color: var(--md-default-fg-color--light);
  margin-top: 0.5rem;
  text-decoration: none;
}

.md-typeset .video-embed .video-fallback:hover {
  color: var(--md-primary-fg-color);
  text-decoration: underline;
}

/* When a video embed sits inside a tab block, drop the extra top margin. */
.md-typeset details .video-embed,
.md-typeset .tabbed-block .video-embed {
  margin-top: 0.5rem;
}

/* Lightbox glow. */
.glightbox-clean .gslide-image img {
  border-radius: 0.5rem;
}

/* Footer: dark + warm. */
.md-footer-meta {
  background: #11141C;
  font-size: 0.74rem;
}

.md-footer__inner.md-grid {
  background: #1D140C;
  padding-top: 1.6rem;
  padding-bottom: 1.6rem;
}

.md-footer__link {
  opacity: 0.85;
}

/* Type scale. Aimed at comfortable reading: ~14.5 px body, ~32 px H1. */
.md-typeset {
  font-size: 0.875rem;
  line-height: 1.65;
}

.md-typeset h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-top: 0.4em;
  margin-bottom: 0.6em;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.md-typeset h2 {
  font-size: 1.4rem;
  margin-top: 1.6em;
  margin-bottom: 0.5em;
}

.md-typeset h3 {
  font-size: 1.1rem;
  margin-top: 1.4em;
  margin-bottom: 0.4em;
}

.md-typeset h4 {
  font-size: 0.95rem;
  margin-top: 1.2em;
  margin-bottom: 0.3em;
}

/* Page lede paragraph (first <p> after the H1). */
.md-typeset h1 + p {
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--md-default-fg-color--light);
  margin-bottom: 1.5rem;
  max-width: 42rem;
}

/* Body paragraphs, lists. */
.md-typeset p,
.md-typeset li {
  font-size: 0.875rem;
}

/* Header chrome. */
.md-header__topic:first-child {
  font-size: 0.95rem;
}

.md-tabs__link {
  font-size: 0.78rem;
}

.md-nav {
  font-size: 0.82rem;
}

.md-nav__title {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

/* Hero block on the home page: centred greeting + tagline + CTAs. */
.md-typeset .hero {
  text-align: center;
  padding: 3rem 1rem 2.5rem;
  margin: 1rem 0 2.5rem;
  border-radius: 1rem;
  background:
    radial-gradient(800px 240px at 50% 0%, rgba(255, 128, 0, 0.10), transparent 70%),
    linear-gradient(180deg, rgba(255, 128, 0, 0.03) 0%, transparent 100%);
  border: 1px solid var(--wg-border);
  position: relative;
  overflow: hidden;
}

[data-md-color-scheme="slate"] .md-typeset .hero {
  background:
    radial-gradient(800px 240px at 50% 0%, rgba(255, 128, 0, 0.18), transparent 70%),
    linear-gradient(180deg, rgba(255, 128, 0, 0.06) 0%, transparent 100%);
}

.md-typeset .hero h1 {
  font-size: 2.8rem;
  font-weight: 800;
  margin-top: 0;
  margin-bottom: 0.6rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
  border: 0;
  padding: 0;
}

.md-typeset .hero p {
  font-size: 1.1rem;
  line-height: 1.55;
  color: var(--md-default-fg-color--light);
  max-width: 38rem;
  margin: 0 auto 1.5rem;
}

.md-typeset .hero .md-button {
  margin: 0.25rem 0.3rem;
  font-weight: 700;
  font-size: 0.85rem;
}

.md-typeset .hero .md-button--primary {
  background: var(--md-primary-fg-color);
  border-color: var(--md-primary-fg-color);
  color: white;
}

.md-typeset .hero .md-button--primary:hover {
  background: var(--md-primary-fg-color--dark);
  border-color: var(--md-primary-fg-color--dark);
}

.md-typeset .hero .md-button:not(.md-button--primary) {
  border-color: var(--wg-border-strong);
  color: var(--md-default-fg-color);
}

.md-typeset .hero .md-button:not(.md-button--primary):hover {
  border-color: var(--md-primary-fg-color);
  color: var(--md-primary-fg-color);
  background: transparent;
}

@media (max-width: 600px) {
  .md-typeset .hero {
    padding: 2rem 0.75rem;
  }
  .md-typeset .hero h1 {
    font-size: 2.2rem;
  }
}

/* Section headings on the home page: smaller, with a top divider for rhythm. */
.md-typeset h2 + .grid.cards,
.md-typeset h2 + .popular-grid {
  margin-top: 0.75rem;
}

/* Quick-start: 3 prominent route cards. */
.md-typeset .grid.cards.quick-start {
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.md-typeset .grid.cards.quick-start > ul > li {
  padding: 1.5rem 1.5rem 1.25rem;
}

.md-typeset .grid.cards.quick-start strong {
  font-size: 1.05rem;
}

.md-typeset .grid.cards.quick-start .twemoji.lg {
  height: 1.7em;
  width: 1.7em;
}

/* Topics grid: smaller, denser cards. The ` &raquo; ` link sits inline in the title. */
.md-typeset .grid.cards.topics > ul > li {
  padding: 1rem 1.125rem 0.875rem;
}

.md-typeset .grid.cards.topics strong a {
  color: var(--md-default-fg-color);
  text-decoration: none;
  border-bottom: 0;
}

.md-typeset .grid.cards.topics strong a:hover {
  color: var(--md-primary-fg-color);
}

.md-typeset .grid.cards.topics p {
  font-size: 0.78rem;
  margin: 0.4rem 0 0;
  color: var(--md-default-fg-color--light);
}

/* Popular links: row of compact pill-style entries. */
.md-typeset .popular-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  gap: 0.5rem;
  margin: 0.75rem 0 2rem;
}

.md-typeset .popular-grid .popular-link {
  display: block;
  padding: 0.75rem 1rem;
  border: 1px solid var(--wg-border);
  border-radius: 0.5rem;
  background: var(--wg-surface);
  font-size: 0.84rem;
  text-decoration: none;
  color: var(--md-default-fg-color);
  transition: border-color 0.15s, transform 0.15s, color 0.15s, background 0.15s;
}

.md-typeset .popular-grid .popular-link a {
  display: inline;
  color: inherit;
  text-decoration: none;
}

.md-typeset .popular-grid .popular-link:hover {
  border-color: var(--md-primary-fg-color);
  background: var(--md-accent-fg-color--transparent);
  transform: translateY(-1px);
}

/* Help cards: lighter styling, no whole-card click overlay (each has only one inline link). */
.md-typeset .grid.cards.help > ul > li {
  background: transparent;
  border: 1px solid var(--wg-border);
  padding: 1.125rem 1.25rem;
}

.md-typeset .grid.cards.help > ul > li:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--md-primary-fg-color);
}

/* Polish mkdocs-material's native `grid cards`. */
.md-typeset .grid.cards > ul > li,
.md-typeset .grid.cards > ol > li {
  position: relative;
  border-radius: 0.625rem;
  border: 1px solid var(--wg-border);
  background: var(--wg-surface);
  padding: 1.25rem 1.25rem 1rem;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.md-typeset .grid.cards > ul > li:hover,
.md-typeset .grid.cards > ol > li:hover {
  border-color: var(--md-primary-fg-color);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(29, 20, 12, 0.08);
}

[data-md-color-scheme="slate"] .md-typeset .grid.cards > ul > li:hover,
[data-md-color-scheme="slate"] .md-typeset .grid.cards > ol > li:hover {
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
}

/* Whole-card click target. Only fires for cards whose last paragraph contains
   a single anchor (the "Bekijk artikelen" CTA). Multi-link cards (the "Snel
   naar de meest gestelde vragen" cluster) are exempt. */
.md-typeset .grid.cards > ul > li:has(> p:last-child > a:only-child) > p:last-child > a::before,
.md-typeset .grid.cards > ol > li:has(> p:last-child > a:only-child) > p:last-child > a::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: 1;
}

/* Inline elements stay above the absolute overlay. */
.md-typeset .grid.cards > ul > li > *,
.md-typeset .grid.cards > ol > li > * {
  position: relative;
  z-index: 2;
}

.md-typeset .grid.cards > ul > li > p:last-child,
.md-typeset .grid.cards > ol > li > p:last-child {
  z-index: 1;
}

.md-typeset .grid.cards > ul > li:has(> p:last-child > a:only-child),
.md-typeset .grid.cards > ol > li:has(> p:last-child > a:only-child) {
  cursor: pointer;
}

.md-typeset .grid.cards .twemoji.lg {
  height: 1.5em;
  width: 1.5em;
  vertical-align: -0.25em;
  color: var(--md-primary-fg-color);
}

.md-typeset .grid.cards strong {
  font-size: 1.05rem;
  color: var(--md-default-fg-color);
}

.md-typeset .grid.cards hr {
  margin: 0.5rem 0 0.75rem;
  border: 0;
  border-top: 1px solid var(--wg-border);
}

.md-typeset .grid.cards p:last-child a {
  font-size: 0.82rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* Keep search visible on the print page when viewed in browser (not when printing). */
@media screen {
  .md-search {
    display: flex !important;
  }
}

/* Search box subtle orange focus ring. */
.md-search__form:focus-within {
  background: rgba(255, 255, 255, 0.95);
}

/* Search highlights. */
.md-search-result mark {
  background: var(--md-accent-fg-color--transparent);
  color: var(--md-primary-fg-color);
  border-radius: 2px;
  padding: 0 2px;
}

/* Blockquote fallback (anything left as raw `> `). */
.md-typeset blockquote {
  border-left: 0.2rem solid var(--md-primary-fg-color);
  background: var(--md-accent-fg-color--transparent);
  padding: 0.625rem 1rem;
  border-radius: 0 0.375rem 0.375rem 0;
  color: var(--md-default-fg-color--light);
}

.md-typeset blockquote p {
  margin: 0;
}

/* Don't render emoji-as-svg twice. */
.md-typeset .twemoji svg {
  height: 1.125em;
  width: 1.125em;
  vertical-align: -0.125em;
}
