/* ═══════════════════════════════════════════════════════════════════
   ADM DEVELOPER — FOOTER
   Multi-column footer with offices, links, awards, newsletter
   ═══════════════════════════════════════════════════════════════════ */

.site-footer {
  background: var(--color-surface-1);
  border-top: 1px solid var(--color-border);
  position: relative;
  overflow: hidden;
}

/* Subtle brand gradient at top edge */
.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-brand), transparent);
}


/* ══════════════════════════════
   FOOTER AWARDS MARQUEE (top band)
   ══════════════════════════════ */

.footer-awards {
  padding: var(--space-8) 0;
  border-bottom: 1px solid var(--color-border);
}

.footer-awards__title {
  text-align: center;
  font-size: var(--font-size-2xs);
  font-family: var(--font-mono);
  color: var(--color-text-muted);
  letter-spacing: var(--letter-spacing-wider);
  text-transform: uppercase;
  margin-bottom: var(--space-6);
}

.footer-award-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-5);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  flex-shrink: 0;
  min-width: 160px;
}

.footer-award-item img {
  height: 64px;
  width: auto;
  /* Award badges are monochrome — flatten every one to a single colour so the set is uniform
     and fully visible on the footer surface: solid ink in light mode, solid white in dark. */
  filter: brightness(0);
}
[data-theme="dark"] .footer-award-item img {
  filter: brightness(0) invert(1);
}

.footer-award-item__text {
  font-size: var(--font-size-xs);
  font-family: var(--font-mono);
  font-weight: var(--font-weight-medium);
  color: var(--color-brand);
  letter-spacing: var(--letter-spacing-wider);
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
}


/* ══════════════════════════════
   FOOTER MAIN GRID
   ══════════════════════════════ */

.footer-main {
  padding: var(--space-16) 0 var(--space-12);
}

/* Brand plus four equal link columns — Services, Industries, Training, Company.
   The offices used to be a fifth column, which made them a narrow vertical stack
   of three addresses alongside the links. They now sit on their own full-width
   row underneath, laid out side by side, so each address has room to breathe and
   the link columns get the width back. */
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(var(--footer-cols, 4), 1fr);
  gap: var(--space-10);
}

.footer-contact {
  grid-column: 1 / -1;
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-8);
}


/* ══════════════════════════════
   FOOTER — BRAND COLUMN
   ══════════════════════════════ */

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.footer-brand__logo img,
.footer-brand__logo svg {
  height: 32px;
  width: auto;
}

.footer-brand__motto {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-medium, 500);
  color: var(--color-text);
  line-height: 1.2;
  margin: 0 0 var(--space-2);
  letter-spacing: -0.01em;
}
.footer-brand__tagline {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
}

.footer-social {
  display: flex;
  gap: var(--space-2);
}

.footer-social__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-secondary);
  font-size: 16px;
  transition: all var(--duration-fast) ease;
}

.footer-social__link:hover {
  border-color: var(--color-border-brand);
  color: var(--color-brand);
  background: var(--color-brand-dim);
}


/* ══════════════════════════════
   FOOTER — LINK COLUMNS
   ══════════════════════════════ */

.footer-links__title {
  font-size: var(--font-size-2xs);
  font-family: var(--font-mono);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-muted);
  letter-spacing: var(--letter-spacing-wider);
  text-transform: uppercase;
  margin-bottom: var(--space-5);
}

.footer-links__title a {
  color: inherit;
  transition: color var(--duration-fast) ease;
}

.footer-links__title a:hover {
  color: var(--color-brand);
}

.footer-links ul,
.footer-links .menu {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li a {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0% 0.75px;
  transition: color var(--duration-fast) ease, background-size 0.35s var(--ease-out);
}

.footer-links li a:hover {
  color: var(--color-brand);
  background-size: 100% 0.75px;
}


/* ══════════════════════════════
   FOOTER — OFFICE COLUMN / NEWSLETTER
   ══════════════════════════════ */

/* Offices across a row rather than down a column. auto-fit keeps it sensible at
   any count — three on UK, however many UAE carries — and collapses to fewer per
   row as the width drops instead of squeezing them. */
.footer-contact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-8);
}

