/* ============================================================
   ACS Electrical Contractors - Brand CSS
   Complete design system replacing Tailwind CSS + DaisyUI
   ============================================================ */

/* ============================================================
   0. CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================================ */
:root {
  /* --- ACS Brand Colors --- */
  --color-primary: #2B7FD4;        /* ACS Blue */
  --color-primary-hover: #1A5FAA;  /* Deep Blue */
  --color-primary-active: #0F4C81; /* Navy */
  --color-primary-content: #ffffff;
  --color-primary-10: rgba(43, 127, 212, 0.1);

  --color-secondary: #5BA8E6;      /* Sky Blue */
  --color-secondary-hover: #2B7FD4;
  --color-secondary-content: #ffffff;

  --color-success: #00A651;        /* Signal Green */
  --color-success-content: #ffffff;

  --color-error: #ED1C24;          /* Signal Red */
  --color-error-content: #ffffff;

  --color-warning: #F59E0B;        /* Caution Amber */
  --color-warning-content: #ffffff;

  --color-info: #2B7FD4;           /* ACS Blue (alias) */
  --color-info-content: #ffffff;

  /* --- Surface / Base Colors (Light Mode) --- */
  --color-base-100: #FFFFFF;       /* White */
  --color-base-200: #F8F9FB;       /* Off-White */
  --color-base-300: #E5E7EB;       /* Light Gray */
  --color-base-content: #1A1D23;   /* Logo Black */
  --color-base-content-70: rgba(26, 29, 35, 0.7);
  --color-base-content-80: rgba(26, 29, 35, 0.8);

  /* --- Neutral / Gray Scale --- */
  --color-gray-50: #F8F9FB;        /* Off-White */
  --color-gray-100: #F3F4F6;
  --color-gray-200: #E5E7EB;       /* Light Gray */
  --color-gray-300: #D1D5DB;
  --color-gray-400: #9CA3AF;
  --color-gray-500: #6B7280;       /* Mid Gray */
  --color-gray-600: #4B5563;
  --color-gray-700: #374151;       /* Charcoal */
  --color-gray-800: #1F2937;
  --color-gray-900: #1A1D23;       /* Logo Black */

  /* --- Named Brand Colors --- */
  --color-deep-blue: #1A5FAA;
  --color-navy: #0F4C81;
  --color-ice-blue: #E8F0FE;

  /* --- Typography --- */
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-serif: Georgia, Cambria, 'Times New Roman', Times, serif;
  --font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;

  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.6;
  --leading-relaxed: 1.625;

  /* --- Spacing Scale --- */
  --space-0: 0;
  --space-0-5: 0.125rem;
  --space-1: 0.25rem;
  --space-1-5: 0.375rem;
  --space-2: 0.5rem;
  --space-2-5: 0.625rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* --- Border Radius --- */
  --radius-sm: 0.125rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
  --radius-3xl: 1.5rem;
  --radius-full: 9999px;

  /* --- Shadows --- */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);

  /* --- Transitions --- */
  --transition-fast: 150ms ease-in-out;
  --transition-base: 200ms ease-in-out;
  --transition-slow: 300ms ease-out;

  /* --- Container --- */
  --container-max: 80rem; /* 1280px */

  /* --- Focus Ring (ACS Blue, 2px outline offset) --- */
  --focus-ring-color: #2B7FD4;
  --focus-ring-offset: 2px;
  --focus-ring-width: 2px;
}

/* --- Dark Mode Custom Properties --- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-base-100: #1A1D27;     /* Dark Surface */
    --color-base-200: #0F1117;     /* Dark BG */
    --color-base-300: #2A2D37;     /* Dark Border */
    --color-base-content: #F8F9FB;
    --color-base-content-70: rgba(248, 249, 251, 0.7);
    --color-base-content-80: rgba(248, 249, 251, 0.8);

    --color-primary: #5BA8E6;      /* Lighter blue for dark mode readability */
    --color-primary-hover: #2B7FD4;
    --color-primary-active: #1A5FAA;
    --color-primary-10: rgba(91, 168, 230, 0.15);

    --color-gray-50: #0F1117;
    --color-gray-100: #1A1D27;
    --color-gray-200: #2A2D37;
    --color-gray-300: #374151;
    --color-gray-400: #6B7280;
    --color-gray-500: #9CA3AF;
    --color-gray-600: #D1D5DB;
    --color-gray-700: #E5E7EB;
    --color-gray-800: #F3F4F6;
    --color-gray-900: #F8F9FB;

    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.4), 0 1px 2px -1px rgba(0, 0, 0, 0.3);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
  }
}

[data-theme="dark"] {
  --color-base-100: #1A1D27;       /* Dark Surface */
  --color-base-200: #0F1117;       /* Dark BG */
  --color-base-300: #2A2D37;       /* Dark Border */
  --color-base-content: #F8F9FB;
  --color-base-content-70: rgba(248, 249, 251, 0.7);
  --color-base-content-80: rgba(248, 249, 251, 0.8);

  --color-primary: #5BA8E6;        /* Sky Blue for dark mode readability */
  --color-primary-hover: #2B7FD4;
  --color-primary-active: #1A5FAA;
  --color-primary-10: rgba(91, 168, 230, 0.15);

  --color-gray-50: #0F1117;
  --color-gray-100: #1A1D27;
  --color-gray-200: #2A2D37;
  --color-gray-300: #374151;
  --color-gray-400: #6B7280;
  --color-gray-500: #9CA3AF;
  --color-gray-600: #D1D5DB;
  --color-gray-700: #E5E7EB;
  --color-gray-800: #F3F4F6;
  --color-gray-900: #F8F9FB;

  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.4), 0 1px 2px -1px rgba(0, 0, 0, 0.3);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
}


/* ============================================================
   1. RESET / NORMALIZE
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  -moz-tab-size: 4;
  tab-size: 4;
  line-height: 1.6;
  font-family: var(--font-sans);
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background-color: var(--color-gray-50);
  color: var(--color-base-content);
  font-family: var(--font-sans);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block;
  max-width: 100%;
}

img,
video {
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

address {
  font-style: normal;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

hr {
  border: none;
  border-top: 1px solid var(--color-base-300);
}

fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

/* Remove animations for reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}


/* ============================================================
   2. TYPOGRAPHY
   ============================================================ */

