/* ============================================================
   ЦПО „Пиер Бурдийо“ · редизайн (мокъп), v3
   Same structure as the original site, modernised:
   two-tier header (large logo + sticky nav with the original items,
   mega menus on Земеделие / БАБХ / Професионално обучение),
   three-slide hero, 12 course tiles, the two CTA blocks, About,
   selected categories, partner logos, enquiry form, footer.
   Palette from the logo: navy for text and dark surfaces, burgundy
   as the single accent. Playfair Display headlines, Manrope body.
   Shapes: pills for actions, 6px for surfaces, 8px for inputs.
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg-soft: #f4f5f7;
  --bg-tint: #f9eef2;
  --fg: #16233a;
  --navy: #1b3a5e;
  --navy-deep: #12263f;
  --muted: #5c6675;
  --line: #e3e6ea;
  --line-strong: #c8cdd5;
  --accent: #8a1c3c;
  --accent-strong: #6d1430;
  --accent-soft: #f3dfe6;
  --on-accent: #ffffff;
  --shadow: 0 18px 44px -24px rgba(22, 35, 58, 0.35);

  --font: "Manrope", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --font-display: "Playfair Display", "Georgia", "Times New Roman", serif;
  --fs-sm: 0.875rem;
  --fs-base: 1.0625rem;
  --fs-lg: 1.2rem;
  --fs-h3: 1.3rem;
  --fs-h2: clamp(1.9rem, 1.4rem + 1.8vw, 2.9rem);
  --fs-h1: clamp(2.1rem, 1.4rem + 2.4vw, 3.4rem);

  --r-surface: 6px;
  --r-input: 8px;
  --r-pill: 999px;
  --gutter: max(20px, env(safe-area-inset-left, 0px));
  --gutter-r: max(20px, env(safe-area-inset-right, 0px));
  --nav-h: 56px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font); font-size: var(--fs-base); line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p, dl, dd { margin: 0; }
h1, h2 { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.01em; text-wrap: balance; color: var(--navy-deep); }
h1 { font-size: var(--fs-h1); line-height: 1.08; }
h2 { font-size: var(--fs-h2); line-height: 1.12; }
h3 { font-size: var(--fs-h3); font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; text-wrap: balance; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip-link { position: absolute; left: var(--gutter); top: -100px; background: var(--accent); color: var(--on-accent); padding: 10px 16px; border-radius: var(--r-pill); z-index: 100; }
.skip-link:focus { top: 12px; }

.container { width: 100%; max-width: 1240px; margin-inline: auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }
.section { padding-block: clamp(56px, 8vw, 104px); }
.section--soft { background: var(--bg-soft); }
.label { display: inline-block; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.label--accent { color: var(--accent); }
.section-head { display: grid; gap: 12px; margin-bottom: clamp(28px, 4vw, 44px); }
.section-head p { color: var(--muted); font-size: var(--fs-lg); line-height: 1.5; max-width: 46ch; }
.section-head--row { display: flex; align-items: end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 24px; border-radius: var(--r-pill); font-weight: 700; font-size: 0.97rem; white-space: nowrap; border: 1.5px solid transparent; transition: background-color .16s var(--ease-out), color .16s var(--ease-out), border-color .16s var(--ease-out), transform .16s var(--ease-out); }
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--accent-strong); }
.btn--dark { background: var(--navy); color: #fff; }
.btn--dark:hover { background: var(--navy-deep); }
.btn--light { background: #fff; color: var(--navy-deep); }
.btn--light:hover { background: var(--bg-soft); }
.btn--outline { border-color: var(--line-strong); color: var(--fg); background: transparent; }
.btn--outline:hover { border-color: var(--navy); }
.btn svg { width: 18px; height: 18px; flex: none; }
.text-link { color: var(--navy); font-weight: 700; display: inline-flex; align-items: center; gap: 8px; }
.text-link svg { width: 18px; height: 18px; transition: transform .18s var(--ease-out); }
.text-link:hover { color: var(--accent); }
.text-link:hover svg { transform: translateX(3px); }
.tag { font-size: 0.75rem; font-weight: 700; padding: 5px 10px; border-radius: var(--r-pill); background: var(--bg-soft); color: var(--muted); white-space: nowrap; }
.tag--accent { background: var(--accent-soft); color: var(--accent); }
a.tag--accent:hover { background: var(--accent); color: #fff; }

/* ---------- Top bar (large logo, phone, CTA) ---------- */
.topbar { background: var(--bg); }
.topbar__bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 14px; }
.brand img { width: 184px; height: auto; }
.topbar__actions { display: flex; align-items: center; gap: 10px; }
.phone-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-variant-numeric: tabular-nums; padding: 10px 12px; border-radius: var(--r-pill); color: var(--navy-deep); }
.phone-link:hover { background: var(--bg-soft); }
.phone-link svg { width: 18px; height: 18px; color: var(--accent); }
.phone-link__num { white-space: nowrap; font-size: 1.05rem; }
.menu-toggle { display: none; width: 46px; height: 46px; border-radius: var(--r-pill); align-items: center; justify-content: center; border: 1.5px solid var(--line); }
.menu-toggle svg { width: 22px; height: 22px; }
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }
.menu-toggle[aria-expanded="true"] .icon-menu { display: none; }

