/* ============================================================
   RNC LEGAL — MASTER STYLESHEET
   South Florida Law Firm Website
   WCAG 2.1 AA Compliant | Mobile-First | SEO Optimized
   ============================================================ */

/* ============================================================
   1. GOOGLE FONTS IMPORT
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;0,900;1,400;1,700&family=Inter:wght@300;400;500;600;700&display=swap');

/* ============================================================
   2. CSS CUSTOM PROPERTIES (VARIABLES)
   ============================================================ */
:root {
  /* Brand Colors — matched to RNC Legal logo */
  --navy:          #0A2463;   /* darkest navy — base of chess piece */
  --navy-dark:     #061640;   /* deepest navy for heavy use */
  --royal:         #1565C0;   /* royal blue — mid gradient */
  --bright-blue:   #1E90FF;   /* bright blue — top of chess piece */
  --sky-blue:      #4FC3F7;   /* sky blue — "Checkmate." color */
  --silver:        #90A4AE;   /* silver-grey — "LEGAL" text */
  --silver-dark:   #607D8B;   /* darker silver for text */

  /* Neutral Palette */
  --white:         #FFFFFF;
  --off-white:     #F5F7FA;
  --light-grey:    #ECEFF1;
  --mid-grey:      #CFD8DC;
  --slate:         #546E7A;
  --charcoal:      #37474F;
  --near-black:    #1A1A2E;

  /* Semantic Colors */
  --success:       #2E7D32;
  --error:         #C62828;
  --warning:       #E65100;
  --info:          var(--royal);

  /* Text Colors — all pass WCAG AA on white */
  --text-primary:  #1A1A2E;   /* ~18:1 on white */
  --text-secondary:#455A64;   /* ~6.6:1 on white */
  --text-muted:    #607D8B;   /* ~4.6:1 on white */
  --text-inverse:  #FFFFFF;
  --text-link:     #0A47A9;   /* ~7.2:1 on white */
  --text-link-hover:#061640;

  /* Background Colors */
  --bg-primary:    #FFFFFF;
  --bg-secondary:  #F5F7FA;
  --bg-tertiary:   #ECEFF1;
  --bg-dark:       #0A2463;
  --bg-darkest:    #061640;

  /* Gradients */
  --gradient-brand:   linear-gradient(135deg, #061640 0%, #0A2463 40%, #1565C0 80%, #1E90FF 100%);
  --gradient-hero:    linear-gradient(135deg, #061640 0%, #0A2463 50%, #1255A8 100%);
  --gradient-card:    linear-gradient(145deg, #0A2463 0%, #1565C0 100%);
  --gradient-overlay: linear-gradient(to bottom, rgba(6,22,64,0.85) 0%, rgba(10,36,99,0.75) 100%);

  /* Typography */
  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Font Sizes — fluid, mobile-first */
  --text-xs:   0.75rem;   /*  12px */
  --text-sm:   0.875rem;  /*  14px */
  --text-base: 1rem;      /*  16px */
  --text-lg:   1.125rem;  /*  18px */
  --text-xl:   1.25rem;   /*  20px */
  --text-2xl:  1.5rem;    /*  24px */
  --text-3xl:  1.875rem;  /*  30px */
  --text-4xl:  2.25rem;   /*  36px */
  --text-5xl:  2.75rem;   /*  44px */
  --text-6xl:  3.5rem;    /*  56px */
  --text-7xl:  4.5rem;    /*  72px */

  /* Font Weights */
  --fw-light:    300;
  --fw-regular:  400;
  --fw-medium:   500;
  --fw-semibold: 600;
  --fw-bold:     700;
  --fw-black:    900;

  /* Spacing (8px grid) */
  --sp-1:  0.25rem;  /*  4px */
  --sp-2:  0.5rem;   /*  8px */
  --sp-3:  0.75rem;  /* 12px */
  --sp-4:  1rem;     /* 16px */
  --sp-5:  1.25rem;  /* 20px */
  --sp-6:  1.5rem;   /* 24px */
  --sp-8:  2rem;     /* 32px */
  --sp-10: 2.5rem;   /* 40px */
  --sp-12: 3rem;     /* 48px */
  --sp-16: 4rem;     /* 64px */
  --sp-20: 5rem;     /* 80px */
  --sp-24: 6rem;     /* 96px */
  --sp-32: 8rem;     /* 128px */

  /* Border Radius */
  --radius-sm:   0.25rem;
  --radius-base: 0.5rem;
  --radius-md:   0.75rem;
  --radius-lg:   1rem;
  --radius-xl:   1.5rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(10,36,99,0.08), 0 1px 2px rgba(10,36,99,0.06);
  --shadow-md:  0 4px 12px rgba(10,36,99,0.12), 0 2px 6px rgba(10,36,99,0.08);
  --shadow-lg:  0 10px 30px rgba(10,36,99,0.15), 0 4px 12px rgba(10,36,99,0.10);
  --shadow-xl:  0 20px 50px rgba(10,36,99,0.20), 0 8px 20px rgba(10,36,99,0.12);
  --shadow-card:0 2px 8px rgba(10,36,99,0.08);
  --shadow-card-hover: 0 12px 32px rgba(10,36,99,0.18);

  /* Transitions */
  --ease-fast:   150ms cubic-bezier(0.4,0,0.2,1);
  --ease-base:   250ms cubic-bezier(0.4,0,0.2,1);
  --ease-slow:   400ms cubic-bezier(0.4,0,0.2,1);
  --ease-spring: 350ms cubic-bezier(0.34,1.56,0.64,1);

  /* Z-index scale */
  --z-base:    1;
  --z-dropdown:100;
  --z-sticky:  200;
  --z-fixed:   300;
  --z-overlay: 400;
  --z-modal:   500;
  --z-toast:   600;
  --z-a11y:    700;

  /* Borders */
  --border-light: 1px solid var(--light-grey);
  --border-mid:   1px solid var(--mid-grey);
  --border-brand: 2px solid var(--bright-blue);

  /* Header heights */
  --header-h-mobile:  70px;
  --header-h-desktop: 88px;

  /* Container widths */
  --container-sm:   640px;
  --container-md:   768px;
  --container-lg:   1024px;
  --container-xl:   1200px;
  --container-2xl:  1400px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* overflow-x:hidden on html clips fixed children on iOS Safari;
     clip is more reliable in modern browsers and doesn't create a scroll context */
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

/* overflow-x:clip supported Chrome 90+, Safari 16+, Firefox 81+ — preferred
   over hidden because it doesn't disable scroll restoration on iOS */
@supports (overflow-x: clip) {
  html { overflow-x: clip; }
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--fw-regular);
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  /* position:relative pairs with overflow-x:hidden to fully contain children */
  position: relative;
}

/* Respect reduced motion preference */
@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;
  }
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

svg {
  overflow: hidden;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

a {
  color: var(--text-link);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--ease-fast);
}

a:hover {
  color: var(--text-link-hover);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  line-height: 1.2;
  color: var(--text-primary);
}

ul, ol {
  padding-left: var(--sp-6);
}

/* ============================================================
   4. ACCESSIBILITY — SKIP NAVIGATION & FOCUS
   ============================================================ */
.skip-nav {
  position: absolute;
  top: -100%;
  left: var(--sp-4);
  z-index: var(--z-a11y);
  padding: var(--sp-3) var(--sp-6);
  background: var(--navy);
  color: var(--white);
  font-weight: var(--fw-semibold);
  font-size: var(--text-base);
  text-decoration: none;
  border-radius: var(--radius-base);
  transition: top var(--ease-fast);
}

.skip-nav:focus {
  top: var(--sp-3);
}

/* Global focus indicator — WCAG 2.1 AA */
:focus-visible {
  outline: 3px solid var(--bright-blue);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

:focus:not(:focus-visible) {
  outline: none;
}

/* Screen-reader only utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   5. LAYOUT UTILITIES
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container-xl);
  margin-inline: auto;
  padding-inline: var(--sp-6);
}

.container--sm { max-width: var(--container-sm); }
.container--md { max-width: var(--container-md); }
.container--lg { max-width: var(--container-lg); }
.container--xl { max-width: var(--container-xl); }
.container--2xl { max-width: var(--container-2xl); }

.section {
  padding-block: var(--sp-20);
}

.section--sm  { padding-block: var(--sp-12); }
.section--lg  { padding-block: var(--sp-32); }
.section--dark {
  background: var(--bg-dark);
  color: var(--text-inverse);
}
.section--darkest {
  background: var(--bg-darkest);
  color: var(--text-inverse);
}
.section--grey { background: var(--bg-secondary); }
.section--white { background: var(--bg-primary); }

.section__header {
  text-align: center;
  max-width: 720px;
  margin-inline: auto;
  margin-bottom: var(--sp-16);
}

.section__eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bright-blue);
  margin-bottom: var(--sp-3);
}

.section--dark .section__eyebrow,
.section--darkest .section__eyebrow {
  color: var(--sky-blue);
}

.section__title {
  font-size: clamp(var(--text-3xl), 4vw, var(--text-5xl));
  color: var(--navy);
  margin-bottom: var(--sp-4);
}

.section--dark .section__title,
.section--darkest .section__title {
  color: var(--white);
}

.section__subtitle {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  line-height: 1.7;
}

.section--dark .section__subtitle,
.section--darkest .section__subtitle {
  color: var(--silver);
}

.divider {
  width: 60px;
  height: 4px;
  background: var(--gradient-brand);
  border-radius: var(--radius-full);
  margin-inline: auto;
  margin-block: var(--sp-4);
}

.divider--left { margin-left: 0; }

/* Grid utilities */
.grid {
  display: grid;
  gap: var(--sp-8);
}

/* min() ensures the column never exceeds the available width on narrow phones */
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); }

/* Flex utilities */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.gap-4 { gap: var(--sp-4); }
.gap-6 { gap: var(--sp-6); }
.gap-8 { gap: var(--sp-8); }

/* ============================================================
   6. TYPOGRAPHY UTILITIES
   ============================================================ */
.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }

.text-white   { color: var(--white) !important; }
.text-navy    { color: var(--navy) !important; }
.text-royal   { color: var(--royal) !important; }
.text-sky     { color: var(--sky-blue) !important; }
.text-silver  { color: var(--silver) !important; }
.text-muted   { color: var(--text-muted) !important; }

.fw-light    { font-weight: var(--fw-light); }
.fw-regular  { font-weight: var(--fw-regular); }
.fw-medium   { font-weight: var(--fw-medium); }
.fw-semibold { font-weight: var(--fw-semibold); }
.fw-bold     { font-weight: var(--fw-bold); }

.font-heading { font-family: var(--font-heading); }
.font-body    { font-family: var(--font-body); }

.italic { font-style: italic; }

.lead {
  font-size: var(--text-xl);
  line-height: 1.7;
  color: var(--text-secondary);
}

/* ============================================================
   7. BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 0.875rem 2rem;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--fw-semibold);
  line-height: 1;
  text-decoration: none;
  border-radius: var(--radius-base);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--ease-base);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.1);
  opacity: 0;
  transition: opacity var(--ease-fast);
}

.btn:hover::before {
  opacity: 1;
}

.btn:active {
  transform: scale(0.98);
}

/* Primary button */
.btn--primary {
  background: var(--gradient-brand);
  color: var(--white);
  border-color: transparent;
  box-shadow: var(--shadow-md);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: var(--white);
}

/* Secondary button (outline) */
.btn--secondary {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}

.btn--secondary:hover {
  background: var(--navy);
  color: var(--white);
  transform: translateY(-2px);
}

/* Outline white (for dark backgrounds) */
.btn--outline-white {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.7);
}

.btn--outline-white:hover {
  background: var(--white);
  color: var(--navy);
  border-color: var(--white);
  transform: translateY(-2px);
}

/* Solid white (for dark backgrounds) */
.btn--white {
  background: var(--white);
  color: var(--navy);
  border-color: var(--white);
  box-shadow: var(--shadow-md);
}

.btn--white:hover {
  background: var(--off-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: var(--navy);
}

/* Sizes */
.btn--sm {
  padding: 0.625rem 1.25rem;
  font-size: var(--text-sm);
}

.btn--lg {
  padding: 1.125rem 2.5rem;
  font-size: var(--text-lg);
  border-radius: var(--radius-md);
}

.btn--xl {
  padding: 1.25rem 3rem;
  font-size: var(--text-xl);
  border-radius: var(--radius-md);
}

.btn--full { width: 100%; }

/* Phone CTA button */
.btn--phone {
  background: #16a34a;
  color: var(--white);
  border-color: #16a34a;
}

.btn--phone:hover {
  background: #15803d;
  color: var(--white);
  transform: translateY(-2px);
}

/* ============================================================
   8. FORMS
   ============================================================ */
.form-group {
  margin-bottom: var(--sp-5);
}

.form-group__label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
  margin-bottom: var(--sp-2);
}

.form-group__label .required {
  color: var(--error);
  margin-left: var(--sp-1);
}

.form-group__input {
  display: block;
  width: 100%;
  padding: 0.875rem var(--sp-4);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--text-primary);
  background: var(--white);
  border: 2px solid var(--mid-grey);
  border-radius: var(--radius-base);
  transition: border-color var(--ease-fast), box-shadow var(--ease-fast);
  appearance: none;
}

.form-group__input:hover {
  border-color: var(--royal);
}

.form-group__input:focus {
  outline: none;
  border-color: var(--royal);
  box-shadow: 0 0 0 3px rgba(21,101,192,0.2);
}

.form-group__input::placeholder {
  color: var(--silver);
}

.form-group__input--error {
  border-color: var(--error);
}

.form-group__input--error:focus {
  box-shadow: 0 0 0 3px rgba(198,40,40,0.15);
}

.form-group__error {
  display: block;
  font-size: var(--text-sm);
  color: var(--error);
  margin-top: var(--sp-1);
}

textarea.form-group__input {
  resize: vertical;
  min-height: 140px;
}

select.form-group__input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23607D8B' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--sp-4) center;
  padding-right: var(--sp-10);
  cursor: pointer;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.form-disclaimer {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: var(--sp-4);
  line-height: 1.5;
}

.form-alert {
  padding: var(--sp-4);
  border-radius: var(--radius-base);
  margin-bottom: var(--sp-5);
  font-weight: var(--fw-medium);
}

.form-alert--success {
  background: #f0fdf4;
  border: 1px solid #86efac;
  color: var(--success);
}

.form-alert--error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: var(--error);
}

/* ============================================================
   9. HEADER & NAVIGATION
   ============================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-sticky);
  height: var(--header-h-mobile);
  background: transparent;
  transition: background var(--ease-base), box-shadow var(--ease-base), height var(--ease-base);
  /* Safe-area inset for notch / Dynamic Island iPhones */
  padding-top: env(safe-area-inset-top, 0px);
  /* Ensure header never overflows viewport on any screen */
  max-width: 100%;
  box-sizing: border-box;
}

.site-header.is-scrolled {
  background: rgba(6,22,64,0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(6,22,64,0.3);
}

.site-header.is-scrolled .header-top {
  display: none;
}

.header-top {
  background: var(--navy-dark);
  padding: var(--sp-2) 0;
  font-size: var(--text-xs);
  color: var(--silver);
}

.header-top .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-top__item {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.header-top__item a {
  color: var(--silver);
  text-decoration: none;
}

.header-top__item a:hover {
  color: var(--sky-blue);
}

.header-main {
  height: var(--header-h-mobile);
  display: flex;
  align-items: center;
}

.header-main .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: var(--sp-3);
  /* Prevent any flex child from pushing the container wider than the viewport */
  max-width: 100%;
  box-sizing: border-box;
  overflow: visible; /* don't clip the nav overlay */
}

/* Logo */
.site-logo {
  flex-shrink: 0;
  text-decoration: none;
  display: flex;
  align-items: center;
}

.site-logo img {
  height: 52px;
  width: auto;
  transition: opacity var(--ease-fast);
}

.site-logo:hover img {
  opacity: 0.9;
}

/* Main Navigation */
.site-nav {
  display: flex;
  align-items: center;
  gap: 0;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-nav__item {
  position: relative;
}

.site-nav__link {
  display: block;
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  transition: color var(--ease-fast);
  white-space: nowrap;
}

.site-nav__link:hover,
.site-nav__link.is-active {
  color: var(--sky-blue);
}

/* Dropdown indicator — desktop only (mobile overrides this below) */
.site-nav__link--dropdown::after {
  content: ' ▾';
  font-size: 0.65em;
  vertical-align: middle;
}

@media (max-width: 991px) {
  /* Reset desktop text character on mobile — we use a CSS-drawn chevron instead */
  .site-nav__link--dropdown::after {
    content: '';
  }
}

/* Dropdown menu */
.site-nav__dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 220px;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  border: var(--border-light);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--ease-fast), transform var(--ease-fast);
  transform: translateX(-50%) translateY(-8px);
  z-index: var(--z-dropdown);
  padding: var(--sp-2) 0;
}