/* --- Headings --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 700;
  line-height: var(--leading-tight);
  color: var(--color-base-content);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }
h5 { font-size: var(--text-base); }
h6 { font-size: var(--text-sm); }

/* --- Body text --- */
p {
  margin-top: 0;
  margin-bottom: 0;
}

strong, b {
  font-weight: 600;
}

small {
  font-size: var(--text-sm);
}

/* --- Links (standalone) --- */
a:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring-color);
  outline-offset: var(--focus-ring-offset);
  border-radius: var(--radius-sm);
}

/* --- Screen reader only --- */
.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;
}


/* ============================================================
   3. LAYOUT - Container & Max Width
   ============================================================ */
.container {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
  max-width: var(--container-max);
}

.max-w-7xl { max-width: 80rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-xl  { max-width: 36rem; }
.max-w-xs  { max-width: 20rem; }
.max-w-none { max-width: none; }

.mx-auto { margin-left: auto; margin-right: auto; }


/* ============================================================
   4. LAYOUT - Flexbox Utilities
   ============================================================ */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1 1 0%; }
.flex-none { flex: none; }
.shrink-0 { flex-shrink: 0; }
.items-center { align-items: center; }
.items-start { align-items: start; }
.items-end { align-items: end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }
.gap-10 { gap: var(--space-10); }
.gap-12 { gap: var(--space-12); }
.gap-x-1 { column-gap: var(--space-1); }
.gap-x-2 { column-gap: var(--space-2); }
.gap-x-2\.5 { column-gap: var(--space-2-5); }
.gap-x-4 { column-gap: var(--space-4); }
.gap-x-6 { column-gap: var(--space-6); }
.gap-x-8 { column-gap: var(--space-8); }
.gap-x-12 { column-gap: var(--space-12); }
.gap-y-8 { row-gap: var(--space-8); }
.flow-root { display: flow-root; }


/* ============================================================
   5. LAYOUT - Grid Utilities
   ============================================================ */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.col-span-2 { grid-column: span 2 / span 2; }
.col-span-4 { grid-column: span 4 / span 4; }
.col-span-5 { grid-column: span 5 / span 5; }
.col-span-7 { grid-column: span 7 / span 7; }
.col-start-3 { grid-column-start: 3; }
.row-span-2 { grid-row: span 2 / span 2; }
.row-end-1 { grid-row-end: 1; }
.row-end-2 { grid-row-end: 2; }
.auto-rows-fr { grid-auto-rows: minmax(0, 1fr); }
.grid-rows-1 { grid-template-rows: repeat(1, minmax(0, 1fr)); }


/* ============================================================
   6. SPACING UTILITIES
   ============================================================ */

/* --- Margin --- */
.m-0 { margin: 0; }
.-m-1\.5 { margin: -0.375rem; }
.-m-2\.5 { margin: -0.625rem; }
.mt-0 { margin-top: 0; }
.mt-0\.5 { margin-top: 0.125rem; }
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mt-10 { margin-top: var(--space-10); }
.mt-16 { margin-top: var(--space-16); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.-mx-3 { margin-left: -0.75rem; margin-right: -0.75rem; }
.-mx-4 { margin-left: -1rem; margin-right: -1rem; }
.-my-6 { margin-top: -1.5rem; margin-bottom: -1.5rem; }
.-bottom-4 { bottom: -1rem; }
.-bottom-6 { bottom: -1.5rem; }
.-bottom-8 { bottom: -2rem; }
.-right-4 { right: -1rem; }
.-right-8 { right: -2rem; }

/* --- Padding --- */
.p-0 { padding: 0; }
.p-1\.5 { padding: 0.375rem; }
.p-2\.5 { padding: 0.625rem; }
.p-3 { padding: var(--space-3); }
.p-4 { padding: var(--space-4); }
.p-5 { padding: var(--space-5); }
.p-6 { padding: var(--space-6); }
.px-3 { padding-left: var(--space-3); padding-right: var(--space-3); }
.px-4 { padding-left: var(--space-4); padding-right: var(--space-4); }
.px-6 { padding-left: var(--space-6); padding-right: var(--space-6); }
.px-8 { padding-left: var(--space-8); padding-right: var(--space-8); }
.py-2 { padding-top: var(--space-2); padding-bottom: var(--space-2); }
.py-5 { padding-top: var(--space-5); padding-bottom: var(--space-5); }
.py-6 { padding-top: var(--space-6); padding-bottom: var(--space-6); }
.py-8 { padding-top: var(--space-8); padding-bottom: var(--space-8); }
.py-10 { padding-top: var(--space-10); padding-bottom: var(--space-10); }
.py-12 { padding-top: var(--space-12); padding-bottom: var(--space-12); }
.py-16 { padding-top: var(--space-16); padding-bottom: var(--space-16); }
.py-24 { padding-top: var(--space-24); padding-bottom: var(--space-24); }
.pt-2 { padding-top: var(--space-2); }
.pt-80 { padding-top: 20rem; }
.pb-8 { padding-bottom: var(--space-8); }
.pb-14 { padding-bottom: 3.5rem; }
.pl-5 { padding-left: var(--space-5); }


/* ============================================================
   7. SIZING UTILITIES
   ============================================================ */
.w-full { width: 100%; }
.w-10 { width: 2.5rem; }
.w-12 { width: 3rem; }
.w-28 { width: 7rem; }
.h-5 { height: 1.25rem; }
.h-6 { height: 1.5rem; }
.h-10 { height: 2.5rem; }
.h-12 { height: 3rem; }
.h-36 { height: 9rem; }
.h-72 { height: 18rem; }
.h-full { height: 100%; }
.min-w-0 { min-width: 0; }
.min-h-screen { min-height: 100vh; }

/* size-N = width + height */
.size-5 { width: 1.25rem; height: 1.25rem; }
.size-6 { width: 1.5rem; height: 1.5rem; }
.size-10 { width: 2.5rem; height: 2.5rem; }
.size-11 { width: 2.75rem; height: 2.75rem; }


/* ============================================================
   8. POSITIONING UTILITIES
   ============================================================ */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }
