/* ============================================================
   ONE4ALL — Component Styles
   Buttons, Navigation, Logo, Trust Badges, Social Icons,
   Section Header, Breadcrumb, Footer sub-components.
   ============================================================ */

/* ----------------------------------------------------------
   LOGO — Header & Footer
---------------------------------------------------------- */

.site-logo,
.site-logo-link img {
  display: block;
  max-height: 50px;
  width: auto;
}

.site-logo-link {
  display: inline-block;
  text-decoration: none;
}

/* WordPress core custom-logo */
.custom-logo-link {
  display: inline-block;
  text-decoration: none;
  line-height: 0;
}

.custom-logo-link img,
.custom-logo {
  display: block;
  max-height: 50px;
  width: auto;
}

/* Footer logo — slightly smaller */
.site-footer__logo-link {
  display: inline-block;
  line-height: 0;
  margin-bottom: 16px;
  text-decoration: none;
}

/* Footer logo text fallback (no SVG set) */
.site-footer__logo-text {
  display: inline-block;
  font-family: var(--o4all-font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--o4all-color-accent);
  text-decoration: none;
  margin-bottom: 16px;
  line-height: 1;
}

.site-footer__logo-text:hover {
  color: var(--o4all-color-accent-light);
  text-decoration: none;
}

.site-footer__logo,
.site-footer__col--brand .custom-logo {
  height: 74px;
  width: auto;
  margin-bottom: 0;
}

.site-footer__col--brand .custom-logo-link {
  display: inline-block;
  margin-bottom: 16px;
}

/* ----------------------------------------------------------
   BUTTONS
   Source: Design System §8 (2–4)
---------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-family: var(--o4all-font-body);
  font-size: var(--o4all-type-button);
  font-weight: 600;
  line-height: 1;
  border-radius: var(--o4all-radius-btn);
  border: none;
  text-decoration: none;
  cursor: pointer;
  transition:
    color var(--o4all-transition),
    background-color var(--o4all-transition),
    border-color var(--o4all-transition),
    transform var(--o4all-transition),
    box-shadow var(--o4all-transition);
  white-space: nowrap;
}

/* Primary — gold accent */
.btn--primary {
  background-color: var(--o4all-color-accent);
  color: var(--o4all-color-ink);
}

.btn--primary:hover {
  background-color: var(--o4all-color-accent-light);
  color: var(--o4all-color-ink);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201, 168, 76, 0.35);
  text-decoration: none;
}

.btn--primary:active {
  background-color: var(--o4all-color-accent-dark);
  transform: translateY(0);
  box-shadow: none;
}

.btn--primary:focus-visible {
  outline: 3px solid var(--o4all-color-accent);
  outline-offset: 3px;
  text-decoration: none;
}

/* Secondary — navy */
.btn--secondary {
  background-color: var(--o4all-color-navy);
  color: var(--o4all-text-inverse);
}

.btn--secondary:hover {
  background-color: var(--o4all-color-steel);
  color: var(--o4all-text-inverse);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(13, 27, 42, 0.25);
  text-decoration: none;
}

.btn--secondary:active {
  background-color: var(--o4all-color-ink);
  transform: translateY(0);
  box-shadow: none;
}

.btn--secondary:focus-visible {
  outline: 3px solid var(--o4all-color-steel);
  outline-offset: 3px;
}

/* Ghost — transparent with accent border */
.btn--ghost {
  background-color: transparent;
  color: var(--o4all-color-accent);
  border: 1.5px solid var(--o4all-color-accent);
}

.btn--ghost:hover {
  background-color: var(--o4all-color-accent);
  color: var(--o4all-color-ink);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201, 168, 76, 0.30);
}

.btn--ghost:focus-visible {
  outline: 3px solid var(--o4all-color-accent);
  outline-offset: 3px;
}

/* Ghost on light background */
.btn--ghost-navy {
  background-color: transparent;
  color: var(--o4all-color-navy);
  border: 1.5px solid var(--o4all-color-navy);
}

.btn--ghost-navy:hover {
  background-color: var(--o4all-color-navy);
  color: var(--o4all-text-inverse);
  text-decoration: none;
  transform: translateY(-2px);
}

/* Disabled */
.btn[disabled],
.btn--disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Small variant */
.btn--sm {
  padding: 10px 20px;
  font-size: var(--o4all-type-small);
}

