/* ===========================
   base.css – Structural layout (brand-neutral)
   Always loaded from static.  Theme CSS overrides variables.
   =========================== */

/* ── Custom properties (neutral defaults) ─────────────── */
:root {
  --bg: #ffffff;
  --fg: #333333;
  --muted: #666666;
  --line: #e0e0e0;
  --accent: #0066cc;
  --radius: 14px;
  --container: 1200px;
  --space: clamp(16px, 2.5vw, 28px);
  --h1: clamp(36px, 6vw, 64px);
  --h2: clamp(24px, 3vw, 36px);
  --h3: clamp(18px, 2vw, 22px);
  --shadow: 0 0 30px rgba(0, 0, 0, .08);

  font-size: 16px;
}


/* ── Reset / base ─────────────────────────────────────── */
html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}


/* ── Page layout ──────────────────────────────────────── */
main {
  margin: 3rem auto;
  padding: 0 1rem;
}

main:has(.page-home) {
  max-width: 100%;
  margin: 0;
  padding: 0;
  background: #ffffff;
  border: 0;
  box-shadow: none;
}

.page-home-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0
           clamp(20px, 3vw, 32px)
           clamp(56px, 6vw, 80px);
}

.page-home-cta-bottom {
  display: flex;
  justify-content: center;
  margin-top: clamp(32px, 4vw, 56px);
}


/* ── Typography ───────────────────────────────────────── */
h1, h2 {
  font-weight: 700;
  color: var(--fg);
}

h1 {
  font-size: 72px;
  line-height: 80px;
  letter-spacing: -2.4px;
}

h2 {
  max-width: 848px;
  width: 100%;
  font-size: 48px;
  line-height: 60px;
  letter-spacing: -1.2px;
}

h3 {
  max-width: 848px;
  width: 100%;
  color: var(--fg);
  font-size: 24px;
  font-weight: 600;
  line-height: 32px;
}

p, li {
  font-weight: 400;
  color: var(--fg);
  line-height: 1.6;
}
p { margin: 0 0 12px; }

.muted { color: var(--muted); }


/* ── Hero (node pages) ────────────────────────────────── */
.hero-node-page {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(16px, 3vw, 32px);
  align-items: center;
  padding: clamp(12px, 2vw, 20px) 0;
  border-bottom: 1px solid var(--line);
}
.hero-node-page h1 { margin-bottom: 8px; }
.hero-node-page p { font-size: clamp(16px, 1.4vw, 18px); }


/* ── Hero (home page) ─────────────────────────────────── */
/* Single-column default; themes can override to multi-column */
.page-home .page-hero {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: clamp(16px, 3vw, 32px);
}

.page-home .page-hero__content h1 {
  font-size: var(--h1);
  margin-top: 0;
  margin-bottom: 16px;
}

.page-home .page-hero__content .muted {
  font-size: clamp(16px, 1.4vw, 18px);
  margin-bottom: 24px;
  max-width: 36rem;
}


/* ── SVG / Shape ──────────────────────────────────────── */
.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}


/* ── Hero image wrapper (base: simple display) ────────── */
.page-home .page-hero__image-wrapper {
  width: 100%;
}

.page-home .page-hero__image {
  max-width: 100%;
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}


/* ── Responsive image ─────────────────────────────────── */
img.resp {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}