.inset-0 { inset: 0; }
.top-0 { top: 0; }
.top-16 { top: 4rem; }
.right-0 { right: 0; }
.bottom-0 { bottom: 0; }
.left-0 { left: 0; }
.z-10 { z-index: 10; }
.z-50 { z-index: 50; }
.-z-10 { z-index: -10; }
.isolate { isolation: isolate; }


/* ============================================================
   9. TYPOGRAPHY UTILITIES
   ============================================================ */
.text-xs { font-size: var(--text-xs); line-height: 1rem; }
.text-sm { font-size: var(--text-sm); line-height: 1.25rem; }
/* text-sm/6 from Tailwind: 0.875rem font with 1.5rem line-height */
.text-sm\/6 { font-size: var(--text-sm); line-height: 1.5rem; }
.text-base { font-size: var(--text-base); line-height: 1.5rem; }
/* text-base/7 from Tailwind */
.text-base\/7 { font-size: var(--text-base); line-height: 1.75rem; }
.text-lg { font-size: var(--text-lg); line-height: 1.75rem; }
/* text-lg/6 */
.text-lg\/6 { font-size: var(--text-lg); line-height: 1.5rem; }
/* text-lg/8 */
.text-lg\/8 { font-size: var(--text-lg); line-height: 2rem; }
.text-xl { font-size: var(--text-xl); line-height: 1.75rem; }
.text-2xl { font-size: var(--text-2xl); line-height: 2rem; }
.text-3xl { font-size: var(--text-3xl); line-height: 2.25rem; }
.text-4xl { font-size: var(--text-4xl); line-height: 2.5rem; }
.text-5xl { font-size: var(--text-5xl); line-height: 1; }

.font-sans { font-family: var(--font-sans); }
.font-serif { font-family: var(--font-serif); }
.font-mono { font-family: var(--font-mono); }

.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.leading-tight { line-height: var(--leading-tight); }
.leading-snug { line-height: var(--leading-snug); }
.leading-normal { line-height: var(--leading-normal); }
.leading-relaxed { line-height: var(--leading-relaxed); }
.leading-7 { line-height: 1.75rem; }

.tracking-normal { letter-spacing: 0; }
.tracking-tight { letter-spacing: -0.025em; }

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.text-balance { text-wrap: balance; }

.uppercase { text-transform: uppercase; }
.lowercase { text-transform: lowercase; }
.capitalize { text-transform: capitalize; }

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.not-italic { font-style: normal; }
.list-disc { list-style-type: disc; }


/* ============================================================
   10. COLOR UTILITIES
   ============================================================ */

