/*
 * Ada Grup OSGB — main stylesheet (no build step; served as is).
 *
 * Visual idiom: occupational-safety signage. Mandatory-sign blue discs with
 * white pictograms, flat plates with a thick top edge, signage lettering
 * (Barlow Condensed for headings, Barlow for text). The logo's red crossbar
 * appears once per page, above the H1.
 *
 * Order: fonts, tokens, base, layout, header/nav, hero, sections, page,
 * prose + blocks, aside, CTA, forms, footer, utilities.
 */

/* ---------- Fonts (latin + latin-ext; Turkish letters are in latin-ext) ---------- */
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/barlow-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/barlow-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/barlow-latin-ext-400-italic.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/barlow-latin-400-italic.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/barlow-latin-ext-500-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/barlow-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/barlow-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/barlow-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/barlow-condensed-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/barlow-condensed-latin-ext-700-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/barlow-condensed-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- Tokens ---------- */
:root {
  --sign: #0b5c8f;       /* mandatory-sign blue, from the logo's steel blue, darkened for AA text */
  --sign-deep: #084870;
  --sign-tint: #e3eef5;
  --ink: #16204b;        /* navy carried over from the current site */
  --red: #c8202f;        /* logo crossbar; used once per page */
  --paper: #f4f6f7;
  --line: #d3dbe0;
  --field: #a9b6bf;      /* form field borders: 3:1 against white */
  --text: #1e2733;
  --muted: #56616e;
  --white: #fff;

  --font-text: "Barlow", system-ui, sans-serif;
  --font-sign: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;

  /* Type scale: 17px base, ratio 1.25; display sizes are fluid from phone up */
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.375rem, 1.2rem + 0.7vw, 1.66rem);
  --step-3: clamp(1.625rem, 1.35rem + 1.2vw, 2.075rem);
  --step-4: clamp(1.875rem, 1.45rem + 1.9vw, 2.594rem);
  --step-5: clamp(2.375rem, 1.8rem + 3.2vw, 4.4rem);

  --wrap: 1200px;
  --gutter: 16px;
  --section: clamp(48px, 7vw, 88px);
  --edge: 5px;           /* thick top edge of plates (signage board) */
  --radius: 2px;
  --tap: 48px;           /* minimum touch target */
  --dock-h: 64px;        /* mobile action bar, excluding the safe area */

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --press: 160ms;
}

@media (min-width: 768px) {
  :root { --gutter: 28px; }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scrollbar-color: #b3c0c9 var(--paper);
  scroll-padding-top: 16px;
}

body {
  margin: 0;
  font-family: var(--font-text);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
  caret-color: var(--sign);
  accent-color: var(--sign);
  /* Room for the mobile action bar so it never covers the footer. */
  padding-bottom: calc(var(--dock-h) + env(safe-area-inset-bottom));
}
@media (min-width: 1080px) {
  body { padding-bottom: 0; }
}
body.nav-open { overflow: hidden; }

::selection { background: var(--sign); color: var(--white); }

img, svg, iframe { max-width: 100%; }
img { height: auto; display: block; }

a { color: var(--sign); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
@media (hover: hover) {
  a:hover { color: var(--sign-deep); text-decoration-thickness: 2px; }
}

:focus-visible { outline: 3px solid var(--sign); outline-offset: 2px; }

h1, h2, h3, h4 {
  font-family: var(--font-sign);
  font-weight: 600;
  line-height: 1.12;
  color: var(--ink);
  letter-spacing: 0.005em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--white);
}
.skip:focus { top: 8px; }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

.icon { width: 1.1em; height: 1.1em; flex: none; }

/* ---------- Buttons ---------- */
.button,
.wp-block-button__link,
.wpcf7-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 12px 22px;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-sign);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.01em;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--press) var(--ease-out), background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}
.button:active,
.wp-block-button__link:active,
.wpcf7-submit:active { transform: scale(0.97); }

.button--primary,
.wp-block-button__link,
.wpcf7-submit { background: var(--sign); color: var(--white); }

.button--outline { border-color: var(--sign); color: var(--sign); background: transparent; }
.button--light { background: var(--white); color: var(--ink); }
.button--ghost { border-color: rgb(255 255 255 / 0.6); color: var(--white); }

