/* =========================================
   Site Header
========================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1100;
  background-color: var(--surface-footer);
  font-family: var(--font-family-ui);
  border-bottom: 1px solid rgba(14, 22, 51, 0.06);
}

.site-header__main {
  background: var(--surface-footer);
  border-bottom: 1px solid rgba(14, 22, 51, 0.06);
}

/* allow dropdowns to escape cleanly */
.site-header,
.site-header .container,
.site-header .navbar,
.site-header .navbar-collapse,
.site-header .dropdown,
.site-header .dropdown-menu {
  overflow: visible;
}

.site-header .navbar {
  --bs-navbar-padding-y: 0;
  --bs-navbar-brand-padding-y: 0;
  padding: 0;
}

.site-header .navbar,
.site-header .navbar-brand,
.site-header .navbar-nav,
.site-header .nav-item,
.site-header .nav-link {
  margin: 0;
}

.site-header .navbar-brand,
.site-header .navbar-nav {
  padding: 0;
}

.site-header .nav-link {
  padding: 0;
  border: 0;
  background: transparent;
}

/* =========================================
   Utility Bar
========================================= */

.site-header__utility-bar {
  background: var(--surface-footer);
  border-bottom: 1px solid rgba(14, 22, 51, 0.08);
}

.site-header__utility-inner {
  min-height: calc(var(--space-lg) + var(--space-xs));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.site-header__hello {
  width: 100%;
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-family: var(--font-family-ui);
  font-size: var(--font-size-body-sm);
  line-height: var(--line-height-body-sm);
  font-weight: var(--font-weight-medium);
  letter-spacing: 0;
}

.site-header__hello a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.22s ease;
}

.site-header__hello a:hover,
.site-header__hello a:focus-visible {
  color: var(--brand-blue);
  text-decoration: none;
}

/* =========================================
   Main Header Row
========================================= */

.site-header__nav {
  padding-top: var(--space-sm);
  padding-bottom: var(--space-sm);
}

.site-header__nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  column-gap: var(--space-2xl);
  min-height: calc(var(--space-3xl) + var(--space-xs));
}

.site-header__brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.site-header__brand-logo {
  display: block;
  max-width: clamp(10.5rem, 10rem + 2vw, 11.875rem);
  max-height: clamp(2rem, 1.9rem + 0.35vw, 2.5rem);
  width: auto;
  height: auto;
}

.site-header .navbar-toggler {
  display: none;
}

/* =========================================
   Layout
========================================= */

.site-header .navbar-collapse {
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2xl);
  min-width: 0;
}

.site-header__nav-wrap {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  min-width: 0;
}

/* =========================================
   Global Header Link Reset
========================================= */

.site-header a,
.site-header .nav-link,
.site-header .dropdown-toggle {
  text-decoration: none;
  color: inherit;
}

.site-header a:hover,
.site-header a:focus,
.site-header .nav-link:hover,
.site-header .nav-link:focus {
  text-decoration: none;
}

/* =========================================
   Shared animated underline system
========================================= */

.site-header__nav-link,
.site-header__dropdown-heading-link,
.site-header__dropdown-link {
  position: relative;
  text-decoration: none;
}

/* Primary nav underline uses ::before so caret can stay on ::after */
.site-header__nav-link::before {
  content: "";
  position: absolute;
  left: var(--space-md);
  right: var(--space-md);
  bottom: 18px;
  height: 2px;
  background: var(--brand-blue);
  border-radius: 999px;
  opacity: 0;
  transform: scaleX(0.6);
  transform-origin: center;
  transition:
    transform 0.24s ease,
    opacity 0.2s ease;
  pointer-events: none;
}

.site-header__nav-link:hover::before,
.site-header__nav-link:focus-visible::before,
.site-header__nav-link[aria-expanded="true"]::before,
.site-header .nav-item.show > .site-header__nav-link::before,
.site-header .nav-item:hover > .site-header__nav-link::before,
.site-header .nav-item:focus-within > .site-header__nav-link::before {
  opacity: 1;
  transform: scaleX(1);
}