/* --- Background --- */
.bg-white { background-color: #ffffff; }
.bg-base-100 { background-color: var(--color-base-100); }
.bg-base-200 { background-color: var(--color-base-200); }
.bg-base-300 { background-color: var(--color-base-300); }
.bg-gray-50 { background-color: var(--color-gray-50); }
.bg-gray-100 { background-color: var(--color-gray-100); }
.bg-gray-300 { background-color: var(--color-gray-300); }
.bg-gray-700 { background-color: var(--color-gray-700); }
.bg-gray-900 { background-color: var(--color-gray-900); }
.bg-primary { background-color: var(--color-primary); }
.bg-primary\/10 { background-color: var(--color-primary-10); }
.bg-ice-blue { background-color: var(--color-ice-blue); }
.bg-navy { background-color: var(--color-navy); }
.bg-deep-blue { background-color: var(--color-deep-blue); }

/* --- Text Color --- */
.text-white { color: #ffffff; }
.text-black { color: #000000; }
.text-base-content { color: var(--color-base-content); }
.text-base-content\/70 { color: var(--color-base-content-70); }
.text-base-content\/80 { color: var(--color-base-content-80); }
.text-primary { color: var(--color-primary); }
.text-primary-content { color: var(--color-primary-content); }
.text-success { color: var(--color-success); }
.text-error { color: var(--color-error); }
.text-gray-400 { color: var(--color-gray-400); }
.text-gray-500 { color: var(--color-gray-500); }
.text-gray-600 { color: var(--color-gray-600); }
.text-gray-700 { color: var(--color-gray-700); }
.text-gray-900 { color: var(--color-gray-900); }

/* --- Border Color --- */
.border-base-100 { border-color: var(--color-base-100); }
.border-base-300 { border-color: var(--color-base-300); }
.border-gray-300 { border-color: var(--color-gray-300); }
.border-gray-900\/5 { border-color: rgba(26, 29, 35, 0.05); }

/* --- Fill (SVG) --- */
.fill-current { fill: currentColor; }


/* ============================================================
   11. BORDER UTILITIES
   ============================================================ */
.border { border: 1px solid var(--color-base-300); }
.border-b { border-bottom: 1px solid var(--color-base-300); }
.border-x { border-left: 1px solid; border-right: 1px solid; }
.border-t-2 { border-top: 2px solid var(--color-base-300); }

.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-2xl { border-radius: var(--radius-2xl); }
.rounded-3xl { border-radius: var(--radius-3xl); }
.rounded-full { border-radius: var(--radius-full); }

/* --- Dividers --- */
.divide-x > * + * { border-left: 1px solid var(--color-base-300); }
.divide-y > * + * { border-top: 1px solid var(--color-base-300); }
.divide-gray-500\/10 > * + * { border-color: rgba(107, 114, 128, 0.1); }
.divide-gray-900\/5 > * + * { border-color: rgba(26, 29, 35, 0.05); }

/* --- Ring --- */
.ring-1 { box-shadow: 0 0 0 1px var(--color-base-300); }
.ring-inset { box-shadow: inset 0 0 0 1px var(--color-base-300); }
.ring-gray-900\/5 { --tw-ring-color: rgba(26, 29, 35, 0.05); }
.ring-gray-900\/10 { --tw-ring-color: rgba(26, 29, 35, 0.1); }


/* ============================================================
   12. SHADOW UTILITIES
   ============================================================ */
.shadow-xs { box-shadow: var(--shadow-xs); }
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow { box-shadow: var(--shadow); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }


/* ============================================================
   13. DISPLAY & OVERFLOW UTILITIES
   ============================================================ */
.block { display: block; }
.inline-block { display: inline-block; }
.hidden { display: none; }
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }
.overflow-visible { overflow: visible; }
.object-cover { object-fit: cover; }
.aspect-video { aspect-ratio: 16 / 9; }


/* ============================================================
   14. SPACING HELPERS
   ============================================================ */
.space-x-3 > * + * { margin-left: var(--space-3); }
.space-y-1 > * + * { margin-top: var(--space-1); }
.space-y-2 > * + * { margin-top: var(--space-2); }
.space-y-4 > * + * { margin-top: var(--space-4); }
.space-y-6 > * + * { margin-top: var(--space-6); }


/* ============================================================
   15. TRANSITION & OPACITY UTILITIES
   ============================================================ */
.transition {
  transition-property: color, background-color, border-color, box-shadow, opacity, transform;
  transition-timing-function: ease-in-out;
  transition-duration: 200ms;
}

.opacity-50 { opacity: 0.5; }
.cursor-pointer { cursor: pointer; }


/* ============================================================
   16. GRADIENT UTILITIES
   ============================================================ */
.bg-gradient-to-t {
  background-image: linear-gradient(to top, var(--tw-gradient-from, transparent), var(--tw-gradient-to, transparent));
}

/* Tailwind-style: from-gray-900 via-gray-900/40 */
.from-gray-900 { --tw-gradient-from: #1A1D23; }
.via-gray-900\/40 { --tw-gradient-via: rgba(26, 29, 35, 0.4); }

/* Combined gradient helper for service index cards */
.bg-gradient-to-t.from-gray-900.via-gray-900\/40 {
  background-image: linear-gradient(to top, #1A1D23, rgba(26, 29, 35, 0.4), transparent);
}


/* ============================================================
   17. FOCUS UTILITIES
   ============================================================ */
.focus\:outline-none:focus { outline: none; }

.focus-within\:ring-2:focus-within {
  box-shadow: 0 0 0 2px var(--color-primary);
}

.focus-within\:ring-offset-2:focus-within {
  box-shadow: 0 0 0 var(--focus-ring-offset) var(--color-base-100), 0 0 0 calc(var(--focus-ring-offset) + 2px) var(--color-primary);
}


/* ============================================================
   18. GROUP / HOVER UTILITIES
   ============================================================ */
/* .group is a marker class, no styles needed on its own */
.group { /* marker */ }

.hover\:bg-gray-50:hover { background-color: var(--color-gray-50); }
.hover\:bg-gray-100:hover { background-color: var(--color-gray-100); }
.hover\:bg-base-50:hover { background-color: var(--color-gray-50); }
.hover\:text-gray-800:hover { color: var(--color-gray-800); }
.hover\:shadow-lg:hover { box-shadow: var(--shadow-lg); }
.hover\:border-gray-400:hover { border-color: var(--color-gray-400); }

.group:hover .group-hover\:bg-white { background-color: #ffffff; }
.group:hover .group-hover\:text-indigo-600 { color: var(--color-primary); }


/* ============================================================
   19. RESPONSIVE BREAKPOINTS (Mobile First)
   ============================================================ */

/* --- sm: 640px --- */
@media (min-width: 640px) {
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm\:grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
  .sm\:max-w-sm { max-width: 24rem; }
  .sm\:ring-1 { box-shadow: 0 0 0 1px var(--color-base-300); }
  .sm\:ring-gray-900\/10 { --tw-ring-color: rgba(26, 29, 35, 0.1); }
  .sm\:mx-0 { margin-left: 0; margin-right: 0; }
  .sm\:rounded-lg { border-radius: var(--radius-lg); }
  .sm\:px-6 { padding-left: var(--space-6); padding-right: var(--space-6); }
  .sm\:px-8 { padding-left: var(--space-8); padding-right: var(--space-8); }
  .sm\:pb-14 { padding-bottom: 3.5rem; }
  .sm\:pt-48 { padding-top: 12rem; }
  .sm\:h-80 { height: 20rem; }
  .sm\:text-5xl { font-size: var(--text-5xl); line-height: 1; }
  .sm\:py-32 { padding-top: 8rem; padding-bottom: 8rem; }
  .sm\:mt-20 { margin-top: 5rem; }
  .sm\:w-36 { width: 9rem; }
  .sm\:-bottom-8 { bottom: -2rem; }
  .sm\:-right-8 { right: -2rem; }
}

/* --- md: 768px --- */
@media (min-width: 768px) {
  .md\:flex { display: flex; }
  .md\:hidden { display: none; }
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:items-center { align-items: center; }
  .md\:justify-between { justify-content: space-between; }
  .md\:gap-6 { gap: var(--space-6); }
  .md\:order-1 { order: 1; }
  .md\:order-2 { order: 2; }
  .md\:mt-0 { margin-top: 0; }
  .md\:text-4xl { font-size: var(--text-4xl); line-height: 2.5rem; }
  .md\:text-5xl { font-size: var(--text-5xl); line-height: 1; }
  .md\:w-44 { width: 11rem; }
}

/* --- lg: 1024px --- */
@media (min-width: 1024px) {
  .lg\:flex { display: flex; }
  .lg\:hidden { display: none; }
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lg\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .lg\:col-span-2 { grid-column: span 2 / span 2; }
  .lg\:col-span-5 { grid-column: span 5 / span 5; }
  .lg\:col-span-7 { grid-column: span 7 / span 7; }
  .lg\:col-start-3 { grid-column-start: 3; }
  .lg\:row-span-2 { grid-row: span 2 / span 2; }
  .lg\:row-end-1 { grid-row-end: 1; }
  .lg\:row-end-2 { grid-row-end: 2; }
  .lg\:mx-0 { margin-left: 0; margin-right: 0; }
  .lg\:max-w-none { max-width: none; }
  .lg\:flex-1 { flex: 1 1 0%; }
  .lg\:justify-end { justify-content: flex-end; }
  .lg\:gap-x-12 { column-gap: var(--space-12); }
  .lg\:px-8 { padding-left: var(--space-8); padding-right: var(--space-8); }
  .lg\:pt-80 { padding-top: 20rem; }
  .lg\:h-\[420px\] { height: 420px; }
  .lg\:w-48 { width: 12rem; }
}

/* --- xl: 1280px --- */
@media (min-width: 1280px) {
  .xl\:gap-x-8 { column-gap: var(--space-8); }
}


/* ============================================================
   20. COMPONENT: Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.625rem 1.25rem;
  min-height: 2.75rem; /* 44px touch target */
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
}

.btn:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring-color);
  outline-offset: var(--focus-ring-offset);
}

/* Primary - ACS Blue */
.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-primary-content);
  border-color: var(--color-primary);
}

