/* ArcFlow theme – page layout: header, navigation, banner, content grid, bands, footer. */

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: var(--space-3);
  top: -100px;
  z-index: 100;
  padding: var(--space-2) var(--space-3);
  background: var(--ink);
  color: var(--surface);
  border-radius: var(--radius-sm);
}
.skip-link:focus { top: var(--space-3); }

/* Blocks: drop the Drupal wrappers' spacing, give block titles one style */
.block { margin-bottom: var(--space-4); }
.block:last-child { margin-bottom: 0; }
.block > h2.title, .block > .title {
  font-size: var(--h3);
  margin: 0 0 var(--space-4);
}

/* ---------------------------------------------------------------- Header
   One dark bar: the logo on the left, vertically centred over both rows; on the right the flags (header_top)
   above the menu row. The whole bar stays at the top while scrolling. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-line);
  color: var(--header-ink);
}
.site-header__inner {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: "logo bar";
  align-items: center;
  column-gap: var(--space-4);
  min-height: var(--header-height);
}
.site-header__inner:has(.site-header__top) {
  grid-template-areas: "logo top" "logo bar";
  grid-template-rows: auto 1fr;
}
.site-logo { grid-area: logo; display: block; line-height: 0; }
.site-logo img { height: 64px; width: auto; }   /* the header (--header-height 92px) keeps its height up to 72px */
/* The flags' row keeps its distance to the top itself: a padding of the whole grid would move the logo (centred over
   both rows) down, so it would sit lower than in a header without flags. */
.site-header__top {
  grid-area: top;
  padding-top: var(--space-2);
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
  font-size: var(--text-sm);
}
.site-header__top a { color: var(--header-ink); }
.site-header__top .block { margin: 0; }
.site-header__bar {
  grid-area: bar;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 60px;
}

.site-nav { display: flex; align-items: center; gap: var(--space-3); margin-left: auto; }
.site-nav .block { margin: 0; }

/* Main menu (themes/arcflow/superfish*.html) */
.nav-menu, .nav-sub { list-style: none; margin: 0; padding: 0; }
.nav-menu li { margin: 0; }
.nav-menu a { color: inherit; text-decoration: none; }

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border: 1px solid var(--header-line);
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
}
.nav-toggle:hover { background: var(--header-hover); }
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
  display: block;
  width: 20px;
  height: 2px;
  margin: auto;
  background: var(--header-ink);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

.sub-toggle { display: none; }

@media (min-width: 1024px) {
  .nav-menu { display: flex; align-items: center; gap: var(--space-1); }
  .nav-menu > li > a {
    display: block;
    padding: 0.6rem 0.8rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
  }
  .nav-menu > li > a:hover, .nav-menu > li:focus-within > a, .nav-menu > li:hover > a { background: var(--header-hover); }
  .nav-menu > li.active-trail > a { color: var(--header-accent); box-shadow: inset 0 -2px 0 var(--header-accent); border-radius: var(--radius-sm) var(--radius-sm) 0 0; }

  /* Dropdown: a plain list under its entry … */
  .nav-menu > li { position: relative; }
  .nav-menu > li > .nav-sub {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 240px;
    padding: var(--space-2);
    background: var(--card-bg);
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
  }
  .nav-menu > li:hover > .nav-sub,
  .nav-menu > li:focus-within > .nav-sub {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .nav-sub a {
    display: block;
    padding: 0.4rem 0.7rem;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
  }
  .nav-sub a:hover, .nav-sub a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-strong); }

  /* … or a mega menu when the entry has a third level: the second level becomes columns */
  .nav-menu > li:has(.depth-2 > .nav-sub) { position: static; }
  .nav-menu > li:has(.depth-2 > .nav-sub) > .nav-sub {
    left: var(--gutter);
    right: var(--gutter);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-3) var(--space-4);
    padding: var(--space-4);
    max-height: calc(100vh - var(--header-height) - 2rem);
    overflow-y: auto;
  }
  .nav-menu .depth-2 > a { font-weight: 650; }
  .nav-menu .depth-2.has-children > a { color: var(--ink-muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; }
  .nav-menu .depth-3.has-children > a { font-weight: 600; }
  .nav-menu .depth-4 > a { padding: 0.2rem 0.7rem 0.2rem 1.4rem; font-size: 0.9rem; color: var(--ink-muted); }
  .nav-menu .depth-3 > .nav-sub { margin-bottom: var(--space-2); }
}