.site-nav__item:hover .site-nav__dropdown,
.site-nav__item:focus-within .site-nav__dropdown {
  opacity: 1;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
}

.site-nav__dropdown::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  background: var(--white);
  border-left: var(--border-light);
  border-top: var(--border-light);
  transform: translateX(-50%) rotate(45deg);
}

.site-nav__dropdown-link {
  display: block;
  padding: var(--sp-3) var(--sp-5);
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  color: var(--text-primary);
  text-decoration: none;
  transition: background var(--ease-fast), color var(--ease-fast);
}

.site-nav__dropdown-link:hover {
  background: var(--bg-secondary);
  color: var(--navy);
}

/* Header CTA */
.header-cta {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-left: var(--sp-4);
}

.header-phone {
  color: var(--sky-blue);
  font-weight: var(--fw-semibold);
  font-size: var(--text-sm);
  text-decoration: none;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.header-phone:hover {
  color: var(--white);
}

/* Mobile hamburger toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border: none;
  background: none;
  cursor: pointer;
  padding: var(--sp-2);
  border-radius: var(--radius-base);
  transition: background var(--ease-fast);
  flex-shrink: 0;
}

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

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: var(--radius-full);
  transition: all var(--ease-base);
  transform-origin: center;
}

.nav-toggle.is-active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav-toggle.is-active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============================================================
   10. HERO SECTION
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--gradient-hero);
  overflow: hidden;
  padding-top: var(--header-h-mobile);
}

.hero__bg-pattern {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(30,144,255,0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(79,195,247,0.06) 0%, transparent 40%),
    radial-gradient(circle at 60% 80%, rgba(21,101,192,0.08) 0%, transparent 40%);
  pointer-events: none;
}

.hero__chess-bg {
  position: absolute;
  right: -40px;
  top: 50%;
  transform: translateY(-50%);
  width: 55%;
  max-width: 700px;
  opacity: 0.05;
  pointer-events: none;
  user-select: none;
}

.hero .container {
  position: relative;
  z-index: 1;
  padding-block: var(--sp-20);
}

.hero__content {
  max-width: 680px;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sky-blue);
  margin-bottom: var(--sp-5);
}

.hero__eyebrow::before {
  content: '';
  display: block;
  width: 30px;
  height: 2px;
  background: var(--sky-blue);
  border-radius: var(--radius-full);
}

.hero__title {
  font-size: clamp(var(--text-4xl), 6vw, var(--text-7xl));
  font-weight: var(--fw-black);
  color: var(--white);
  line-height: 1.1;
  margin-bottom: var(--sp-6);
  letter-spacing: -0.02em;
}

.hero__title .accent {
  background: linear-gradient(90deg, var(--sky-blue), var(--bright-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: clamp(var(--text-base), 2vw, var(--text-xl));
  color: rgba(255,255,255,0.85);
  line-height: 1.7;
  margin-bottom: var(--sp-10);
  max-width: 560px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  margin-bottom: var(--sp-12);
}

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-8);
  padding-top: var(--sp-8);
  border-top: 1px solid rgba(255,255,255,0.15);
}

.hero__stat-value {
  font-family: var(--font-heading);
  font-size: var(--text-4xl);
  font-weight: var(--fw-bold);
  color: var(--white);
  line-height: 1;
  display: block;
}

.hero__stat-label {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.65);
  margin-top: var(--sp-1);
  display: block;
}

.hero__scroll-hint {
  position: absolute;
  bottom: var(--sp-8);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  color: rgba(255,255,255,0.5);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  animation: bounce-subtle 2s infinite;
}

@keyframes bounce-subtle {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}

.hero__scroll-icon {
  width: 28px;
  height: 46px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: var(--radius-full);
  position: relative;
}

.hero__scroll-icon::after {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background: rgba(255,255,255,0.5);
  border-radius: var(--radius-full);
  animation: scroll-dot 2s infinite;
}

@keyframes scroll-dot {
  0%   { opacity: 1; top: 6px; }
  80%  { opacity: 0; top: 20px; }
  100% { opacity: 0; top: 6px; }
}

/* ============================================================
   11. TRUST / CREDENTIAL BAR
   ============================================================ */
.trust-bar {
  background: var(--navy-dark);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-block: var(--sp-6);
}

.trust-bar .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--sp-8);
}

.trust-bar__label {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.5);
  white-space: nowrap;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.trust-bar__items {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--sp-8);
}

.trust-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-1);
  opacity: 0.7;
  transition: opacity var(--ease-fast);
}

.trust-badge:hover {
  opacity: 1;
}

.trust-badge__icon {
  font-size: 2rem;
  line-height: 1;
}

.trust-badge__text {
  font-size: var(--text-xs);
  color: var(--silver);
  white-space: nowrap;
  text-align: center;
  line-height: 1.3;
}

.trust-badge__text strong {
  display: block;
  color: var(--white);
  font-weight: var(--fw-semibold);
}

/* ============================================================
   12. PRACTICE AREA CARDS
   ============================================================ */
.practice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: var(--sp-6);
}

.practice-card {
  position: relative;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--light-grey);
  transition: transform var(--ease-base), box-shadow var(--ease-base);
  display: flex;
  flex-direction: column;
}

.practice-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
}

.practice-card__accent {
  height: 4px;
  background: var(--gradient-brand);
}

.practice-card__body {
  padding: var(--sp-8);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.practice-card__icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--off-white), var(--light-grey));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--sp-5);
  flex-shrink: 0;
  transition: background var(--ease-base);
}

.practice-card:hover .practice-card__icon {
  background: linear-gradient(135deg, rgba(10,36,99,0.08), rgba(21,101,192,0.12));
}

.practice-card__icon svg {
  width: 28px;
  height: 28px;
  stroke: var(--navy);
  transition: stroke var(--ease-fast);
}

.practice-card:hover .practice-card__icon svg {
  stroke: var(--royal);
}

.practice-card__title {
  font-size: var(--text-xl);
  color: var(--navy);
  margin-bottom: var(--sp-3);
}

.practice-card__desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.7;
  flex: none;
  margin-bottom: var(--sp-3);
}

.practice-card__list {
  list-style: none;
  padding: 0;
  margin-bottom: var(--sp-6);
}

.practice-card__list li {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  padding: var(--sp-1) 0;
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
}

.practice-card__list li::before {
  content: '';
  display: block;
  width: 6px;
  height: 6px;
  background: var(--bright-blue);
  border-radius: var(--radius-full);
  margin-top: 6px;
  flex-shrink: 0;
}

.practice-card__link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  color: var(--navy);
  text-decoration: none;
  transition: gap var(--ease-fast), color var(--ease-fast);
  margin-top: auto;
}

.practice-card__link:hover {
  gap: var(--sp-3);
  color: var(--royal);
}

.practice-card__link svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  transition: transform var(--ease-fast);
}

.practice-card__link:hover svg {
  transform: translateX(3px);
}

