/**
 * EverSmith Theme Stylesheet
 *
 * Brand Colors from Figma:
 * - EVER BLUE: #01B3C5
 * - SMITH GREY: #404A50
 * - BRANDS GREY: #99A3A2
 * - Orange: #E57440
 *
 * @package EverSmith
 * @version 1.0.0
 */

/* ----- Global tokens (from Figma) ----- */
:root {
  --orange: #e57440;
  --smith-grey: #404a50;
  --color-scheme-1-text: #111827;
  --text-regular: 16px;
  --text-medium: 18px;
  --text-small: 14px;
  --page-padding: 80px;
  --section-padding-medium: 80px;

  /* Button state colors - from Figma Design System */
  /* Primary button (orange) states */
  --btn-primary-rest: #e57440;
  --btn-primary-hover: #f26828;
  --btn-primary-pressed: #c87400;
  --btn-primary-disabled: #f2d6a8;

  /* Ghost/Link button (orange underline with arrow) states - from Figma node 1232:1111 */
  --link-light-rest: #e57440;
  --link-light-hover: #f26828;
  --link-light-pressed: #c87400;
  --link-light-disabled: #f2d6a8;

  /* Link on dark background states (blue bg #42638b) */
  --link-dark-rest: #ffffff;
  --link-dark-hover: #f5f8fc;
  --link-dark-pressed: #e0e7f0;
  --link-dark-disabled: rgba(255, 255, 255, 0.45);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-medium: 0.3s ease;

  /* Shared with ACF blocks (teal accent / highlights) */
  --smith-teal: #0097a7;
}

*, *::before, *::after { box-sizing: border-box; }

html,
body {
  height: auto !important;
  overflow-x: hidden;
}

main {
  flex: 1;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  background: #fff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ============================================================
   Button & Link States (from Figma Design System)
   ============================================================
   Comprehensive button and interactive element states.
   Use .btn for primary buttons and .link-light/.link-dark for text links.
   ============================================================ */

/* ----- Primary Button (Orange background) ----- */
.btn {
  /* Base styles matching Figma specs */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 8px 32px;
  border-radius: 8px;
  background-color: var(--btn-primary-rest);
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.5;
  text-decoration: none;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  transition: background-color var(--transition-fast), box-shadow var(--transition-fast);
}

/* Hover state - darker orange with subtle shadow */
.btn:hover {
  background-color: var(--btn-primary-hover);
  box-shadow: 0px 6px 14px rgba(1, 13, 20, 0.1);
}

/* Active/Pressed state - even darker orange */
.btn:active,
.btn.is-pressed {
  background-color: var(--btn-primary-pressed);
  box-shadow: none;
}

/* Focus state for accessibility */
.btn:focus-visible {
  outline: 2px solid var(--btn-primary-pressed);
  outline-offset: 2px;
}

/* Disabled state - light orange, no interaction */
.btn:disabled,
.btn.is-disabled {
  background-color: var(--btn-primary-disabled);
  cursor: not-allowed;
  box-shadow: none;
  pointer-events: none;
}

/* ----- Text Link on Light Background ----- */
.link-light {
  /* Base styles for text links */
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--link-light-rest);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.5;
  text-decoration: none; /* Remove underline from entire link */
  cursor: pointer;
  transition: color var(--transition-fast);
}