@media (hover: hover) {
  .button--primary:hover,
  .wp-block-button__link:hover,
  .wpcf7-submit:hover { background: var(--sign-deep); color: var(--white); }
  .button--outline:hover { background: var(--sign-tint); color: var(--sign-deep); }
  .button--light:hover { background: var(--sign-tint); color: var(--ink); }
  .button--ghost:hover { border-color: var(--white); color: var(--white); }
}

/* ---------- Contact strip (tablet and up; phones get the action bar) ---------- */
.strip { display: none; }
@media (min-width: 768px) {
  .strip {
    display: block;
    background: var(--ink);
    color: rgb(255 255 255 / 0.85);
    font-size: var(--step--1);
  }
  .strip__inner { display: flex; flex-wrap: wrap; gap: 4px 24px; padding-block: 8px; }
  .strip a, .strip span { display: inline-flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; }
  .strip a:hover { color: var(--white); text-decoration: underline; }
}

/* ---------- Masthead + navigation (mobile first: sheet under the header) ---------- */
.masthead {
  position: relative;
  z-index: 20;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
}
.brand { display: block; padding-block: 6px; }
.brand img { width: 104px; height: auto; }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  font: 600 1.0625rem var(--font-sign);
  cursor: pointer;
  transition: transform var(--press) var(--ease-out);
}
.nav-toggle:active { transform: scale(0.97); }
.nav-toggle .icon { width: 22px; height: 22px; }
.nav-toggle__close { display: none; }
.nav-open .nav-toggle__open { display: none; }
.nav-open .nav-toggle__close { display: inline-flex; }

.nav {
  display: none;
  position: absolute;
  inset: 100% 0 auto;
  height: calc(100dvh - 68px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4px var(--gutter) calc(24px + var(--dock-h) + env(safe-area-inset-bottom));
  background: var(--white);
}
.nav-open .nav {
  display: block;
  opacity: 1;
  transform: none;
  transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out);
}
@starting-style {
  .nav-open .nav { opacity: 0; transform: translateY(-6px); }
}

.nav__list { list-style: none; margin: 0; padding: 0; }
.nav__item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.nav__link {
  flex: 1;
  display: flex;
  align-items: center;
  min-height: 56px;
  font-family: var(--font-sign);
  font-size: 1.3125rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}
.nav__link[aria-current="page"],
.nav__item.is-active > .nav__link { color: var(--sign); }

.nav__expand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-right: -12px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  cursor: pointer;
}
.nav__expand .icon { width: 22px; height: 22px; transition: transform 200ms var(--ease-out); }
.nav__item.is-open > .nav__expand .icon { transform: rotate(180deg); }

.panel { display: none; width: 100%; padding-bottom: 12px; }
.nav__item.is-open > .panel { display: block; }
.panel__intro { display: none; }
.panel__list { list-style: none; margin: 0; padding: 0 0 0 4px; }
.panel__list a {
  display: flex;
  align-items: center;
  min-height: var(--tap);
  color: var(--text);
  text-decoration: none;
}
.panel__list a[aria-current="page"] { color: var(--sign); font-weight: 600; }
/* Phones have the same action in the bottom bar. */
.nav__cta { display: none; }

@media (min-width: 1080px) {
  .masthead__inner { min-height: 76px; }
  .brand img { width: 112px; }
  .nav-toggle { display: none; }

  .nav {
    position: static;
    display: flex;
    align-items: center;
    gap: 28px;
    height: auto;
    overflow: visible;
    padding: 0;
    background: none;
  }
  .nav__list { display: flex; align-items: center; gap: 22px; }
  .nav__item { position: relative; flex-wrap: nowrap; border: 0; }
  .nav__link { flex: none; min-height: 76px; font-size: 1.1875rem; }
  .nav__expand { width: 28px; height: 28px; margin: 0 0 0 2px; }
  .nav__expand .icon { width: 18px; height: 18px; }
  @media (hover: hover) {
    .nav__link:hover { color: var(--sign); }
  }

  /* Panels stay in the layout and fade in, so hover and focus open them
     without a jump; closing is faster than opening. */
  .panel {
    position: absolute;
    top: 100%;
    left: -24px;
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 28px;
    width: min(680px, 80vw);
    padding: 24px;
    background: var(--white);
    border: 1px solid var(--line);
    border-top: var(--edge) solid var(--sign);
    box-shadow: 0 18px 40px -24px rgb(22 32 75 / 0.35);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transform-origin: top left;
    pointer-events: none;
    transition: opacity 120ms ease, transform 120ms ease, visibility 0s linear 120ms;
  }
  .nav__item--hub:hover > .panel,
  .nav__item--hub:focus-within > .panel,
  .nav__item.is-open > .panel {
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
    transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out), visibility 0s;
  }
  .nav__item--hub:last-of-type .panel { left: auto; right: 0; transform-origin: top right; }
  .panel__intro { display: block; }
  .panel__intro p { color: var(--muted); font-size: var(--step--1); margin-block: 10px; }
  .panel__intro a { font-weight: 600; }
  .panel__intro .pictogram { width: 52px; height: 52px; }
  .panel__list { columns: 2; column-gap: 24px; padding: 0; }
  .panel__list li { break-inside: avoid; }
  .panel__list a {
    min-height: 0;
    padding: 7px 0;
    border-bottom: 1px solid var(--line);
  }
  .panel__list a:hover { color: var(--sign); }
  .nav__cta { display: inline-flex; }
}