.footer-office {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer-office__city {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.footer-office__city i {
  color: var(--color-brand);
  font-size: 14px;
}

.footer-office__address {
  font-size: var(--font-size-xs);
  font-style: normal;
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
}

.footer-office__address a {
  color: var(--color-text-secondary);
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0% 0.75px;
  transition: color var(--duration-fast) ease, background-size 0.35s var(--ease-out);
}

.footer-office__address a:hover {
  color: var(--color-brand);
  background-size: 100% 0.75px;
}

/* Newsletter form */
.footer-newsletter__title {
  font-size: var(--font-size-2xs);
  font-family: var(--font-mono);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-muted);
  letter-spacing: var(--letter-spacing-wider);
  text-transform: uppercase;
  margin-bottom: var(--space-3);
}

.footer-newsletter__form {
  display: flex;
  gap: var(--space-2);
}

.footer-newsletter__input {
  flex: 1;
  padding: 0.6rem 0.75rem;
  font-size: var(--font-size-xs);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  outline: none;
  transition: border-color var(--duration-fast) ease;
}

.footer-newsletter__input:focus {
  border-color: rgba(var(--color-brand-rgb), 0.5);
}

.footer-newsletter__input::placeholder {
  color: var(--color-text-muted);
}

.footer-newsletter__btn {
  padding: 0.6rem 1rem;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  background: var(--color-brand);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--duration-fast) ease;
  white-space: nowrap;
}

.footer-newsletter__btn:hover {
  background: var(--color-brand-hover);
}


/* ══════════════════════════════
   FOOTER — BOTTOM BAR
   ══════════════════════════════ */

.footer-bottom {
  padding: var(--space-5) 0;
  border-top: 1px solid var(--color-border);
}

.footer-bottom .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.footer-copyright {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.footer-bottom-links {
  display: flex;
  align-items: center; /* stop the taller theme-toggle stretching the links (which floated the hover underline far below the text) */
  gap: var(--space-6);
}

.footer-bottom-links a {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0% 0.75px;
  transition: color var(--duration-fast) ease, background-size 0.35s var(--ease-out);
}

.footer-bottom-links a:hover {
  color: var(--color-brand);
  background-size: 100% 0.75px;
}

/* Brand dot separator */
.footer-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-brand);
  flex-shrink: 0;
  opacity: 0.5;
}

/* ══════════════════════════════
   ADM Control — footer layout variants (driven by body class)
   ══════════════════════════════ */
/* Simple: drop the awards marquee + contact column, keep brand + link columns */
.adm-footer-simple .footer-awards,
.adm-footer-simple .footer-contact { display: none; }
.adm-footer-simple .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; }
/* Minimal: a single row — brand + socials only */
.adm-footer-minimal .footer-awards,
.adm-footer-minimal .footer-links,
.adm-footer-minimal .footer-contact { display: none; }
.adm-footer-minimal .footer-grid { display: flex; align-items: center; justify-content: space-between; gap: var(--space-6); }
.adm-footer-minimal .footer-brand { display: flex; align-items: center; gap: var(--space-6); margin: 0; }
.adm-footer-minimal .footer-brand__tagline { display: none; }
@media (max-width: 640px) {
  .adm-footer-minimal .footer-grid { flex-direction: column; text-align: center; }
}

/* Phone: the footer grid still ran two columns here, which left the office addresses crammed into a
   narrow left cell with an empty half beside them while the sibling columns centred — the addresses
   looked misaligned rather than intentionally left. One column, centred to match everything else.
   Same treatment landing.css already applies to .adm-lp footers. */
@media (max-width: 560px) {
  /* .site-footer prefix is load-order insurance: responsive.css loads after this file and sets
     .footer-grid to two columns at 768px, which at equal specificity would win and leave the
     addresses in a narrow left column. */
  .site-footer .footer-grid { grid-template-columns: 1fr; }
  .site-footer .footer-brand { grid-column: auto; }
  .footer-contact, .footer-office, .footer-office__address { text-align: center; }
  .footer-office__city { justify-content: center; }
  .footer-office__contact a { margin-left: auto; margin-right: auto; }
}

/* ── Built award laurel badge (footer marquee + event pages) ────────────────────────────
   Composed from: stars + the theme's laurel pair + the event-year logo (mono) + category.
   No laurel images are uploaded; the one colour logo is filtered black (light) / white (dark). */
.adm-wreath { display: inline-flex; flex: 0 0 auto; width: max-content; flex-direction: column; align-items: center; justify-content: center; gap: 0; padding: var(--space-5) var(--space-6); background: var(--color-surface-2); border: 1px solid var(--color-border); border-radius: var(--radius-md); color: var(--color-text); }
.adm-wreath__stars { font-size: 15px; letter-spacing: 4px; line-height: 1; color: currentColor; opacity: .85; }
.adm-wreath__core { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 6px; }
/* Override the 16px hero .adm-laurel sizing for the larger footer wreath. */
.adm-wreath__core .adm-laurel { width: 38px; height: 92px; color: currentColor; flex: 0 0 auto; }
.adm-wreath__logo { display: inline-flex; align-items: center; justify-content: center; min-width: 104px; max-width: 156px; padding: 0 4px; }
.adm-wreath__logo img { max-height: 66px; max-width: 100%; width: auto; height: auto; object-fit: contain; display: block; filter: brightness(0); }
[data-theme="dark"] .adm-wreath__logo img { filter: brightness(0) invert(1); }
.adm-wreath__result { font-family: var(--font-mono); font-size: 11px; font-weight: var(--font-weight-medium); text-transform: uppercase; letter-spacing: .1em; color: var(--color-brand); text-align: center; max-width: 230px; line-height: 1.4; margin-top: 8px; }

