/* Shared site navigation for every page:
   .mbn  header menus (native <details>, work without JavaScript)
   .mbt  "all topics" overview on the homepages
   .mbs  site map in the footer */
:root {
  --mbn-gold: #d7b33e;
  --mbn-gold-soft: #f0d98b;
  --mbn-ink: #f4f1e8;
  --mbn-muted: #c8c1b1;
  --mbn-dim: #9a9384;
  --mbn-line: rgba(215, 179, 62, .22);
  --mbn-panel: #0a0c10;
  --mbn-serif: "Playfair Display", Georgia, "Times New Roman", serif;
}

/* ---------- Header menus ---------- */
.mbn {
  --mbn-top-color: var(--mbn-muted);
  --mbn-top-size: 13px;
  --mbn-top-weight: 750;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 26px;
}
.mbn-item { position: static; }
.mbn-item--list { position: relative; }
.mbn-item > summary,
.mbn > .mbn-top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  color: var(--mbn-top-color);
  font-size: var(--mbn-top-size);
  font-weight: var(--mbn-top-weight);
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  list-style: none;
  -webkit-user-select: none;
  user-select: none;
}
.mbn-item > summary::-webkit-details-marker { display: none; }
.mbn-item > summary::after {
  width: 6px;
  height: 6px;
  margin-top: -4px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  content: "";
  transform: rotate(45deg);
  transition: transform .2s ease, margin .2s ease;
}
.mbn-item[open] > summary::after { margin-top: 3px; transform: rotate(-135deg); }
.mbn-item > summary:hover,
.mbn > .mbn-top:hover,
.mbn-item[open] > summary,
.mbn-item--current > summary { color: var(--mbn-gold-soft); }
.mbn-item > summary:focus-visible,
.mbn > .mbn-top:focus-visible {
  outline: 3px solid var(--mbn-gold-soft);
  outline-offset: 3px;
}

