/* =========================================================
   Azizov & Partners — main page template (rev. 2)

   GRID & LINES (see "Инструкция по макетам", orange lines)
   ---------------------------------------------------------
   Everything sits on ONE 3-column grid inside .container.
   Each column has two vertical guide lines:

     col start                  col end
       |  pad  icon  gap |                 |
       |<---- --inset -->| text line        |
       |          |<card-pad>|              |
       |      card border line     |<card-end>|

   • Text line  = column start + --inset. Section titles, practice
     names, card content, testimonial quote, FAQ questions and the hero
     text all start on it.
   • Card line  = text line − --card-pad. Card borders and the FAQ list
     border sit on it.
   • Outer lines = container edges. Header, nav bar, hero, practice
     grid, news panel, testimonial box, FAQ list, awards row and
     footer bar all start/end on them.
   The same variables drive tablet and mobile, so the lines move
   together when the layout adapts.

   Breakpoints: ≥1200 desktop · 1024–1199 small desktop ·
                768–1023 tablet · <768 mobile
   ========================================================= */

:root {
  color-scheme: light;

  /* brand */
  --navy: #002a5b;
  --navy-deep: #002339;
  --navy-footer: #132d4d;
  --graphite: #313744;
  --olive: #b9c21f;
  --olive-hover: #a7b015;
  --olive-text: #7d8510;
  --cream: #faf8f1;

  /* neutrals */
  --ink: #1d2733;
  --muted: #5e6670;
  --line: #d7dadc;
  --line-soft: #e6e8ea;
  --white: #ffffff;

  /* type */
  --serif: "PT Serif", Georgia, "Times New Roman", serif;
  --sans: Arial, "Helvetica Neue", Helvetica, sans-serif;

  /* layout */
  --container: 1280px;
  --gutter: 16px;
  --section-gap: 48px;

  /* guide lines */
  --pad: 14px;        /* practice cell left padding */
  --icon: 30px;       /* practice icon size */
  --icon-gap: 14px;   /* icon → text */
  --inset: calc(var(--pad) + var(--icon) + var(--icon-gap));   /* text line */
  --card-pad: 16px;   /* card border → card content */
  --card-end: 24px;   /* card right border → column end */
  --card-line: calc(var(--inset) - var(--card-pad));          /* card border line */

  /* hero buttons — identical size */
  --btn-w: 260px;
  --btn-h: 50px;
  --btn-gap: 80px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 64px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }

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

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 200;
  background: var(--navy); color: #fff; padding: 10px 16px; font-family: var(--sans);
}
.skip-link:focus { top: 8px; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* the shared 3-column grid */
.grid3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 0;
}

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  position: sticky;
  top: calc(var(--hdr-offset, 0px) * -1);   /* desktop: top row scrolls away, nav bar stays */
  z-index: 50;
  background: var(--white);
}

.header-top {
  display: flex;
  align-items: center;
  padding-top: 14px;
  padding-bottom: 14px;
}