/* Light / dark switch (site.js); the icon shows what a click switches to */
.scheme-toggle {
  flex: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--header-line);
  border-radius: 50%;
  background: transparent;
  color: var(--header-ink);
  cursor: pointer;
  transition: background-color 0.15s;
}
.scheme-toggle:hover { background: var(--header-hover); }
.scheme-toggle__icon {
  display: block;
  width: 18px;
  height: 18px;
  margin: auto;
  background: currentColor;
  -webkit-mask: var(--scheme-icon) center / contain no-repeat;
  mask: var(--scheme-icon) center / contain no-repeat;
  --scheme-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20.5 14.6A8.5 8.5 0 0 1 9.4 3.5a8.5 8.5 0 1 0 11.1 11.1z'/%3E%3C/svg%3E");
}
[data-scheme="dark"] .scheme-toggle__icon {
  --scheme-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='4.5' fill='black'/%3E%3Cpath d='M12 1.5v2.5M12 20v2.5M1.5 12H4M20 12h2.5M4.6 4.6l1.8 1.8M17.6 17.6l1.8 1.8M4.6 19.4l1.8-1.8M17.6 6.4l1.8-1.8'/%3E%3C/svg%3E");
}
/* The short visible label (strings.schemeShort) only in the phone menu; the full text stays the accessible name */
.scheme-toggle__label { display: none; }
/* Language menu (site.yaml strings.languages): a globe button like the scheme switch, the languages below it */
.lang-switch { position: relative; flex: none; }
.lang-switch__button {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 12px 0 10px;
  border: 1px solid var(--header-line);
  border-radius: 999px;
  background: transparent;
  color: var(--header-ink);
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s;
}
.lang-switch__button:hover, .lang-switch__button[aria-expanded="true"] { background: var(--header-hover); }
.lang-switch__icon {
  display: block;
  width: 18px;
  height: 18px;
  background: currentColor;
  -webkit-mask: var(--globe-icon) center / contain no-repeat;
  mask: var(--globe-icon) center / contain no-repeat;
  --globe-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='M2.5 12h19M12 2.5c2.6 2.6 4 6 4 9.5s-1.4 6.9-4 9.5c-2.6-2.6-4-6-4-9.5s1.4-6.9 4-9.5z'/%3E%3C/svg%3E");
}
.lang-switch__code { text-transform: uppercase; letter-spacing: 0.04em; }
.lang-switch__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  min-width: 11rem;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}
.lang-switch__menu[hidden] { display: none; }
.lang-switch__menu li { margin: 0; }   /* not the content lists' li + li spacing */
.lang-switch__menu a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.lang-switch__menu a:hover, .lang-switch__menu a:focus-visible { background: var(--surface-alt); outline: none; }
.lang-switch__name { flex: 1 1 auto; }
/* The countries of a language (de: Germany, Switzerland - en: international, Philippines - tr: Turkey) */
.lang-switch__flags { display: flex; gap: 4px; }
.lang-switch__flags img { display: block; width: auto; height: 14px; border-radius: 2px; box-shadow: 0 0 0 1px var(--line); }
/* Every row keeps the check mark's room (the flags stay in one column); the site's own language: brand colour + check */
.lang-switch__menu a::after { content: ""; flex: none; width: 14px; height: 14px; }
.lang-switch__menu a[aria-current="true"] { color: var(--brand-strong); font-weight: 600; }
.lang-switch__menu a[aria-current="true"]::after {
  background: currentColor;
  -webkit-mask: var(--check-icon) center / contain no-repeat;
  mask: var(--check-icon) center / contain no-repeat;
  --check-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5l5 5L20 6.5'/%3E%3C/svg%3E");
}
/* Language and light/dark switch after the search (in the menu panel on phones, see Mobile navigation) */
.site-tools { display: flex; align-items: center; gap: var(--space-3); }
@media (max-width: 1023.98px) {
  .site-header__bar { justify-content: flex-end; min-height: 52px; }
  .js .nav-toggle { order: 2; margin-left: 0; }
}

/* Search (block in search_area) */
.site-search form > div, .site-search .container-inline { display: flex; align-items: center; }
.site-search .form-item { margin: 0; }
.site-search input.form-text {
  width: 11rem;
  padding: 0.5rem 2.4rem 0.5rem 0.8rem;
  border-radius: 999px;
  background: var(--header-hover);
  border-color: var(--header-line);
  color: var(--header-ink);
  font-size: 0.95rem;
}
.site-search input.form-text::placeholder { color: color-mix(in srgb, var(--header-ink) 65%, transparent); }
.site-search input.form-text:focus { background: var(--card-bg); border-color: var(--brand); color: var(--ink); }
.site-search .form-actions { margin-left: -2.4rem; }
.site-search input.form-submit {
  width: 2.2rem;
  height: 2.2rem;
  padding: 0;
  border-radius: 50%;
  background: transparent no-repeat center / 18px
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c9d0d6' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
  font-size: 0;
}
.site-search input.form-submit:hover { background-color: var(--header-hover); }
.site-search .form-item:focus-within + .form-actions input.form-submit { filter: brightness(0.45); }