.btn-primary:hover {
  background-color: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
}

.btn-primary:active {
  background-color: var(--color-primary-active);
  border-color: var(--color-primary-active);
}

/* Secondary - Sky Blue */
.btn-secondary {
  background-color: var(--color-secondary);
  color: var(--color-secondary-content);
  border-color: var(--color-secondary);
}

.btn-secondary:hover {
  background-color: var(--color-secondary-hover);
  border-color: var(--color-secondary-hover);
}

.btn-secondary:active {
  background-color: var(--color-primary-active);
  border-color: var(--color-primary-active);
}

/* Outline */
.btn-outline {
  background-color: transparent;
  color: var(--color-base-content);
  border-color: var(--color-base-300);
}

.btn-outline:hover {
  background-color: var(--color-base-200);
  border-color: var(--color-gray-400);
}

.btn-outline:active {
  background-color: var(--color-base-300);
}

/* Ghost */
.btn-ghost {
  background-color: transparent;
  color: var(--color-base-content);
  border-color: transparent;
}

.btn-ghost:hover {
  background-color: var(--color-base-200);
}

.btn-ghost:active {
  background-color: var(--color-base-300);
}

/* Sizes */
.btn-sm {
  padding: 0.375rem 0.75rem;
  min-height: 2.25rem;
  font-size: var(--text-xs);
}

.btn-wide {
  min-width: 16rem;
}

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

/* Submit spinner animation */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.submit-spinner {
  animation: spin 0.8s linear infinite;
}


/* ============================================================
   21. COMPONENT: Cards
   ============================================================ */
.card {
  background-color: var(--color-base-100);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.card-body {
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.card-title {
  font-size: var(--text-lg);
  font-weight: 600;
  line-height: var(--leading-tight);
  color: var(--color-base-content);
}

.card-header {
  padding: var(--space-6) var(--space-6) 0;
  font-weight: 600;
}


/* ============================================================
   22. COMPONENT: Alerts
   ============================================================ */
.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-xl);
  background-color: var(--color-base-200);
  color: var(--color-base-content);
  font-size: var(--text-sm);
}

.alert-info {
  background-color: rgba(43, 127, 212, 0.1);
  color: var(--color-info);
}

.alert-success {
  background-color: rgba(0, 166, 81, 0.1);
  color: var(--color-success);
}

.alert-error {
  background-color: rgba(237, 28, 36, 0.1);
  color: var(--color-error);
}

.alert-warning {
  background-color: rgba(245, 158, 11, 0.1);
  color: var(--color-warning);
}


/* ============================================================
   23. COMPONENT: Forms - Labels
   ============================================================ */
.label {
  display: flex;
  align-items: center;
  padding-top: var(--space-2);
  padding-bottom: var(--space-1);
}

.label-text {
  font-size: var(--text-sm);
  color: var(--color-base-content);
}


/* ============================================================
   24. COMPONENT: Forms - Inputs
   ============================================================ */
.input {
  display: block;
  width: 100%;
  padding: 0.625rem 0.75rem;
  min-height: 2.75rem; /* 44px touch target */
  font-size: var(--text-sm);
  line-height: 1.5;
  color: var(--color-base-content);
  background-color: var(--color-base-100);
  border: 1px solid #000000;
  border-radius: var(--radius-lg);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  appearance: none;
}

.input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px var(--color-primary-10);
}

.input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background-color: var(--color-base-200);
}

.input::placeholder {
  color: var(--color-gray-400);
}

/* input-bordered is a marker class - .input already has border */
.input-bordered { /* styled by .input */ }


/* ============================================================
   25. COMPONENT: Forms - Textarea
   ============================================================ */
.textarea {
  display: block;
  width: 100%;
  padding: 0.625rem 0.75rem;
  font-size: var(--text-sm);
  line-height: 1.5;
  color: var(--color-base-content);
  background-color: var(--color-base-100);
  border: 1px solid #000000;
  border-radius: var(--radius-lg);
  resize: vertical;
  min-height: 5rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px var(--color-primary-10);
}

.textarea:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background-color: var(--color-base-200);
}

.textarea::placeholder {
  color: var(--color-gray-400);
}

.textarea-bordered { /* styled by .textarea */ }


/* ============================================================
   26. COMPONENT: Forms - Checkbox
   ============================================================ */
.checkbox {
  appearance: none;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--color-base-300);
  border-radius: var(--radius-sm);
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.checkbox:checked {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

.checkbox:checked::after {
  content: '';
  position: absolute;
  top: 1px;
  left: 5px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring-color);
  outline-offset: var(--focus-ring-offset);
}

.checkbox-primary:checked {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}


/* ============================================================
   27. COMPONENT: Tables
   ============================================================ */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.table th,
.table td {
  padding: 0.75rem 1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--color-base-300);
}

.table th {
  font-weight: 600;
  color: var(--color-base-content);
}

.table-sm th,
.table-sm td {
  padding: 0.5rem 0.75rem;
}


/* ============================================================
   28. COMPONENT: Links
   ============================================================ */
.link {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--transition-fast);
}

.link:hover {
  color: var(--color-primary-hover);
}

.link:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring-color);
  outline-offset: var(--focus-ring-offset);
}

.link-hover {
  text-decoration: none;
}