.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--navy); flex-shrink: 0; }
.logo__mark { width: 44px; height: 44px; }
.logo__text {
  font-family: var(--serif);
  font-variant: small-caps;
  font-size: 27px;
  letter-spacing: .01em;
  line-height: 1;
  color: var(--navy);
  white-space: nowrap;
}
.logo__text--light { color: #fff; font-size: 22px; }

/* margin-left is set by js so the block starts on the "Court Practice" divider;
   margin-left:auto is the fallback */
.header-info {
  margin-left: auto;
  display: flex;
  gap: 48px;
  font-size: 11px;
  line-height: 1.35;
}
.header-info__col { display: flex; flex-direction: column; }
.header-info__title { font-weight: 700; color: var(--navy); font-size: 12px; margin-bottom: 4px; }
.header-info a,
.header-info__addr { color: #3a6ea5; text-decoration: underline; text-underline-offset: 2px; }
.header-info a:hover { color: var(--navy); }

.header-info__location { text-decoration: none !important; }
.header-info__location:hover .header-info__addr { color: var(--navy); }

.header-aside { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.header-aside__row { display: flex; align-items: center; gap: 4px; }

.social {
  width: 24px; height: 24px;
  display: inline-grid; place-items: center;
  background: var(--graphite); color: #fff;
}
.social svg { width: 18px; height: 18px; fill: currentColor; }
.social:hover { background: var(--navy); }

.lang { display: flex; gap: 4px; }
.lang__item {
  min-width: 24px; height: 24px; padding: 0 3px;
  display: inline-grid; place-items: center;
  font-family: var(--sans); font-size: 11px; font-weight: 700;
  color: #fff; background: var(--graphite);
}
.lang__item:hover { background: var(--navy); }
.lang__item.is-active { background: var(--navy); box-shadow: inset 0 -3px 0 var(--olive); }

.offices { display: flex; gap: 48px; font-family: var(--sans); font-size: 13px; color: var(--ink); }
.offices a { border-bottom: 1px solid transparent; }
.offices a:hover { color: var(--navy); border-bottom-color: var(--olive); }

.burger {
  display: none;
  width: 44px; height: 44px;
  border: 0; background: transparent;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px;
}
.burger span { display: block; width: 24px; height: 2px; background: var(--navy); }

/* ---------- nav bar ---------- */
.navbar { background: var(--white); }
.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--graphite);
  padding: 6px 6px 6px 0;
}
.main-nav ul { display: flex; }
.main-nav li + li { border-left: 1px solid rgba(255,255,255,.55); }
.main-nav a {
  display: block;
  padding: 6px 16px;
  font-family: var(--sans); font-size: 15px; font-weight: 700;
  color: #fff; white-space: nowrap;
}
.main-nav a:hover { color: var(--olive); }

.search { display: flex; flex: 0 1 360px; }
.search input {
  flex: 1; min-width: 0;
  height: 32px; padding: 0 10px;
  border: 1px solid var(--line); border-right: 0; border-radius: 0;
  font-family: var(--sans); font-size: 13px; color: var(--ink); background: #fff;
  -webkit-appearance: none; appearance: none;
}
.search button {
  height: 32px; padding: 0 18px;
  border: 0; background: var(--olive); color: var(--graphite);
  font-family: var(--sans); font-size: 13px;
}
.search button:hover { background: var(--olive-hover); }

/* ---------- drawer (tablet / mobile) ---------- */
.drawer-backdrop {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(0, 20, 40, .45);
  opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s;
}
body.drawer-open .drawer-backdrop { opacity: 1; visibility: visible; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 100;
  width: min(380px, 88vw);
  display: flex; flex-direction: column; gap: 24px;
  padding: calc(16px + env(safe-area-inset-top, 0px)) 20px calc(24px + env(safe-area-inset-bottom, 0px));
  background: var(--navy-footer); color: #fff;
  overflow-y: auto;
  transform: translateX(100%); visibility: hidden;
  transition: transform .3s ease, visibility .3s;
}
.drawer.is-open { transform: none; visibility: visible; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; }
.drawer__close { width: 44px; height: 44px; margin-right: -10px; border: 0; background: transparent; color: #fff; }
.drawer__close svg { width: 24px; height: 24px; stroke: currentColor; stroke-width: 2; fill: none; }
.search--drawer { flex: none; }
.search--drawer input, .search--drawer button { height: 44px; }
.drawer__nav { display: flex; flex-direction: column; border-top: 1px solid rgba(255,255,255,.15); }
.drawer__nav a {
  padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.15);
  font-family: var(--sans); font-size: 17px; font-weight: 700;
}
.drawer__nav a:hover { color: var(--olive); }
.drawer__contacts { display: flex; flex-direction: column; gap: 4px; font-family: var(--sans); font-size: 14px; color: rgba(255,255,255,.85); }
.drawer__contacts a:hover { color: var(--olive); }
.drawer__location { text-decoration: underline; text-underline-offset: 3px; }
.drawer__offices { display: flex; gap: 20px; }
.drawer__offices a { text-decoration: underline; text-underline-offset: 3px; }
.drawer__label { margin-top: 12px; font-family: var(--serif); font-weight: 700; color: #fff; font-size: 15px; }
.drawer__label:first-child { margin-top: 0; }
.drawer__foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; }
.drawer__social { display: flex; gap: 6px; }
.lang--drawer .lang__item, .drawer__social .social { width: 40px; height: 40px; font-size: 13px; background: rgba(255,255,255,.12); }
.lang--drawer .lang__item.is-active { background: var(--olive); color: var(--navy); box-shadow: none; }

/* =========================================================
   HERO (+ slide show)
   ========================================================= */
.hero { padding-top: 8px; }
.hero__frame {
  position: relative;
  min-height: 460px;
  display: flex; align-items: center;
  overflow: hidden;
  background: #dbe8f6;
}
.hero__slides, .hero__slide, .hero__veil { position: absolute; inset: 0; }
.hero__slide { opacity: 0; transition: opacity .9s ease; }
.hero__slide.is-active { opacity: 1; }
.hero__slide img { width: 100%; height: 100%; object-fit: cover; object-position: right center; }
.hero__veil {
  background: linear-gradient(90deg,
    rgba(255,255,255,.88) 0%,
    rgba(255,255,255,.72) 32%,
    rgba(255,255,255,.18) 58%,
    rgba(255,255,255,0) 72%);
}

.hero__content {
  position: relative; z-index: 1;
  width: 100%;
  padding: 40px var(--gutter) 40px var(--inset);   /* text on the text line */
}
.hero__tagline {
  display: flex; flex-wrap: wrap; gap: 6px 26px;
  margin-bottom: 14px;
  font-weight: 700; font-size: 15px; text-transform: uppercase;
  color: var(--navy);
}
.hero__title {
  font-size: clamp(30px, 3.2vw, 42px);
  line-height: 1.15; font-weight: 700;
  color: var(--navy);
  margin-bottom: 14px;
}
.hero__text { font-size: 16px; line-height: 1.5; color: var(--navy); max-width: 52ch; }

.hero__actions {
  display: grid;
  grid-template-columns: repeat(2, var(--btn-w));
  column-gap: var(--btn-gap);
  row-gap: 12px;
  margin-top: 36px;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 20px;
  width: 100%; height: var(--btn-h);
  padding: 0 20px;
  border: 1.5px solid var(--navy);
  font-family: var(--serif); font-size: 17px; font-weight: 700;
  color: var(--navy);
  transition: background-color .15s, color .15s;
}
.btn__arrow { font-family: var(--sans); font-weight: 400; transition: transform .15s; }
.btn:hover .btn__arrow { transform: translateX(4px); }
.btn--primary { background: var(--olive); }
.btn--primary:hover { background: var(--olive-hover); }
.btn--outline { background: var(--white); }
.btn--outline:hover { background: var(--navy); color: #fff; }

.hero__controls {
  position: absolute; z-index: 2; right: 16px; bottom: 14px;
  display: flex; align-items: center; gap: 10px;
}
.hero__dots { display: flex; gap: 6px; }
.hero__dots button {
  width: 10px; height: 10px; padding: 0;
  border: 1.5px solid #fff; background: rgba(0,42,91,.35);
  transition: background-color .2s, width .2s;
}
.hero__dots button[aria-current="true"] { width: 26px; background: #fff; }
.hero__pause {
  width: 28px; height: 28px; padding: 0;
  display: grid; place-items: center;
  border: 0; background: rgba(0,42,91,.55); color: #fff;
}
.hero__pause svg { width: 16px; height: 16px; fill: currentColor; }
.hero__pause .i-play { display: none; }
.hero__pause.is-paused .i-play { display: block; }
.hero__pause.is-paused .i-pause { display: none; }

/* =========================================================
   SECTIONS (shared)
   ========================================================= */
.section { padding-top: var(--section-gap); }
.section-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(24px, 2.4vw, 30px);
  line-height: 1.2;
  color: var(--navy);
  margin-bottom: 16px;
  padding-left: var(--inset);     /* text line of column 1 */
}
.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  /* "All …" ends where the content of the last card ends */
  padding-right: calc(var(--card-end) + var(--card-pad));
}
.link-all { flex-shrink: 0; font-family: var(--serif); font-weight: 700; font-size: 15px; color: var(--navy); }
.link-all span { font-family: var(--sans); font-weight: 400; margin-left: 6px; display: inline-block; transition: transform .15s; }
.link-all:hover span { transform: translateX(4px); }

/* =========================================================
   PRACTICE AREAS GRID
   ========================================================= */
.practice-grid { position: relative; }
/* top + left outer border drawn as an overlay so it takes no space
   and the column edges stay exactly on the grid lines */
.practice-grid::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  border-top: 1px solid var(--line); border-left: 1px solid var(--line);
}
.practice-grid li { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.practice {
  height: 100%; min-height: 46px;
  display: flex; align-items: center; gap: var(--icon-gap);
  padding: 8px 10px 8px var(--pad);
  font-family: var(--serif); font-weight: 700; font-size: 13px; line-height: 1.3;
  text-transform: uppercase; letter-spacing: .01em;
  color: var(--navy);
  transition: background-color .15s;
}
.practice img { width: var(--icon); height: var(--icon); flex-shrink: 0; }
.practice:hover { background: var(--cream); }
.practice:hover span { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--olive); }
.practice-toggle { display: none; }