/* ============================================================
   13. ABOUT SECTION
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-16);
  align-items: center;
}

.about-image {
  position: relative;
}

.about-image__main {
  width: 100%;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  aspect-ratio: 4/3;
  object-fit: cover;
}

.about-image__badge {
  position: absolute;
  bottom: -var(--sp-6);
  right: -var(--sp-6);
  background: var(--gradient-brand);
  color: var(--white);
  padding: var(--sp-5) var(--sp-6);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.about-image__badge-num {
  font-family: var(--font-heading);
  font-size: var(--text-4xl);
  font-weight: var(--fw-bold);
  line-height: 1;
  display: block;
}

.about-image__badge-label {
  font-size: var(--text-xs);
  opacity: 0.85;
  display: block;
  margin-top: var(--sp-1);
}

.about-content .section__eyebrow {
  text-align: left;
}

.about-content .divider {
  margin-left: 0;
}

.about-content p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: var(--sp-5);
}

.about-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
  margin: var(--sp-8) 0;
}

.about-feature {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
}

.about-feature__icon {
  width: 36px;
  height: 36px;
  background: rgba(10,36,99,0.08);
  border-radius: var(--radius-base);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.about-feature__icon svg {
  width: 18px;
  height: 18px;
  stroke: var(--navy);
}

.about-feature__text {
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  color: var(--text-primary);
  line-height: 1.4;
}

/* ============================================================
   14. STATS SECTION
   ============================================================ */
.stats-section {
  background: var(--gradient-brand);
  padding-block: var(--sp-16);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--sp-8);
  text-align: center;
}

.stat-item__number {
  font-family: var(--font-heading);
  font-size: clamp(var(--text-4xl), 5vw, var(--text-6xl));
  font-weight: var(--fw-bold);
  color: var(--white);
  line-height: 1;
  display: block;
  margin-bottom: var(--sp-2);
}

.stat-item__suffix {
  font-size: 0.55em;
  vertical-align: super;
}

.stat-item__label {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.75);
  line-height: 1.4;
}

/* ============================================================
   15. WHY CHOOSE US
   ============================================================ */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: var(--sp-8);
}

.why-card {
  text-align: center;
  padding: var(--sp-8);
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: var(--border-light);
  transition: all var(--ease-base);
}

.why-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(21,101,192,0.2);
}

.why-card__icon {
  width: 72px;
  height: 72px;
  background: var(--gradient-card);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--sp-5);
}

.why-card__icon svg {
  width: 36px;
  height: 36px;
  stroke: var(--white);
}

.why-card__title {
  font-size: var(--text-xl);
  color: var(--navy);
  margin-bottom: var(--sp-3);
}

.why-card__desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ============================================================
   16. TEAM / ATTORNEY CARDS
   ============================================================ */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: var(--sp-8);
}

.attorney-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: var(--border-light);
  transition: all var(--ease-base);
}

.attorney-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
}

.attorney-card__image-wrap {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: var(--gradient-card);
}

.attorney-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--ease-slow);
}

.attorney-card:hover .attorney-card__image {
  transform: scale(1.04);
}

.attorney-card__image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.6);
  gap: var(--sp-3);
}

.attorney-card__image-placeholder svg {
  width: 60px;
  height: 60px;
  stroke: currentColor;
}

.attorney-card__image-placeholder span {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.5);
}

.attorney-card__body {
  padding: var(--sp-6);
}

.attorney-card__name {
  font-size: var(--text-xl);
  color: var(--navy);
  margin-bottom: var(--sp-1);
}

.attorney-card__title {
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  color: var(--royal);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--sp-3);
}

.attorney-card__areas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
}

.tag {
  display: inline-block;
  padding: var(--sp-1) var(--sp-3);
  font-size: var(--text-xs);
  font-weight: var(--fw-medium);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.tag--blue {
  background: rgba(21,101,192,0.1);
  color: var(--royal);
}

.attorney-card__bio {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--sp-5);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.attorney-card__links {
  display: flex;
  gap: var(--sp-3);
  align-items: center;
}

.attorney-card__cta {
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  color: var(--navy);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  transition: color var(--ease-fast);
}

.attorney-card__cta:hover {
  color: var(--royal);
}

.attorney-card__social {
  display: flex;
  gap: var(--sp-2);
  margin-left: auto;
}

.social-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-base);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  transition: all var(--ease-fast);
  text-decoration: none;
}

.social-icon:hover {
  background: var(--navy);
  color: var(--white);
}

.social-icon svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* ============================================================
   17. TESTIMONIALS
   ============================================================ */
.testimonials-slider {
  position: relative;
  overflow: hidden;
}

.testimonials-track {
  display: flex;
  gap: var(--sp-6);
  transition: transform var(--ease-slow);
}

.testimonial-card {
  flex: 0 0 calc(33.333% - var(--sp-4));
  min-width: 280px;
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: var(--sp-8);
  box-shadow: var(--shadow-card);
  border: var(--border-light);
  position: relative;
}

.testimonial-card__quote-mark {
  font-family: var(--font-heading);
  font-size: 5rem;
  line-height: 0.5;
  color: var(--bright-blue);
  opacity: 0.15;
  position: absolute;
  top: var(--sp-6);
  left: var(--sp-6);
  user-select: none;
  pointer-events: none;
}

.testimonial-card__stars {
  display: flex;
  gap: 2px;
  margin-bottom: var(--sp-4);
  color: #F59E0B;
  font-size: var(--text-lg);
}

.testimonial-card__text {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--sp-6);
  font-style: italic;
  position: relative;
  z-index: 1;
}

.testimonial-card__author {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}

.testimonial-card__avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--gradient-card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: var(--fw-bold);
  flex-shrink: 0;
  overflow: hidden;
}

.testimonial-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.testimonial-card__name {
  font-size: var(--text-base);
  font-weight: var(--fw-semibold);
  color: var(--navy);
  display: block;
}

.testimonial-card__meta {
  font-size: var(--text-xs);
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

.testimonial-card__platform {
  font-size: var(--text-xs);
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

.slider-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
  margin-top: var(--sp-10);
}

.slider-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--white);
  border: 2px solid var(--mid-grey);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--ease-fast);
  color: var(--navy);
}

.slider-btn:hover {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

.slider-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

.slider-dots {
  display: flex;
  gap: var(--sp-2);
}

.slider-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--mid-grey);
  border: none;
  cursor: pointer;
  transition: all var(--ease-fast);
  padding: 0;
}

.slider-dot.is-active {
  background: var(--navy);
  width: 24px;
}

/* ============================================================
   18. FAQ ACCORDION
   ============================================================ */
.faq-list {
  max-width: 840px;
  margin-inline: auto;
}

.faq-item {
  border-bottom: var(--border-mid);
}

.faq-item:first-child {
  border-top: var(--border-mid);
}

.faq-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-6) 0;
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: var(--fw-semibold);
  color: var(--navy);
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  transition: color var(--ease-fast);
}

.faq-trigger:hover {
  color: var(--royal);
}

.faq-trigger[aria-expanded="true"] {
  color: var(--royal);
}

.faq-icon {
  width: 24px;
  height: 24px;
  border: 2px solid currentColor;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform var(--ease-base), background var(--ease-fast);
}

.faq-icon svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  transition: transform var(--ease-base);
}

.faq-trigger[aria-expanded="true"] .faq-icon {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

.faq-trigger[aria-expanded="true"] .faq-icon svg {
  transform: rotate(180deg);
}

.faq-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--ease-base);
}

.faq-panel.is-open {
  grid-template-rows: 1fr;
}

.faq-panel__inner {
  overflow: hidden;
}

.faq-panel__content {
  padding-bottom: var(--sp-6);
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: 1.8;
}

/* ============================================================
   19. CTA SECTION
   ============================================================ */
.cta-section {
  background: var(--gradient-hero);
  position: relative;
  overflow: hidden;
  padding-block: var(--sp-24);
  text-align: center;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 30% 50%, rgba(30,144,255,0.12) 0%, transparent 50%),
    radial-gradient(circle at 70% 50%, rgba(79,195,247,0.08) 0%, transparent 50%);
  pointer-events: none;
}

.cta-section .container {
  position: relative;
  z-index: 1;
}

.cta-section__title {
  font-size: clamp(var(--text-3xl), 5vw, var(--text-6xl));
  color: var(--white);
  margin-bottom: var(--sp-4);
}

.cta-section__subtitle {
  font-size: var(--text-xl);
  color: rgba(255,255,255,0.8);
  margin-bottom: var(--sp-10);
  max-width: 600px;
  margin-inline: auto;
}