.mbn-panel {
  position: absolute;
  z-index: 80;
  inset-inline: 0;
  top: 100%;
  padding-block: 26px 28px;
  border-block: 1px solid var(--mbn-line);
  color: var(--mbn-ink);
  background: var(--mbn-panel);
  box-shadow: 0 34px 60px -28px rgba(0, 0, 0, .85);
  text-align: start;
  white-space: normal;
  cursor: auto;
}
.mbn-panel__inner { width: min(1160px, calc(100% - 48px)); margin-inline: auto; }
.mbn-groups {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 22px 28px;
}
.mbn-item--guides .mbn-groups { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mbn-item--mega .mbn-group--wide { grid-column: span 2; }
.mbn-item--mega .mbn-group--wide .mbn-list { columns: 2; column-gap: 28px; }
.mbn .mbn-group__title {
  margin: 0 0 8px;
  color: var(--mbn-gold);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.mbn .mbn-list { margin: 0; padding: 0; list-style: none; }
.mbn .mbn-list li { margin: 0; break-inside: avoid; }
.mbn .mbn-panel .mbn-link {
  display: block;
  padding-block: 6px;
  color: var(--mbn-ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
  opacity: 1;
  overflow-wrap: break-word;
}
.mbn .mbn-panel .mbn-link:hover { color: var(--mbn-gold-soft); }
.mbn .mbn-panel .mbn-link[aria-current="page"] {
  color: var(--mbn-gold-soft);
  text-decoration: underline;
  text-decoration-color: rgba(215, 179, 62, .6);
  text-underline-offset: 4px;
}
.mbn .mbn-panel .mbn-link:focus-visible { outline: 2px solid var(--mbn-gold-soft); outline-offset: 2px; }
.mbn .mbn-panel__all {
  margin: 20px 0 0;
  padding-block-start: 14px;
  border-block-start: 1px solid var(--mbn-line);
}
.mbn .mbn-panel .mbn-link--all { display: inline-flex; gap: 8px; color: var(--mbn-gold-soft); font-weight: 800; }

/* Small menus open as a box below their label. */
.mbn-item--list .mbn-panel {
  inset-inline: -18px auto;
  top: calc(100% + 10px);
  min-width: 260px;
  padding: 12px 18px;
  border: 1px solid var(--mbn-line);
  border-radius: 12px;
}
.mbn-item--list .mbn-panel__inner { width: auto; }
.mbn-item--list .mbn-groups { display: block; }
.mbn-item--list .mbn-group + .mbn-group {
  margin-block-start: 10px;
  padding-block-start: 10px;
  border-block-start: 1px solid var(--mbn-line);
}

/* Header layouts that host the menus */
.legal-top .legal-nav { flex: 1 1 auto; }
/* The legal pages keep their sticky top bar on wide screens: keep long menus scrollable there. */
.legal-top .mbn-panel { max-height: calc(100vh - 90px); overflow-y: auto; overscroll-behavior: contain; }
.legal-top .legal-nav .mbn-item > summary { color: var(--mbn-muted); }

@media (max-width: 980px) {
  .mbn-item--list { position: static; }
  .mbn-item--list .mbn-panel {
    inset-inline: 0;
    top: 100%;
    min-width: 0;
    padding: 22px 0 24px;
    border-width: 1px 0;
    border-radius: 0;
  }
  .mbn-panel__inner,
  .mbn-item--list .mbn-panel__inner { width: min(1160px, calc(100% - 28px)); }
  .mbn-groups,
  .mbn-item--guides .mbn-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; }
  .mbn-item--list .mbn-groups { display: grid; }
  .mbn-item--list .mbn-group + .mbn-group { margin: 0; padding: 0; border: 0; }
  .legal-top { position: relative; flex-wrap: wrap; }
  .legal-top .mbn-panel { max-height: none; overflow: visible; }
  .legal-top .legal-nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    border-block-start: 1px solid var(--mbn-line);
  }
}
@media (max-width: 560px) {
  .mbn { gap: 2px 18px; }
  .mbn-groups,
  .mbn-item--guides .mbn-groups,
  .mbn-item--list .mbn-groups { grid-template-columns: minmax(0, 1fr); }
  .mbn-item--mega .mbn-group--wide { grid-column: auto; }
  .mbn .mbn-panel .mbn-link { padding-block: 8px; }
}

/* Stacked variant: accordion inside the mobile menu of the German homepage */
.mbn--stacked { display: block; }
.mbn--stacked .mbn-item { position: static; border-block-end: 1px solid var(--mbn-line); }
.mbn--stacked .mbn-item > summary {
  display: flex;
  justify-content: space-between;
  width: 100%;
  min-height: 58px;
  color: var(--mbn-ink);
  font-family: var(--mbn-serif);
  font-size: 22px;
  font-weight: 600;
}
.mbn--stacked .mbn-item > summary::after { width: 8px; height: 8px; }
.mbn--stacked .mbn-panel,
.mbn--stacked .mbn-item--list .mbn-panel {
  position: static;
  min-width: 0;
  padding: 0 0 20px;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}
.mbn--stacked .mbn-panel__inner,
.mbn--stacked .mbn-item--list .mbn-panel__inner { width: auto; }
.mbn--stacked .mbn-groups,
.mbn--stacked .mbn-item--guides .mbn-groups,
.mbn--stacked .mbn-item--list .mbn-groups { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.mbn--stacked .mbn-item--mega .mbn-group--wide { grid-column: auto; }
.mbn--stacked .mbn-item--list .mbn-group + .mbn-group { margin: 0; padding: 0; border: 0; }
.mbn--stacked .mbn-item--mega .mbn-group--wide .mbn-list { columns: 1; }
@media (min-width: 520px) {
  .mbn--stacked .mbn-item--mega .mbn-group--wide .mbn-list { columns: 2; }
  .mbn--stacked .mbn-groups,
  .mbn--stacked .mbn-item--guides .mbn-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mbn--stacked .mbn-item--mega .mbn-group--wide { grid-column: span 2; }
}

/* ---------- "All topics" overview on the homepages ---------- */
.mbt-section.lp-section,
.mbt-section.seo-section { padding-top: 0; }
.mbt {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  text-align: start;
}
.mbt-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 28px 26px;
  border: 1px solid var(--mbn-line);
  border-radius: var(--mbt-radius, 0);
  background: linear-gradient(180deg, rgba(23, 28, 37, .72), rgba(12, 15, 20, .72));
}
.lp .mbt { --mbt-radius: 18px; }
.mbt-card--insurance { grid-column: 1 / -1; }
.mbt .mbt-card__title {
  margin: 0 0 8px;
  color: var(--mbn-ink);
  font-family: var(--mbn-serif);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
}
.mbt .mbt-card__title a { color: inherit; text-decoration: none; }
.mbt .mbt-card__title a:hover { color: var(--mbn-gold-soft); }
.mbt .mbt-card__intro { max-width: 640px; margin: 0 0 20px; color: var(--mbn-muted); font-size: 14.5px; line-height: 1.65; }
.mbt-groups { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px 26px; }
.mbt-card--insurance .mbt-groups { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.mbt-card--insurance .mbt-group--wide { grid-column: span 2; }
.mbt-card--insurance .mbt-group--wide .mbt-list { columns: 2; column-gap: 26px; }
.mbt .mbt-group__title {
  margin: 0 0 6px;
  color: var(--mbn-gold);
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.mbt .mbt-list { margin: 0; padding: 0; list-style: none; }
.mbt .mbt-list li { margin: 0; break-inside: avoid; }
.mbt .mbt-link {
  display: block;
  padding-block: 6px;
  color: var(--mbn-ink);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  overflow-wrap: break-word;
}
.mbt .mbt-link:hover { color: var(--mbn-gold-soft); }
.mbt .mbt-all { margin: auto 0 0; padding-block-start: 18px; }
.mbt .mbt-link--all { display: inline-flex; gap: 8px; color: var(--mbn-gold-soft); font-weight: 800; }
@media (max-width: 980px) {
  .mbt { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mbt-card--guides { grid-column: 1 / -1; }
  .mbt-card--insurance .mbt-groups,
  .mbt-card--guides .mbt-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mbt-card--guides .mbt-group--wide { grid-column: span 2; }
  .mbt-card--guides .mbt-group--wide .mbt-list { columns: 2; column-gap: 26px; }
}
@media (max-width: 620px) {
  .mbt { grid-template-columns: minmax(0, 1fr); }
  .mbt-card { padding: 24px 20px; }
  .mbt-card--insurance .mbt-groups,
  .mbt-card--guides .mbt-groups { grid-template-columns: minmax(0, 1fr); }
  .mbt-card--insurance .mbt-group--wide,
  .mbt-card--guides .mbt-group--wide { grid-column: auto; }
  .mbt-card--insurance .mbt-group--wide .mbt-list,
  .mbt-card--guides .mbt-group--wide .mbt-list { columns: 1; }
}

/* ---------- Footer site map ---------- */
.mb-footer nav.mbs { display: block; }
.mbs {
  margin-block-start: 34px;
  padding-block: 30px 4px;
  border-block-start: 1px solid var(--mbn-line);
  text-align: start;
}
.mbs .mbs-title {
  max-width: none;
  margin: 0 0 20px;
  color: var(--mbn-gold);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.mbs-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-areas:
    "insurance insurance guides advice"
    "insurance insurance guides about";
  gap: 22px 36px;
  align-items: start;
}
.mbs-block { min-width: 0; }
.mbs-block--insurance { grid-area: insurance; }
.mbs-block--guides { grid-area: guides; }
.mbs-block--advice { grid-area: advice; }
.mbs-block--about { grid-area: about; }
.mbs-block--insurance .mbs-block__body { columns: 2; column-gap: 36px; }
.mbs .mbs-block__title {
  display: block;
  margin: 0 0 10px;
  color: var(--mbn-ink);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.4;
  list-style: none;
  cursor: default;
  pointer-events: none;
}
.mbs .mbs-block__title::-webkit-details-marker { display: none; }
.mbs-group { margin-block-end: 14px; break-inside: avoid; }
.mbs .mbs-group__title {
  max-width: none;
  margin: 0 0 3px;
  color: var(--mbn-dim);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.mbs .mbs-list { margin: 0; padding: 0; list-style: none; }
.mbs .mbs-list li { margin: 0; }
.mbs .mbs-link {
  display: inline-block;
  padding-block: 4px;
  color: var(--mbn-muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  text-decoration: none;
  overflow-wrap: break-word;
}
.mbs .mbs-link:hover,
.mbs .mbs-link[aria-current="page"] { color: var(--mbn-gold-soft); }
.mbs .mbs-all { max-width: none; margin: 0 0 8px; break-inside: avoid; }
.mbs .mbs-link--all { display: inline-flex; gap: 6px; color: var(--mbn-gold-soft); font-weight: 800; }
.lp-footer .mbs { margin-block: 0 36px; }
.mbs-legal { width: min(1160px, calc(100% - 32px)); margin: 0 auto 8px; }
@media (max-width: 900px) {
  .mbs-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "insurance insurance"
      "guides advice"
      "guides about";
  }
}
/* Small screens: the four blocks become an accordion (closed by mb-nav.js, open without JavaScript). */
@media (max-width: 560px) {
  .mbs { padding-block-start: 24px; }
  .mbs .mbs-title { margin-bottom: 6px; }
  .mbs-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "insurance" "guides" "advice" "about";
    gap: 0;
  }
  .mbs-block { border-block-end: 1px solid var(--mbn-line); }
  .mbs-block--about { border-block-end: 0; }
  .mbs .mbs-block__title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 52px;
    margin: 0;
    font-size: 15px;
    cursor: pointer;
    pointer-events: auto;
  }
  .mbs .mbs-block__title::after {
    width: 7px;
    height: 7px;
    margin-top: -4px;
    border-right: 1.5px solid var(--mbn-gold);
    border-bottom: 1.5px solid var(--mbn-gold);
    content: "";
    transform: rotate(45deg);
  }
  .mbs .mbs-block[open] > .mbs-block__title::after { margin-top: 3px; transform: rotate(-135deg); }
  .mbs .mbs-block__title:focus-visible { outline: 2px solid var(--mbn-gold-soft); outline-offset: 2px; }
  .mbs-block__body { padding-block-end: 14px; }
  .mbs-block--insurance .mbs-block__body,
  .mbs-block--guides .mbs-block__body { columns: 2; column-gap: 22px; }
  .mbs .mbs-link { padding-block: 6px; }
}

/* Persian pages */
html[lang="fa"] .mbn .mbn-group__title,
html[lang="fa"] .mbt .mbt-group__title,
html[lang="fa"] .mbs .mbs-title,
html[lang="fa"] .mbs .mbs-group__title { font-size: 12px; letter-spacing: 0; text-transform: none; }
html[lang="fa"] .mbt .mbt-card__title,
html[lang="fa"] .mbn--stacked .mbn-item > summary { font-family: "Vazirmatn", Tahoma, Arial, sans-serif; }
html[lang="fa"] .mbn .mbn-panel .mbn-link,
html[lang="fa"] .mbt .mbt-link,
html[lang="fa"] .mbs .mbs-link { line-height: 1.6; }

@media (prefers-reduced-motion: reduce) {
  .mbn-item > summary::after { transition: none; }
}