/* ---------- Navigation row (sticky) ---------- */
.header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: var(--bg); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: box-shadow .2s ease; }
.header.is-stuck { box-shadow: 0 10px 30px -22px rgba(22, 35, 58, 0.45); }
.nav { display: flex; align-items: stretch; justify-content: space-between; height: var(--nav-h); }
.nav > .nav__link:first-child { margin-left: -7px; }
.nav > .nav__link:last-child { margin-right: -7px; }
.nav__item { position: static; display: flex; }
.nav__link { display: inline-flex; align-items: center; gap: 5px; padding: 0 10px; font-weight: 600; font-size: 0.92rem; white-space: nowrap; color: var(--fg); border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .12s ease, border-color .12s ease; }
.nav__link:hover, .nav__link[aria-expanded="true"] { color: var(--accent); border-color: var(--accent); }
.nav__link svg { width: 13px; height: 13px; transition: transform .2s var(--ease-out); }
.nav__link[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav__link--contact { color: var(--accent); font-weight: 800; }

/* ---------- Mega menu panels ---------- */
.mega { position: absolute; left: 0; right: 0; top: 100%; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 30px 60px -30px rgba(22,35,58,0.35); opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .16s var(--ease-out), transform .16s var(--ease-out), visibility 0s linear .16s; }
.nav__item.is-open .mega { opacity: 1; visibility: visible; transform: none; transition: opacity .16s var(--ease-out), transform .16s var(--ease-out), visibility 0s; }
@media (hover: hover) and (min-width: 1200px) {
  .nav__item--mega:hover .mega { opacity: 1; visibility: visible; transform: none; transition: opacity .16s var(--ease-out), transform .16s var(--ease-out), visibility 0s; }
}
.mega__inner { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 40px; padding-block: 26px 30px; }
.mega__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.mega__head h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.5rem; color: var(--navy-deep); }
.mega__head p { color: var(--muted); font-size: var(--fs-sm); margin-top: 4px; max-width: 56ch; }
.mega__head .text-link { white-space: nowrap; margin-top: 6px; }
.mega__cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 28px; }
.mega__cols--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mega__group { display: grid; gap: 1px; align-content: start; }
.mega__group-title { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-weight: 800; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--navy); padding: 4px 8px 8px; margin-inline: -8px; }
.mega__group-title span { font-size: 0.75rem; color: var(--muted); letter-spacing: 0; }
a.mega__group-title:hover { color: var(--accent); }
.mega__group a:not(.mega__group-title) { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 6px 8px; margin-inline: -8px; border-radius: 6px; font-size: 0.92rem; line-height: 1.35; }
.mega__group a:not(.mega__group-title):hover { background: var(--bg-soft); color: var(--accent); }
.mega__group .meta { font-size: 0.74rem; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.mega__aside { display: grid; gap: 8px; align-content: start; padding: 18px; border-radius: var(--r-surface); background: var(--bg-soft); }
.mega__aside img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 4px; margin-bottom: 6px; }
.mega__aside strong { font-family: var(--font-display); font-weight: 500; font-size: 1.15rem; line-height: 1.25; color: var(--navy-deep); }
.mega__aside-text { font-size: var(--fs-sm); color: var(--muted); }
a.mega__aside:hover strong { color: var(--accent); }
.mega__aside--logo { justify-items: start; }
.mega__aside--logo img { width: auto; height: 72px; aspect-ratio: auto; object-fit: contain; }