.cta-section__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  justify-content: center;
  margin-bottom: var(--sp-8);
}

.cta-section__note {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.55);
}

/* ============================================================
   20. CONTACT SECTION
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-16);
}

.contact-info__title {
  font-size: var(--text-2xl);
  color: var(--white);
  margin-bottom: var(--sp-4);
}

.contact-info__subtitle {
  color: rgba(255,255,255,0.75);
  line-height: 1.7;
  margin-bottom: var(--sp-8);
}

.contact-info__items {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}

.contact-info__item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
}

.contact-info__icon {
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-base);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-info__icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--sky-blue);
}

.contact-info__label {
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.5);
  display: block;
  margin-bottom: var(--sp-1);
}

.contact-info__value {
  font-size: var(--text-base);
  color: var(--white);
  font-weight: var(--fw-medium);
}

.contact-info__value a {
  color: inherit;
  text-decoration: none;
}

.contact-info__value a:hover {
  color: var(--sky-blue);
}

.contact-form-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: var(--sp-10);
  box-shadow: var(--shadow-xl);
}

.contact-form-card__title {
  font-size: var(--text-2xl);
  color: var(--navy);
  margin-bottom: var(--sp-2);
}

.contact-form-card__subtitle {
  color: var(--text-secondary);
  margin-bottom: var(--sp-8);
  font-size: var(--text-sm);
}

/* ============================================================
   21. MAP SECTION
   ============================================================ */
.map-section {
  height: 420px;
  background: var(--bg-tertiary);
  position: relative;
}

.map-section iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.map-section__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: var(--sp-4);
  background: var(--gradient-card);
  color: var(--white);
}

/* ============================================================
   22. BREADCRUMB
   ============================================================ */
.breadcrumb {
  padding: var(--sp-4) 0;
  background: var(--bg-secondary);
  border-bottom: var(--border-light);
}

.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: var(--text-sm);
}

.breadcrumb__item {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  color: var(--text-muted);
}

.breadcrumb__item:not(:last-child)::after {
  content: '/';
  color: var(--mid-grey);
}

.breadcrumb__link {
  color: var(--text-link);
  text-decoration: none;
  transition: color var(--ease-fast);
}

.breadcrumb__link:hover {
  color: var(--navy);
}

.breadcrumb__current {
  color: var(--text-primary);
  font-weight: var(--fw-medium);
}

/* ============================================================
   23. PAGE HERO (Inner Pages)
   ============================================================ */
.page-hero {
  background: var(--gradient-hero);
  padding: calc(var(--header-h-mobile) + var(--sp-16)) 0 var(--sp-16);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 30% 60%, rgba(30,144,255,0.1) 0%, transparent 50%);
  pointer-events: none;
}

.page-hero .container { position: relative; z-index: 1; }

.page-hero__title {
  font-size: clamp(var(--text-3xl), 5vw, var(--text-6xl));
  color: var(--white);
  margin-bottom: var(--sp-4);
}

.page-hero__subtitle {
  font-size: var(--text-lg);
  color: rgba(255,255,255,0.8);
  max-width: 600px;
  margin-inline: auto;
  line-height: 1.7;
}

/* ============================================================
   24. FOOTER
   ============================================================ */
.site-footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,0.75);
}

.footer-main {
  padding-block: var(--sp-20);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-10);
}

.footer-brand {
  max-width: 340px;
}

.footer-logo {
  display: inline-block;
  margin-bottom: var(--sp-5);
}

.footer-logo img {
  height: 56px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.footer-brand__desc {
  font-size: var(--text-sm);
  line-height: 1.8;
  color: rgba(255,255,255,0.6);
  margin-bottom: var(--sp-6);
}

.footer-social {
  display: flex;
  gap: var(--sp-3);
}

.footer-social-link {
  width: 38px;
  height: 38px;
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius-base);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.6);
  transition: all var(--ease-fast);
  text-decoration: none;
}

.footer-social-link:hover {
  background: var(--royal);
  color: var(--white);
}

.footer-social-link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.footer-col__title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: var(--fw-semibold);
  color: var(--white);
  margin-bottom: var(--sp-5);
}

.footer-nav-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.footer-nav-link {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: color var(--ease-fast);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
}

.footer-nav-link:hover {
  color: var(--sky-blue);
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}

.footer-contact-item svg {
  width: 18px;
  height: 18px;
  stroke: var(--sky-blue);
  flex-shrink: 0;
  margin-top: 2px;
}

.footer-contact-item span {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.65);
  line-height: 1.5;
}

.footer-contact-item a {
  color: rgba(255,255,255,0.65);
  text-decoration: none;
}

.footer-contact-item a:hover {
  color: var(--sky-blue);
}

.footer-bottom {
  background: rgba(0,0,0,0.2);
  padding-block: var(--sp-5);
  border-top: 1px solid rgba(255,255,255,0.06);
}

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

.footer-bottom__copy {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.4);
}

.footer-bottom__links {
  display: flex;
  gap: var(--sp-5);
}

.footer-bottom__link {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  transition: color var(--ease-fast);
}

.footer-bottom__link:hover {
  color: var(--sky-blue);
}

.footer-disclaimer {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.3);
  line-height: 1.6;
  margin-top: var(--sp-6);
  padding-top: var(--sp-6);
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* ============================================================
   25. BACK TO TOP
   ============================================================ */
.back-to-top {
  position: fixed;
  bottom: var(--sp-6);
  right: var(--sp-6);
  width: 48px;
  height: 48px;
  background: var(--gradient-brand);
  color: var(--white);
  border: none;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: all var(--ease-base);
  z-index: var(--z-fixed);
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: all;
}

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
}

.back-to-top svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

/* Mobile floating call button */
.floating-call {
  position: fixed;
  bottom: calc(var(--sp-6) + env(safe-area-inset-bottom, 0px));
  left: calc(var(--sp-6) + env(safe-area-inset-left, 0px));
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  background: #16a34a;
  color: var(--white);
  text-decoration: none;
  border-radius: var(--radius-full);
  padding: var(--sp-3) var(--sp-5);
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-fixed);
  transition: all var(--ease-base);
  animation: pulse-green 2s infinite;
}

.floating-call:hover {
  background: #15803d;
  color: var(--white);
  transform: scale(1.04);
}

.floating-call svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  flex-shrink: 0;
}

@keyframes pulse-green {
  0%, 100% { box-shadow: 0 0 0 0 rgba(22,163,74,0.4), var(--shadow-lg); }
  50%       { box-shadow: 0 0 0 10px rgba(22,163,74,0), var(--shadow-lg); }
}

/* ============================================================
   26. ACCESSIBILITY TOOLBAR WIDGET
   ============================================================ */
.a11y-toolbar {
  position: fixed;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  z-index: var(--z-a11y);
  display: flex;
  flex-direction: column;
}

.a11y-toggle {
  width: 44px;
  padding: var(--sp-3);
  background: var(--navy);
  color: var(--white);
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  writing-mode: vertical-rl;
  border-radius: 0 var(--radius-base) var(--radius-base) 0;
  box-shadow: var(--shadow-md);
  font-size: 10px;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background var(--ease-fast);
}

.a11y-toggle:hover { background: var(--royal); }

.a11y-toggle svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  margin-bottom: var(--sp-2);
}

.a11y-panel {
  position: absolute;
  left: 44px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--white);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  box-shadow: var(--shadow-xl);
  border: var(--border-light);
  width: 240px;
  padding: var(--sp-5);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) translateX(-10px);
  transition: all var(--ease-base);
}

.a11y-panel.is-open {
  opacity: 1;
  pointer-events: all;
  transform: translateY(-50%) translateX(0);
}

.a11y-panel__title {
  font-size: var(--text-sm);
  font-weight: var(--fw-bold);
  color: var(--navy);
  margin-bottom: var(--sp-4);
  padding-bottom: var(--sp-3);
  border-bottom: var(--border-light);
}

.a11y-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--light-grey);
  gap: var(--sp-3);
}

.a11y-option:last-child { border-bottom: none; }