/* ── Grid ─────────────────────────────────────────────── */
.grid {
  display: grid;
  gap: clamp(12px, 2vw, 20px);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-single {
  display: grid;
  gap: clamp(12px, 2vw, 20px);
  grid-template-columns: minmax(0, 1fr);
}


/* ── Cards / Sections ─────────────────────────────────── */
.card,
.section-alt,
.v-fieldset label {
  background: #ffffff;
  box-shadow: var(--shadow);
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(14px, 2.3vw, 22px);
  transition: border-color .12s ease, box-shadow .12s ease, transform .12s ease;
  color: var(--fg);
}
.card:hover {
  border-color: #dcdcdc;
  transform: translateY(-2px);
}
.card h3 { margin-bottom: 6px; }
.card p { margin: 0; color: var(--fg); }

.section-alt {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(16px, 3vw, 28px);
  color: var(--fg);
}


/* ── Info card with optional image ────────────────────── */
.info-card--has-image {
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 0;
  overflow: hidden;
  max-height: 220px;
}
.info-card__image-wrap {
  flex-shrink: 0;
  width: 220px;
  overflow: hidden;
}
.info-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.info-card--has-image .info-card__body {
  padding: clamp(14px, 2.3vw, 22px);
}
@media (max-width: 640px) {
  .info-card--has-image {
    flex-direction: column;
  }
  .info-card__image-wrap {
    width: 100%;
    max-height: 200px;
  }
}


/* ── Support contact card ─────────────────────────────── */
.support-contact {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}
.support-contact__image-wrap {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
}
.support-contact__image {
  width: 80px;
  height: 80px;
  max-width: 80px;
  max-height: 80px;
  object-fit: cover;
  display: block;
}
.support-contact__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.support-subtitle {
  font-weight: 600;
  margin-top: 6px;
  margin-bottom: 0;
}


/* ── Sections ─────────────────────────────────────────── */
section { margin-top: clamp(24px, 4vw, 48px); }
section + section { margin-top: clamp(28px, 5vw, 64px); }


/* ── Forms ────────────────────────────────────────────── */
.v-form { max-width: 760px; }
.v-fieldset { border: 0; padding: 0; margin: 0; }

.question {
  font-size: 1.1rem;
  margin: 0 0 1rem;
}

form ul { list-style: none; padding: 0; margin: 0 0 1rem; }
form li { margin: .35rem 0; }

.actions { display: flex; gap: .75rem; }
button { cursor: pointer; font-family: inherit; }

.v-fieldset ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.v-fieldset li { margin: 0; padding: 0; }

.v-fieldset label {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color .12s ease, box-shadow .12s ease, transform .12s ease;
  color: var(--fg);
}
.v-fieldset input[type="radio"] {
  accent-color: var(--accent);
  width: 18px;
  height: 18px;
}
.v-fieldset label:hover {
  border-color: #dcdcdc;
  transform: translateY(-1px);
}
.v-fieldset input[type="radio"]:focus-visible + label {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.v-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
}
.v-actions__right {
  display: flex;
  gap: 12px;
  align-items: center;
}
.v-link {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px dashed var(--line);
}
.v-link:hover {
  color: var(--fg);
  border-bottom-color: var(--fg);
}


/* ── Buttons (.vbtn) ──────────────────────────────────── */
.vbtn {
  display: inline-flex;
  padding: 8px 20px;
  justify-content: center;
  align-items: center;
  gap: 10px;

  border-radius: 23px;
  border: none;

  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;

  cursor: pointer;

  /* Default variables (neutral) */
  --btn-bg: var(--fg);
  --btn-hover-overlay: rgba(0, 0, 0, 0.20);
  --btn-active-overlay: rgba(255, 255, 255, 0.20);
  --btn-focus-border: #F2F2F2;
  --btn-focus-ring: #999999;
  --btn-disabled-bg: #CDCDCD;
  --btn-text-color: #ffffff;

  background: var(--btn-bg);
  color: var(--btn-text-color);

  transition:
    background .12s ease,
    box-shadow .12s ease,
    border-color .12s ease,
    transform .12s ease,
    color .12s ease;
}

.vbtn,
.vbtn:hover,
.vbtn:focus,
.vbtn:active {
  text-decoration: none !important;
}

.vbtn:hover:not(:disabled):not(.disabled) {
  background:
    linear-gradient(0deg, var(--btn-hover-overlay) 0%, var(--btn-hover-overlay) 100%),
    var(--btn-bg);
}

.vbtn:focus-visible:not(:disabled):not(.disabled) {
  background: var(--btn-bg);
  border: 1.5px solid var(--btn-focus-border);
  box-shadow: 0 0 0 1.5px var(--btn-focus-ring);
  outline: none;
}

.vbtn:active:not(:disabled):not(.disabled) {
  background:
    linear-gradient(0deg, var(--btn-active-overlay) 0%, var(--btn-active-overlay) 100%),
    var(--btn-bg);
  transform: scale(.98);
}

.vbtn:disabled,
.vbtn.disabled {
  background: var(--btn-disabled-bg);
  color: #ffffff;
  cursor: not-allowed;
  box-shadow: none;
  border: none;
  transform: none;
}


/* ── Node-page semantic button variants ──────────────── */
.vbtn--node-primary   { --btn-bg: var(--fg); }
.vbtn--node-secondary { --btn-bg: var(--muted); }
.vbtn--node-tertiary  {
  --btn-bg: transparent;
  --btn-text-color: var(--fg);
  border: 1.5px solid var(--fg);
}


/* ── Button sizes ─────────────────────────────────────── */
.vbtn--sm {
  padding: 6px 14px;
  font-size: 13px;
  border-radius: 20px;
}

.vbtn--lg {
  padding: 11px 26px;
  font-size: 16px;
  border-radius: 26px;
}


/* ── Icon buttons ─────────────────────────────────────── */
.vbtn--icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  justify-content: center;
  gap: 0;
}

.vbtn--with-icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.vbtn--with-icon svg,
.vbtn--icon svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}


/* ── Legacy buttons (.vbtn1, .vbtn2, .cta) ────────────── */
.vbtn1,
.vbtn2,
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  height: 42px;
  padding: 0 20px;

  border-radius: 40px;

  font-size: 20px;
  font-weight: 600;
  line-height: 1;

  cursor: pointer;
  text-decoration: none;

  transition: transform .12s ease, box-shadow .12s ease,
              background .12s ease, color .12s ease, border-color .12s ease;
}