.link-hover:hover {
  text-decoration: underline;
}

.link-primary {
  color: var(--color-primary);
}

.link-primary:hover {
  color: var(--color-primary-hover);
}


/* ============================================================
   29. COMPONENT: Breadcrumbs
   ============================================================ */
/* Semantic breadcrumbs built from <nav aria-label="Breadcrumb"> + <ol> */
nav[aria-label="Breadcrumb"] ol {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: var(--text-sm);
  color: var(--color-base-content-70);
}

nav[aria-label="Breadcrumb"] a {
  color: var(--color-base-content-70);
  text-decoration: none;
}

nav[aria-label="Breadcrumb"] a:hover {
  text-decoration: underline;
  color: var(--color-base-content);
}

/* Optional class-based breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: var(--text-sm);
  color: var(--color-base-content-70);
}

.breadcrumb a {
  color: var(--color-base-content-70);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
  color: var(--color-base-content);
}


/* ============================================================
   30. COMPONENT: Collapse / Accordion
   ============================================================ */
.collapse {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.collapse > input[type="checkbox"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
  /* Only cover the title area */
  height: auto;
  bottom: auto;
}

.collapse-title {
  display: flex;
  align-items: center;
  padding: 1rem 1.5rem;
  font-size: var(--text-base);
  font-weight: 500;
  cursor: pointer;
  position: relative;
  user-select: none;
  min-height: 2.75rem; /* 44px touch target */
}

.collapse-content {
  padding: 0 1.5rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-slow), padding var(--transition-slow);
}

/* When the checkbox is checked, expand */
.collapse > input[type="checkbox"]:checked ~ .collapse-content {
  max-height: 40rem;
  padding-bottom: 1rem;
}

/* Arrow indicator */
.collapse-arrow .collapse-title::after {
  content: '';
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transition: transform var(--transition-base);
}

.collapse-arrow > input[type="checkbox"]:checked ~ .collapse-title::after {
  transform: translateY(-50%) rotate(-135deg);
}

/* Focus ring for accessibility */
.collapse > input[type="checkbox"]:focus-visible ~ .collapse-title {
  outline: var(--focus-ring-width) solid var(--focus-ring-color);
  outline-offset: calc(-1 * var(--focus-ring-width));
}


/* ============================================================
   31. COMPONENT: Avatar
   ============================================================ */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.avatar.placeholder > div {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-family: var(--font-sans);
}


/* ============================================================
   32. COMPONENT: Site Header & Navigation
   ============================================================ */

/* --- Site header (sticky Deep Blue bar) --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: var(--color-deep-blue);
  box-shadow: var(--shadow-md);
}

.site-nav {
  position: relative;
}

.site-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-3) var(--space-6);
}

/* --- Logo --- */
.site-nav__logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.site-nav__logo img {
  height: 3.5rem;
  width: auto;
  padding: var(--space-2) var(--space-3);
  background-color: #ffffff;
  border-radius: var(--radius-md);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.site-nav__logo:focus-visible {
  outline: var(--focus-ring-width) solid #ffffff;
  outline-offset: var(--focus-ring-offset);
  border-radius: var(--radius-sm);
}

/* --- Desktop nav links (hidden below 768px) --- */
.site-nav__links {
  display: none;
  align-items: center;
  gap: var(--space-1);
  margin: 0;
  padding: 0;
}

@media (min-width: 768px) {
  .site-nav__links {
    display: flex;
  }
}

/* --- Individual nav link --- */
.site-nav__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
  border-radius: var(--radius-md);
  border: none;
  border-bottom: 2px solid transparent;
  min-height: 2.75rem; /* 44px touch target */
  transition: all var(--transition-base);
  cursor: pointer;
  background: none;
}

.site-nav__link:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.site-nav__link:focus-visible {
  outline: var(--focus-ring-width) solid #ffffff;
  outline-offset: var(--focus-ring-offset);
}

/* Active page indicator: ACS Blue underline */
.site-nav__link[aria-current="page"] {
  border-bottom-color: var(--color-primary);
}

/* --- Chevron icon in dropdown toggle --- */
.site-nav__chevron {
  transition: transform var(--transition-base);
}

.site-nav__dropdown-toggle[aria-expanded="true"] .site-nav__chevron {
  transform: rotate(180deg);
}

/* --- Desktop dropdown (mega menu) --- */
.site-nav__dropdown {
  position: static;
}

.site-nav__dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  width: 100%;
  background-color: var(--color-base-100);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  box-shadow: var(--shadow-xl);
  z-index: 50;
  overflow: hidden;
}

.site-nav__dropdown-menu.is-open {
  display: block;
}

.site-nav__dropdown-inner {
  padding: 0;
}

/* --- Dropdown CTA bar --- */
.site-nav__dropdown-cta {
  display: flex;
  border-top: 1px solid var(--color-base-300);
  background-color: var(--color-gray-50);
}

.site-nav__dropdown-cta-link {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-base-content);
  text-decoration: none;
  transition: background-color var(--transition-base);
  min-height: 2.75rem;
}

.site-nav__dropdown-cta-link:hover {
  background-color: var(--color-gray-100);
}

.site-nav__dropdown-cta-link:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring-color);
  outline-offset: calc(-1 * var(--focus-ring-width));
}

.site-nav__dropdown-cta-link + .site-nav__dropdown-cta-link {
  border-left: 1px solid var(--color-base-300);
}

.site-nav__dropdown-cta-link svg {
  flex-shrink: 0;
  color: var(--color-gray-400);
}

/* --- Right-side actions (theme toggle + hamburger) --- */
.site-nav__actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* --- Hamburger button (visible below 768px) --- */
.site-nav__hamburger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2);
  min-width: 2.75rem;
  min-height: 2.75rem;
  border-radius: var(--radius-md);
  color: #ffffff;
  cursor: pointer;
  transition: background-color var(--transition-base);
  background: none;
  border: none;
}

.site-nav__hamburger:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.site-nav__hamburger:focus-visible {
  outline: var(--focus-ring-width) solid #ffffff;
  outline-offset: var(--focus-ring-offset);
}