/* ----------------------------------------------------------
   NAVIGATION — SITE HEADER
   Source: Design System §8.1
---------------------------------------------------------- */

.site-branding {
  flex-shrink: 0;
}

.site-title-link {
  font-family: var(--o4all-font-heading);
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--o4all-color-accent);
  text-decoration: none;
  letter-spacing: 0.08em;
  line-height: 1;
}

.site-title-link:hover {
  color: var(--o4all-color-accent-light);
  text-decoration: none;
}

.site-header__cta {
  flex-shrink: 0;
}

.main-navigation {
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: center;
}

/* Nav list */
.main-navigation ul {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-navigation ul li a {
  display: block;
  position: relative;
  padding: 8px 14px;
  font-size: var(--o4all-type-nav);
  font-weight: 500;
  color: var(--o4all-text-inverse);
  text-decoration: none;
  border-radius: var(--o4all-radius-sm);
  transition: color var(--o4all-transition),
              background-color var(--o4all-transition);
}

/* Animated gold underline — expands from center on hover / active */
.main-navigation ul li a::after {
  content: "";
  position: absolute;
  left: 50%;
  right: 50%;
  bottom: 4px;
  height: 1px;
  background: var(--o4all-color-accent);
  opacity: 0;
  transition: left var(--o4all-transition),
              right var(--o4all-transition),
              opacity var(--o4all-transition);
}

.main-navigation ul li a:hover,
.main-navigation ul li.current-menu-item > a,
.main-navigation ul li.current-page-ancestor > a {
  color: var(--o4all-color-accent);
}

.main-navigation ul li a:hover::after,
.main-navigation ul li.current-menu-item > a::after,
.main-navigation ul li.current-page-ancestor > a::after {
  left: 14px;
  right: 14px;
  opacity: 1;
}

.main-navigation ul li a:focus-visible {
  outline: 2px solid var(--o4all-color-accent);
  outline-offset: 2px;
}

/* Hamburger button */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: var(--o4all-radius-sm);
  transition: background-color var(--o4all-transition);
}

.nav-toggle:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

.nav-toggle:focus-visible {
  outline: 3px solid var(--o4all-color-accent);
  outline-offset: 2px;
}

.nav-toggle__bar {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--o4all-text-inverse);
  border-radius: 2px;
  transition: transform var(--o4all-transition), opacity var(--o4all-transition);
}

/* Hamburger → X */
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav */
@media (max-width: 767px) {
  .nav-toggle {
    display: flex;
  }

  .site-header__cta {
    display: none;
  }

  .main-navigation {
    position: static;
    flex: none;
  }

  .main-navigation ul {
    display: none;
    position: fixed;
    top: var(--o4all-header-height, 80px);
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background-color: var(--o4all-color-ink);
    padding: 16px 0 32px;
    overflow-y: auto;
    z-index: var(--o4all-z-nav);
    box-shadow: var(--o4all-shadow-nav);
  }

  .main-navigation ul.is-open {
    display: flex;
  }

  .main-navigation ul li a {
    padding: 16px 24px;
    border-radius: 0;
    font-size: var(--o4all-type-body);
    border-bottom: 1px solid var(--o4all-border-dark);
  }
}

/* ----------------------------------------------------------
   SECTION HEADER
   Source: Design System §8.18
   Usage: get_template_part('template-parts/global/section-header', null, $args)
---------------------------------------------------------- */

.section-header {
  margin-bottom: 48px;
  border-bottom: 1px solid var(--o4all-border);
  padding-bottom: 1.5rem;
}

.section-header__label {
  display: inline-block;
  font-family: var(--o4all-font-body);
  font-size: var(--o4all-type-xs);
  font-weight: 500;
  letter-spacing: var(--o4all-tracking-label);
  text-transform: uppercase;
  color: var(--o4all-color-accent);
  margin-bottom: 12px;
}

.section-header__heading {
  color: var(--o4all-text-primary);
  margin-bottom: 16px;
}

.section-header__subheading {
  font-size: var(--o4all-type-body-lg);
  color: var(--o4all-text-secondary);
  line-height: var(--o4all-leading-body);
  max-width: 640px;
  margin: 0;
}

/* Center alignment variant */
.section-header--center {
  text-align: center;
}

.section-header--center .section-header__subheading {
  margin-inline: auto;
}

/* Dark background variant */
.section-header--dark .section-header__heading {
  color: var(--o4all-text-inverse);
}