.a11y-option__label {
  font-size: var(--text-xs);
  font-weight: var(--fw-medium);
  color: var(--text-primary);
  flex: 1;
}

.a11y-option__controls {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.a11y-btn {
  width: 28px;
  height: 28px;
  background: var(--bg-secondary);
  border: var(--border-mid);
  border-radius: var(--radius-base);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: var(--text-sm);
  font-weight: var(--fw-bold);
  color: var(--navy);
  transition: all var(--ease-fast);
  line-height: 1;
}

.a11y-btn:hover {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

/* Checkbox toggle for a11y options */
.a11y-switch {
  position: relative;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

.a11y-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.a11y-switch__track {
  position: absolute;
  inset: 0;
  background: var(--mid-grey);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background var(--ease-fast);
}

.a11y-switch input:checked + .a11y-switch__track {
  background: var(--navy);
}

.a11y-switch__track::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  background: var(--white);
  border-radius: var(--radius-full);
  top: 3px;
  left: 3px;
  transition: transform var(--ease-fast);
  box-shadow: var(--shadow-sm);
}

.a11y-switch input:checked + .a11y-switch__track::after {
  transform: translateX(18px);
}

.a11y-panel__reset {
  margin-top: var(--sp-4);
  width: 100%;
  font-size: var(--text-xs);
  padding: var(--sp-2) var(--sp-3);
  background: var(--bg-secondary);
  border: var(--border-mid);
  border-radius: var(--radius-base);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--ease-fast);
}

.a11y-panel__reset:hover {
  background: var(--error);
  color: var(--white);
  border-color: var(--error);
}

/* High Contrast Mode */
body.high-contrast {
  --text-primary:   #000000;
  --text-secondary: #000000;
  --text-muted:     #000000;
  --bg-primary:     #FFFFFF;
  --bg-secondary:   #F0F0F0;
  --navy:           #000080;
  --royal:          #00008B;
  --bright-blue:    #0000CD;
  filter: contrast(1.3);
}

body.high-contrast .practice-card,
body.high-contrast .attorney-card,
body.high-contrast .why-card {
  border: 2px solid #000000;
}

/* Large Cursor */
body.large-cursor { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='14' fill='%230A2463' fill-opacity='0.7'/%3E%3C/svg%3E") 16 16, auto; }

/* Dyslexia Font */
@font-face {
  font-family: 'OpenDyslexic';
  src: url('https://cdn.jsdelivr.net/npm/opendyslexic@1.0.3/opendyslexic-regular.woff2') format('woff2');
  font-display: swap;
}

body.dyslexia-font {
  font-family: 'OpenDyslexic', var(--font-body) !important;
}

body.dyslexia-font * {
  font-family: inherit !important;
}

/* Text spacing increase */
body.increased-spacing {
  letter-spacing: 0.12em;
  word-spacing: 0.16em;
  line-height: 1.9 !important;
}

body.increased-spacing p,
body.increased-spacing li,
body.increased-spacing span {
  line-height: 1.9 !important;
}

/* Link highlight */
body.highlight-links a {
  background: #FFFF00;
  color: #000 !important;
  text-decoration: underline !important;
  padding: 0 2px;
}

/* ============================================================
   27. COOKIE CONSENT BANNER
   ============================================================ */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--navy-dark);
  color: rgba(255,255,255,0.85);
  padding: var(--sp-5) 0;
  z-index: var(--z-modal);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
  transform: translateY(100%);
  transition: transform var(--ease-base);
}

.cookie-banner.is-visible {
  transform: translateY(0);
}

.cookie-banner .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-4);
  justify-content: space-between;
}

.cookie-banner__text {
  font-size: var(--text-sm);
  flex: 1;
  min-width: 200px;
}

.cookie-banner__text a {
  color: var(--sky-blue);
}

.cookie-banner__actions {
  display: flex;
  gap: var(--sp-3);
  flex-shrink: 0;
}

/* ============================================================
   28. SCROLL REVEAL ANIMATIONS
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal--delay-1 { transition-delay: 0.1s; }
.reveal--delay-2 { transition-delay: 0.2s; }
.reveal--delay-3 { transition-delay: 0.3s; }
.reveal--delay-4 { transition-delay: 0.4s; }
.reveal--delay-5 { transition-delay: 0.5s; }

.reveal--left {
  opacity: 0;
  transform: translateX(-24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal--left.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal--right {
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal--right.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* ============================================================
   29. INNER PAGE CONTENT STYLES
   ============================================================ */
.page-content {
  padding-block: var(--sp-20);
}

.page-content h2 {
  font-size: var(--text-3xl);
  color: var(--navy);
  margin-bottom: var(--sp-4);
  margin-top: var(--sp-12);
}

.page-content h2:first-child {
  margin-top: 0;
}

.page-content h3 {
  font-size: var(--text-2xl);
  color: var(--navy);
  margin-bottom: var(--sp-3);
  margin-top: var(--sp-8);
}

.page-content p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: var(--sp-5);
  font-size: var(--text-lg);
}

.page-content ul, .page-content ol {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: var(--sp-5);
  font-size: var(--text-base);
}

.page-content li {
  margin-bottom: var(--sp-2);
}

.page-content .sidebar {
  position: sticky;
  top: calc(var(--header-h-mobile) + var(--sp-6));
}

.sidebar-card {
  background: var(--gradient-card);
  color: var(--white);
  border-radius: var(--radius-xl);
  padding: var(--sp-8);
  margin-bottom: var(--sp-6);
}

.sidebar-card__title {
  font-size: var(--text-xl);
  color: var(--white);
  margin-bottom: var(--sp-3);
}

.sidebar-card__text {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.8);
  line-height: 1.7;
  margin-bottom: var(--sp-5);
}

.sidebar-nav {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  border: var(--border-light);
}

.sidebar-nav__title {
  font-size: var(--text-base);
  font-weight: var(--fw-semibold);
  color: var(--navy);
  margin-bottom: var(--sp-4);
}

.sidebar-nav__list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.sidebar-nav__link {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3);
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-base);
  transition: all var(--ease-fast);
}

.sidebar-nav__link:hover,
.sidebar-nav__link.is-active {
  background: var(--navy);
  color: var(--white);
}

.highlight-box {
  background: rgba(21,101,192,0.06);
  border-left: 4px solid var(--royal);
  padding: var(--sp-6);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: var(--sp-8) 0;
}

.highlight-box p {
  color: var(--text-primary) !important;
  margin: 0;
  font-size: var(--text-base) !important;
}

/* ============================================================
   30. RESPONSIVE — TABLET & UP (768px+)
   ============================================================ */
@media (min-width: 768px) {
  :root {
    --header-h-mobile: 80px;
  }

  .section { padding-block: var(--sp-24); }

  .about-grid {
    grid-template-columns: 1fr 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-5);
  }

  .hero__stats {
    gap: var(--sp-12);
  }

  .testimonial-card {
    flex: 0 0 calc(50% - var(--sp-3));
  }

  .page-content-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: var(--sp-12);
    align-items: start;
  }
}

/* ============================================================
   31. RESPONSIVE — DESKTOP (992px+)
   ============================================================ */
@media (min-width: 992px) {
  :root {
    --header-h-mobile: var(--header-h-desktop);
  }

  .header-top { display: flex; }

  .site-header { height: auto; }

  .header-main {
    height: var(--header-h-desktop);
  }

  .nav-toggle { display: none; }

  .site-nav {
    display: flex;
    align-items: center;
  }

  .about-grid {
    gap: var(--sp-20);
  }

  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: var(--sp-8);
  }

  .testimonial-card {
    flex: 0 0 calc(33.333% - var(--sp-4));
  }

  /* Don't show floating call button on desktop */
  .floating-call {
    display: none;
  }
}

/* ============================================================
   32. RESPONSIVE — MOBILE (max 991px)
   ============================================================ */
