/* ═══════════════════════════════════════════════════════════════════════════
   Central Coast HR — Main Stylesheet
   Colors extracted from logo: navy, coastal teal, sandy beige
   Note: Fonts loaded via <link> in header.php for faster paint
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Skip-to-content link (accessibility) ─────────────────────────────────── */
/* Visually hidden until focused via Tab. Standard WCAG pattern — truly clipped
   out of the layout when not focused, so it never peeks above the header on
   any viewport. */
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link:focus {
  position: absolute;
  top: 0;
  left: 0;
  width: auto;
  height: auto;
  padding: .6rem 1rem;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
  background: #1B3563;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  z-index: 10000;
  border-bottom-right-radius: 4px;
  outline: 2px solid #C4A882;
  outline-offset: -2px;
}

/* ── CSS Variables ────────────────────────────────────────────────────────── */
:root {
  --navy:        #1B3563;
  --navy-dark:   #122444;
  --navy-light:  #2A4E82;
  --teal:        #537D8D;
  --teal-dark:   #3D6070;
  --teal-light:  #7EAFC0;
  --sand:        #C4A882;
  --sand-light:  #DDD0BC;
  --sand-dark:   #A8916A;
  --white:       #FFFFFF;
  --off-white:   #F8F9FC;
  --light-gray:  #F0F2F7;
  --mid-gray:    #D4D8E4;
  --border:      #E0E4EE;
  --text:        #1A2640;
  --text-med:    #4A5570;
  --text-light:  #7A8AA0;
  --success:     #2A7A50;
  --warning:     #C97B28;
  --error:       #C83030;
  --info:        #2A6A9A;

  --font-head: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  --shadow-sm:  0 1px 3px rgba(27,53,99,.08), 0 1px 2px rgba(27,53,99,.06);
  --shadow:     0 4px 12px rgba(27,53,99,.10), 0 2px 6px rgba(27,53,99,.06);
  --shadow-lg:  0 12px 32px rgba(27,53,99,.14), 0 4px 12px rgba(27,53,99,.08);
  --shadow-xl:  0 24px 48px rgba(27,53,99,.18), 0 8px 20px rgba(27,53,99,.10);

  --radius-sm: 4px;
  --radius:    8px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  --transition: 0.22s ease;

  --container: 1200px;
  --section-pad: 5rem;
}