.footer-awards .magic-marquee__track { align-items: center; gap: var(--space-8); }

/* Light/dark toggle relocated into the footer bottom bar (stakeholder request 2026-07) */
/* Light/dark control as a sliding toggle switch (pill track + knob), not a plain button. */
.footer-bottom .footer-theme-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 54px;
  height: 28px;
  padding: 0 7px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface-2);
  cursor: pointer;
  transition: background var(--duration-fast) ease, border-color var(--duration-fast) ease;
}
.footer-bottom .footer-theme-toggle:hover { border-color: var(--color-border-brand); }
/* Both icons always visible at the ends (override the single-icon nav rules). */
html[data-theme] .footer-theme-toggle .icon-sun,
html[data-theme] .footer-theme-toggle .icon-moon {
  display: inline-flex;
  position: relative;
  z-index: 1;
  width: 12px;
  height: 12px;
  color: var(--color-text-muted);
  transition: color var(--duration-fast) ease;
}
.footer-theme-toggle .icon-sun svg,
.footer-theme-toggle .icon-moon svg { width: 12px; height: 12px; }
/* Sliding knob */
.footer-theme-toggle__knob {
  position: absolute;
  top: 50%;
  left: 3px;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .28);
  transition: transform var(--duration-base) var(--ease-spring), background var(--duration-fast) ease;
}
html[data-theme="dark"] .footer-bottom .footer-theme-toggle { background: rgba(255, 255, 255, .14); }
html[data-theme="dark"] .footer-theme-toggle__knob { transform: translateY(-50%) translateX(26px); background: var(--color-brand); }
/* Highlight the icon for the active mode */
html[data-theme="light"] .footer-theme-toggle .icon-sun { color: var(--color-brand); }
html[data-theme="dark"] .footer-theme-toggle .icon-moon { color: #fff; }

/* Per-office phone/email under each footer address */
.footer-office__contact { display: block; margin-top: var(--space-2); }
/* fit-content so the hover underline hugs the text, not the full column width */
.footer-office__contact a { display: block; width: fit-content; max-width: 100%; }

/* ── Phone: link lists in two columns ───────────────────────────────────────────────────────────────
   With the footer grid collapsed to one column, each list ran as a single tall stack — Industries alone
   is 12 items, so the footer became an endless scroll of one-word rows with a whole screen of dead space
   beside them. The headings stay full width; only the lists split, so the grouping still reads. */
@media (max-width: 560px) {
  .site-footer .footer-links ul,
  .site-footer .footer-links .menu {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-3) var(--space-5);
    align-content: start;
  }
  /* 10px uppercase mono is too small to scan on a phone; these are navigation labels, not fine print. */
  .site-footer .footer-links__title { font-size: var(--font-size-xs); margin-bottom: var(--space-4); }
}

/* ── Phone/tablet: centre the footer ────────────────────────────────────────────────────────────────
   The footer is rendered by footer.php, outside the Page Blocks system, so the per-section "Centre
   content on mobile" toggle cannot reach it — without this the page centres all the way down and then
   the footer alone reverts to left, which reads as a bug rather than a choice.

   Matches the 860px breakpoint the block centring uses so the two never disagree at any width. The
   two-column link lists from the rule above are kept; only their contents centre. */
@media (max-width: 860px) {
  .site-footer,
  .site-footer * { text-align: center; }
  /* Flex rows need justify-content — text-align cannot move a flex item. */
  .site-footer .footer-social,
  .site-footer .footer-brand,
  .site-footer .footer-office__city,
  .site-footer .footer-legal,
  .site-footer .footer-bottom { justify-content: center; }
  /* The brand block is a column stack; centre its items rather than stretching them. */
  .site-footer .footer-brand { align-items: center; }
  /* Logo and any inline-block badge centre as boxes. */
  .site-footer .footer-logo,
  .site-footer .footer-brand__logo { margin-left: auto; margin-right: auto; }
  /* Addresses read as blocks of their own; centre the block, keep the lines together. */
  .site-footer .footer-office__address { margin-left: auto; margin-right: auto; }
}