/* Mobile drawer */
.drawer { display: none; position: fixed; inset: 0; top: calc(var(--nav-h) + env(safe-area-inset-top, 0px)); background: var(--bg); z-index: 49; overflow-y: auto; padding: 16px var(--gutter-r) 40px var(--gutter); }
.drawer.is-open { display: block; }
.drawer__list { display: grid; }
.drawer__list > li > a, .drawer__list summary { display: flex; align-items: center; justify-content: space-between; padding: 15px 4px; font-weight: 700; font-size: 1.05rem; border-bottom: 1px solid var(--line); cursor: pointer; list-style: none; }
.drawer__list summary::-webkit-details-marker { display: none; }
.drawer__list summary svg { width: 16px; height: 16px; transition: transform .2s var(--ease-out); }
.drawer__list details[open] > summary svg { transform: rotate(180deg); }
.drawer__sub { padding: 6px 0 12px 10px; display: grid; }
.drawer__sub a { display: block; padding: 9px 6px; color: var(--muted); font-size: 0.97rem; }
.drawer__sub .label { padding: 10px 6px 4px; }
.drawer__cta { display: grid; gap: 10px; margin-top: 24px; }
.drawer__cta .btn { width: 100%; }

/* ---------- Hero slider ---------- */
.slider { position: relative; background: var(--navy-deep); }
.slider__track { position: relative; min-height: 420px; }
.slide { position: relative; }
.slide img { width: 100%; height: clamp(420px, 42vw, 720px); object-fit: cover; }
.slide__inner { position: absolute; inset: 0; display: flex; align-items: center; }
.slide__card { background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-radius: var(--r-surface); padding: clamp(24px, 3vw, 40px); max-width: 600px; display: grid; gap: 22px; box-shadow: var(--shadow); }
.slide__card h1, .slide__card .slide__title { font-family: var(--font-display); font-weight: 500; font-size: clamp(2rem, 1.3rem + 2.2vw, 3.1rem); overflow-wrap: anywhere; line-height: 1.08; color: var(--navy-deep); letter-spacing: -0.01em; text-wrap: balance; }
.slide__card em { font-style: normal; color: var(--accent); }
.slide__card .btn { justify-self: start; }
.slide { transition: opacity .4s ease; }
.slide[hidden] { display: none; }
.slider__controls { position: absolute; left: 0; right: 0; bottom: 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; pointer-events: none; }
.slider__dots { display: flex; gap: 8px; pointer-events: auto; }
.slider__dot { width: 34px; height: 4px; border-radius: var(--r-pill); background: rgba(255,255,255,0.45); transition: background-color .2s ease; }
.slider__dot.is-active, .slider__dot:hover { background: #fff; }
.slider__dot:focus-visible { outline-color: #fff; }
.slider__arrows { display: flex; gap: 8px; pointer-events: auto; }
.slider__arrow { width: 44px; height: 44px; border-radius: var(--r-pill); background: rgba(255,255,255,0.92); color: var(--navy-deep); display: grid; place-items: center; transition: background-color .16s ease, transform .16s var(--ease-out); }
.slider__arrow:hover { background: #fff; }
.slider__arrow:active { transform: scale(0.95); }
.slider__arrow svg { width: 20px; height: 20px; }

/* ---------- Course tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.tiles--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tile { display: grid; grid-template-rows: auto 1fr; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-surface); overflow: hidden; transition: border-color .16s ease, transform .16s var(--ease-out), box-shadow .16s ease; }
.tile img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.tile__body { padding: 16px 18px 18px; display: grid; gap: 8px; align-content: start; }
.tile h3 { font-size: 1.1rem; color: var(--navy-deep); }
.tile p { font-size: 0.9rem; color: var(--muted); line-height: 1.5; }
.tile__more { margin-top: 4px; font-size: var(--fs-sm); font-weight: 700; color: var(--accent); }
@media (hover: hover) and (pointer: fine) {
  .tile:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: 0 16px 32px -24px rgba(22,35,58,0.4); }
}

/* ---------- CTA pair: Избери професия + Записване ---------- */
.cta-pair { padding-block: 0 clamp(56px, 8vw, 104px); }
.cta-pair__grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 18px; }
.cta-panel { position: relative; border-radius: var(--r-surface); overflow: hidden; min-height: 340px; display: grid; align-content: end; isolation: isolate; }
.cta-panel__body { padding: clamp(24px, 3.5vw, 44px); display: grid; gap: 14px; justify-items: start; }
.cta-panel__body h2 { font-size: clamp(1.8rem, 1.3rem + 1.6vw, 2.6rem); }
.cta-panel__body p { color: var(--muted); max-width: 40ch; }
.cta-panel__actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.cta-panel--image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.cta-panel--image::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(18,38,63,0.15) 0%, rgba(18,38,63,0.85) 100%); }
.cta-panel--image h2, .cta-panel--image .label { color: #fff; }
.cta-panel--image .label { color: rgba(255,255,255,0.8); }
.cta-panel--tint { background: var(--bg-tint); }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(28px, 6vw, 80px); align-items: center; }
.about__text { display: grid; gap: 16px; max-width: 58ch; }
.about__city { display: block; font-size: 0.5em; color: var(--muted); font-style: italic; margin-top: 4px; }
.about__text p { color: var(--muted); }
.about__text p.lead { color: var(--fg); font-size: var(--fs-lg); line-height: 1.5; }
.about__actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.about__media { display: grid; gap: 0; }
.about__media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--r-surface) var(--r-surface) 0 0; }
.about__facts { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--r-surface) var(--r-surface); }
.about__facts li { padding: 16px 18px; display: grid; gap: 2px; }
.about__facts li + li { border-left: 1px solid var(--line); }
.about__facts strong { font-family: var(--font-display); font-weight: 500; font-size: 1.3rem; color: var(--navy-deep); font-variant-numeric: tabular-nums; white-space: nowrap; }
.about__facts span { font-size: 0.78rem; color: var(--muted); }