/* ── Reset ────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Mobile foundation: prevent rogue overflow, smooth scroll, no janky tap-highlight */
html {
  overflow-x: hidden;             /* safety net against any decorative element bleed */
  scroll-behavior: smooth;        /* in-page anchor links glide */
  -webkit-text-size-adjust: 100%; /* prevent Safari font auto-resizing on rotate */
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
img {
  -webkit-user-drag: none;
  user-drag: none;
  -webkit-user-select: none;
  user-select: none;
  pointer-events: none;
}
/* Re-enable pointer events on linked images */
a img, button img { pointer-events: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; border: none; background: none; }

/* ── Typography ───────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  line-height: 1.2;
  color: var(--navy);
}
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); font-weight: 600; }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.7rem); font-weight: 600; }
h4 { font-size: 1.2rem; font-weight: 600; }
h5 { font-size: 1.05rem; font-weight: 600; }

p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

.lead {
  font-size: 1.2rem;
  line-height: 1.75;
  color: var(--text-med);
}

.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.75rem;
}

/* ── Layout ───────────────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: var(--section-pad) 0;
}

.section--light  { background: var(--off-white); }
.section--gray   { background: var(--light-gray); }
.section--navy   { background: var(--navy); color: var(--white); }
.section--navy h2, .section--navy h3 { color: var(--white); }
.section--navy .section-label { color: var(--sand-light); }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }

.flex        { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between{ display: flex; align-items: center; justify-content: space-between; }
.gap-1  { gap: .5rem; }
.gap-2  { gap: 1rem; }
.gap-3  { gap: 1.5rem; }

.text-center { text-align: center; }
.text-right  { text-align: right; }

/* ── Navigation ───────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  gap: 2rem;
}

.nav-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.nav-logo img {
  height: 52px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-links a {
  padding: .5rem .9rem;
  font-size: .95rem;
  font-weight: 500;
  color: var(--text-med);
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.nav-links a:hover, .nav-links a.active {
  color: var(--navy);
  background: var(--light-gray);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: .5rem;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  transition: var(--transition);
  border-radius: 2px;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .7rem 1.6rem;
  font-size: .95rem;
  font-weight: 600;
  border-radius: var(--radius);
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
  border: 2px solid transparent;
  line-height: 1.4;
}

.btn-primary {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}
.btn-primary:hover {
  background: var(--navy-dark);
  border-color: var(--navy-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(27,53,99,.3);
}

.btn-teal {
  background: var(--teal);
  color: var(--white);
  border-color: var(--teal);
}
.btn-teal:hover {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(83,125,141,.35);
}

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

.btn-outline-white {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,.6);
}
.btn-outline-white:hover {
  background: var(--white);
  color: var(--navy);
  border-color: var(--white);
}

.btn-sand {
  background: var(--sand);
  color: var(--navy-dark);
  border-color: var(--sand);
}
.btn-sand:hover {
  background: var(--sand-dark);
  border-color: var(--sand-dark);
  transform: translateY(-1px);
}

.btn-sm { padding: .45rem 1rem; font-size: .875rem; }
.btn-lg { padding: .9rem 2.2rem; font-size: 1.05rem; }

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 54vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 45%, var(--teal-dark) 100%);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 50%, rgba(83,125,141,.25) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 20% 80%, rgba(196,168,130,.12) 0%, transparent 50%);
}

.hero-wave {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  overflow: hidden;
}
.hero-wave svg { width: 100%; height: 100%; }

.hero-content {
  position: relative;
  z-index: 1;
  padding: 2.25rem 0 2.75rem;
  text-align: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(196,168,130,.15);
  border: 1px solid rgba(196,168,130,.35);
  color: var(--sand-light);
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .4rem 1rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
}

.hero h1 {
  color: var(--white);
  margin: 0 auto 1.25rem;
  max-width: 760px;
}

.hero h1 em {
  font-style: normal;
  color: var(--sand-light);
}

.hero-sub {
  font-size: 1.1rem;
  color: rgba(255,255,255,.8);
  max-width: 620px;
  margin: 0 auto 1.75rem;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.75rem;
  justify-content: center;
}

.hero-stats {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
  justify-content: center;
}
.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-stat-num {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 700;
  color: var(--sand-light);
  line-height: 1;
}
.hero-stat-label {
  font-size: .85rem;
  color: rgba(255,255,255,.65);
  margin-top: .2rem;
}

/* ── Services Section ─────────────────────────────────────────────────────── */
.service-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--navy), var(--teal));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.service-card:hover::before { transform: scaleX(1); }

.service-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--navy-light), var(--teal));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.5rem;
  color: white;
}

.service-card h3 {
  font-size: 1.15rem;
  margin-bottom: .6rem;
}

.service-card p {
  font-size: .94rem;
  color: var(--text-med);
  line-height: 1.65;
}

.service-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-top: 1rem;
  font-size: .9rem;
  font-weight: 600;
  color: var(--teal);
  transition: gap var(--transition), color var(--transition);
}
.service-link:hover { gap: .6rem; color: var(--teal-dark); }

/* ── About Section ────────────────────────────────────────────────────────── */
.about-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: center;
}

.about-image-wrap {
  position: relative;
}
.about-image-main {
  width: 100%;
  aspect-ratio: 4/5;
  border-radius: var(--radius-xl);
  object-fit: cover;
  box-shadow: var(--shadow-xl);
}
.about-image-placeholder {
  width: 100%;
  aspect-ratio: 4/5;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--light-gray) 0%, var(--mid-gray) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 3rem;
  box-shadow: var(--shadow-xl);
}

.about-badge {
  position: absolute;
  bottom: 2rem;
  right: -1.5rem;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: .75rem;
  min-width: 180px;
}
.about-badge-icon { font-size: 1.75rem; }
.about-badge-num { font-family: var(--font-head); font-size: 1.4rem; font-weight: 700; color: var(--navy); line-height: 1; }
.about-badge-txt { font-size: .8rem; color: var(--text-light); }

.credentials {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  margin: 1.75rem 0;
}
.credential {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: .95rem;
  color: var(--text-med);
}
.credential-icon {
  width: 28px;
  height: 28px;
  background: var(--light-gray);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  flex-shrink: 0;
  color: var(--teal);
}