/* Secondary nav underline */
.site-header__dropdown-heading-link::after,
.site-header__dropdown-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--brand-blue);
  border-radius: 999px;
  opacity: 0;
  transform: scaleX(0.6);
  transform-origin: left center;
  transition:
    transform 0.24s ease,
    opacity 0.2s ease;
  pointer-events: none;
}

.site-header__dropdown-heading-link:hover::after,
.site-header__dropdown-heading-link:focus-visible::after,
.site-header__dropdown-link:hover::after,
.site-header__dropdown-link:focus-visible::after {
  opacity: 1;
  transform: scaleX(1);
}

/* =========================================
   Primary Navigation
========================================= */

.site-header__nav-list {
  display: flex;
  align-items: stretch;
  width: 100%;
  height: 84px;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0;
  font-weight: var(--font-weight-semibold);
}

.site-header__nav-list > .nav-item {
  display: flex;
  align-items: stretch;
  position: static;
  margin: 0;
  padding: 0;
}

.site-header__nav-list > .nav-item > .site-header__nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  height: 100%;
  min-height: 0;
  padding: 0 var(--space-md);
  font-family: var(--font-family-ui);
  font-size: var(--font-size-label-lg);
  line-height: 1;
  font-weight: var(--font-weight-semibold);
  letter-spacing: -0.01em;
  white-space: nowrap;
  color: var(--text) !important;
  background: transparent;
  border: 0;
  appearance: none;
  -webkit-appearance: none;
  transition: color 0.22s ease;
}

.site-header .dropdown-toggle {
  background-image: none !important;
}

.site-header .dropdown-toggle.nav-link {
  padding-right: 0;
}

/* Custom caret retained for dropdown items */
.site-header__nav-link.dropdown-toggle::after,
.nav-link.dropdown-toggle.site-header__nav-link::after {
  display: inline-block;
  content: "";
  width: 7px;
  height: 7px;
  margin-left: 6px;
  vertical-align: middle;
  border-right: 1.8px solid currentColor;
  border-bottom: 1.8px solid currentColor;
  border-top: 0;
  border-left: 0;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.2s ease;
}

.site-header .nav-item.dropdown:hover > .site-header__nav-link.dropdown-toggle::after,
.site-header .nav-item.dropdown:focus-within > .site-header__nav-link.dropdown-toggle::after,
.site-header .nav-item.show > .site-header__nav-link.dropdown-toggle::after,
.site-header__nav-link.dropdown-toggle[aria-expanded="true"]::after {
  transform: translateY(1px) rotate(225deg);
}

.site-header__nav-link:hover,
.site-header__nav-link:focus,
.site-header__nav-link:focus-visible,
.site-header .nav-item.show > .site-header__nav-link,
.site-header__nav-link[aria-expanded="true"] {
  color: var(--brand-blue) !important;
  text-decoration: none;
}

.site-header__nav-link:focus-visible {
  outline: none;
}

/* =========================================
   Mega Menu Panel
========================================= */

.site-header__dropdown-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 1200;
  width: 100%;
  min-width: 15rem;
  padding: var(--space-lg) 0;
  margin-top: 0;
  background: #ffffff;
  border: 0;
  border-top: 1px solid rgba(14, 22, 51, 0.06);
  border-radius: 0;
  box-shadow: 0 12px 30px rgba(14, 22, 51, 0.08);
  display: block;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    visibility 0.18s ease;
}

/* Desktop hover-open */
@media (min-width: 992px) {
  .site-header .nav-item.dropdown {
    position: static;
  }

  .site-header .nav-item.dropdown::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 12px;
  }

  .site-header .nav-item.dropdown:hover > .site-header__dropdown-menu,
  .site-header .nav-item.dropdown:focus-within > .site-header__dropdown-menu,
  .site-header .nav-item.show > .site-header__dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }
}

/* =========================================
   Mega Menu Headings
========================================= */