@media (max-width: 991px) {
  .header-top { display: none; }

  .nav-toggle {
    display: flex;
    /* Ensure toggle stays above the site-nav overlay (z-index 300) within
       the header's stacking context, so the X button is always tappable */
    position: relative;
    z-index: 400;
  }

  /* Mobile overlay nav */
  .site-nav {
    position: fixed;
    inset: 0;
    background: var(--navy-dark);
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: calc(var(--header-h-mobile) + var(--sp-6)) var(--sp-6) var(--sp-6);
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform var(--ease-base);
    z-index: var(--z-fixed);
    gap: 0;
  }

  .site-nav.is-open {
    transform: translateX(0);
  }

  .site-nav__list {
    flex-direction: column;
    width: 100%;
    gap: 0;
  }

  .site-nav__link {
    font-size: var(--text-xl);
    padding: var(--sp-4) 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    width: 100%;
  }

  /* Mobile dropdown — smooth max-height slide with left-border hierarchy cue.
     Stays display:block always; visibility controlled by max-height + opacity. */
  .site-nav__dropdown {
    position: static;
    transform: none;
    background: rgba(255,255,255,0.06);
    /* Left stripe visually connects sub-items to the Practice Areas button */
    border-left: 3px solid var(--sky-blue);
    border-radius: 0 var(--radius-base) var(--radius-base) 0;
    box-shadow: none;
    border-top: none;
    border-right: none;
    border-bottom: none;
    padding: 0;
    margin: var(--sp-1) 0 0 var(--sp-4);
    display: block;     /* Kept visible — max-height controls open/close */
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: max-height 0.32s ease, opacity 0.22s ease, margin 0.22s ease;
  }

  .site-nav__item.is-open .site-nav__dropdown {
    max-height: 500px;  /* large enough for all sub-items */
    opacity: 1;
    pointer-events: all;
    margin-top: var(--sp-1);
  }

  .site-nav__dropdown-link {
    color: rgba(255,255,255,0.8);
    padding: var(--sp-3) var(--sp-5);
    font-size: var(--text-base);
    display: block;
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }

  .site-nav__dropdown-link:last-child {
    border-bottom: none;
  }

  .site-nav__dropdown-link:hover,
  .site-nav__dropdown-link:focus {
    background: rgba(255,255,255,0.1);
    color: var(--white);
    padding-left: calc(var(--sp-5) + 4px);  /* subtle indent on hover */
  }

  /* Dropdown trigger: full-width flex so chevron sits at the right edge */
  .site-nav__link--dropdown {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    text-align: left;
  }

  /* Animated chevron arrow — pure CSS, rotates when menu opens */
  .site-nav__link--dropdown::after {
    content: '';
    display: inline-block;
    width: 9px;
    height: 9px;
    border-right: 2px solid rgba(255,255,255,0.7);
    border-bottom: 2px solid rgba(255,255,255,0.7);
    transform: rotate(45deg);
    transition: transform 0.25s ease, border-color 0.2s ease;
    flex-shrink: 0;
    margin-right: 4px;
  }

  .site-nav__item.is-open .site-nav__link--dropdown::after {
    transform: rotate(-135deg);  /* chevron points up when open */
    border-color: var(--sky-blue);
  }

  .header-cta .btn--primary {
    display: none;
  }

  /* Hide phone number in header on mobile — the floating green call button
     handles this CTA; keeping the number causes header overflow on narrow screens */
  .header-phone {
    display: none;
  }

  /* Tighten header container padding on mobile so logo + hamburger fit cleanly */
  .header-main .container {
    padding-inline: var(--sp-4);
  }

  /* Prevent ANY fixed-width child from causing horizontal scroll */
  .header-main .container > * {
    min-width: 0;
    max-width: 100%;
  }

  /* iOS auto-zoom prevention: inputs MUST be ≥16px font-size on iPhone.
     Below 16px, Safari zooms the entire page when the field is tapped. */
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="number"],
  input[type="search"],
  input[type="password"],
  textarea,
  select {
    font-size: 16px !important;
  }

  /* Ensure sections never create horizontal scroll.
     NOTE: 'header' intentionally excluded — adding overflow or transform
     to the fixed site-header creates a new CSS containing block that breaks
     the position:fixed nav overlay (it becomes relative to the header, not
     the viewport). Same risk with aside (a11y toolbar is position:fixed). */
  section, article, footer, main {
    max-width: 100%;
    overflow-x: hidden;
  }

  .hero { min-height: 100svh; }

  .hero__stats {
    gap: var(--sp-6);
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-6);
  }

  .about-features {
    grid-template-columns: 1fr;
  }

  /* On mobile the a11y toolbar sits above the floating call button.
     The toggle becomes a round FAB (easy to tap), panel opens upward. */
  .a11y-toolbar {
    top: auto;
    bottom: 90px;
    left: 12px;
    transform: none;
    flex-direction: column-reverse;
  }

  .a11y-toggle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    writing-mode: horizontal-tb;
    flex-direction: column;
    gap: 2px;
    font-size: 8px;
    padding: 8px;
    box-shadow: 0 4px 16px rgba(10,36,99,0.35);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  .a11y-toggle svg {
    width: 20px;
    height: 20px;
    margin-bottom: 0;
  }

  .a11y-panel {
    position: fixed;
    left: 12px;
    bottom: 160px;
    top: auto;
    width: calc(100vw - 24px);
    max-width: 300px;
    border-radius: var(--radius-lg);
    transform: translateY(10px) !important;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    box-shadow: 0 8px 40px rgba(10,36,99,0.25);
  }

  .a11y-panel.is-open {
    transform: translateY(0) !important;
    opacity: 1 !important;
    pointer-events: all !important;
  }
}

/* ============================================================
   33. PRINT STYLES
   ============================================================ */
/* ============================================================
   34. LANGUAGE TOGGLE (EN / ES)
   ============================================================ */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 6px;
  padding: 5px 11px;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s;
  /* Remove iOS tap flash and 300ms delay */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.lang-toggle:hover,
.lang-toggle:focus-visible {
  background: rgba(255,255,255,0.22);
  border-color: rgba(255,255,255,0.5);
  outline: none;
}

.lang-toggle svg { flex-shrink: 0; }
.lang-toggle__label { line-height: 1; }

/* Hide the Google Translate toolbar that appears at top of page */
.goog-te-banner-frame.skiptranslate,
.goog-te-gadget { display: none !important; }
.goog-te-gadget img { display: none !important; }

/* Google Translate sets body.style.top = '-40px' to offset its banner.
   We counter this, but must NOT use !important or it blocks our iOS scroll lock.
   Instead, the higher-specificity rule below wins when the nav is open. */
body { top: 0; }

/* iOS scroll lock: class added via JS when mobile nav opens.
   Higher specificity (html.X body) beats the Google Translate counter-rule above,
   so this correctly positions the frozen page at the user's scroll offset. */
html.nav-scroll-locked body {
  position: fixed !important;
  top: var(--scroll-y, 0) !important;
  left: 0 !important;
  right: 0 !important;
  overflow-y: scroll !important;
  width: 100% !important;
}

/* While the mobile nav is open, hide floating elements that sit above it in
   the root stacking context (z-index 300 vs header z-index 200) */
html.nav-scroll-locked .back-to-top,
html.nav-scroll-locked .floating-call {
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity 0.2s ease !important;
}

/* ============================================================
   35. MOBILE — iOS TOUCH & OVERFLOW FIXES
   ============================================================ */