/* Credential badges (small pill chips for certifications) */
.credential-badge {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--navy);
  font-size: .82rem;
  font-weight: 600;
  padding: .45rem .85rem;
  border-radius: 100px;
  box-shadow: var(--shadow-sm);
}
.credential-badge i {
  color: var(--teal);
  font-size: .9rem;
}

/* ── Testimonials / Trust ─────────────────────────────────────────────────── */
.trust-bar {
  background: var(--off-white);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 2.5rem 0;
}
.trust-items {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}
.trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.trust-item-num {
  font-family: var(--font-head);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
}
.trust-item-label {
  font-size: .85rem;
  color: var(--text-light);
  margin-top: .25rem;
}

/* ── CTA Banner ───────────────────────────────────────────────────────────── */
.cta-banner {
  background: linear-gradient(135deg, var(--navy) 0%, var(--teal-dark) 100%);
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: rgba(196,168,130,.08);
  top: -200px; right: -100px;
  pointer-events: none;
}

/* ── Cards ────────────────────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

/* ── Contact Form ─────────────────────────────────────────────────────────── */
.form-group {
  margin-bottom: 1.25rem;
}
.form-label {
  display: block;
  font-size: .9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: .4rem;
}
.form-control {
  display: block;
  width: 100%;
  padding: .7rem 1rem;
  font-size: .95rem;
  color: var(--text);
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(83,125,141,.18);
}
.form-control::placeholder { color: var(--text-light); }
textarea.form-control { resize: vertical; min-height: 130px; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%237A8AA0' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .75rem center; background-size: 18px; padding-right: 2.5rem; }

.form-hint { font-size: .82rem; color: var(--text-light); margin-top: .3rem; }
.form-error { font-size: .82rem; color: var(--error); margin-top: .3rem; }

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.contact-info-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--navy-light), var(--teal));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  color: var(--white);
}
.contact-info-label { font-size: .8rem; font-weight: 600; color: var(--text-light); text-transform: uppercase; letter-spacing: .08em; }
.contact-info-value { font-size: .98rem; color: var(--text); margin-top: .1rem; }