.section-header--dark .section-header__subheading {
  color: rgba(255, 255, 255, 0.72);
}

/* ----------------------------------------------------------
   BREADCRUMB
   Source: Design System §8.17
   Yoast outputs <span class="breadcrumb_last"> for current page.
---------------------------------------------------------- */

.breadcrumb {
  background-color: var(--o4all-bg-subtle);
  padding-block: 12px;
  border-bottom: 1px solid var(--o4all-border);
}

.breadcrumb__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 0;
  font-size: var(--o4all-type-small);
  color: var(--o4all-text-muted);
}

/* Yoast items are plain <a> and <span> children — target both patterns */
.breadcrumb__list a,
.breadcrumb__list li a {
  color: var(--o4all-text-muted);
  text-decoration: none;
  padding-inline: 4px;
  transition: color var(--o4all-transition);
}

.breadcrumb__list a:hover,
.breadcrumb__list li a:hover {
  color: var(--o4all-color-steel);
}

/* Separator — inserted before every item after the first */
.breadcrumb__list > * + *::before,
.breadcrumb__list li + li::before {
  content: '›';
  padding-inline: 2px;
  color: var(--o4all-text-muted);
  pointer-events: none;
}

/* Current page (Yoast class + custom class) */
.breadcrumb__item--current,
.breadcrumb__list .breadcrumb_last {
  color: var(--o4all-text-primary);
  padding-inline: 4px;
}

/* ----------------------------------------------------------
   TRUST BADGES
   Used in footer trust strip and optional homepage section.
   Source: Design System §8.6
---------------------------------------------------------- */

.trust-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  min-width: 100px;
}

.trust-badge svg {
  width: 40px;
  height: 40px;
  color: var(--o4all-color-accent);
  flex-shrink: 0;
}

.trust-badge__text {
  font-size: var(--o4all-type-xs);
  font-weight: 500;
  color: var(--o4all-text-muted);
  text-transform: uppercase;
  letter-spacing: var(--o4all-tracking-label);
  line-height: 1.4;
  max-width: 120px;
}

/* Trust strip in footer */
.site-footer__trust {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 24px 48px;
  padding-block: 32px;
  border-top: 1px solid var(--o4all-border-dark);
  border-bottom: 1px solid var(--o4all-border-dark);
  margin-block: 40px 32px;
}

/* ----------------------------------------------------------
   FOOTER SUB-COMPONENTS
   Source: Design System §8.16
---------------------------------------------------------- */

.site-footer__col {
  /* Column base */
}

.site-footer__heading {
  font-family: var(--o4all-font-body);
  font-size: var(--o4all-type-label);
  font-weight: 600;
  color: var(--o4all-text-inverse);
  text-transform: uppercase;
  letter-spacing: var(--o4all-tracking-label);
  margin-bottom: 20px;
}

.site-footer__tagline {
  font-size: var(--o4all-type-small);
  color: var(--o4all-footer-text-accessible);
  line-height: var(--o4all-leading-body);
  max-width: 280px;
  margin-bottom: 20px;
}

/* Footer nav lists */
.site-footer__col nav ul,
.site-footer__col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.site-footer__col nav ul a,
.site-footer__col ul a {
  font-size: var(--o4all-type-small);
  color: var(--o4all-footer-link-accessible);
  text-decoration: none;
  transition: color var(--o4all-transition);
  padding-block: 2px;
  display: inline-block;
}

.site-footer__col nav ul a:hover,
.site-footer__col ul a:hover {
  color: var(--o4all-color-accent);
}

/* Contact block in brand column */
.site-footer__contact {
  margin-top: 4px;
  font-style: normal;
}

.site-footer__contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: var(--o4all-type-small);
  color: var(--o4all-footer-text-accessible);
  margin-bottom: 10px;
  line-height: 1.5;
}

.site-footer__contact-item svg {
  width: 16px;
  height: 16px;
  color: var(--o4all-color-accent);
  flex-shrink: 0;
  margin-top: 1px;
}

.site-footer__contact-item a {
  color: var(--o4all-footer-link-accessible);
  text-decoration: none;
  transition: color var(--o4all-transition);
}

.site-footer__contact-item a:hover {
  color: var(--o4all-color-accent);
}

/* Social icons */
/* specificity 20 — beats .site-footer__col ul (11) which was forcing column direction */
.site-footer__col .site-footer__social {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 10px;
}