/* Show hamburger icon, hide close icon by default */
.site-nav__hamburger .close-icon {
  display: none;
}

/* When expanded, swap icons */
.site-nav__hamburger[aria-expanded="true"] .hamburger-icon {
  display: none;
}

.site-nav__hamburger[aria-expanded="true"] .close-icon {
  display: block;
}

@media (min-width: 768px) {
  .site-nav__hamburger {
    display: none;
  }
}

/* --- Mobile navigation panel --- */
.site-nav__mobile {
  display: none;
  background-color: var(--color-deep-blue);
  padding: var(--space-4) var(--space-6) var(--space-6);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.site-nav__mobile.is-open {
  display: block;
}

@media (min-width: 768px) {
  .site-nav__mobile {
    display: none !important;
  }
}

.site-nav__mobile-links {
  margin: 0;
  padding: 0;
}

.site-nav__mobile-links > li + li {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.site-nav__mobile-links a,
.site-nav__mobile-dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
  border-radius: var(--radius-md);
  min-height: 2.75rem;
  background: none;
  border: none;
  cursor: pointer;
  transition: background-color var(--transition-base);
}

.site-nav__mobile-links a:hover,
.site-nav__mobile-dropdown-toggle:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.site-nav__mobile-links a:focus-visible,
.site-nav__mobile-dropdown-toggle:focus-visible {
  outline: var(--focus-ring-width) solid #ffffff;
  outline-offset: var(--focus-ring-offset);
}

.site-nav__mobile-links a[aria-current="page"] {
  border-left: 3px solid var(--color-primary);
  background-color: rgba(255, 255, 255, 0.05);
}

/* --- Mobile dropdown chevron --- */
.site-nav__mobile-dropdown-toggle .site-nav__chevron {
  transition: transform var(--transition-base);
}

.site-nav__mobile-dropdown-toggle[aria-expanded="true"] .site-nav__chevron {
  transform: rotate(180deg);
}

/* --- Mobile services submenu --- */
.site-nav__mobile-submenu {
  display: none;
  margin: 0;
  padding: 0 0 0 var(--space-4);
}

.site-nav__mobile-submenu.is-open {
  display: block;
}

.site-nav__mobile-submenu a {
  font-size: var(--text-sm);
  font-weight: 500;
  padding: var(--space-2) var(--space-4);
  color: rgba(255, 255, 255, 0.85);
}

.site-nav__mobile-submenu a:hover {
  color: #ffffff;
}

/* --- Services grid (inner services dropdown / mega menu) --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-1);
  padding: var(--space-6) var(--space-8);
  max-width: var(--container-max);
  margin: 0 auto;
}

@media (min-width: 768px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.services-grid__item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--color-base-content);
  transition: background-color var(--transition-base);
}

.services-grid__item:hover {
  background-color: var(--color-gray-50);
}

.services-grid__item:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring-color);
  outline-offset: calc(-1 * var(--focus-ring-width));
}

.services-grid__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  flex-shrink: 0;
  border-radius: var(--radius-lg);
  background-color: var(--color-gray-50);
  color: var(--color-gray-600);
  transition: all var(--transition-base);
}

.services-grid__item:hover .services-grid__icon {
  background-color: #ffffff;
  color: var(--color-primary);
}

.services-grid__title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-base-content);
}

.services-grid__desc {
  font-size: var(--text-sm);
  color: var(--color-gray-600);
  margin-top: var(--space-1);
}

.services-grid__empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--space-6);
  color: var(--color-gray-500);
}


/* ============================================================
   33. COMPONENT: Prose (Rich Text Content)
   ============================================================ */
.prose {
  color: var(--color-base-content-80);
  line-height: 1.75;
}

.prose p {
  margin-top: 1.25em;
  margin-bottom: 1.25em;
}

.prose p:first-child {
  margin-top: 0;
}

.prose p:last-child {
  margin-bottom: 0;
}

.prose a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose a:hover {
  color: var(--color-primary-hover);
}

.prose strong {
  color: var(--color-base-content);
  font-weight: 600;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4 {
  color: var(--color-base-content);
  margin-top: 2em;
  margin-bottom: 0.75em;
}

.prose h1 { font-size: var(--text-3xl); }
.prose h2 { font-size: var(--text-2xl); }
.prose h3 { font-size: var(--text-xl); }
.prose h4 { font-size: var(--text-lg); }

.prose ul,
.prose ol {
  padding-left: 1.5em;
  margin-top: 1em;
  margin-bottom: 1em;
}

.prose ul { list-style-type: disc; }
.prose ol { list-style-type: decimal; }

.prose li {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

.prose blockquote {
  border-left: 3px solid var(--color-primary);
  padding-left: 1em;
  margin-left: 0;
  font-style: italic;
  color: var(--color-base-content-70);
}

.prose code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background-color: var(--color-base-200);
  padding: 0.125em 0.375em;
  border-radius: var(--radius-sm);
}

.prose pre {
  background-color: var(--color-base-200);
  padding: 1em;
  border-radius: var(--radius-lg);
  overflow-x: auto;
}

.prose pre code {
  background: none;
  padding: 0;
}

.prose img {
  margin-top: 1.5em;
  margin-bottom: 1.5em;
  border-radius: var(--radius-lg);
}

.prose hr {
  margin-top: 2em;
  margin-bottom: 2em;
  border-top: 1px solid var(--color-base-300);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5em;
  margin-bottom: 1.5em;
}

.prose th,
.prose td {
  padding: 0.5em 0.75em;
  border-bottom: 1px solid var(--color-base-300);
  text-align: left;
}

.prose th {
  font-weight: 600;
}


/* ============================================================
   34. DARK MODE TOGGLE (for use in navigation bar)
   ============================================================ */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2);
  min-width: 2.75rem;  /* 44px touch target */
  min-height: 2.75rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.3);
  background-color: transparent;
  color: #ffffff;
  cursor: pointer;
  transition: all var(--transition-base);
}

.theme-toggle:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
}

.theme-toggle:focus-visible {
  outline: var(--focus-ring-width) solid #ffffff;
  outline-offset: var(--focus-ring-offset);
}