.vbtn1 {
  background: var(--fg);
  color: #fff;
}
.vbtn1:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, .12);
}
.vbtn1:active {
  transform: translateY(0) scale(.98);
}

.vbtn2 {
  background: var(--accent);
  color: #fff;
}
.vbtn2:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, .12);
}
.vbtn2:active {
  transform: translateY(0) scale(.98);
}

.cta {
  border: 1px solid var(--fg);
  background: var(--fg);
  color: #fff;
}
.cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .08);
  background: var(--accent);
  border-color: var(--accent);
}
.cta:active {
  transform: translateY(0) scale(.99);
}

/* Small legacy button variants */
.vbtn1-small,
.vbtn2-small {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  height: 42px;
  padding: 0 16px;

  border-radius: 32px;

  font-size: 20px;
  font-weight: 600;
  line-height: 1;

  cursor: pointer;
  text-decoration: none;

  transition: transform .12s ease, box-shadow .12s ease;
}

.vbtn1-small {
  background: var(--fg);
  color: #fff;
}
.vbtn1-small:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 12px rgba(0, 0, 0, .12);
}
.vbtn1-small:active {
  transform: translateY(0) scale(.98);
}

.vbtn2-small {
  background: var(--accent);
  color: #fff;
}
.vbtn2-small:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 12px rgba(0, 0, 0, .12);
}
.vbtn2-small:active {
  transform: translateY(0) scale(.98);
}


/* ── Header ───────────────────────────────────────────── */
.site-header {
  width: 100%;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  padding: clamp(16px, 2vw, 24px) 0;
}

.header-bar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(20px, 3vw, 32px);

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(12px, 2vw, 20px);
}

.logo img {
  height: 40px;
  width: auto;
  display: block;
}

.logo-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--fg);
  text-decoration: none;
  line-height: 40px;
}

.brand {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  flex: 1 1 auto;
  min-width: 0;
  align-items: flex-end;
  text-align: right;
  margin-right: clamp(16px, 3vw, 36px);
}

.brand strong,
.brand span {
  display: block;
  width: 100%;
  text-align: right;
}

.brand strong {
  font-size: 18px;
  font-weight: 700;
  white-space: nowrap;
}

.brand span {
  font-size: 14px;
  color: var(--muted);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-cta {
  margin-left: 12px;
  white-space: nowrap;
}


/* ── Language switcher ────────────────────────────────── */
.language-switcher {
  display: inline-flex;
  align-items: center;
  margin-right: 12px;
}

.lang-form {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.globe-icon {
  width: 29px;
  height: 29px;
  display: block;
  pointer-events: none;
}

.lang-switch-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: opacity 0.2s ease;
}

.lang-switch-btn:hover .lang-text {
  opacity: 0.7;
}

.lang-text {
  color: var(--fg);
  font-size: 22px;
  font-weight: 400;
  line-height: 32px;
}


/* ── Footer ───────────────────────────────────────────── */
.site-footer {
  margin-top: clamp(36px, 6vw, 80px);
  padding: clamp(16px, 3vw, 28px) 0;
  border-top: 1px solid var(--line);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.6;
  color: var(--fg);
}

.site-footer a,
.footer-consent-btn {
  color: var(--fg);
}
.site-footer a:hover,
.footer-consent-btn:hover {
  text-decoration: underline;
}
.footer-consent-btn {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  font: inherit;
}


/* ── Utilities ────────────────────────────────────────── */
.shadow {
  box-shadow: var(--shadow);
}

.hr {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 24px 0;
}


/* ── Prose / CKEditor ─────────────────────────────────── */
.prose {
  font-size: 16px;
  line-height: 1.6;
  color: var(--fg);
}
.prose p { margin: 0 0 12px; }
.prose ul, .prose ol { margin: 12px 0 12px 22px; }
.prose h3 { margin: 18px 0 8px; font-size: var(--h3); }

.ck-content img {
  display: block;
  max-width: 100%;
  height: auto !important;
}

.ck-content figure.image {
  display: block;
  margin: 1em 0;
  text-align: initial;
}
.ck-content figure.image::after {
  content: "";
  display: block;
  clear: both;
}

.ck-content img[width],
.ck-content img[height] {
  width: auto !important;
  height: auto !important;
}

.ck-content figcaption {
  font-size: 0.85em;
  color: var(--muted);
  text-align: center;
}


/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 980px) {
  .grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .header-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .brand {
    margin-left: 0;
    margin-right: 0;
    align-items: flex-start;
    text-align: left;
    width: 100%;
  }

  .brand strong,
  .brand span {
    text-align: left;
  }

  .site-nav {
    width: 100%;
    padding-top: 8px;
  }
}

@media (max-width: 620px) {
  .grid { grid-template-columns: 1fr; }
  .cta { width: 100%; text-align: center; }
}