/* Mobile navigation */
@media (max-width: 1023.98px) {
  .js .nav-toggle { display: block; }
  .site-nav {
    flex-direction: column;
    align-items: stretch;
    margin: 0;
  }
  .js .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
    padding: var(--space-3) var(--gutter) var(--space-4);
    background: var(--surface);
    color: var(--ink);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .js .site-header.nav-open .site-nav { display: flex; }
  .site-search { order: -1; margin-bottom: var(--space-3); }
  /* The open menu is a panel in the page colours (not the header's): search and links follow the scheme */
  .js .site-search input.form-text { background: var(--surface-alt); border-color: transparent; color: var(--ink); }
  .js .site-search input.form-text::placeholder { color: var(--ink-muted); }
  .js .site-search input.form-submit { filter: var(--search-icon-filter); }
  .js .site-search input.form-submit:hover { background-color: var(--line); }
  .js .site-search input.form-text:focus { background: var(--card-bg); border-color: var(--brand); }
  .site-search input.form-text { width: 100%; max-width: none; }
  .site-search .block, .site-search .content, .site-search #nav-search, .site-search form { width: 100%; }
  .site-search form > div, .site-search .form-item { flex: 1; }
  .nav-menu a[aria-current="page"] { color: var(--brand-strong); }
  /* Language and light/dark switch at the end of the panel: the languages listed (no globe button), the switch
     with its label */
  /* One grid for both: the switch takes one cell, so it has the size of a language button */
  .site-tools {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
    gap: var(--space-2);
    margin-top: var(--space-4);
  }
  .lang-switch { display: contents; }
  .lang-switch__button { display: none; }
  .lang-switch__menu, .lang-switch__menu[hidden] { display: contents; }
  .lang-switch__menu li { display: flex; }
  .lang-switch__menu a { flex: 1; justify-content: center; gap: 0.5rem; border: 1px solid var(--line); border-radius: 999px; color: inherit; }
  .lang-switch__name { flex: none; }
  .lang-switch__menu a::after, .lang-switch__menu a[aria-current="true"]::after { display: none; }
  .lang-switch__menu a[aria-current="true"] { border-color: var(--brand-strong); color: var(--brand-strong); }
  .scheme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: auto;
    height: auto;
    padding: 0.5rem 0.75rem;
    border-radius: 999px;
    font: inherit;
    line-height: inherit;
  }
  .js .scheme-toggle { border-color: var(--line); color: var(--ink); }
  .js .scheme-toggle:hover { background: var(--surface-alt); }
  .scheme-toggle__icon { flex: none; margin: 0; }
  /* Like the icon, the label says what a tap switches to: "Dunkel" in light mode, "Hell" in dark mode */
  .scheme-toggle__label { display: inline; white-space: nowrap; }
  .scheme-toggle__label--light, [data-scheme="dark"] .scheme-toggle__label--dark { display: none; }
  [data-scheme="dark"] .scheme-toggle__label--light { display: inline; }

  .nav-menu li { position: relative; border-bottom: 1px solid var(--line); }
  .nav-sub li:last-child { border-bottom: 0; }
  .nav-menu a { display: block; padding: 0.75rem 3rem 0.75rem 0; font-weight: 600; }
  .nav-sub { padding-left: var(--space-3); }
  .nav-sub a { font-weight: 400; }
  .js .nav-menu .nav-sub { display: none; }
  .js .nav-menu li.is-open > .nav-sub { display: block; }
  .js .sub-toggle {
    display: block;
    position: absolute;
    right: 0;
    top: 0.25rem;
    width: 2.5rem;
    height: 2.5rem;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    cursor: pointer;
  }
  .sub-toggle::before {
    content: "";
    display: block;
    width: 9px;
    height: 9px;
    margin: auto;
    border-right: 2px solid var(--ink-muted);
    border-bottom: 2px solid var(--ink-muted);
    transform: translateY(-2px) rotate(45deg);
    transition: transform 0.15s;
  }
  li.is-open > .sub-toggle::before { transform: translateY(2px) rotate(-135deg); }
  .site-logo img { height: 52px; }
}

/* ---------------------------------------------------------------- Banner */
.banner { position: relative; background: var(--surface-alt); }
.hero__image {
  display: block;
  width: 100%;
  height: clamp(180px, 26vw, 420px);
  object-fit: cover;
}
.hero__caption {
  position: absolute;
  inset: auto 0 0 0;
  padding-block: var(--space-5) var(--space-4);
  color: #fff;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 40% 0 0 0;
  background: linear-gradient(to top, rgba(10, 14, 20, 0.7), transparent);
  pointer-events: none;
}
.hero__caption { z-index: 1; }
.hero__title { margin: 0; font-size: var(--h1); font-weight: 700; line-height: 1.15; text-wrap: balance; }
.hero__text { margin: var(--space-2) 0 0; max-width: 45rem; font-size: 1.125rem; }