/* ---------- Selected categories ---------- */
.cats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.cat { position: relative; display: grid; align-content: end; gap: 2px; min-height: 220px; padding: 16px; border-radius: var(--r-surface); overflow: hidden; color: #fff; isolation: isolate; }
.cat img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .5s var(--ease-out); }
.cat::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(18,38,63,0) 35%, rgba(18,38,63,0.88) 100%); }
.cat__name { font-weight: 700; font-size: 0.98rem; line-height: 1.25; }
.cat__count { font-size: 0.78rem; opacity: 0.85; }
@media (hover: hover) and (pointer: fine) { .cat:hover img { transform: scale(1.04); } }

/* ---------- Partner logos ---------- */
.partners { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg); }
.partners__row { display: flex; align-items: center; justify-content: space-around; gap: 32px; flex-wrap: wrap; padding-block: 28px; }
.partners__row img { height: 64px; width: auto; filter: grayscale(1); opacity: 0.75; transition: filter .2s ease, opacity .2s ease; }
.partners__row img:hover { filter: none; opacity: 1; }

/* ---------- Enquiry (form + contacts) ---------- */
.enrol { background: var(--bg-soft); }
.enrol__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(28px, 6vw, 96px); align-items: start; }
.enrol__copy { display: grid; gap: 18px; }
.enrol__copy p { color: var(--muted); font-size: var(--fs-lg); line-height: 1.5; max-width: 38ch; }
.contact-list { display: grid; margin-top: 8px; border-top: 1px solid var(--line-strong); }
.contact-list li { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-strong); align-items: baseline; }
.contact-list strong { font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.contact-list span, .contact-list a { font-weight: 600; }
.contact-list a:hover { color: var(--accent); }
.form { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: clamp(24px, 3vw, 36px); display: grid; gap: 18px; box-shadow: var(--shadow); }
.form__head { display: grid; gap: 4px; margin-bottom: 4px; }
.form h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.6rem; color: var(--navy-deep); }
.form__head p { color: var(--muted); font-size: var(--fs-sm); }
.field { display: grid; gap: 7px; }
.field label { font-weight: 700; font-size: 0.8rem; letter-spacing: 0.02em; color: var(--navy-deep); }
.field input, .field textarea, .field select { width: 100%; font: inherit; color: var(--fg); background: var(--bg-soft); border: 1.5px solid transparent; border-radius: 10px; padding: 13px 16px; min-height: 50px; transition: border-color .14s ease, background-color .14s ease, box-shadow .14s ease; }
.field textarea { min-height: 128px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #8a909b; }
.field input:hover, .field textarea:hover { background: #eef0f3; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; background: var(--bg); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form__foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 4px; }
.form__note { font-size: 0.8rem; color: var(--muted); }
.form__success { background: var(--accent-soft); color: var(--accent-strong); border-radius: 10px; padding: 14px 16px; font-weight: 600; }

/* ---------- Footer ---------- */
.footer { background: var(--navy-deep); color: #e8edf3; padding-block: 56px 28px; }
.footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; }
.footer h4 { margin: 0 0 16px; font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: #9fb0c4; }
.footer__logo { width: 150px; background: #fff; padding: 10px 12px; border-radius: var(--r-surface); margin-bottom: 24px; }
.footer__list { display: grid; gap: 8px; }
.footer__list a { font-weight: 600; color: #e8edf3; }
.footer__list a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer__contact { display: grid; gap: 10px; }
.footer__contact li { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start; }
.footer__contact svg { width: 20px; height: 20px; color: #e9a9bb; margin-top: 3px; }
.footer__contact a:hover { text-decoration: underline; text-underline-offset: 3px; }
.footer__bottom { margin-top: 44px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.14); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: var(--fs-sm); color: #9fb0c4; }
.footer__bottom a:hover { color: #fff; }
.footer__legal { display: flex; gap: 18px; flex-wrap: wrap; }

/* ---------- Course page (product layout, no sidebar) ---------- */
.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; font-size: var(--fs-sm); color: var(--muted); padding-block: 20px 0; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; color: var(--line-strong); }
.product { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 72px); align-items: start; padding-block: 24px clamp(40px, 6vw, 72px); }
.product__gallery { position: sticky; top: calc(var(--nav-h) + 24px); }
.product__gallery img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--r-surface); }
.product__details { display: grid; gap: 20px; }
.product__cats { display: flex; flex-wrap: wrap; gap: 8px; }
.product__details h1 { font-size: clamp(2rem, 1.4rem + 2vw, 3rem); }
.product__details .lead { font-size: var(--fs-lg); color: var(--muted); line-height: 1.55; max-width: 56ch; }
.facts { display: grid; border-top: 1px solid var(--line); margin-top: 4px; }
.facts__row { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.facts dt { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.facts dd { font-weight: 600; }
.product__actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.product__meta { font-size: var(--fs-sm); color: var(--muted); }
.product__meta span { font-weight: 700; color: var(--fg); }
.product__meta a { color: var(--accent); }
.product__meta a:hover { text-decoration: underline; text-underline-offset: 3px; }

.tabs { padding-bottom: clamp(24px, 4vw, 40px); }
.tabs__list { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs__list::-webkit-scrollbar { display: none; }
.tabs__tab { padding: 14px 18px; font-weight: 700; font-size: 0.97rem; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; transition: color .12s ease, border-color .12s ease; }
.tabs__tab:hover { color: var(--fg); }
.tabs__tab[aria-selected="true"] { color: var(--accent); border-color: var(--accent); }
.tabs__panel { padding-top: clamp(28px, 4vw, 40px); }
.tabs__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.tabs__figure { margin: 0; display: grid; gap: 8px; }
.tabs__figure img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--r-surface); }
.tabs__figure figcaption { font-size: 0.8rem; color: var(--muted); }
.prose { max-width: 66ch; display: grid; gap: 14px; }
.prose h2 { font-size: 1.7rem; }
.prose h3 { font-size: 1.15rem; margin-top: 8px; color: var(--navy-deep); }
.prose ul { display: grid; gap: 8px; padding-left: 20px; list-style: disc; }
.prose li::marker { color: var(--accent); }
.callout { background: var(--bg-tint); border-left: 3px solid var(--accent); padding: 14px 18px; font-weight: 600; color: var(--accent-strong); }
.formats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 980px; }
.format { border: 1px solid var(--line); border-radius: var(--r-surface); padding: 24px; display: grid; gap: 10px; align-content: start; }
.format h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.4rem; color: var(--navy-deep); }
.format p { color: var(--muted); font-size: 0.97rem; }
.format__fact { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.faq { display: grid; border-top: 1px solid var(--line); max-width: 76ch; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 4px; font-weight: 700; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { width: 20px; height: 20px; flex: none; color: var(--accent); transition: transform .2s var(--ease-out); }
.faq details[open] summary svg { transform: rotate(45deg); }
.faq__body { padding: 0 4px 16px; color: var(--muted); display: grid; gap: 10px; max-width: 64ch; }
.faq__body ul { display: grid; gap: 6px; padding-left: 20px; list-style: disc; }
.faq__body li::marker { color: var(--accent); }
.related { border-top: 1px solid var(--line); }
.tile p { margin: 0; }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .slide, .tile, .cat img, .btn, .text-link svg { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1199px) {
  .header { border-top: 0; }
  .nav { display: none; }
  .header { position: static; height: 0; border: 0; }
  .topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; border-bottom: 1px solid var(--line); }
  .topbar.is-stuck { box-shadow: 0 10px 30px -22px rgba(22,35,58,0.45); }
  .menu-toggle { display: inline-flex; }
  .drawer { top: calc(76px + env(safe-area-inset-top, 0px)); }
  .brand img { width: 140px; }
  .tiles, .tiles--4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .product { grid-template-columns: 1fr; }
  .product__gallery { position: static; }
}
@media (max-width: 860px) {
  .about, .enrol__grid, .cta-pair__grid, .product, .tabs__grid { grid-template-columns: 1fr; }
  .tiles, .tiles--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .slide img { height: clamp(460px, 110vw, 560px); }
  .slide__inner { align-items: flex-end; padding-bottom: 72px; }
  .slide__card { max-width: none; }
  .product__gallery img { aspect-ratio: 4 / 3; }
  .phone-link__num { display: none; }
  .phone-link { padding: 10px; border: 1.5px solid var(--line); width: 46px; height: 46px; justify-content: center; }
}
@media (max-width: 600px) {
  .brand img { width: 120px; }
  .topbar__bar { gap: 10px; }
  .topbar__actions .btn { padding-inline: 16px; min-height: 42px; }
  .tiles, .tiles--4, .cats, .formats, .form__row, .about__facts { grid-template-columns: 1fr; }
  .facts__row { grid-template-columns: 1fr; gap: 2px; }
  .about__facts li + li { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; }
  .footer__grid { grid-template-columns: 1fr; gap: 32px; }
  .contact-list li { grid-template-columns: 1fr; gap: 2px; }
  .partners__row { justify-content: center; gap: 24px; }
  .partners__row img { height: 48px; }
  .cta-panel { min-height: 280px; }
}

/* ---------- Professions page ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.page-head { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; padding-block: 20px clamp(28px, 4vw, 44px); }
.page-head__text { display: grid; gap: 14px; }
.page-head__text h1 { max-width: 22ch; }
.page-head__text p { color: var(--muted); font-size: var(--fs-lg); line-height: 1.5; max-width: 48ch; }
.licence { background: var(--bg-soft); border-radius: var(--r-surface); padding: 22px 24px; display: grid; gap: 6px; align-content: start; }
.licence > strong { font-family: var(--font-display); font-weight: 500; font-size: 1.5rem; color: var(--navy-deep); font-variant-numeric: tabular-nums; }
.licence__list { display: grid; margin-top: 8px; border-top: 1px solid var(--line-strong); }
.licence__list div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); }
.licence__list dt { color: var(--muted); }
.licence__list dd { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }

.directory-page { padding-bottom: clamp(48px, 7vw, 88px); }
.toolbar { display: grid; grid-template-columns: minmax(0, 1.2fr) auto; gap: 14px 24px; align-items: center; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); position: sticky; top: var(--nav-h); background: var(--bg); z-index: 20; }
.search { position: relative; display: block; }
.search svg { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input { width: 100%; font: inherit; color: var(--fg); background: var(--bg-soft); border: 1.5px solid transparent; border-radius: var(--r-pill); padding: 11px 16px 11px 42px; min-height: 46px; transition: border-color .14s ease, background-color .14s ease, box-shadow .14s ease; }
.search input:focus { outline: none; background: var(--bg); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.toolbar__filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 9px 14px; border-radius: var(--r-pill); border: 1.5px solid var(--line); font-size: var(--fs-sm); font-weight: 700; color: var(--muted); transition: background-color .14s ease, color .14s ease, border-color .14s ease; }
.chip:hover { border-color: var(--line-strong); color: var(--fg); }
.chip.is-active { background: var(--navy-deep); border-color: var(--navy-deep); color: #fff; }
.select select { font: inherit; font-size: var(--fs-sm); font-weight: 600; color: var(--fg); background: var(--bg-soft); border: 1.5px solid transparent; border-radius: var(--r-pill); padding: 10px 36px 10px 16px; min-height: 42px; max-width: 320px; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235c6675' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 14px; }
.select select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.toolbar__count { grid-column: 1 / -1; font-size: var(--fs-sm); color: var(--muted); margin-top: -4px; }
.toolbar__count span { font-weight: 700; color: var(--fg); font-variant-numeric: tabular-nums; }

.table-wrap { overflow-x: auto; margin-top: 8px; }
.table { width: 100%; border-collapse: collapse; font-size: 0.95rem; min-width: 760px; }
.table th { text-align: left; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding: 14px 12px; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tbody tr:hover td { background: var(--bg-soft); }
.table td:first-child { white-space: nowrap; }
.table .spk { display: inline-block; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; padding: 3px 9px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent); }
.table .code { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 0.85rem; margin-right: 6px; }
.table td.pn { color: var(--muted); font-size: 0.9rem; }
.table td.date { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--muted); }
.table tr[hidden] { display: none; }
.table-empty { padding: 32px 12px; color: var(--muted); text-align: center; }

@media (max-width: 1199px) { .toolbar { top: 0; position: static; } }
@media (max-width: 860px) {
  .page-head { grid-template-columns: 1fr; }
  .toolbar { grid-template-columns: 1fr; }
  .toolbar__filters { justify-content: flex-start; }
  .select select { max-width: 100%; }
}
@media (max-width: 600px) { .licence__list div { grid-template-columns: 1fr; gap: 2px; } }