.site-header__dropdown-heading {
  margin: 0 0 var(--space-sm);
  font-family: var(--font-family-ui);
  font-size: var(--font-size-label-sm);
  line-height: var(--line-height-label-sm);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.site-header__dropdown-heading-link {
  display: inline-block;
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-header__dropdown-heading-link::after {
  bottom: -1px;
}

.site-header__dropdown-heading-link:hover,
.site-header__dropdown-heading-link:focus,
.site-header__dropdown-heading-link:focus-visible {
  color: var(--brand-blue);
  text-decoration: none;
  outline: none;
}

/* =========================================
   Mega Menu Lists
========================================= */

.site-header__dropdown-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-header__dropdown-list li {
  margin: 0;
  padding: 0;
}

/* =========================================
   Mega Menu Links
========================================= */

.site-header__dropdown-link {
  display: inline-block;
  padding: var(--space-2xs) 0;
  font-family: var(--font-family-ui);
  font-size: var(--font-size-body-sm);
  line-height: var(--line-height-body-sm);
  font-weight: var(--font-weight-regular);
  letter-spacing: -0.01em;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-header__dropdown-link::after {
  bottom: 0;
}

.site-header__dropdown-link:hover,
.site-header__dropdown-link:focus,
.site-header__dropdown-link:focus-visible {
  color: var(--brand-blue);
  text-decoration: none;
  outline: none;
}

/* =========================================
   Search
========================================= */

.site-header__search {
  flex: 0 0 clamp(16rem, 14rem + 8vw, 20rem);
  width: clamp(16rem, 14rem + 8vw, 20rem);
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.site-header__search .input-group {
  display: flex;
  align-items: center;
  width: 100%;
}

.site-header__search-input {
  height: clamp(2.375rem, 2.25rem + 0.3vw, 2.5rem);
  padding-inline: var(--space-sm);
  border: 1px solid #d1d5db;
  border-radius: 0;
  background: #ffffff;
  color: var(--text);
  font-family: var(--font-family-ui);
  font-size: var(--font-size-body-sm);
  line-height: var(--line-height-body-sm);
  box-shadow: none;
}

.site-header__search-input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.site-header__search-input:focus {
  border-color: var(--brand-blue);
  box-shadow: none;
  outline: none;
}

.site-header__search-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(2.5rem, 2.35rem + 0.25vw, 2.625rem);
  height: clamp(2.375rem, 2.25rem + 0.3vw, 2.5rem);
  border: 1px solid #d1d5db;
  border-left: 0;
  border-radius: 0;
  background: #ffffff;
  color: var(--muted);
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background-color 0.2s ease;
}

.site-header__search-button:hover,
.site-header__search-button:focus-visible {
  color: var(--brand-blue);
  border-color: var(--brand-blue);
  background: #ffffff;
  outline: none;
}

/* =========================================
   Mobile
========================================= */

@media (max-width: 991.98px) {
  .site-header__nav {
    padding-top: var(--space-xs);
    padding-bottom: var(--space-xs);
  }

  .site-header__nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    column-gap: var(--space-md);
    min-height: clamp(3rem, 2.85rem + 0.5vw, 3.5rem);
  }

  .site-header__brand-logo {
    max-width: clamp(9.5rem, 9rem + 2vw, 10.625rem);
    max-height: clamp(1.875rem, 1.8rem + 0.3vw, 2.25rem);
  }

  .site-header .navbar-toggler {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .site-header .navbar-toggler:focus {
    box-shadow: none;
    outline: none;
  }

  .site-header .navbar-collapse {
    display: none !important;
    width: 100%;
    padding-top: var(--space-xs);
  }

  .site-header .navbar-collapse.show {
    display: block !important;
  }

  .site-header__nav-wrap {
    width: 100%;
    display: block;
  }

  .site-header__nav-list {
    flex-direction: column;
    align-items: stretch;
    height: auto;
    width: 100%;
  }

  .site-header__nav-list .nav-item {
    display: block;
    width: 100%;
    border-top: 1px solid rgba(14, 22, 51, 0.06);
    position: relative;
  }

  .site-header__nav-list > .nav-item > .site-header__nav-link {
    width: 100%;
    min-height: clamp(3rem, 2.9rem + 0.25vw, 3.25rem);
    height: auto;
    justify-content: space-between;
    padding: 14px 0;
  }

  .site-header__nav-list > .nav-item > .site-header__nav-link::before {
    left: 0;
    right: 0;
    bottom: 8px;
  }

  .site-header__dropdown-menu {
    position: static !important;
    min-width: 0;
    width: 100%;
    padding: var(--space-xs) 0 var(--space-sm);
    box-shadow: none;
    border-top: 0;
    background: transparent;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    display: none;
  }

  .site-header .nav-item.show > .site-header__dropdown-menu {
    display: block;
  }

  .site-header__dropdown-heading {
    margin: var(--space-xs) 0 var(--space-xs);
  }

  .site-header__dropdown-link {
    padding: var(--space-xs) 0;
  }

  .site-header__search {
    width: 100%;
    margin-top: var(--space-sm);
    flex: 0 0 auto;
  }

  .site-header__search .input-group {
    width: 100%;
  }
}

/* =========================================
   Breadcrumbs
========================================= */

.site-header__breadcrumbs {
  padding-top: var(--space-xs);
  padding-bottom: var(--space-sm);
  border-top: 1px solid #f1f3f5;
  background: var(--surface-footer);
}

.site-header__breadcrumbs .breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  margin: 0;
  padding: 0;
  background: transparent;
  font-family: var(--font-family-ui);
  font-size: var(--font-size-label-sm);
  line-height: var(--line-height-label-sm);
}

.site-header__breadcrumbs .breadcrumb-item {
  display: inline-flex;
  align-items: center;
  line-height: var(--line-height-label-sm);
  color: var(--muted);
}

.site-header__breadcrumbs .breadcrumb-item a {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-header__breadcrumbs .breadcrumb-item a:hover,
.site-header__breadcrumbs .breadcrumb-item a:focus-visible {
  color: var(--brand-blue);
  text-decoration: none;
}

.site-header__breadcrumbs .breadcrumb-item.active {
  color: var(--text);
  font-weight: var(--font-weight-medium);
}

.site-header__breadcrumbs .breadcrumb-item + .breadcrumb-item {
  padding-left: 0;
}

.site-header__breadcrumbs .breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  float: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--space-xs);
  color: var(--muted);
  line-height: 1;
}
/* =========================================
   Horizontal Ticker (Reusable)
========================================= */

.ticker-container {
  overflow: hidden;
  width: 100%;
  position: relative;
}

.ticker-track {
  display: flex;
  gap: 24px;
  width: max-content;
  animation: ticker-scroll 40s linear infinite;
}

.ticker-track > * {
  flex: 0 0 auto;
}

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.ticker-container:hover .ticker-track {
  animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track {
    animation: none;
  }
}
/* =========================================
   Footer Badges (Premium Ticker)
========================================= */

.footer-badges {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: 32px 0;
}

.badge-ticker {
  overflow: hidden;
  position: relative;
}

.footer-badge-img {
  height: 48px;
  margin: 0 32px;
  opacity: 0.7;
  filter: grayscale(100%);
  transition: all 0.3s ease;
}

.footer-badge-img:hover {
  opacity: 0.85;
  filter: grayscale(0%);
  transform: translateY(-2px);
}

@keyframes footerTickerScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.badge-ticker:hover .ticker-track {
  animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track {
    animation: none;
  }
}

/* =========================================
   Footer Core
========================================= */

.site-footer {
  background: #f3f4f6;
  padding: 56px 0 28px;
  color: var(--text);
}

.footer-top {
  align-items: flex-start;
  margin-bottom: 24px;
}

.footer-links h6 {
  font-family: var(--font-family-heading);
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-label-lg);
  line-height: 1.35;
  margin-bottom: var(--space-sm);
  color: var(--text);
  letter-spacing: -0.01em;
}