/* ---------- Mobile action bar ---------- */
.dock {
  position: fixed;
  inset: auto 0 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 8px;
  padding: 8px max(12px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  background: rgb(255 255 255 / 0.94);
  border-top: 1px solid var(--line);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
}
.dock--single { grid-template-columns: 1fr; }
.dock a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--tap);
  border-radius: var(--radius);
  font-family: var(--font-sign);
  font-size: 1.1875rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform var(--press) var(--ease-out);
}
.dock a:active { transform: scale(0.97); }
.dock__call { border: 2px solid var(--sign); color: var(--sign); }
.dock__quote { background: var(--sign); color: var(--white); }
@media (min-width: 1080px) {
  .dock { display: none; }
}

/* ---------- Red crossbar: once per page, above the H1; draws in on load ---------- */
.hero__title::before,
.page-hero__title::before {
  content: "";
  display: block;
  width: 64px;
  height: 6px;
  margin-bottom: 18px;
  background: linear-gradient(90deg, var(--red) 70%, #e9a3a9);
}
@media (prefers-reduced-motion: no-preference) {
  .hero__title::before,
  .page-hero__title::before {
    animation: adg-crossbar 700ms var(--ease-out) 120ms both;
  }
}
@keyframes adg-crossbar {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

/* ---------- Home hero + routes ---------- */
.hero {
  padding-block: 32px var(--section);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.hero__title {
  max-width: 17ch;
  font-size: var(--step-5);
  font-weight: 700;
  line-height: 1.02;
}
.hero__lead {
  max-width: 62ch;
  margin-top: 16px;
  font-size: var(--step-0);
  line-height: 1.55;
  color: var(--muted);
}
.hero__actions {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}
@media (min-width: 640px) {
  .hero { padding-top: clamp(40px, 6vw, 80px); }
  .hero__lead { margin-top: 20px; font-size: var(--step-1); line-height: 1.5; }
  .hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
}

.routes {
  list-style: none;
  margin: 36px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.route {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "sign title" "sign summary" "sign count";
  column-gap: 16px;
  align-content: start;
  padding: 18px 18px 20px;
  background: var(--white);
  border: 1px solid var(--line);
  border-top: var(--edge) solid var(--sign);
  transition: border-color 150ms ease, transform var(--press) var(--ease-out);
}
.route:active { transform: scale(0.985); }
.route:focus-within { outline: 3px solid var(--sign); outline-offset: 2px; }
.route .pictogram { grid-area: sign; width: 56px; height: 56px; }
.route__title { grid-area: title; font-size: var(--step-2); }
.route__title a { color: var(--ink); text-decoration: none; }
.route__title a::after { content: ""; position: absolute; inset: 0; }
.route__title a:focus-visible { outline: none; }
.route__summary { grid-area: summary; margin-top: 6px; color: var(--muted); font-size: var(--step--1); line-height: 1.5; }
.route__count {
  grid-area: count;
  margin-top: 10px;
  font-family: var(--font-sign);
  font-weight: 600;
  color: var(--sign);
}
@media (hover: hover) {
  .route:hover { border-color: var(--sign); }
}
@media (min-width: 860px) {
  .routes { grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: clamp(40px, 6vw, 64px); }
  .route {
    grid-template-columns: 1fr;
    grid-template-areas: "sign" "title" "summary" "count";
    padding: 32px 28px;
  }
  .route .pictogram { width: 96px; height: 96px; margin-bottom: 24px; }
  .route__summary { margin-top: 8px; font-size: var(--step-0); line-height: 1.6; }
}
.routes--compact { margin-top: 0; }

/* ---------- Home sections ---------- */
.section { padding-block: var(--section); }
.section--paper { background: var(--paper); }
.section__head { max-width: 60ch; margin-bottom: 24px; }
.section__head p { margin-top: 10px; color: var(--muted); }
.section__title { font-size: var(--step-4); }
.link-strong { display: inline-flex; align-items: center; min-height: var(--tap); margin-top: 8px; font-weight: 600; }
@media (min-width: 768px) {
  .section__head { margin-bottom: 32px; }
}

/* Service lists with photos: compact rows on phones (thumbnail + title),
   photo tiles from 600px. Shared by the home tiles and the hub cards. */
.tiles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.tile {
  position: relative;
  display: grid;
  grid-template-columns: 88px 1fr;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--line);
  transition: border-color 150ms ease, transform var(--press) var(--ease-out);
}
.tile:active { transform: scale(0.985); }
.tile img { width: 88px; height: 72px; object-fit: cover; }
.tile__title { padding: 10px 16px; font-size: var(--step-1); }
.tile__title a { color: var(--ink); text-decoration: none; }
.tile__title a::after { content: ""; position: absolute; inset: 0; }
.tile__title a:focus-visible { outline: none; }
.tile:focus-within { outline: 3px solid var(--sign); outline-offset: 2px; }
@media (hover: hover) {
  .tile:hover { border-color: var(--sign); }
  .tile:hover .tile__title a { color: var(--sign); }
}
@media (min-width: 600px) {
  .tiles { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .tile { grid-template-columns: 1fr; align-items: stretch; }
  .tile img { width: 100%; height: auto; aspect-ratio: 4 / 3; }
  .tile__title { padding: 14px 16px 16px; }
}
@media (min-width: 900px) {
  .tiles { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
}

.tests__list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.tests__list a {
  display: flex;
  align-items: center;
  min-height: 56px;
  padding-block: 10px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-sign);
  font-size: var(--step-2);
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
  text-decoration: none;
}
.tests__list a:active { color: var(--sign); }
@media (hover: hover) {
  .tests__list a:hover { color: var(--sign); }
}
@media (min-width: 900px) {
  .tests { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; align-items: start; }
}

.prose.about__content { max-width: none; }
.about__content > .wp-block-image:first-child img { aspect-ratio: 3 / 2; object-fit: cover; }
@media (min-width: 900px) {
  .about__content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 56px;
    align-items: start;
  }
  .about__content > * { grid-column: 2; max-width: 62ch; }
  .about__content > .wp-block-image:first-child { grid-column: 1; grid-row: 1 / span 8; margin: 0; }
  .about__content > .wp-block-image:first-child img { aspect-ratio: auto; }
}

.facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px 0;
  margin: 40px 0 0;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.facts__item {
  display: flex;
  flex-direction: column-reverse;
  padding-inline: 16px;
  border-left: 1px solid var(--line);
}
.facts dd {
  margin: 0;
  font-family: var(--font-sign);
  font-size: var(--step-4);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--sign);
}
.facts dt { margin-top: 6px; color: var(--muted); font-size: var(--step--1); }
@media (min-width: 760px) {
  .facts { grid-template-columns: repeat(4, 1fr); margin-top: 56px; padding-top: 32px; }
  .facts__item { padding-inline: 20px; }
  .facts dt { font-size: var(--step-0); }
}

/* ---------- Interior page hero ---------- */
.page-hero {
  padding-block: 24px 28px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.page-hero__inner { display: grid; gap: 24px; align-items: center; }
.page-hero__title { font-size: var(--step-5); font-weight: 700; max-width: 20ch; }
.page-hero__lead { max-width: 60ch; margin-top: 12px; font-size: var(--step-1); color: var(--muted); }
.page-hero__media { margin: 0; }
.page-hero__media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
@media (min-width: 900px) {
  .page-hero { padding-block: clamp(36px, 5vw, 56px); }
  .page-hero--image .page-hero__inner { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; }
  .page-hero__media img { aspect-ratio: 4 / 3; }
}

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  font-size: var(--step--1);
  color: var(--muted);
}
.crumbs li + li::before { content: "/"; margin-inline: 8px; color: #9aa7b1; }
.crumbs a { color: var(--muted); }
@media (hover: hover) {
  .crumbs a:hover { color: var(--sign); }
}

.page-body { padding-block: 32px 48px; }
@media (min-width: 768px) {
  .page-body { padding-block: clamp(40px, 6vw, 64px); }
}
@media (min-width: 1000px) {
  .page-body--aside {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 64px;
    align-items: start;
  }
}

/* ---------- Prose: Gutenberg content ---------- */
.prose { max-width: 70ch; }
.prose--wide { max-width: none; }
.prose > * + * { margin-top: 1em; }
.prose > h2 { margin-top: 1.8em; font-size: var(--step-3); }
.prose > h3 { margin-top: 1.6em; font-size: var(--step-2); }
.prose > h4 { margin-top: 1.5em; font-size: var(--step-1); }
.prose > h2 + *, .prose > h3 + * { margin-top: 0.6em; }
.prose > :first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.35em; }
.prose li::marker { color: var(--sign); }
.prose strong { font-weight: 600; color: var(--ink); }
.prose a { overflow-wrap: anywhere; }

/* Section labels left over from BeTheme ("HAKKIMIZDA" above a heading) repeat the heading. */
.adg-eyebrow { display: none; }

/* Quotes in this content are lead statements and legal excerpts: a tinted
   panel, no side rule. */
.wp-block-quote {
  margin-inline: 0;
  padding: 18px 20px;
  background: var(--sign-tint);
  color: var(--ink);
}
.wp-block-quote > * + * { margin-top: 0.8em; }

.prose table { width: 100%; border-collapse: collapse; font-size: var(--step--1); font-variant-numeric: tabular-nums; }
.prose th, .prose td { padding: 8px 10px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { background: var(--paper); font-weight: 600; }
/* Wide tables scroll inside their own box on phones instead of the page. */
.prose .wp-block-html:has(table) { overflow-x: auto; }

.wp-block-image { margin-inline: 0; }
.wp-block-image img { width: 100%; }
.wp-block-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.5em; }

.prose iframe { display: block; width: 100%; aspect-ratio: 4 / 3; border: 0; }
@media (min-width: 768px) {
  .prose iframe { aspect-ratio: 16 / 10; }
}

/* Hub card grid (core group blocks). Without theme.json, core wraps group
   children in .wp-block-group__inner-container; the layout goes on
   whichever element holds the children. Same rhythm as .tiles. */
.adg-cards:not(:has(> .wp-block-group__inner-container)),
.adg-cards > .wp-block-group__inner-container {
  display: grid;
  gap: 10px;
}
.prose .adg-cards { margin-top: 0; }
.adg-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  transition: border-color 150ms ease, transform var(--press) var(--ease-out);
}
.adg-card:not(:has(> .wp-block-group__inner-container)),
.adg-card > .wp-block-group__inner-container {
  display: grid;
  grid-template-columns: 88px 1fr;
  align-items: center;
}
.adg-card:active { transform: scale(0.985); }
.adg-card .wp-block-image { margin: 0; }
.adg-card .wp-block-image img { width: 88px; height: 72px; object-fit: cover; }
.adg-card .wp-block-heading { margin: 0; padding: 10px 16px; font-size: var(--step-1); }
.adg-card .wp-block-heading a { color: var(--ink); text-decoration: none; }
.adg-card .wp-block-heading a::after { content: ""; position: absolute; inset: 0; }
.adg-card .wp-block-heading a:focus-visible { outline: none; }
.adg-card:focus-within { outline: 3px solid var(--sign); outline-offset: 2px; }
@media (hover: hover) {
  .adg-card:hover { border-color: var(--sign); }
  .adg-card:hover .wp-block-heading a { color: var(--sign); }
}
@media (min-width: 600px) {
  .adg-cards:not(:has(> .wp-block-group__inner-container)),
  .adg-cards > .wp-block-group__inner-container { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .adg-card { border-top: var(--edge) solid var(--sign); }
  .adg-card:not(:has(> .wp-block-group__inner-container)),
  .adg-card > .wp-block-group__inner-container { grid-template-columns: 1fr; align-items: stretch; }
  .adg-card .wp-block-image img { width: 100%; height: auto; aspect-ratio: 4 / 3; }
  .adg-card .wp-block-heading { padding: 14px 16px 18px; }
}
@media (min-width: 1000px) {
  .adg-cards:not(:has(> .wp-block-group__inner-container)),
  .adg-cards > .wp-block-group__inner-container { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
}

/* References: client logo wall */
.adg-logos {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 0;
}
@media (min-width: 700px) { .adg-logos { grid-template-columns: repeat(4, 1fr); gap: 12px; } }
@media (min-width: 1000px) { .adg-logos { grid-template-columns: repeat(5, 1fr); } }
.adg-logos .wp-block-image {
  display: grid;
  place-items: center;
  margin: 0;
  padding: 14px;
  background: var(--white);
  border: 1px solid var(--line);
}
.adg-logos img { width: 100%; height: 80px; object-fit: contain; }
@media (min-width: 700px) { .adg-logos img { height: 96px; } }

.post-meta { color: var(--muted); font-size: var(--step--1); }
.post-list { list-style: none; padding: 0; }
.post-list li + li { margin-top: 32px; }

/* ---------- Asides (service siblings, contact) ---------- */
.aside { display: grid; gap: 20px; margin-top: 40px; }
@media (min-width: 1000px) {
  .aside { position: sticky; top: 24px; gap: 24px; margin-top: 0; }
}
.plate {
  padding: 18px 20px 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-top: var(--edge) solid var(--sign);
}
.plate__title {
  margin-bottom: 10px;
  font-family: var(--font-sign);
  font-size: var(--step-1);
  font-weight: 600;
  color: var(--ink);
}
.plate__list { list-style: none; margin: 0; padding: 0; }
.plate__list a {
  display: flex;
  align-items: center;
  min-height: var(--tap);
  padding-inline: 10px;
  margin-inline: -10px;
  color: var(--text);
  text-decoration: none;
}
.plate__list li + li a { border-top: 1px solid var(--line); }
.plate__list a[aria-current="page"] {
  background: var(--sign-tint);
  color: var(--sign-deep);
  font-weight: 600;
}
@media (hover: hover) {
  .plate__list a:hover { color: var(--sign); }
}
@media (min-width: 1000px) {
  .plate__list a { min-height: 40px; }
}
.plate--contact { background: var(--ink); border-color: var(--ink); color: rgb(255 255 255 / 0.85); }
.plate--contact .plate__title { color: var(--white); }
.plate--contact .button { margin-top: 16px; width: 100%; background: var(--white); color: var(--ink); }
@media (hover: hover) {
  .plate--contact .button:hover { background: var(--sign-tint); }
}
.plate__phone {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: var(--tap);
  margin-top: 6px;
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
}
.plate__facts { list-style: none; margin: 0; padding: 0; }
.plate__facts li { display: flex; align-items: center; gap: 10px; min-height: var(--tap); }
.plate__facts li + li { border-top: 1px solid rgb(255 255 255 / 0.15); }
.plate--contact a { color: var(--white); }

/* ---------- CTA band ---------- */
.cta-band { background: var(--sign); color: rgb(255 255 255 / 0.9); padding-block: 40px; }
.cta-band__inner { display: grid; gap: 20px; align-items: center; }
.cta-band__title { color: var(--white); font-size: var(--step-3); }
.cta-band p { margin-top: 8px; }
.cta-band__actions { display: grid; gap: 10px; }
@media (min-width: 640px) {
  .cta-band__actions { display: flex; flex-wrap: wrap; gap: 12px; }
}
@media (min-width: 900px) {
  .cta-band { padding-block: 48px; }
  .cta-band__inner { grid-template-columns: 1fr auto; gap: 48px; }
}

/* ---------- Forms (Contact Form 7; its own CSS is not loaded) ---------- */
.wpcf7 form > p, .wpcf7 form label { display: block; }
.wpcf7 form > p + p { margin-top: 14px; }
.wpcf7 label { font-weight: 500; color: var(--ink); }
.wpcf7-form-control-wrap { display: block; }
.wpcf7 input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
.wpcf7 textarea,
.wpcf7 select {
  display: block;
  width: 100%;
  min-height: var(--tap);
  margin-top: 6px;
  padding: 11px 12px;
  border: 1px solid var(--field);
  border-radius: var(--radius);
  background: var(--white);
  font: inherit;
  font-size: max(16px, 1em); /* 16px+ keeps iOS from zooming into the field */
  color: var(--text);
}
.wpcf7 ::placeholder { color: #6b7681; opacity: 1; }
.wpcf7 textarea { min-height: 140px; resize: vertical; }
.wpcf7 input:focus, .wpcf7 textarea:focus, .wpcf7 select:focus { outline: 3px solid var(--sign); outline-offset: 0; border-color: var(--sign); }

/* Checkbox and radio groups: each option is a full-width tap row. */
.wpcf7-checkbox, .wpcf7-radio { display: grid; gap: 6px; margin-top: 8px; }
.wpcf7-list-item { display: block; margin: 0; }
.wpcf7 .wpcf7-list-item label {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--tap);
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  font-weight: 500;
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease;
}
.wpcf7-list-item input { width: 20px; height: 20px; margin: 0; flex: none; }
.wpcf7 .wpcf7-list-item label:has(input:checked) { border-color: var(--sign); background: var(--sign-tint); }
@media (min-width: 640px) {
  .wpcf7-checkbox { grid-template-columns: repeat(2, 1fr); }
}
.wpcf7-submit { width: 100%; margin-top: 8px; }
@media (min-width: 640px) {
  .wpcf7-submit { width: auto; }
}

.wpcf7-not-valid-tip { display: block; margin-top: 4px; color: var(--red); font-size: var(--step--1); }
.wpcf7-response-output { margin: 20px 0 0; padding: 12px 14px; border: 1px solid var(--sign); background: var(--sign-tint); color: var(--ink); }
.wpcf7 form.init .wpcf7-response-output,
.wpcf7-response-output:empty { display: none; }
.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.failed .wpcf7-response-output { border-color: var(--red); background: #fbecee; }
.wpcf7-spinner { display: none; }
.wpcf7 .hidden-fields-container { display: none; }
.wpcf7 .screen-reader-response { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: rgb(255 255 255 / 0.78); font-size: var(--step--1); }
.footer a { color: rgb(255 255 255 / 0.88); text-decoration: none; }
.footer__grid { display: grid; gap: 28px; padding-block: 40px 28px; }
.footer__name { font-family: var(--font-sign); font-size: var(--step-2); font-weight: 600; color: var(--white); margin-bottom: 8px; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer__contact { margin-top: 16px !important; }
.footer__contact li { display: flex; gap: 10px; align-items: flex-start; padding-block: 8px; }
.footer__contact .icon { margin-top: 3px; }
.footer__contact a { display: inline-block; }

/* Phones: each hub is one tappable row; its page list lives in the menu
   and on the hub page. From 760px the full lists return. */
.footer__heading { font-family: var(--font-sign); font-size: var(--step-1); font-weight: 600; }
.footer__heading a {
  display: flex;
  align-items: center;
  min-height: var(--tap);
  color: var(--white);
  border-bottom: 1px solid rgb(255 255 255 / 0.15);
}
.footer__col ul { display: none; }
.footer__col { margin-top: -28px; }
.footer__brand + .footer__col { margin-top: 0; }

.footer__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-block: 20px 28px;
  border-top: 1px solid rgb(255 255 255 / 0.15);
}
.footer__legal { display: flex; gap: 20px; }

@media (hover: hover) {
  .footer a:hover { color: var(--white); text-decoration: underline; }
}
@media (min-width: 760px) {
  .footer__grid { grid-template-columns: repeat(2, 1fr); gap: 40px; padding-block: 56px 40px; }
  .footer__col, .footer__brand + .footer__col { margin-top: 0; }
  .footer__heading { margin-bottom: 12px; }
  .footer__heading a { display: inline; min-height: 0; border: 0; }
  .footer__col ul { display: block; }
  .footer__col li + li { margin-top: 6px; }
  .footer__contact li { padding-block: 0; }
  .footer__contact li + li { margin-top: 10px; }
}
@media (min-width: 1100px) {
  .footer__grid { grid-template-columns: 1.3fr repeat(3, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; animation: none !important; }
}