/* Hide the sun icon in light mode, moon icon in dark mode */
[data-theme="light"] .theme-toggle .icon-sun,
:root:not([data-theme="dark"]) .theme-toggle .icon-sun {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-moon {
    display: none;
  }
  :root:not([data-theme="light"]) .theme-toggle .icon-sun {
    display: block;
  }
}


/* ============================================================
   37. COMPONENT: Footer
   ============================================================ */
.site-footer {
  background-color: var(--color-navy);
  color: rgba(255, 255, 255, 0.85);
}

.site-footer a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: color 0.15s ease;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: #ffffff;
  text-decoration: underline;
}

.site-footer__inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: var(--space-12) var(--space-6);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}

@media (min-width: 640px) {
  .site-footer__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .site-footer__grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-10);
  }
}

.site-footer__heading {
  color: #ffffff;
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 var(--space-4);
}

.site-footer__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer__list li {
  margin-bottom: var(--space-2);
}

.site-footer__list a {
  font-size: var(--text-sm);
  line-height: 1.5;
}

.site-footer__about {
  font-size: var(--text-sm);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
  margin-top: var(--space-3);
}

.site-footer__logo {
  display: inline-block;
  margin-bottom: var(--space-3);
}

.site-footer__logo img {
  height: 3.5rem;
  width: auto;
  padding: var(--space-2) var(--space-3);
  background-color: #ffffff;
  border-radius: var(--radius-md);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.site-footer__social {
  display: flex;
  gap: var(--space-4);
  margin-top: var(--space-4);
  list-style: none;
  padding: 0;
}

.site-footer__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-md);
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.15s ease, background-color 0.15s ease;
}

.site-footer__social a:hover,
.site-footer__social a:focus-visible {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.1);
  text-decoration: none;
}

.site-footer__social svg {
  width: 1.25rem;
  height: 1.25rem;
}

.site-footer__address {
  font-style: normal;
  font-size: var(--text-sm);
  line-height: 1.6;
}

.site-footer__heading--spaced {
  margin-top: var(--space-6);
}

.site-footer__divider {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  margin: var(--space-8) 0 0;
}

.site-footer__bottom {
  max-width: 80rem;
  margin: 0 auto;
  padding: var(--space-6) var(--space-6) var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  align-items: center;
  text-align: center;
}

@media (min-width: 640px) {
  .site-footer__bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.site-footer__copyright {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
}

.site-footer__bottom-links {
  display: flex;
  gap: var(--space-4);
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer__bottom-links a {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.5);
}

.site-footer__bottom-links a:hover,
.site-footer__bottom-links a:focus-visible {
  color: rgba(255, 255, 255, 0.85);
}


/* ============================================================
   38. COMPONENT: Badges
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0.125rem 0.625rem;
  font-size: var(--text-xs);
  font-weight: 500;
  line-height: 1.25rem;
  border-radius: var(--radius-full);
  background-color: var(--color-base-200);
  color: var(--color-base-content);
}

.badge-primary {
  background-color: var(--color-primary-10);
  color: var(--color-primary);
}

.badge-success {
  background-color: rgba(0, 166, 81, 0.1);
  color: var(--color-success);
}

.badge-error {
  background-color: rgba(237, 28, 36, 0.1);
  color: var(--color-error);
}

.badge-warning {
  background-color: rgba(245, 158, 11, 0.1);
  color: var(--color-warning);
}


/* ============================================================
   39. WAGTAIL USERBAR OVERRIDE
   ============================================================ */
.wagtail-userbar {
  z-index: 9999 !important;
}


/* ============================================================
   40. PRINT STYLES
   ============================================================ */
@media print {
  .no-print,
  header nav,
  footer,
  .btn,
  .theme-toggle {
    display: none !important;
  }

  body {
    background: white;
    color: black;
    font-size: 12pt;
  }

  a {
    text-decoration: underline;
    color: black;
  }

  .card {
    break-inside: avoid;
    border: 1px solid #ddd;
    box-shadow: none;
  }
}


/* ============================================================
   41. CUSTOM COMPONENT: Section Backgrounds
   ============================================================ */
.section-light {
  background-color: var(--color-base-100);
}

.section-medium {
  background-color: var(--color-base-200);
}

.section-ice {
  background-color: var(--color-ice-blue);
}

.section-dark {
  background-color: var(--color-navy);
  color: white;
}


/* ============================================================
   42. ACCESSIBILITY: Focus Visible Styles
   ============================================================ */
/* Global focus visible for interactive elements */
:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring-color);
  outline-offset: var(--focus-ring-offset);
}

/* Remove outline for mouse users */
:focus:not(:focus-visible) {
  outline: none;
}

/* Skip to content link (hidden until focused) */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  z-index: 9999;
  padding: var(--space-2) var(--space-4);
  background-color: var(--color-primary);
  color: var(--color-primary-content);
  border-radius: var(--radius-lg);
  font-weight: 600;
  text-decoration: none;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-4);
}


/* ============================================================
   43. DARK MODE TOGGLE - JavaScript Snippet
   ============================================================
   Include this script in base.html <head> (before body renders)
   to prevent flash of wrong theme:

   <script>
   (function() {
     var theme = localStorage.getItem('theme');
     if (theme === 'dark' || theme === 'light') {
       document.documentElement.setAttribute('data-theme', theme);
     } else if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
       document.documentElement.setAttribute('data-theme', 'dark');
     } else {
       document.documentElement.setAttribute('data-theme', 'light');
     }
   })();
   </script>

   Then for the toggle button (in navigation):

   <button class="theme-toggle" onclick="toggleTheme()" aria-label="Toggle dark mode">
     <svg class="icon-moon size-5" ...><!-- moon icon --></svg>
     <svg class="icon-sun size-5" ...><!-- sun icon --></svg>
   </button>

   <script>
   function toggleTheme() {
     var current = document.documentElement.getAttribute('data-theme');
     var next = current === 'dark' ? 'light' : 'dark';
     document.documentElement.setAttribute('data-theme', next);
     localStorage.setItem('theme', next);
   }
   </script>
   ============================================================ */