/* ── Alert / Flash ────────────────────────────────────────────────────────── */
.alert {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .85rem 1.25rem;
  border-radius: var(--radius);
  font-size: .95rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
}
.alert-icon { font-size: 1.1rem; flex-shrink: 0; }
.alert-success { background: #edf7f1; color: #1e5c39; border: 1px solid #a3d9b8; }
.alert-error   { background: #fef2f2; color: #922020; border: 1px solid #f5b8b8; }
.alert-warning { background: #fffbeb; color: #92600a; border: 1px solid #fcd97a; }
.alert-info    { background: #eff6ff; color: #1d4e8a; border: 1px solid #b3d1f8; }

/* ── Footer ───────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,.75);
  padding: 4rem 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
}

.footer-logo { height: 44px; width: auto; filter: brightness(0) invert(1); margin-bottom: 1rem; }
.footer-tagline { font-size: .9rem; line-height: 1.65; opacity: .75; max-width: 260px; }

.footer-heading {
  font-family: var(--font-body);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--sand-light);
  margin-bottom: .9rem;
}

.footer-links { display: flex; flex-direction: column; gap: .45rem; }
.footer-links a {
  font-size: .9rem;
  color: rgba(255,255,255,.65);
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 1.25rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .85rem;
  color: rgba(255,255,255,.45);
  flex-wrap: wrap;
  gap: .5rem;
}
.footer-bottom a { color: rgba(255,255,255,.55); }
.footer-bottom a:hover { color: var(--white); }

/* ── Page Hero (inner pages) ─────────────────────────────────────────────── */
.page-hero {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 60%, var(--teal-dark) 100%);
  padding: 4.5rem 0 3.5rem;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: rgba(83,125,141,.2);
  top: -100px; right: -80px;
}
.page-hero-content { position: relative; z-index: 1; }
.page-hero h1 { color: var(--white); margin-bottom: .5rem; }
.page-hero p  { color: rgba(255,255,255,.75); font-size: 1.1rem; }

.breadcrumb {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .85rem;
  color: rgba(255,255,255,.55);
  margin-bottom: 1rem;
}
.breadcrumb a { color: rgba(255,255,255,.65); }
.breadcrumb a:hover { color: var(--white); }
.breadcrumb-sep { opacity: .4; }

/* ── Services Detail Page ────────────────────────────────────────────────── */
.service-detail {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 3rem;
  align-items: start;
}

.service-detail-icon {
  width: 72px; height: 72px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--navy-light), var(--teal));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 1.25rem;
  color: white;
}

.process-steps {
  counter-reset: steps;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin: 2rem 0;
}
.process-step {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}
.process-step::before {
  counter-increment: steps;
  content: counter(steps);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .9rem;
  flex-shrink: 0;
  margin-top: .1rem;
}

/* ── Scroll animations ───────────────────────────────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Utilities ───────────────────────────────────────────────────────────── */
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.hidden { display: none !important; }

/* ── Mobile Dropdown (hidden on desktop) ─────────────────────────────────── */
.nav-dropdown { display: none; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  :root { --section-pad: 4rem; }
  .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .about-layout { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
  .about-image-wrap { max-width: 400px; }
  .about-badge { right: 1rem; }
}

@media (max-width: 900px) {
  :root { --section-pad: 3rem; }

  /* Hide desktop nav-links and CTA at mobile */
  .nav-links,
  .nav-cta { display: none; }

  /* Hamburger button — three lines that animate into an X when open */
  .nav-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    border-radius: var(--radius-sm);
    transition: background var(--transition);
  }
  .nav-toggle:hover { background: var(--light-gray); }
  .nav-toggle:active { transform: scale(.95); }
  .nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--navy);
    border-radius: 2px;
    transition: transform .25s ease, opacity .2s ease, background .2s ease;
    transform-origin: center;
  }
  .nav-toggle.open span { background: var(--teal); }
  .nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* Dropdown menu — full width with 20px padding from screen edges */
  .nav-dropdown {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 20px;
    right: 20px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(15, 25, 45, .14);
    margin-top: .5rem;
    padding: .65rem;
    opacity: 0;
    transform: translateY(-8px) scale(.98);
    transform-origin: top center;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
    z-index: 1001;
  }
  .nav-dropdown.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
  }

  /* Dropdown links */
  .nav-dropdown > a {
    display: block;
    padding: .8rem 1rem;
    font-size: .98rem;
    font-weight: 500;
    color: var(--text);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: background var(--transition), color var(--transition);
  }
  .nav-dropdown > a:hover,
  .nav-dropdown > a.active {
    background: var(--off-white);
    color: var(--navy);
  }
  .nav-dropdown > a.active {
    color: var(--teal);
    font-weight: 600;
  }

  /* CTA buttons stacked at bottom of dropdown */
  .nav-dropdown-cta {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    margin-top: .5rem;
    padding-top: .75rem;
    border-top: 1px solid var(--border);
  }
  .nav-dropdown-cta .btn {
    width: 100%;
    justify-content: center;
    padding: .7rem 1rem;
    font-size: .9rem;
  }

  /* The .nav element needs position: relative for the absolute dropdown to anchor correctly */
  .nav { position: relative; }

  /* Single column layouts. minmax(0, 1fr) prevents children with long content
     from blowing the column past the viewport (the auto minimum bug). */
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .hero-stats { gap: 1.5rem; }
  .trust-items { gap: 1.5rem; flex-wrap: wrap; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .service-detail { grid-template-columns: minmax(0, 1fr); }
  .about-layout { grid-template-columns: minmax(0, 1fr); }
  /* About headshot: cap to a sensible mobile size, centered, badge overlay */
  .about-image-wrap {
    max-width: 320px;
    margin: 0 auto;
    width: 100%;
  }
  .about-image-main {
    aspect-ratio: 4/5;
    border-radius: var(--radius-lg);
  }
  .about-badge {
    right: -.5rem;
    bottom: 1rem;
    padding: .6rem .9rem;
    font-size: .85rem;
  }
  .about-badge-num { font-size: .9rem !important; }
  .about-badge-txt { font-size: .72rem; }
}