/* ---------------------------------------------------------------- Breadcrumb */
.breadcrumb { padding-block: var(--space-3) 0; font-size: var(--text-sm); color: var(--ink-muted); }
.breadcrumb ol { display: flex; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.breadcrumb li { margin: 0; }
.breadcrumb li + li::before { content: "/"; margin: 0 0.5em; color: var(--line-strong); }
.breadcrumb a { color: inherit; text-decoration: none; }
.breadcrumb a:hover { color: var(--brand-strong); text-decoration: underline; }

/* ---------------------------------------------------------------- Content */
.site-main:focus { outline: none; }
.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-5);
  padding-block: var(--space-5) var(--space-6);
}
.front .content-grid { padding-top: var(--space-5); }
@media (min-width: 992px) {
  .content-grid.has-sidebar-first { grid-template-columns: 280px minmax(0, 1fr); }
  .content-grid.has-sidebar-second { grid-template-columns: minmax(0, 1fr) 280px; }
  .content-grid.has-sidebar-first.has-sidebar-second { grid-template-columns: 240px minmax(0, 1fr) 240px; }
}
.page-title { margin-bottom: var(--space-4); }
.prose p, .prose li, .prose h2, .prose h3, .prose h4, .prose blockquote { max-width: var(--measure); }

/* ---------------------------------------------------------------- Bands below the content */
.band { padding-block: var(--space-6); }
.band--featured { background: var(--surface-alt); }
.band--featured .block + .block { margin-top: var(--space-6); }
.band--contact { background: var(--brand-soft); }
.band--accent { background: var(--brand-strong); color: var(--on-brand); }
.band--accent a { color: var(--on-brand); }

/* ---------------------------------------------------------------- Blog post, testimonial */
/* Blog: the date right under the title, as its subtitle */
.kind-blog .page-title { margin-bottom: var(--space-2); }
.post__date { margin: 0 0 var(--space-4); color: var(--ink-muted); font-size: 1.125rem; font-weight: 500; }
.testimonial { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
@media (min-width: 640px) {
  .testimonial:has(.testimonial__image) { grid-template-columns: 140px minmax(0, 1fr); }
}
.testimonial__image { border-radius: 50%; object-fit: cover; }
.testimonial__body .prose p { font-size: 1.15rem; font-style: italic; }
.testimonial__author { color: var(--ink-muted); }

/* ---------------------------------------------------------------- Footer */
.site-footer { background: var(--footer-bg); color: var(--footer-ink); font-size: 0.95rem; }
.site-footer a { color: var(--footer-ink); }
.site-footer a:hover { color: #fff; }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-5);
  padding-block: var(--space-6) var(--space-5);
}
.subfooter { border-top: 1px solid rgba(255, 255, 255, 0.08); color: var(--footer-muted); }
.subfooter__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
  padding-block: var(--space-4);
}
.subfooter p { margin: 0; }
.subfooter .block { margin: 0; }
.subfooter a { color: var(--footer-muted); text-decoration: none; }
.subfooter a:hover { color: #fff; text-decoration: underline; }
.subfooter .region-footer a + a { margin-left: var(--space-4); }

/* ---------------------------------------------------------------- Back to top */
.to-top {
  position: fixed;
  right: var(--space-4);
  bottom: var(--space-4);
  z-index: 40;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}
.to-top::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 10px;
  height: 10px;
  border-left: 2px solid var(--surface);
  border-top: 2px solid var(--surface);
  transform: translateY(2px) rotate(45deg);
}
.to-top.is-visible { opacity: 0.85; visibility: visible; }
.to-top:hover { opacity: 1; }

/* ---------------------------------------------------------------- Lightbox (site.js) */
.lightbox {
  max-width: min(96vw, 1400px);
  max-height: 94vh;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  overflow: visible;
}
.lightbox::backdrop { background: rgba(10, 14, 20, 0.85); }
.lightbox img { display: block; max-width: 100%; max-height: 88vh; margin: auto; border-radius: var(--radius-sm); background: #fff; }
.lightbox__close, .lightbox__prev, .lightbox__next {
  position: fixed;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox__close:hover, .lightbox__prev:hover, .lightbox__next:hover { background: rgba(255, 255, 255, 0.3); }
.lightbox__close { top: var(--space-3); right: var(--space-3); }
.lightbox__prev { left: var(--space-3); top: 50%; transform: translateY(-50%); }
.lightbox__next { right: var(--space-3); top: 50%; transform: translateY(-50%); }
.lightbox__count { position: fixed; bottom: var(--space-3); left: 0; right: 0; text-align: center; color: #fff; font-size: var(--text-sm); }