/* specificity 21 — beats .site-footer__col ul a (12) which was overriding display and hover color */
.site-footer__col .site-footer__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding-block: 0;
  border-radius: 6px;
  background-color: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--o4all-border-dark);
  color: var(--o4all-text-muted);
  text-decoration: none;
  transition: background-color var(--o4all-transition),
              color var(--o4all-transition),
              border-color var(--o4all-transition),
              transform var(--o4all-transition);
}

.site-footer__col .site-footer__social a:hover {
  background-color: var(--o4all-color-accent);
  border-color: var(--o4all-color-accent);
  color: var(--o4all-color-ink);
  transform: translateY(-2px);
}

.site-footer__col .site-footer__social a:focus-visible {
  background-color: var(--o4all-color-accent);
  border-color: var(--o4all-color-accent);
  color: var(--o4all-color-ink);
  outline: 2px solid var(--o4all-color-accent);
  outline-offset: 3px;
}

.site-footer__social svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Footer nav list — columns 2 & 3 */
.site-footer__nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.site-footer__nav-list a {
  font-size: var(--o4all-type-small);
  color: var(--o4all-footer-link-accessible);
  text-decoration: none;
  transition: color var(--o4all-transition);
  display: inline-block;
  padding-block: 2px;
}

.site-footer__nav-list a:hover {
  color: var(--o4all-color-accent);
}

/* Footer contact list — column 4 */
.site-footer__contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Legal nav — bottom bar right */
.site-footer__legal-nav .site-footer__legal-list,
.site-footer__legal-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

.site-footer__legal-list a {
  font-size: var(--o4all-type-small);
  color: var(--o4all-footer-link-accessible);
  text-decoration: none;
  transition: color var(--o4all-transition);
}

.site-footer__legal-list a:hover {
  color: var(--o4all-color-accent);
}

/* WordPress auto-wraps wp_nav_menu in a <div> — ensure legal-nav ul gets right styles */
.site-footer__legal-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

.site-footer__legal-nav ul a {
  font-size: var(--o4all-type-small);
  color: var(--o4all-footer-link-accessible);
  text-decoration: none;
  transition: color var(--o4all-transition);
}

.site-footer__legal-nav ul a:hover {
  color: var(--o4all-color-accent);
}

/* ------------------------------------------------------------
   A11Y — Footer text links: underline only on hover / focus, plus
   a clearly visible keyboard focus ring. No permanent underline.
   Selectors mirror the rules above so later source order wins.
------------------------------------------------------------ */
.site-footer__col nav ul a:hover,
.site-footer__col ul a:hover,
.site-footer__nav-list a:hover,
.site-footer__contact-item a:hover,
.site-footer__legal-list a:hover,
.site-footer__legal-nav ul a:hover,
.site-footer__copy a:hover,
.site-footer__col nav ul a:focus-visible,
.site-footer__col ul a:focus-visible,
.site-footer__nav-list a:focus-visible,
.site-footer__contact-item a:focus-visible,
.site-footer__legal-list a:focus-visible,
.site-footer__legal-nav ul a:focus-visible,
.site-footer__copy a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.site-footer__col nav ul a:focus-visible,
.site-footer__col ul a:focus-visible,
.site-footer__nav-list a:focus-visible,
.site-footer__contact-item a:focus-visible,
.site-footer__legal-list a:focus-visible,
.site-footer__legal-nav ul a:focus-visible,
.site-footer__copy a:focus-visible {
  outline: 2px solid var(--o4all-color-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Social icon links have no text — keep them free of underline on hover */
.site-footer__col .site-footer__social a:hover,
.site-footer__col .site-footer__social a:focus-visible {
  text-decoration: none;
}

@media (max-width: 767px) {
  .site-footer__legal-nav .site-footer__legal-list,
  .site-footer__legal-nav ul,
  .site-footer__legal-list {
    gap: 0.25rem 1rem;
  }
}

/* ----------------------------------------------------------
   REDUCED MOTION
   Disable all transform/transition micro-interactions for
   users who prefer reduced motion.
---------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .btn,
  .main-navigation ul li a,
  .main-navigation ul li a::after,
  .site-footer__social a {
    transition: none;
  }

  .btn:hover,
  .btn--primary:hover,
  .btn--secondary:hover,
  .btn--ghost:hover,
  .btn--ghost-navy:hover,
  .site-footer__social a:hover {
    transform: none;
    box-shadow: none;
  }
}