.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  position: relative;
  color: var(--muted);
  text-decoration: none;
  font-size: var(--font-size-body-sm);
  line-height: var(--line-height-body-sm);
  transition: color 0.25s ease;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--text);
}

.footer-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 2px;
  background: var(--brand-blue);
  transition: width 0.25s ease;
}

.footer-links a:hover::after,
.footer-links a:focus-visible::after {
  width: 100%;
}

.footer-divider {
  border: none;
  border-top: 1px solid #dde3ea;
  margin: 28px 0 22px;
}

.footer-bottom {
  align-items: center;
}

.footer-copy {
  font-size: var(--font-size-body-sm);
  line-height: var(--line-height-body-sm);
  color: var(--muted);
  margin: 0;
}

/* =========================================
   Footer Accreditations
========================================= */

.footer-accreditations {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
}

.footer-accreditations-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  margin-left: auto;
}

.footer-accreditations-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 14px;
  flex-wrap: nowrap;
}

.footer-accreditations-separator {
  width: 100%;
  max-width: 220px;
}

.footer-accreditation {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
}

.footer-accreditation-box {
  width: 84px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  background: transparent;
  border-radius: 8px;
  transition:
    box-shadow 0.25s ease,
    transform 0.25s ease,
    background 0.25s ease;
}