/* =========================================================
   CARDS (news / projects)
   ========================================================= */
.news__panel {
  position: relative;
  background: var(--cream);
  padding: 18px 0 28px;
}
/* frame drawn above the content: takes no space, so the grid stays on its lines,
   and carousel cards scrolling underneath never cut it */
.news__panel::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  border: 1px solid var(--olive);
}

.card {
  display: flex; flex-direction: column;
  margin: 0 var(--card-end) 0 var(--card-line);  /* border on the card line */
  padding: 0 calc(var(--card-pad) - 1px) 14px;   /* content on the text line (−1px border) */
  background: var(--white);
  border: 1px solid var(--line);
}
.card__media { display: block; aspect-ratio: 2 / 1; overflow: hidden; background: #e9edf2; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__media--top img { object-position: center top; }
.card__body { display: flex; flex-direction: column; flex: 1; padding-top: 12px; }
.card__date { font-family: var(--sans); font-weight: 700; font-size: 11px; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.card__title { font-size: 15px; line-height: 1.3; font-weight: 700; color: var(--navy); }
.card__title a:hover { text-decoration: underline; text-underline-offset: 3px; }
.card__text { margin-top: 12px; font-family: var(--sans); font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.card__more { margin-top: auto; padding-top: 18px; align-self: flex-start; font-family: var(--sans); font-weight: 700; font-size: 12.5px; color: var(--olive-text); }
.card__more span { font-weight: 400; margin-left: 6px; display: inline-block; transition: transform .15s; }
.card__more:hover span { transform: translateX(4px); }

.carousel-dots { display: none; }

/* =========================================================
   TESTIMONIAL + FAQ
   columns 1–2: testimonial, column 3: FAQ
   ========================================================= */
.split__grid {
  grid-template-areas:
    "tt tt ft"
    "tb tb fl";
  align-items: stretch;           /* box and FAQ list share top & bottom lines */
}
.split__t-title { grid-area: tt; }
.split__f-title { grid-area: ft; }

.testimonial {
  grid-area: tb;
  position: relative;
  display: flex; flex-direction: column; justify-content: center;
  margin-right: var(--card-end);  /* right edge = right border of card 2 */
  padding: 28px 40px 28px var(--inset);
  background: var(--navy-deep); color: #fff;
}
.testimonial__track { display: grid; }
.testimonial__item {
  grid-area: 1 / 1;
  margin: 0;
  opacity: 0; visibility: hidden;
  transition: opacity .5s ease, visibility .5s;
}
.testimonial__item.is-active { opacity: 1; visibility: visible; }
.testimonial__item blockquote { margin: 0; }
.testimonial__item p { font-size: 18px; line-height: 1.45; max-width: 62ch; }
.testimonial__item figcaption { display: flex; flex-wrap: wrap; gap: 4px 0; margin-top: 22px; font-size: 11px; font-weight: 700; }
.testimonial__item figcaption span + span::before { content: "|"; margin: 0 8px; font-weight: 400; opacity: .8; }

.testimonial__nav {
  position: absolute; right: 14px; bottom: 12px;
  display: flex; align-items: center; gap: 6px;
  font-family: var(--sans); font-size: 12px; color: rgba(255,255,255,.8);
}
.testimonial__arrow {
  width: 30px; height: 30px; padding: 0;
  border: 1px solid rgba(255,255,255,.4); background: transparent; color: #fff;
  font-family: var(--sans);
}
.testimonial__arrow:hover { border-color: var(--olive); color: var(--olive); }
.testimonial__count { min-width: 34px; text-align: center; }

.faq__list {
  grid-area: fl;
  display: flex; flex-direction: column; justify-content: space-between; gap: 4px;
  margin-left: var(--card-line);  /* border on the card line of column 3 */
}
.faq__item { border: 1px solid var(--line); background: var(--white); }
.faq__item h3 { font-size: inherit; }
.faq__q {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 38px;
  padding: 8px 10px 8px calc(var(--card-pad) - 1px);   /* text on the text line */
  border: 0; background: transparent; text-align: left;
  font-family: var(--sans); font-weight: 700; font-size: 12.5px; color: var(--navy);
}
.faq__q:hover { background: var(--cream); }
.faq__icon { position: relative; width: 10px; height: 10px; flex-shrink: 0; }
.faq__icon::before, .faq__icon::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  background: var(--navy); transform: translate(-50%, -50%); transition: transform .2s;
}
.faq__icon::before { width: 9px; height: 1.6px; }
.faq__icon::after { width: 1.6px; height: 9px; }
.faq__q[aria-expanded="true"] .faq__icon::after { transform: translate(-50%, -50%) scaleY(0); }
.faq__a { padding: 0 10px 12px calc(var(--card-pad) - 1px); font-family: var(--sans); font-size: 13px; line-height: 1.55; color: var(--ink); }

/* =========================================================
   AWARDS
   ========================================================= */
.awards__list { display: grid; grid-template-columns: repeat(7, 1fr); gap: 28px; }
.awards__list li {
  position: relative;
  aspect-ratio: 1 / 0.88;
  border: 1px solid var(--line);
  background: #fff; overflow: hidden;
}
.awards__list img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer { padding-top: var(--section-gap); padding-bottom: 20px; }
.footer__bar {
  background: var(--navy-footer); color: #fff;
  padding: 16px var(--gutter) 16px var(--card-pad);
  font-family: var(--sans); font-size: 13px; line-height: 1.55;
}
.footer__links {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 32px;
  padding-top: 18px;
  font-family: var(--sans); font-size: 13px; color: var(--ink);
}
.footer__links a:hover { color: var(--navy); text-decoration: underline; }

/* =========================================================
   ≤1199 — small desktop
   ========================================================= */
@media (max-width: 1199px) {
  :root { --card-end: 16px; --btn-w: 220px; --btn-gap: 40px; }
  .logo__text { font-size: 23px; }
  .header-info { gap: 24px; }
  .offices { gap: 24px; }
  .main-nav a { padding: 6px 11px; font-size: 14px; }
  .search { flex-basis: 240px; }
  .awards__list { gap: 16px; }
  .testimonial { padding-right: 24px; }
}

/* =========================================================
   ≤1023 — TABLET
   ========================================================= */
@media (max-width: 1023px) {
  :root { --section-gap: 40px; --gutter: 24px; --card-end: 0px; }

  .site-header { top: 0; box-shadow: 0 1px 0 var(--line-soft); }
  .header-top { min-height: 64px; padding-top: 10px; padding-bottom: 10px; }
  .header-info, .navbar { display: none; }
  .header-aside__row .social, .offices { display: none; }
  .burger { display: inline-flex; margin-left: 4px; margin-right: -10px; }
  .logo__mark { width: 40px; height: 40px; }

  .hero__frame { min-height: 420px; }
  .hero__veil {
    background: linear-gradient(90deg, rgba(255,255,255,.9) 0%, rgba(255,255,255,.75) 50%, rgba(255,255,255,.2) 100%);
  }

  .practice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .practice { min-height: 56px; }

  /* cards → scroll-snap carousel, first card on the card line */
  .cards {
    display: flex; gap: 20px;
    overflow-x: auto; scroll-snap-type: x mandatory;
    padding: 2px var(--gutter) 8px var(--card-line);
    scroll-padding-left: var(--card-line);
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .cards::-webkit-scrollbar { display: none; }
  .card { flex: 0 0 calc((100% - var(--card-line) - 20px) / 2.15); margin: 0; scroll-snap-align: start; }
  .section-head { padding-right: var(--gutter); }

  .carousel-dots { display: flex; justify-content: center; gap: 8px; padding-top: 12px; }
  .carousel-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: var(--line); transition: background-color .2s, width .2s; }
  .carousel-dots button.is-active { background: var(--navy); width: 22px; border-radius: 4px; }

  /* testimonial + FAQ stacked, each keeps its lines */
  .split__grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "tt" "tb" "ft" "fl";
  }
  .testimonial { margin-right: 0; min-height: 160px; }
  .testimonial.has-nav { padding-bottom: 56px; }   /* room for arrows only when there are 2+ reviews */
  .split__f-title { margin-top: 40px; }

  /* FAQ list spans the same outer lines as the testimonial box,
     question/answer text starts on the text line (same as the titles and the quote) */
  .faq__list { margin-left: 0; }
  .faq__q, .faq__a { padding-left: calc(var(--inset) - 1px); }

  .awards__list { grid-template-columns: repeat(8, 1fr); gap: 16px; }
  .awards__list li { grid-column: span 2; }
  .awards__list li:nth-child(5) { grid-column: 2 / span 2; }
}

/* =========================================================
   <768 — MOBILE
   ========================================================= */
@media (max-width: 767px) {
  :root {
    --section-gap: 36px; --gutter: 16px;
    --pad: 12px; --icon: 24px; --icon-gap: 12px;   /* text line = 48px */
    --card-pad: 12px;
  }
  body { font-size: 15px; }

  .logo__text { font-size: 19px; }
  .logo__mark { width: 34px; height: 34px; }
  .logo { gap: 8px; }
  .lang { gap: 3px; }
  .lang__item { min-width: 30px; height: 30px; }

  .hero__frame { min-height: 0; align-items: flex-end; }
  .hero__slide img { object-position: 78% center; }
  .hero__veil { background: linear-gradient(180deg, rgba(255,255,255,.9) 0%, rgba(255,255,255,.82) 65%, rgba(255,255,255,.45) 100%); }
  .hero__content { padding: 28px var(--gutter) 56px var(--inset); }
  .hero__tagline { font-size: 13px; gap: 4px 18px; margin-bottom: 10px; }
  .hero__title { font-size: 29px; }
  .hero__text { font-size: 15px; }
  .br-lg { display: none; }
  .hero__actions { grid-template-columns: minmax(0, 1fr); margin-top: 24px; }
  .btn { height: 52px; }

  .section-title { font-size: 25px; margin-bottom: 14px; }
  .section-head { flex-wrap: wrap; column-gap: 16px; padding-right: var(--card-pad); }
  .section-head .link-all { padding-left: var(--inset); margin: -6px 0 14px; }

  .practice-grid { grid-template-columns: minmax(0, 1fr); }
  .practice { min-height: 52px; }
  .practice-grid:not(.is-expanded) li:nth-child(n + 9) { display: none; }
  .practice-toggle {
    display: flex; align-items: center; justify-content: center;
    width: 100%; height: 48px; margin-top: 12px;
    border: 1.5px solid var(--navy); background: #fff;
    font-family: var(--serif); font-weight: 700; font-size: 15px; color: var(--navy);
  }
  .practice-toggle:hover { background: var(--cream); }

  .cards { gap: 12px; padding-right: var(--card-line); }
  .card { flex-basis: 84%; }
  .card__title { font-size: 16px; }
  .card__text { font-size: 13px; }

  .testimonial { padding: 24px 18px 24px var(--inset); }
  .testimonial.has-nav { padding-bottom: 56px; }
  .testimonial__item p { font-size: 17px; }
  .faq__q { min-height: 52px; font-size: 14px; }
  .faq__a { font-size: 14px; }

  .awards__list {
    display: flex; gap: 12px;
    overflow-x: auto; scroll-snap-type: x mandatory;
    padding-bottom: 8px;
    scrollbar-width: none;
  }
  .awards__list::-webkit-scrollbar { display: none; }
  .awards__list li, .awards__list li:nth-child(5) { flex: 0 0 132px; scroll-snap-align: start; }

  .footer__bar { font-size: 12px; }
}

@media (max-width: 359px) {
  .logo__text { font-size: 17px; }
  .lang__item:not(.is-active) { display: none; }
}

/* =========================================================
   WORDPRESS INTEGRATION (main-page-v2.php)
   Menu comes from wp_nav_menu() and has sub-menus.
   ========================================================= */
.main-nav > ul > li { position: relative; }
.main-nav li.current-menu-item > a,
.main-nav li.current-menu-ancestor > a { color: var(--olive); }

/* dropdowns */
.main-nav .sub-menu {
  display: none;
  position: absolute; top: 100%; left: 0; z-index: 60;
  min-width: 240px;
  flex-direction: column;
  padding: 6px 0;
  background: var(--graphite);
  box-shadow: 0 8px 24px rgba(0, 20, 40, .18);
}
.main-nav .sub-menu .sub-menu { top: -6px; left: 100%; }
.main-nav li:hover > .sub-menu,
.main-nav li:focus-within > .sub-menu { display: flex; }
.main-nav .sub-menu li + li { border-left: 0; }
.main-nav .sub-menu a { padding: 8px 16px; font-size: 14px; font-weight: 400; white-space: normal; }
.main-nav .menu-item-has-children > a::after {
  content: ""; display: inline-block; margin-left: 6px; vertical-align: 3px;
  border: 4px solid transparent; border-top-color: currentColor; border-bottom: 0;
}
.main-nav .sub-menu .menu-item-has-children > a::after { transform: rotate(-90deg); vertical-align: 1px; }

/* drawer: nested menu, sub-items indented */
.drawer__nav ul { display: flex; flex-direction: column; }
.drawer__nav a { display: block; }
.drawer__nav .sub-menu a { padding: 10px 0 10px 16px; font-size: 15px; font-weight: 400; }
.drawer__nav .sub-menu .sub-menu a { padding-left: 32px; }

/* admin bar (logged-in users) */
.admin-bar .drawer { top: 46px; }
@media (min-width: 783px) { .admin-bar .drawer { top: 32px; } }

/* keep plugin/global styles from leaking into the new layout */
body.ap2 { margin: 0; }
.ap2 .faq__a p + p { margin-top: 10px; }
.ap2 .faq__a a { text-decoration: underline; }