/* Underline only the text label (span child), not the arrow */
.link-light .link-label {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Add arrow indicator - no underline on arrow per Figma design (→ from inter-u2192-wght.woff2, see eversmith-inter-font.css). */
.link-light::after {
  content: "→";
  display: inline-block;
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.5;
  text-decoration: none;
  transition: transform var(--transition-fast);
}

/* Hover state - darker orange */
.link-light:hover {
  color: var(--link-light-hover);
}

.link-light:hover::after {
  transform: translateX(2px);
}

/* Active/Pressed state */
.link-light:active,
.link-light.is-pressed {
  color: var(--link-light-pressed);
}

/* Focus state for accessibility */
.link-light:focus-visible {
  outline: 2px solid var(--link-light-pressed);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Disabled state */
.link-light:disabled,
.link-light.is-disabled {
  color: var(--link-light-disabled);
  cursor: not-allowed;
  pointer-events: none;
}

/* ----- Text Link on Dark Background ----- */
.link-dark {
  /* Base styles for text links on dark backgrounds */
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--link-dark-rest);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.5;
  text-decoration: none; /* Remove underline from entire link */
  cursor: pointer;
  transition: color var(--transition-fast);
}

/* Underline only the text label (span child), not the arrow */
.link-dark .link-label {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Add arrow indicator - no underline on arrow per Figma design */
.link-dark::after {
  content: "→";
  display: inline-block;
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.5;
  text-decoration: none;
  transition: transform var(--transition-fast);
}

/* Hover state - light gray */
.link-dark:hover {
  color: var(--link-dark-hover);
}

.link-dark:hover::after {
  transform: translateX(2px);
}

/* Active/Pressed state */
.link-dark:active,
.link-dark.is-pressed {
  color: var(--link-dark-pressed);
}

/* Focus state for accessibility */
.link-dark:focus-visible {
  outline: 2px solid var(--link-dark-hover);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Disabled state */
.link-dark:disabled,
.link-dark.is-disabled {
  color: var(--link-dark-disabled);
  cursor: not-allowed;
  pointer-events: none;
}

/* ----- Utility button sizes ----- */
.btn-sm {
  height: 36px;
  padding: 6px 24px;
  font-size: 14px;
}

.btn-lg {
  height: 52px;
  padding: 12px 40px;
  font-size: 18px;
}

/* ============================================================
   Shared Home Page Components (from HTML page styles.css)
   ============================================================
   These classes are used across multiple blocks for consistency.
   ============================================================ */

/* ----- Section Label (with crown icon) ----- */
.home-section-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.home-section-label span {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.5;
  color: #0097a7;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Modifier .home-section-label--stacked: column layout only inside
   @media (max-width: 1024px) in the responsive section below (not on desktop). */

/* Crown icon (es-icon-crown-dark.png): single size via CSS — no width/height on <img> */
.es-icon-titles {
  height: 14px;
  width: auto;
  max-width: 100%;
  display: block;
  flex-shrink: 0;
  object-fit: contain;
}

/* ----- CTA Button (Orange background) ----- */
.home-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 8px 32px;
  border-radius: 8px;
  background: var(--btn-primary-rest);
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.5;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  z-index: 1;
  border: none;
  cursor: pointer;
  transition: background-color var(--transition-fast), box-shadow var(--transition-fast);
}

.home-cta-btn:hover {
  background-color: var(--btn-primary-hover);
  box-shadow: 0px 6px 14px rgba(1, 13, 20, 0.1);
}

.home-cta-btn:active {
  background-color: var(--btn-primary-pressed);
  box-shadow: none;
}

.home-cta-btn:focus-visible {
  outline: 2px solid var(--btn-primary-pressed);
  outline-offset: 2px;
}

/* ----- CTA Link (Orange text with underline and arrow) ----- */
.home-cta-link {
  display: inline;
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.5;
  color: var(--link-light-rest);
  text-decoration: none;
  cursor: pointer;
  transition: color var(--transition-fast);
}

/* Underline only the text label, not the arrow */
.home-cta-link .link-label {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Arrow stays with text, no underline. inline-block so transform works (inline ignores translateX). */
.home-cta-link .link-arrow {
  display: inline-block;
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.5;
  text-decoration: none;
  vertical-align: baseline;
  transition: transform var(--transition-fast);
}

.home-cta-link:hover {
  color: var(--link-light-hover);
}

.home-cta-link:hover .link-arrow {
  transform: translateX(2px);
}

.home-cta-link:active {
  color: var(--link-light-pressed);
}

.home-cta-link:focus-visible {
  outline: 2px solid var(--link-light-pressed);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ----- Teal Serif Emphasis Text ----- */
.serif-teal {
  font-family: 'PT Serif', serif;
  font-weight: 700;
  color: #0097a7;
}

/* ============================================================
   EverSmith shared block typography (es-*)
   Single source for section / card / hero titles across ACF blocks.
   Blocks keep layout (grids, backgrounds) in their own CSS files.
   ============================================================ */

.es-section-title {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 700;
  font-size: 40px;
  line-height: 1.2;
  color: var(--smith-grey, #404a50);
}

.es-section-title .serif-teal,
.es-hero-title .serif-teal,
.es-card-title .serif-teal {
  font-family: 'PT Serif', Georgia, serif;
  font-weight: 700;
  font-style: normal;
  color: var(--smith-teal, #0097a7);
}

.es-section-subtitle {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 400;
  font-size: 18px;
  line-height: 1.5;
  color: var(--smith-grey, #404a50);
}

.es-card-title {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.5;
  color: var(--smith-grey, #404a50);
}

/* Multi-line section titles (stacked phrases) */
.es-title-line {
  display: block;
}

/* Slightly larger card heading (e.g. home hero pathway cards) */
.es-card-title--lg {
  font-size: 18px;
}

@media (max-width: 480px) {
  .es-card-title--lg {
    font-size: 16px;
  }
}

.es-section-title--light {
  color: #fff;
}

/* Narrower section heading (e.g. three-columns block): was 26px before shared es-* scale */
.es-section-title.es-section-title--compact {
  font-size: 26px;
  line-height: 1.4;
}

.es-section-subtitle--light {
  color: #fff;
}

.es-hero-title {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 700;
  font-size: 56px;
  line-height: 1.1;
  color: var(--smith-grey, #404a50);
}

.es-hero-title--light {
  color: #fff;
}

.es-hero-subtitle {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 400;
  font-size: 18px;
  line-height: 1.5;
  color: var(--smith-grey, #404a50);
}

.es-hero-subtitle--light {
  color: #fff;
}

@media (max-width: 1024px) {
  .es-section-title {
    font-size: 36px;
  }

  .es-section-subtitle {
    font-size: 18px;
  }

  .es-hero-title {
    font-size: 42px;
  }
}

@media (max-width: 768px) {
  .es-section-title {
    font-size: 36px;
  }

  .es-hero-title {
    font-size: 42px;
  }

  .es-hero-subtitle {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .es-section-title {
    font-size: 28px;
    line-height: 1.3;
  }

  .es-card-title {
    font-size: 15px;
  }

  .es-hero-title {
    font-size: 28px;
  }
}

/* Overrides default responsive .es-section-title sizes for --compact (two-class specificity) */
@media (max-width: 1024px) {
  .es-section-title.es-section-title--compact {
    font-size: 22px;
    line-height: 1.4;
  }
}

@media (max-width: 768px) {
  .es-section-title.es-section-title--compact {
    font-size: 16px;
    line-height: 1.4;
  }
}

@media (max-width: 480px) {
  .es-section-title.es-section-title--compact {
    font-size: 16px;
    line-height: 1.3;
  }
}

/* ----- Typography ----- */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 1rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-scheme-1-text);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

p {
  margin: 0 0 1rem;
}

img {
  max-width: 100%;
  height: auto;
}

/* ----- Header ----- */
.site-header {
  width: 100%;
  background: #fff;
  /* Make header stick to top when scrolling */
  position: sticky;
  top: 0;
  z-index: 1000;
  /* Add subtle shadow when sticky */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 16px 48px;
}
.site-nav-logo { width: 236px; height: 43px; flex-shrink: 0; }
.site-nav-logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.site-nav-links { display: flex; align-items: center; gap: 32px; }
.site-nav-links a {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-scheme-1-text);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--transition-fast);
}
/* Orange hover for all nav links (desktop + mobile) */
.site-nav-links a:hover {
  color: var(--orange);
}
/* Current/active menu item - underline styling (classes applied to anchor by walker) */
.site-nav-links a.current-menu-item,
.site-nav-links a.current-menu-parent,
.site-nav-links a.current-menu-ancestor,
.site-nav-links a.current_page_item,
.site-nav-links a.current_page_parent,
.site-nav-links a.current_page_ancestor,
.site-nav-links a[aria-current="page"],
/* Also target submenu items */
.site-nav-submenu a.current-menu-item,
.site-nav-submenu a.current_page_item,
.site-nav-submenu a[aria-current="page"] {
  text-decoration-line: underline !important;
  text-decoration-style: solid !important;
  text-decoration-skip-ink: none !important;
  text-decoration-thickness: auto !important;
  text-underline-offset: auto !important;
  text-underline-position: from-font !important;
  text-decoration-color: var(--color-scheme-1-text) !important;
}
/* On hover, underline color also turns orange */
.site-nav-links a.current-menu-item:hover,
.site-nav-links a.current-menu-parent:hover,
.site-nav-links a.current-menu-ancestor:hover,
.site-nav-links a.current_page_item:hover,
.site-nav-links a.current_page_parent:hover,
.site-nav-links a.current_page_ancestor:hover,
.site-nav-links a[aria-current="page"]:hover,
.site-nav-submenu a.current-menu-item:hover,
.site-nav-submenu a.current_page_item:hover,
.site-nav-submenu a[aria-current="page"]:hover {
  text-decoration-color: var(--orange) !important;
}
/* Nav links with dropdown chevrons (Franchising, About Us) */
.site-nav-dropdown {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
/* "About Us" link is underlined per Figma – higher specificity to beat .site-nav-links a */
.site-nav-links a.site-nav-dropdown--underline,
.careers-nav-links a.site-nav-dropdown--underline {
  text-decoration: underline;
  text-underline-offset: 2px;
}
/* Small chevron next to "Franchising" – 12.6 x 7.1px per Figma */
.nav-chevron-sm,
.nav-chevron--sm {
  width: 12.6px;
  height: 7.1px;
  flex-shrink: 0;
}
/* Larger chevron next to "About Us" – 24x24px per Figma */
.nav-chevron {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

/* Chevron toggle button - only visible on mobile (hidden on desktop) */
.nav-chevron-toggle {
  display: none;
}

/* Dropdown submenu wrapper (About Us) */
.site-nav-has-submenu {
  position: relative;
}
/* Invisible bridge between trigger and panel so cursor doesn't lose hover */
.site-nav-has-submenu::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 16px;
  display: none;
}
.site-nav-has-submenu:hover::after {
  display: block;
}
/* Submenu panel – hidden by default, revealed on hover (matches Figma 1050:108) */
.site-nav-submenu {
  display: none;
  flex-direction: column;
  gap: 14px;
  position: absolute;
  top: calc(100% + 8px);
  left: -20px;
  width: 219px;
  background: #fff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  padding: 30px 20px;
  z-index: 100;
}
/* Show on hover */
.site-nav-has-submenu:hover .site-nav-submenu {
  display: flex;
}
/* Individual submenu links – Inter Medium 16px per Figma */
.site-nav-submenu a {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-scheme-1-text);
  text-decoration: none;
  white-space: nowrap;
}
.site-nav-submenu a:hover {
  color: var(--orange);
}

.site-nav-cta {
  /* Uses .btn base styles - extends the primary button component */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 8px 32px;
  border-radius: 8px;
  background-color: var(--btn-primary-rest);
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.5;
  text-decoration: none;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  transition: background-color var(--transition-fast), box-shadow var(--transition-fast);
}

.site-nav-cta:hover {
  background-color: var(--btn-primary-hover);
  box-shadow: 0px 6px 14px rgba(1, 13, 20, 0.1);
}

.site-nav-cta:active {
  background-color: var(--btn-primary-pressed);
  box-shadow: none;
}

.site-nav-cta:focus-visible {
  outline: 2px solid var(--btn-primary-pressed);
  outline-offset: 2px;
}

/* ----- Footer ----- */
.site-footer {
  width: 100%;
  background: var(--smith-grey);
  padding: 80px 64px 20px;
  min-height: 836px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: auto;
}
.site-footer-inner {
  width: 100%;
  max-width: 1280px;
  display: flex;
  flex-direction: column;
  gap: 64px;
}
.site-footer-top { display: flex; gap: 64px; align-items: flex-start; }
.site-footer-col { flex: 1 1 0; min-width: 0; }
.site-footer-logo { width: 187px; height: 45px; margin-bottom: 32px; }
.site-footer-logo img { width: 100%; height: 100%; object-fit: contain; }
.site-footer-contact { display: flex; flex-direction: column; gap: 16px; padding: 32px 0; }
.site-footer-contact .row { display: flex; gap: 16px; align-items: flex-start; }
.site-footer-contact .icon { width: 25px; height: 25px; flex-shrink: 0; }
.site-footer-contact .icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* Icons keep their original SVG color (orange #E57440) per Figma */
}
.site-footer-contact p { font-size: 16px; color: #fff; margin: 0; line-height: 1.5; }
.site-footer-contact .footer-email-link { font-size: 16px; color: #fff; text-decoration: none; line-height: 1.5; }
.site-footer-contact .footer-email-link:hover { text-decoration: underline; }
.site-footer-social {
  display: flex;
  gap: 12px;
  align-items: center;
}
.site-footer-social a { display: block; width: 24px; height: 24px; }
.site-footer-social img { width: 100%; height: 100%; object-fit: contain; /* Icons keep their original SVG color (orange #E57440) per Figma */ }

/* Footer Links - support both static HTML and WordPress menu output */
.site-footer-links { max-width: 400px; margin-left: auto; }
.site-footer-links ul {
  display: flex;
  flex-direction: column;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-footer-links li {
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-footer-links a {
  display: block;
  padding: 8px 0;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.5;
  color: #fff;
  text-align: right;
  text-decoration: none;
}
.site-footer-links a:hover {
  color: var(--orange);
}
.site-footer-credits { width: 100%; display: flex; flex-direction: column; gap: 22px; }
.site-footer-image img { width: 100%; display: block; object-fit: cover; }
.site-footer-divider { height: 1px; margin-bottom: 32px; }
.site-footer-divider img { display: block; width: 100%; height: 100%; object-fit: cover; }
.site-footer-bottom { display: flex; align-items: center; justify-content: space-between; height: 21px; padding-bottom: 20px; /* Add space at bottom inside footer */ }
.site-footer-bottom p, .site-footer-bottom a { font-size: 14px; line-height: 1.5; color: #fff; margin: 0; text-decoration: none; }
/* Footer Legal Links - support WordPress menu output */
.site-footer-legal ul {
  display: flex;
  gap: 24px;
  justify-content: flex-start; /* Desktop: row is laid out by .site-footer-bottom; links stay left in the middle column */
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-footer-legal li {
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-footer-legal a {
  font-size: 14px;
  line-height: 1.5;
  color: #fff;
  text-decoration: none;
}
.site-footer-legal a:hover {
  color: var(--orange);
}

/* BPA Credit */
.site-footer-bpa a {
  display: flex;
  gap: 8px;
  align-items: center;
  text-decoration: none;
  color: inherit;
}
.site-footer-bpa img { width: 13px; height: 18px; }
.site-footer-bpa p { font-size: 14px; color: #fff; margin: 0; }

/*
 * Footer tablet: match EverSmith-HTML-PAGE/assets/css/styles.css (@media max-width: 1024px).
 * Stack credits row and center legal links with wrap (WordPress uses ul as the flex container).
 */
@media (max-width: 1024px) {
  .site-footer-bottom {
    flex-direction: column;
    height: auto;
    gap: 12px;
  }

  /* Center the legal block only on tablet + mobile (not desktop) */
  .site-footer-legal {
    display: flex;
    justify-content: center;
    width: 100%;
  }

  .site-footer-legal ul {
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    align-content: center;
    gap: 4px 21.6px;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

}

/*
 * Footer mobile: match HTML reference (merged rules from styles.css 768px blocks).
 * Legal links flex lives on ul in WP output, not on .site-footer-legal.
 */
@media (max-width: 768px) {
  .site-footer {
    min-height: auto; /* Let footer height be determined by content */
    padding: 48px 20px 64px;
  }

  .site-footer-top {
    flex-direction: column;
    gap: 32px;
  }

  .site-footer-links {
    margin-left: 0;
    max-width: none;
  }

  .site-footer-links a {
    text-align: left;
  }

  .site-footer-bottom {
    flex-direction: column;
    height: auto;
    gap: 12px;
    align-items: flex-start;
    padding-bottom: 0;
  }

  .site-footer-legal ul {
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    align-content: center;
    gap: 4px 21.6px;
    max-width: 375px;
    margin: 0 auto;
  }

  .site-footer-bpa {
    align-self: center;
  }

  .site-footer-copyright {
    text-align: center;
    align-self: center;
  }
}

/* ----- Responsive Header Styles ----- */
.site-nav {
  gap: 24px;
}

/* Mobile nav toggle button (hamburger icon) */
.site-nav-toggle {
  display: none; /* shown via media query */
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #fff;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}

.site-nav-toggle-bar {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #111827;
  position: relative;
}

.site-nav-toggle-bar::before,
.site-nav-toggle-bar::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #111827;
}

.site-nav-toggle-bar::before {
  top: -5px;
}

.site-nav-toggle-bar::after {
  top: 5px;
}

/* Close icon inside toggle – hidden by default (hamburger shows instead) */
.site-nav-close-icon {
  display: none;
  width: 40px;
  height: 40px;
}

/* Mobile navigation - max-width 1138px (shows mobile menu below 1139px) */
@media (max-width: 1138px) {
  /* Navbar padding per Figma: 14.4px 18px */
  .site-nav,
  .careers-nav {
    padding: 14.4px 18px;
  }

  /* Hide desktop links and CTA button */
  .site-nav-links,
  .site-nav-cta,
  .careers-nav-links,
  .careers-nav-cta {
    display: none;
  }

  /* Show hamburger toggle */
  .site-nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  /* --- Open state - Full screen overlay per Figma --- */
  .site-nav.is-open,
  .careers-nav.is-open {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* No explicit height — top:0 + bottom:0 fills the real visible viewport,
       unlike 100vh which on Android includes the area behind the address bar */
    width: 100%;
    max-width: 100%;
    background: #fff;
    flex-direction: column;
    padding: 14.4px 18px;
    overflow-y: auto;
    z-index: 1000;
  }

  /* Logo stays at top left */
  .site-nav.is-open .site-nav-logo,
  .careers-nav.is-open .site-nav-logo {
    position: absolute;
    top: 14.4px;
    left: 18px;
    z-index: 1001;
  }

  /* Close button at top right */
  .site-nav.is-open .site-nav-toggle,
  .careers-nav.is-open .site-nav-toggle {
    position: absolute;
    top: 14.4px;
    right: 18px;
    z-index: 1001;
  }

  /* Swap hamburger → close icon when open */
  .site-nav.is-open .site-nav-toggle,
  .careers-nav.is-open .site-nav-toggle {
    border: none;
    background: transparent;
    border-radius: 0;
  }
  .site-nav.is-open .site-nav-toggle-bar,
  .careers-nav.is-open .site-nav-toggle-bar {
    display: none;
  }
  .site-nav.is-open .site-nav-close-icon,
  .careers-nav.is-open .site-nav-close-icon {
    display: block;
  }

  /* Mobile menu column — centered on screen, items left-aligned (Figma 808:1532) */
  .site-nav.is-open .site-nav-links,
  .careers-nav.is-open .careers-nav-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;  /* Left-align items inside the column */
    gap: 32px;                /* 32px between each menu item per Figma */
    width: 100%;
    max-width: 375px;         /* Match Figma 375px mobile frame */
    margin: 0 auto;
    padding: 120px 72px 180px; /* Figma: py-120, px-72; extra bottom for CTA */
    position: relative;
    z-index: 1;               /* Above the ::after background pseudo-element (z-index: 0) */
  }

  /* CTA button - sticky bar at bottom per Figma node 1232:1768 */
  .site-nav.is-open .site-nav-cta,
  .careers-nav.is-open .careers-nav-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 60px;
    margin: 0;
    border-radius: 0;
    background-color: var(--orange);
    color: #fff;
    font-weight: 600;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
  }

  /* Background image via fixed pseudo-element so it always sits above the CTA bar.
     Both this and the CTA use position:fixed, so they share the same viewport reference
     — no mismatch from scrollable content height or Android address-bar resizing. */
  .site-nav.is-open::after {
    content: '';
    position: fixed;
    left: 0;
    bottom: 60px; /* Sits right above the 60px CTA bar */
    width: 100%;
    height: 40vh;
    background-image: url('../images/es-background.png');
    background-repeat: no-repeat;
    background-position: left bottom;
    background-size: 130% auto;
    pointer-events: none;
    z-index: 0;
  }

  /* ---- Top-level links: simple left-aligned text per Figma ---- */
  .site-nav.is-open .site-nav-links > a,
  .careers-nav.is-open .careers-nav-links > a {
    display: flex;
    align-items: center;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    color: var(--color-scheme-1-text);
    text-decoration: none;
    white-space: nowrap;
  }

  /* ---- Parent item with submenu: column layout (Figma 1307:124) ---- */
  .site-nav.is-open .site-nav-has-submenu {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;  /* 8px between parent row and expanded submenu per Figma */
  }

  /* Parent link row: text + inline chevron (Figma shows chevron inside the link) */
  .site-nav.is-open .site-nav-has-submenu .site-nav-dropdown {
    display: inline-flex;
    align-items: center;
    gap: 0; /* Reset desktop 8px gap; spacing handled by chevron margin-left */
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    color: var(--color-scheme-1-text);
    text-decoration: none;
    white-space: nowrap;
  }

  /* Keep the desktop chevron visible on mobile (matches Figma) */
  .site-nav.is-open .site-nav-dropdown .nav-chevron {
    display: block;
    cursor: pointer;
    transition: transform 0.2s ease;
  }

  /* Chevron gap: 4px for large chevron (About Us), 8px for small (Franchising) per Figma */
  .site-nav.is-open .site-nav-dropdown .nav-chevron--sm {
    margin-left: 8px;
  }
  .site-nav.is-open .site-nav-dropdown .nav-chevron:not(.nav-chevron--sm) {
    margin-left: 4px;
  }

  /* Hide the separate toggle button — chevron inside <a> handles toggling via JS */
  .site-nav.is-open .nav-chevron-toggle {
    display: none !important;
  }

  /* Chevron rotation on the desktop chevron (kept visible on mobile):
     expanded = up (180deg), collapsed = down (0deg) */
  .site-nav.is-open .site-nav-has-submenu .nav-chevron {
    transform: rotate(180deg);
  }
  .site-nav.is-open .site-nav-has-submenu.submenu-collapsed .nav-chevron {
    transform: rotate(0deg);
  }

  /* ---- Submenu panel: indented column below parent link (Figma 1307:119) ---- */
  .site-nav.is-open .site-nav-submenu {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;              /* 8px between submenu items per Figma */
    padding: 0 0 0 8px;   /* 8px left indent per Figma */
    /* Reset desktop absolute positioning — keeps submenu in normal flow */
    position: static;
    top: auto;
    left: auto;
    width: auto;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    margin: 0;
  }

  /* Submenu links: same font as parent items, left-aligned */
  .site-nav.is-open .site-nav-submenu a {
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    color: var(--color-scheme-1-text);
    text-decoration: none;
    white-space: nowrap;
  }

  /* Orange hover for all mobile menu links (top-level, parent dropdowns, submenu) */
  .site-nav.is-open .site-nav-links > a:hover,
  .site-nav.is-open .site-nav-has-submenu .site-nav-dropdown:hover,
  .site-nav.is-open .site-nav-submenu a:hover {
    color: var(--orange);
  }

  /* Collapsed class hides the submenu (expanded by default) */
  .site-nav.is-open .site-nav-has-submenu.submenu-collapsed .site-nav-submenu {
    display: none;
  }

  /* Current page underline styling */
  .site-nav.is-open .site-nav-links a.current-menu-item,
  .site-nav.is-open .site-nav-links a.current-menu-parent,
  .site-nav.is-open .site-nav-links a.current-menu-ancestor,
  .site-nav.is-open .site-nav-links a.current_page_item,
  .site-nav.is-open .site-nav-links a.current_page_parent,
  .site-nav.is-open .site-nav-links a.current_page_ancestor,
  .site-nav.is-open .site-nav-links a[aria-current="page"],
  .site-nav.is-open .site-nav-submenu a.current-menu-item,
  .site-nav.is-open .site-nav-submenu a.current_page_item,
  .site-nav.is-open .site-nav-submenu a[aria-current="page"] {
    text-decoration-line: underline;
    text-decoration-style: solid;
    text-decoration-skip-ink: none;
    text-decoration-thickness: auto;
    text-underline-offset: auto;
    text-underline-position: from-font;
    text-decoration-color: var(--color-scheme-1-text);
  }

  /* On hover, underline color also turns orange (mobile) */
  .site-nav.is-open .site-nav-links a.current-menu-item:hover,
  .site-nav.is-open .site-nav-links a.current-menu-parent:hover,
  .site-nav.is-open .site-nav-links a.current-menu-ancestor:hover,
  .site-nav.is-open .site-nav-links a.current_page_item:hover,
  .site-nav.is-open .site-nav-links a.current_page_parent:hover,
  .site-nav.is-open .site-nav-links a.current_page_ancestor:hover,
  .site-nav.is-open .site-nav-links a[aria-current="page"]:hover,
  .site-nav.is-open .site-nav-submenu a.current-menu-item:hover,
  .site-nav.is-open .site-nav-submenu a.current_page_item:hover,
  .site-nav.is-open .site-nav-submenu a[aria-current="page"]:hover {
    text-decoration-color: var(--orange);
  }
}

/* ----- Utility Classes ----- */
.container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ============================================================
   Responsive: Shared Home Page Components
   ============================================================ */

/* Tablet and below: stack crown above label text when block uses --stacked */
@media (max-width: 1024px) {
  .home-section-label--stacked {
    flex-direction: column;
    gap: 4px;
  }
}

@media (max-width: 768px) {
  /* Crown icon smaller on mobile */
  .es-icon-titles {
    height: 13px;
  }

  /* Default: keep horizontal layout on mobile */
  .home-section-label {
    flex-direction: row;
    gap: 8px;
  }

  /* CTA Link slightly smaller on mobile */
  .home-cta-link {
    font-size: 16px;
  }

  .home-cta-link .link-arrow {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  /* Section label text smaller on small screens */
  .home-section-label span {
    font-size: 14px;
  }
}

/* ============================================================
   404 Page Styles
   ============================================================
   Styles for the 404 Not Found page template.
   Includes decorative background images and centered content.
   ============================================================ */

.not-found-wrapper {
  position: relative;
  width: 100%;
  padding: 200px 80px 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 614px;
  flex: 1;
}

/* Decorative es-background.png inside not-found-wrapper: design size 725x428px */
.not-found-bg-image {
  position: absolute;
  z-index: 0;
  opacity: 0.7;
  background-image: url("../images/es-background.png");
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
}

/* Top right of not-found-wrapper */
.not-found-bg-image--top-right {
  top: 0;
  right: 0;
  width: 725px;
  height: 428px;
  background-position: top right;
}

/* Bottom left of not-found-wrapper */
.not-found-bg-image--bottom-left {
  bottom: 0;
  left: 0;
  width: 725px;
  height: 428px;
  background-position: bottom left;
}

.not-found-inner {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  width: 100%;
  text-align: center;
}

.not-found-inner .not-found-404,
.not-found-inner .not-found-message,
.not-found-inner p:has(.not-found-back) {
  position: relative;
  z-index: 1;
}

.not-found-404 {
  font-weight: 700;
  font-size: 120px;
  line-height: 1;
  margin: 0 0 24px;
  color: transparent;
  background-image: url("../images/eversmith-brands-footer.webp");
  background-size: cover;
  background-position: center;
  -webkit-background-clip: text;
  background-clip: text;
}

.not-found-404 img {
  max-width: 100%;
  height: auto;
}

.not-found-message {
  font-weight: 700;
  font-size: 18px;
  line-height: 1.5;
  color: var(--smith-grey);
  margin: 0 0 16px;
}

/* Go Back link - orange text with underline and arrow */
.not-found-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.5;
  color: var(--orange);
  text-decoration: none;
  cursor: pointer;
}

.not-found-back .link-label {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Arrow indicator */
.not-found-back::after {
  content: "→";
  display: inline-block;
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.5;
  text-decoration: none;
  transition: transform var(--transition-fast);
}

.not-found-back:hover::after {
  transform: translateX(2px);
}

/* ----- 404 Page Responsive Styles ----- */

/* Tablet adjustments */
@media (max-width: 1024px) {
  .not-found-wrapper {
    padding: 160px 60px 140px;
  }

  /* Smaller decorative bg images on tablet (proportional to 725x428) */
  .not-found-bg-image--top-right,
  .not-found-bg-image--bottom-left {
    width: 400px;
    height: 236px;
  }
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .not-found-wrapper {
    padding: 120px 40px 100px;
    min-height: auto;
  }

  .not-found-404 {
    font-size: 72px;
  }

  /* Even smaller decorative bg images on mobile */
  .not-found-bg-image--top-right,
  .not-found-bg-image--bottom-left {
    width: 280px;
    height: 165px;
  }
}

/* Small mobile screens */
@media (max-width: 480px) {
  .not-found-wrapper {
    padding: 100px 24px 80px;
  }

  .not-found-404 {
    font-size: 56px;
  }

  .not-found-message {
    font-size: 16px;
  }

  .not-found-back {
    font-size: 14px;
  }
}