.footer-accreditation:hover .footer-accreditation-box {
  transform: translateY(-2px);
}

.footer-accreditation:active .footer-accreditation-box {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(14, 22, 51, 0.08);
}

.footer-accreditation-box img,
.footer-accreditation-box svg {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  opacity: 1;
  filter: grayscale(0%);
  transition: transform 0.25s ease;
}

.footer-accreditation:hover img,
.footer-accreditation:hover svg {
  transform: scale(1.04);
}

.footer-accreditation:focus-visible {
  outline: 2px solid var(--brand-blue);
  outline-offset: 4px;
  border-radius: 8px;
}

/* =========================================
   Footer Awarding Bodies
========================================= */

.footer-awarding-bodies {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e5e7eb;
  flex-wrap: nowrap;
}

.footer-awarding-box {
  width: 84px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.footer-awarding-box img,
.footer-awarding-box svg {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  opacity: 0.85;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.footer-awarding-box:hover img,
.footer-awarding-box:hover svg {
  transform: scale(1.04);
  opacity: 1;
}

/* =========================================
   Footer Social Icons
========================================= */

.footer-social {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.footer-icons {
  display: inline-flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  text-decoration: none;
  border-radius: 8px;
  transition:
    background-color 0.25s ease,
    transform 0.25s ease;
}

.footer-icons a svg {
  display: block;
  width: 24px;
  height: 24px;
  opacity: 0.7;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.footer-icons a:hover,
.footer-icons a:focus-visible {
  background: rgba(12, 109, 253, 0.08);
}

.footer-icons a:hover svg,
.footer-icons a:focus-visible svg {
  opacity: 1;
  transform: translateY(-2px);
}

.footer-icons a:focus-visible {
  outline: 2px solid var(--brand-blue);
  outline-offset: 3px;
}

/* =========================================
   Footer Responsive
========================================= */

@media (max-width: 991.98px) {
  .footer-accreditations {
    justify-content: flex-start;
    margin-top: 24px;
  }

  .footer-accreditations-inner {
    margin-left: 0;
    justify-content: flex-start;
    gap: 16px;
    flex-wrap: wrap;
  }

  .footer-awarding-bodies {
    justify-content: flex-start;
    margin-top: 12px;
    flex-wrap: wrap;
    gap: 12px;
  }

  .footer-social {
    justify-content: flex-start;
    margin-top: 16px;
  }

  .footer-icons {
    justify-content: flex-start;
  }
}

@media (max-width: 767.98px) {
  .site-footer {
    padding: 44px 0 24px;
  }

  .footer-top {
    row-gap: 24px;
  }

  .footer-links li {
    margin-bottom: 10px;
  }

  .footer-accreditation-box {
    width: 72px;
    height: 52px;
    padding: 4px;
  }

  .footer-awarding-box {
    width: 72px;
    height: 42px;
  }

  .footer-accreditation-box img[alt="Ofsted"],
  .footer-accreditation-box img[alt*="Cyber Essentials"],
  .footer-accreditation-box img[alt="Klarna"] {
    max-height: 42px;
  }
}