/* Remove 300ms tap delay and iOS blue flash on all interactive elements */
a, button, [role="button"],
.nav-toggle, .site-nav__link, .btn,
.back-to-top, .floating-call,
.sidebar-nav__link, .footer-nav-link {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Prevent text from overflowing its container on narrow screens */
h1, h2, h3, h4, h5, h6,
p, li, td, th, blockquote, figcaption {
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Honour iOS font scaling without breaking layout */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* iOS-safe mobile nav scroll lock handled in JS (position:fixed);
   ensure nav overlay scrolls smoothly on iPhone */
.site-nav {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* -----------------------------------------------------------------------
   LOGO — MOBILE SIZE OVERRIDE
   Every page's <head> has a per-page <style> that sets the logo to
   160–180 px. Those rules have `!important` but they're wrapped in
   `@media (min-width:768px)`. Below that breakpoint we need our own
   `!important` to beat any stray inline `style="height:auto"` on the img.
   ----------------------------------------------------------------------- */
@media (max-width: 767px) {
  .site-logo {
    flex-shrink: 1;
    min-width: 0;
    max-width: calc(100vw - 120px); /* leave room for toggle + lang button */
  }
  .site-logo img {
    height: 48px !important;   /* compact header on mobile              */
    width: auto !important;    /* maintain aspect ratio                 */
    max-width: 100% !important;
    max-height: 48px !important;
  }
}

/* Clamp hero heading so it never overflows on very small screens */
@media (max-width: 480px) {
  .hero__title {
    font-size: clamp(1.75rem, 9vw, 2.75rem);
  }
  .hero__subtitle {
    font-size: clamp(0.9rem, 4vw, 1.1rem);
  }
  /* Tighten up the contact layout on very small screens */
  .lang-toggle { padding: 4px 9px; font-size: 0.72rem; }

  /* Reduce section padding so text doesn't crowd edges */
  .container { padding-inline: var(--sp-4); }
}

/* ============================================================
   36. PRINT STYLES
   ============================================================ */
@media print {
  .site-header,
  .site-nav,
  .back-to-top,
  .floating-call,
  .a11y-toolbar,
  .cookie-banner,
  .hero__scroll-hint,
  .cta-section {
    display: none !important;
  }

  body {
    font-size: 11pt;
    color: #000;
    background: #fff;
  }

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

  a[href]::after {
    content: ' (' attr(href) ')';
    font-size: 0.8em;
    color: #666;
  }

  a[href^="tel"]::after,
  a[href^="mailto"]::after {
    content: ' (' attr(href) ')';
  }

  .page-break {
    page-break-before: always;
  }

  .no-print {
    display: none !important;
  }
}

/* ============================================================
   37. BLOG STYLES — Practical Legal Concepts
   ============================================================ */

/* Blog listing page */
.blog-hero {
  background: var(--gradient-hero);
  padding: calc(var(--header-h-mobile) + var(--sp-16)) 0 var(--sp-16);
  text-align: center;
  color: var(--white);
}

.blog-hero__eyebrow {
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sky-blue);
  margin-bottom: var(--sp-4);
}

.blog-hero__title {
  font-family: var(--font-heading);
  font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
  font-weight: var(--fw-bold);
  margin-bottom: var(--sp-4);
}

.blog-hero__desc {
  font-size: var(--text-lg);
  color: var(--silver);
  max-width: 640px;
  margin: 0 auto;
}

/* Blog grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
  gap: var(--sp-8);
  padding: var(--sp-16) 0;
}

.blog-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  border: var(--border-light);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--ease-base), box-shadow var(--ease-base);
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.blog-card__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  background: var(--sky-blue);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: var(--fw-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  margin-bottom: var(--sp-3);
  width: fit-content;
}

.blog-card__body {
  padding: var(--sp-6);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card__title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: var(--fw-bold);
  color: var(--navy);
  margin-bottom: var(--sp-3);
  line-height: 1.3;
}

.blog-card__excerpt {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.7;
  flex: 1;
  margin-bottom: var(--sp-5);
}

.blog-card__meta {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}

.blog-card__meta svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  color: var(--sky-blue);
}

.blog-card__link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  color: var(--bright-blue);
  font-weight: var(--fw-semibold);
  font-size: var(--text-sm);
  text-decoration: none;
  transition: gap var(--ease-fast);
}

.blog-card__link:hover { gap: var(--sp-3); }
.blog-card__link svg { width: 14px; height: 14px; }

/* Blog article page */
.blog-article-header {
  background: var(--gradient-hero);
  padding: calc(var(--header-h-mobile) + var(--sp-16)) 0 var(--sp-12);
  color: var(--white);
}

.blog-article-header .breadcrumb {
  color: rgba(255,255,255,0.65);
  font-size: var(--text-sm);
  margin-bottom: var(--sp-5);
}

.blog-article-header .breadcrumb a {
  color: var(--sky-blue);
  text-decoration: none;
}

.blog-article-header .breadcrumb a:hover { text-decoration: underline; }

.blog-article-header__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: var(--fw-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: var(--sp-4);
}

.blog-article-header__title {
  font-family: var(--font-heading);
  font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl));
  font-weight: var(--fw-bold);
  line-height: 1.2;
  margin-bottom: var(--sp-5);
  max-width: 820px;
}

.blog-article-header__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-5);
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.75);
}

.blog-article-header__meta svg {
  width: 14px;
  height: 14px;
  vertical-align: middle;
  margin-right: 4px;
}

/* Article body layout */
.blog-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-12);
  padding: var(--sp-16) 0;
}

@media (min-width: 992px) {
  .blog-layout {
    grid-template-columns: 1fr 320px;
    align-items: start;
  }
}

/* Article prose content */
.blog-prose {
  font-size: var(--text-base);
  line-height: 1.85;
  color: var(--text-primary);
  max-width: 72ch;
}

.blog-prose h2 {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: var(--fw-bold);
  color: var(--navy);
  margin: var(--sp-10) 0 var(--sp-4);
  padding-top: var(--sp-2);
  border-top: 3px solid var(--sky-blue);
}

.blog-prose h3 {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: var(--fw-semibold);
  color: var(--navy-dark);
  margin: var(--sp-7) 0 var(--sp-3);
}

.blog-prose p { margin-bottom: var(--sp-5); }

.blog-prose ul,
.blog-prose ol {
  margin: var(--sp-4) 0 var(--sp-5) var(--sp-6);
}

.blog-prose li {
  margin-bottom: var(--sp-2);
  padding-left: var(--sp-2);
}

.blog-prose ul li::marker { color: var(--sky-blue); }
.blog-prose ol li::marker { color: var(--bright-blue); font-weight: var(--fw-bold); }

.blog-prose a {
  color: var(--bright-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

.blog-prose strong { color: var(--navy); }

.blog-prose blockquote {
  border-left: 4px solid var(--sky-blue);
  background: var(--bg-secondary);
  padding: var(--sp-5) var(--sp-6);
  margin: var(--sp-6) 0;
  border-radius: 0 var(--radius-base) var(--radius-base) 0;
  font-style: italic;
  color: var(--text-secondary);
}

.blog-prose .callout-box {
  background: var(--bg-navy-light, rgba(10,36,99,0.05));
  border: 1px solid rgba(10,36,99,0.15);
  border-left: 4px solid var(--navy);
  padding: var(--sp-5) var(--sp-6);
  border-radius: var(--radius-base);
  margin: var(--sp-6) 0;
}

/* Blog sidebar */
.blog-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
  position: sticky;
  top: calc(var(--header-h-mobile) + var(--sp-4));
}

.blog-sidebar__widget {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: var(--sp-6);
  box-shadow: var(--shadow-card);
  border: var(--border-light);
}

.blog-sidebar__widget-title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: var(--fw-bold);
  color: var(--navy);
  margin-bottom: var(--sp-4);
  padding-bottom: var(--sp-3);
  border-bottom: 2px solid var(--sky-blue);
}

.blog-sidebar__links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.blog-sidebar__links a {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  color: var(--text-primary);
  text-decoration: none;
  font-size: var(--text-sm);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-base);
  transition: background var(--ease-fast), color var(--ease-fast);
}

.blog-sidebar__links a::before {
  content: '›';
  color: var(--sky-blue);
  font-weight: bold;
  flex-shrink: 0;
}

.blog-sidebar__links a:hover {
  background: var(--bg-secondary);
  color: var(--navy);
}

.blog-cta-widget {
  background: var(--gradient-brand);
  color: var(--white);
  text-align: center;
  border-radius: var(--radius-xl);
  padding: var(--sp-8) var(--sp-6);
}

.blog-cta-widget h3 {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  margin-bottom: var(--sp-3);
}

.blog-cta-widget p {
  font-size: var(--text-sm);
  opacity: 0.9;
  margin-bottom: var(--sp-5);
  line-height: 1.6;
}

/* Mobile blog responsive tweaks */
@media (max-width: 767px) {
  .blog-hero {
    padding-top: calc(var(--header-h-mobile) + var(--sp-10));
  }
  .blog-article-header {
    padding-top: calc(var(--header-h-mobile) + var(--sp-10));
  }
  .blog-prose { max-width: 100%; }
  .blog-sidebar { position: static; }
}