@media (max-width: 600px) {
  :root { --section-pad: 2.5rem; }   /* tighten section padding on phones */

  /* Container padding tightens on phones */
  .container { padding: 0 1.25rem; }

  /* ── Nav ────────────────────────────────────────── */
  .nav { height: 68px; gap: 1rem; }
  .nav-logo img { height: 44px; max-width: 180px; }

  /* ── Typography scale ───────────────────────────── */
  h2 { font-size: 1.65rem; }
  h3 { font-size: 1.15rem; }
  .lead { font-size: 1.05rem; line-height: 1.6; }

  /* ── Hero (homepage) ─────────────────────────────── */
  .hero { min-height: auto; }
  .hero-content { padding: 1.5rem 0 3rem; }
  .hero h1 { font-size: 2.1rem; line-height: 1.15; margin-top: .75rem; }
  .hero-sub { font-size: 1rem; }
  .hero-eyebrow { font-size: .72rem; padding: .35rem .85rem; margin-bottom: 1rem; }
  .hero-actions { flex-direction: column; gap: .75rem; width: 100%; margin-top: 1.5rem; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero-stats {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.25rem 2rem;
    text-align: left;
    margin-top: 2rem;
  }
  .hero-stat-num { font-size: 1.7rem; }
  .hero-stat-label { font-size: .75rem; }
  .hero::before { width: 100%; }            /* contain decorative gradient blob */

  /* ── Page hero (inner pages) ─────────────────────── */
  .page-hero { padding: 2rem 0 2.5rem; }
  .page-hero h1 { font-size: 1.85rem; margin-bottom: .5rem; }
  .page-hero p { font-size: .95rem; }
  .page-hero::before {
    width: 240px; height: 240px;
    top: -80px; right: -60px;
  }
  .breadcrumb { font-size: .82rem; margin-bottom: .85rem; }

  /* ── Buttons ────────────────────────────────────── */
  .btn { min-height: 44px; }                /* iOS-recommended touch target */
  .btn-sm { min-height: 36px; padding: .55rem .9rem; }
  .btn-lg { width: 100%; padding: .9rem 1.5rem; font-size: 1rem; }
  /* Long button text wraps cleanly on small screens (overrides global nowrap) */
  .btn { white-space: normal; }

  /* ── Cards ──────────────────────────────────────── */
  .card { padding: 1.5rem 1.25rem; }
  .service-card { padding: 1.5rem 1.25rem; }

  /* ── Trust bar ──────────────────────────────────── */
  .trust-items {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.25rem;
  }
  .trust-item-num { font-size: .95rem; }
  .trust-item-label { font-size: .72rem; }

  /* ── About section ──────────────────────────────── */
  .about-image-wrap { max-width: 320px; margin: 0 auto; width: 100%; }
  .about-image-main { aspect-ratio: 4/5; border-radius: var(--radius-lg); }
  .about-badge {
    right: -.5rem;
    bottom: 1rem;
    padding: .55rem .85rem;
    min-width: auto;                        /* was 180px — let it size to content */
    gap: .55rem;
  }
  .about-badge-icon { font-size: 1.4rem; }
  .about-badge-num { font-size: .9rem !important; }
  .about-badge-txt { font-size: .72rem; }

  /* ── Credential badges (about page) ─────────────── */
  .credential-badges { gap: .4rem !important; margin-top: 1.25rem !important; }
  .credential-badge {
    font-size: .75rem;
    padding: .4rem .7rem;
  }

  /* ── Contact page ───────────────────────────────── */
  .contact-info-item { gap: .85rem; }
  .contact-info-icon { width: 38px; height: 38px; font-size: 1rem; }

  /* ── Forms (prevent iOS zoom on focus) ──────────── */
  .form-control { font-size: 16px; padding: .75rem 1rem; }
  textarea.form-control { min-height: 120px; }

  /* ── CTA banner ─────────────────────────────────── */
  .cta-banner { padding: 2.5rem 0; }
  .cta-banner h2 { font-size: 1.6rem; }
  .cta-banner::before { display: none; }    /* hide oversized decorative blob */
  .cta-banner::after  { display: none; }

  /* ── Service detail page (services.php anchors) ── */
  .service-detail-icon {
    width: 56px; height: 56px;
    font-size: 1.5rem;
  }

  /* ── Footer ─────────────────────────────────────── */
  .footer-grid { gap: 1.75rem; }
  .footer-heading { font-size: .85rem; }
  .footer-links a, .footer-links li { font-size: .9rem; }

  /* ── FAQ details on contact page ────────────────── */
  .card details summary { font-size: .95rem; }
}

@media (max-width: 380px) {
  .nav-logo img { height: 40px; max-width: 160px; }
  .hero h1 { font-size: 1.85rem; }
  .hero-stats { gap: 1rem; }
}
