/* =============================================
   Raileys Services LLC — Design System
   Vibe: clean-modern | Colors: red + gray
   Fonts: Inter (heading + body)
   ============================================= */

:root {
  --color-primary: #C41E24;
  --color-primary-dark: #A11A1F;
  --color-primary-light: #E8444A;
  --color-secondary: #4B5563;
  --color-secondary-dark: #374151;
  --color-accent: #E8E8E8;
  --color-bg: #ffffff;
  --color-bg-alt: #F9FAFB;
  --color-bg-dark: #1F2937;
  --color-text: #1F2937;
  --color-text-light: #ffffff;
  --color-muted: #6B7280;
  --color-border: #E5E7EB;
  --color-success: #059669;
  --color-error: #DC2626;
  --font-heading: 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  --spacing-section: 3.5rem;
  --max-width: 1200px;
  --transition: 0.2s ease;
  --shadow-premium: 0 18px 45px rgba(31,41,55,0.14);
}

/* ---- RESET & BASE ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-primary-dark); }
ul, ol { list-style: none; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-text);
}
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; margin-bottom: 1rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.75rem; }
h4 { font-size: 1.25rem; margin-bottom: 0.5rem; }
p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* Skip link */
.skip-link {
  position: absolute; top: -100%; left: 1rem; z-index: 9999;
  background: var(--color-primary); color: #fff; padding: 0.5rem 1rem;
  border-radius: var(--radius); font-weight: 600;
}
.skip-link:focus { top: 1rem; }

/* ---- LAYOUT ---- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }
section, .section { padding: var(--spacing-section) 0; }
.section-dark { background: var(--color-bg-dark); color: var(--color-text-light); }
.section-dark h2, .section-dark h3, .section-dark h4 { color: var(--color-text-light); }
.section-alt { background: var(--color-bg-alt); }
.section-label {
  display: inline-block; font-size: 0.8125rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--color-primary); margin-bottom: 0.75rem;
}
.section-dark .section-label { color: var(--color-primary-light); }
.section-header { text-align: center; max-width: 700px; margin: 0 auto 2rem; }
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-primary);
  font-weight: 700;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}
.muted { color: var(--color-muted); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.text-center { text-align: center; }

/* ---- GRID ---- */
.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: 2rem; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }

/* --- SMS Consent (A2P Compliance) --- */
.sms-consent{margin:16px 0}
.sms-consent__label{display:flex;align-items:flex-start;gap:10px;font-size:12px;line-height:1.5;color:var(--color-text-muted);cursor:pointer;margin-bottom:12px}
.sms-consent__label input[type="checkbox"]{margin-top:3px;flex-shrink:0;width:16px;height:16px;cursor:pointer;accent-color:var(--color-primary)}
.sms-consent__label a{color:var(--color-primary);text-decoration:underline}

@media (max-width: 1023px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 639px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  section, .section { padding: 2.5rem 0; }
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.875rem 1.75rem; border-radius: var(--radius); font-weight: 600;
  font-size: 1rem; font-family: var(--font-body); cursor: pointer;
  transition: all var(--transition); border: 2px solid transparent;
  text-decoration: none; line-height: 1.2;
}
.btn--primary {
  background: var(--color-primary); color: #fff; border-color: var(--color-primary);
}
.btn--primary:hover { background: var(--color-primary-dark); border-color: var(--color-primary-dark); color: #fff; }
.btn--outline {
  background: transparent; color: var(--color-primary); border-color: var(--color-primary);
}
.btn--outline:hover { background: var(--color-primary); color: #fff; }
.btn--white {
  background: #fff; color: var(--color-primary); border-color: #fff;
}
.btn--white:hover { background: var(--color-bg-alt); border-color: var(--color-bg-alt); color: var(--color-primary-dark); }
.btn--sm { padding: 0.5rem 1.25rem; font-size: 0.875rem; }
.btn--full { width: 100%; }
.btn-group { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.5rem; }
.hero .btn--outline { color: #fff; border-color: #fff; }
.hero .btn--outline:hover { background: #fff; color: var(--color-primary); }

/* ---- HEADER ---- */
.header {
  position: sticky; top: 0; z-index: 100;
  background: #fff; border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow);
  min-height: 72px; contain: layout style;
}
.header .container {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 0.75rem; padding-bottom: 0.75rem;
}
.header__logo img { height: 48px; width: auto; }
.header__nav { display: flex; align-items: center; gap: 0.25rem; }
.header__nav a {
  padding: 0.5rem 0.75rem; font-size: 0.9375rem; font-weight: 500;
  color: var(--color-text); border-radius: var(--radius);
  transition: all var(--transition);
}
.header__nav a:hover, .header__nav a.active {
  color: var(--color-primary); background: rgba(196,30,36,0.06);
}
.header__actions { display: flex; align-items: center; gap: 1rem; }
.header__phone {
  display: flex; align-items: center; gap: 0.5rem;
  font-weight: 600; color: var(--color-text); font-size: 0.9375rem;
}
.header__phone svg { flex-shrink: 0; }
.header__phone:hover { color: var(--color-primary); }
.header__toggle {
  display: none; background: none; border: none; cursor: pointer;
  color: var(--color-text); padding: 0.25rem;
}

/* Nav dropdown */
.nav__dropdown { position: relative; }
.nav__dropdown-trigger { display: flex; align-items: center; gap: 0.25rem; }
.nav__dropdown-trigger::after {
  content: ''; display: inline-block; width: 0; height: 0;
  border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-top: 4px solid currentColor; margin-left: 2px;
}
.nav__dropdown-trigger:has(svg)::after { display: none; }
.nav__dropdown-menu {
  position: absolute; top: 100%; left: 0; min-width: 240px;
  background: #fff; border: 1px solid var(--color-border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 0.5rem 0; opacity: 0; visibility: hidden;
  max-height: calc(100vh - 96px); overflow-y: auto; overscroll-behavior: contain;
  pointer-events: none; transition: opacity 0.15s ease, visibility 0.15s ease; z-index: 50;
}
.nav__dropdown:hover .nav__dropdown-menu,
.nav__dropdown:focus-within .nav__dropdown-menu,
.nav__dropdown.open .nav__dropdown-menu {
  opacity: 1; visibility: visible; pointer-events: auto;
}
.nav__dropdown-menu a {
  display: block; padding: 0.5rem 1rem; font-size: 0.875rem;
  color: var(--color-text); border-radius: 0;
}
.nav__dropdown-menu a:hover { background: var(--color-bg-alt); color: var(--color-primary); }

/* Pointer-intent handling in desktop-dropdown-intent.js preserves diagonal
   travel without a transparent hit area overlapping the neighboring trigger. */
@media (min-width: 1181px) and (hover: hover) and (pointer: fine) {
  .nav__dropdown:hover,
  .nav__dropdown:focus-within,
  .nav__dropdown.open {
    z-index: 60;
  }
}

@media (max-width: 1023px) {
  .header__nav {
    display: none;
    position: fixed; top: 0; right: 0; width: min(300px, 82vw); height: 100vh;
    background: #fff; flex-direction: column; align-items: stretch;
    padding: 5rem 1.5rem 2rem; gap: 0; z-index: 200;
    box-shadow: -4px 0 20px rgba(0,0,0,0.15);
    overflow-y: auto;
    transform: none;
    visibility: hidden;
    pointer-events: none;
  }
  .header__nav.open {
    display: flex;
    visibility: visible;
    pointer-events: auto;
  }
  .header__nav a {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; min-width: 0; padding: 0.75rem 0;
    font-size: 1.0625rem; border-radius: 0; border-bottom: 1px solid var(--color-border);
    overflow-wrap: anywhere;
  }
  .header__toggle { display: flex; z-index: 250; }
  .header__phone { display: none; }
  .nav__list, .nav__list > li, .nav__dropdown { width: 100%; min-width: 0; }
  .nav__dropdown-trigger::after { display: none; }
  .nav__dropdown-menu {
    position: static; opacity: 1; visibility: visible; transform: none; pointer-events: auto;
    box-shadow: none; border: none; padding: 0; display: none;
  }
  .nav__dropdown.open .nav__dropdown-menu { display: block; }
  .nav__dropdown-menu a { padding-left: 1rem; font-size: 0.9375rem; }
}

/* Mobile phone bar */
.mobile-phone-bar {
  display: none; background: var(--color-primary); text-align: center;
  padding: 0.5rem;
}
.mobile-phone-bar a {
  color: #fff; font-weight: 600; font-size: 0.9375rem;
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
}
@media (max-width: 1023px) { .mobile-phone-bar { display: block; } }

/* Grading page conversion path */
.service-mobile-cta { display: none; }
.service-proof {
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
  padding: 1.75rem 2rem;
  background: #fff;
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}
.service-proof blockquote { font-size: 1.125rem; line-height: 1.7; }
.service-proof figcaption { margin-top: 0.75rem; color: var(--color-muted); font-weight: 700; }

@media (max-width: 1180px) {
  .grading-page { padding-bottom: 62px; }
  .service-mobile-cta {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 95;
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 58px;
    background: #fff;
    border-top: 1px solid var(--color-border);
    box-shadow: 0 -4px 16px rgba(31,41,55,0.16);
  }
  .service-mobile-cta a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 0.75rem;
    font-weight: 700;
    text-align: center;
  }
  .service-mobile-cta a:last-child { background: var(--color-primary); color: #fff; }
  body.nav-open .service-mobile-cta { display: none; }
}

@media (max-width: 479px) {
  .service-proof { padding: 1.25rem; }
  .service-mobile-cta a { font-size: 0.875rem; }
}

/* ---- HERO ---- */
.hero {
  position: relative; background: linear-gradient(135deg, var(--color-bg-dark) 0%, #111827 100%);
  background-size: cover; background-position: center;
  color: #fff; padding: 5rem 0 4rem; overflow: hidden;
  min-height: 420px;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(180deg, rgba(31,41,55,0) 0%, rgba(31,41,55,0.32) 100%);
  pointer-events: none;
  z-index: 0;
}
.hero--inner { padding: 3.5rem 0 3rem; min-height: 320px; }
.hero-compact { padding: 3.25rem 0 2.75rem; min-height: 300px; }
.hero h1 { color: #fff; font-size: 2.75rem; max-width: 700px; }
.hero--inner h1 { font-size: 2.25rem; }
.hero-compact h1 { font-size: clamp(2rem, 3vw, 2.65rem); line-height: 1.12; }
.hero p { color: rgba(255,255,255,0.85); font-size: 1.125rem; max-width: 600px; margin-bottom: 0.75rem; }
.hero .section-label { color: var(--color-primary-light); }
.hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0.2; z-index: 0;
}
.hero .container { position: relative; z-index: 1; }
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 430px);
  gap: 2.5rem;
  align-items: center;
}
.hero__content h1 { max-width: 640px; }
.hero__content p { max-width: 620px; }
.hero-form-card {
  background: #fff;
  color: var(--color-text);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-premium);
  border-top: 4px solid var(--color-primary);
}
.hero-form-card h2 {
  color: var(--color-text);
  font-size: 1.35rem;
  margin-bottom: 0.35rem;
}
.hero-form-card p {
  color: var(--color-muted);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}
.hero-form-card .form-group { margin-bottom: 0.85rem; }
.hero-form-card .form-label { color: var(--color-text); font-size: 0.85rem; }
.hero-form-card .form-input { min-height: 44px; }

@media (max-width: 1023px) {
  .hero__grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}
@media (max-width: 639px) {
  .hero-conversion {
    padding: 1.75rem 0 2rem;
    min-height: 0;
  }
  .hero-conversion h1 { font-size: 1.75rem; line-height: 1.12; }
  .hero-conversion p { font-size: 0.95rem; line-height: 1.45; }
  .hero-conversion .btn-group { display: none; }
  .hero-form-card { padding: 1rem; }
  .hero-form-card h2 { font-size: 1.15rem; }
  .hero-form-card p { font-size: 0.88rem; line-height: 1.4; }
  .hero-form-card .form-group { margin-bottom: 0.65rem; }
  .hero-form-card .form-input { min-height: 40px; padding: 0.55rem 0.75rem; }
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem;
  font-size: 0.8125rem; margin-bottom: 1.25rem;
}
.breadcrumbs a { color: var(--color-muted); }
.breadcrumbs a:hover { color: var(--color-primary); }
.breadcrumbs .current { color: var(--color-text); font-weight: 500; }
.hero .breadcrumbs a { color: rgba(255,255,255,0.6); }
.hero .breadcrumbs a:hover { color: #fff; }
.hero .breadcrumbs .current { color: rgba(255,255,255,0.9); }
.hero .breadcrumbs span { color: rgba(255,255,255,0.4); }

@media (max-width: 639px) {
  .hero { padding: 3rem 0 2.5rem; }
  .hero h1 { font-size: 2rem; }
  .hero--inner h1 { font-size: 1.75rem; }
}

/* ---- CARDS ---- */
.card {
  background: #fff; border: 1px solid var(--color-border);
  border-radius: var(--radius); overflow: hidden;
  transition: all var(--transition); box-shadow: var(--shadow);
}
.card:hover { box-shadow: var(--shadow-premium); transform: translateY(-3px); }
.card-img { position: relative; overflow: hidden; aspect-ratio: 16/10; background: var(--color-bg-alt); }
.card-body { padding: 1.5rem; }
.card-body h3 { font-size: 1.25rem; }
.card-body h3 a { color: var(--color-text); }
.card-body h3 a:hover { color: var(--color-primary); }
.card-link {
  display: inline-flex; align-items: center; gap: 0.375rem;
  font-weight: 600; font-size: 0.875rem; color: var(--color-primary); margin-top: 0.75rem;
}
.card-link:hover { gap: 0.5rem; }
.card-link svg { transition: transform var(--transition); }
.card-link:hover svg { transform: translateX(3px); }

/* Card class aliases (BEM double-underscore ↔ single-hyphen) */
.card__img { position: relative; overflow: hidden; aspect-ratio: 16/10; background: var(--color-bg-alt); }
.card__body { padding: 1.5rem; }
.card__body h3 { font-size: 1.25rem; }
.card__body h3 a { color: var(--color-text); }
.card__body h3 a:hover { color: var(--color-primary); }
.card--link { text-decoration: none; color: inherit; display: block; }
.card--compact .card-body, .card--compact .card__body { padding: 1.25rem; }

/* Testimonial card aliases */
.testimonial-card { background: var(--color-bg-alt); border-radius: var(--radius); padding: 2rem; border-left: 4px solid var(--color-primary); }
.testimonial-card__text { font-style: italic; font-size: 1.0625rem; line-height: 1.7; margin-bottom: 1rem; }
.testimonial-card__author { font-weight: 600; color: var(--color-text); }
.testimonial-card__meta { font-size: 0.8125rem; color: var(--color-muted); }
.testimonial-card__stars { color: #F59E0B; font-size: 1.125rem; margin-bottom: 0.5rem; }

/* Structural wrappers used by build agents */
.header__inner { /* no-op — layout handled by .header .container */ }
.nav__list { display: flex; align-items: center; gap: 0.25rem; list-style: none; }
.faq-list { /* structural wrapper — no styles needed */ }
.trust-bar__items { display: flex; flex-wrap: wrap; justify-content: center; gap: 2rem; }
.stats-bar__items { display: flex; flex-wrap: wrap; justify-content: center; gap: 3rem; }

@media (max-width: 1023px) {
  .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
}

/* Utility aliases agents may use */
.lead { font-size: 1.125rem; color: var(--color-muted); max-width: 700px; }
.divider { height: 1px; background: var(--color-border); margin: 2rem 0; }
.badge-text { display: inline-block; padding: 0.25rem 0.75rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; background: rgba(196,30,36,0.1); color: var(--color-primary); }
.card__icon {
  width: 48px; height: 48px; border-radius: var(--radius);
  background: rgba(196,30,36,0.1); display: flex; align-items: center; justify-content: center;
  color: var(--color-primary); margin-bottom: 1rem; flex-shrink: 0;
}
.stat-callout { text-align: center; padding: 1.5rem; }
.stat-callout__number { font-size: 2rem; font-weight: 700; color: var(--color-primary); line-height: 1.2; }
.stat-callout__label { font-size: 0.875rem; color: var(--color-muted); margin-top: 0.25rem; }
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.image-placeholder { display: flex; align-items: center; justify-content: center; background: var(--color-bg-alt); color: var(--color-muted); font-size: 0.875rem; min-height: 200px; border-radius: var(--radius); }
.hero--gradient { background: linear-gradient(135deg, var(--color-bg-dark) 0%, #111827 100%); }
.hero--centered { text-align: center; }
.hero--centered h1, .hero--centered p { max-width: 700px; margin-left: auto; margin-right: auto; }
.eyebrow { display: inline-block; font-size: 0.8125rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-primary); margin-bottom: 0.75rem; }
.hero .eyebrow { color: var(--color-primary-light); }

/* ---- IMAGE PLACEHOLDER SYSTEM ---- */
.img-placeholder {
  display: flex; align-items: center; justify-content: center;
  background: var(--color-bg-alt); color: var(--color-muted);
  font-size: 0.875rem; font-weight: 500; text-align: center;
  position: absolute; inset: 0; z-index: 0; padding: 1rem;
}
.img-real {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 1; opacity: 0; transition: opacity 0.3s ease;
}
.img-real.loaded { opacity: 1; }

/* ---- TRUST BAR ---- */
.trust-bar {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 2rem;
  padding: 1.5rem 0; border-bottom: 1px solid var(--color-border);
}
.trust-bar__item {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.9375rem; font-weight: 600; color: var(--color-text);
}
.trust-bar__item svg { color: var(--color-primary); flex-shrink: 0; }

/* ---- STATS BAR ---- */
.stats-bar { display: flex; flex-wrap: wrap; justify-content: center; gap: 3rem; padding: 2rem 0; background: var(--color-bg-dark); color: var(--color-text-light); }
.stats-bar__item { text-align: center; }
.stats-bar__number { font-size: 2.5rem; font-weight: 700; color: var(--color-primary-light); line-height: 1; }
.stats-bar__label { font-size: 0.875rem; color: rgba(255,255,255,0.7); margin-top: 0.25rem; }
.section-dark .stats-bar__number { color: var(--color-primary-light); }

/* ---- TESTIMONIALS ---- */
.testimonial {
  background: var(--color-bg-alt); border-radius: var(--radius);
  padding: 2rem; border-left: 4px solid var(--color-primary);
}
.testimonial__text { font-style: italic; font-size: 1.0625rem; line-height: 1.7; margin-bottom: 1rem; }
.testimonial__author { font-weight: 600; color: var(--color-text); }
.testimonial__meta { font-size: 0.8125rem; color: var(--color-muted); }
.testimonial__stars { color: #F59E0B; font-size: 1.125rem; margin-bottom: 0.5rem; }

/* ---- FAQ ---- */
.faq-item { border-bottom: 1px solid var(--color-border); }
.faq-item:first-child { border-top: 1px solid var(--color-border); }
.faq-item__question {
  display: flex; justify-content: space-between; align-items: center;
  width: 100%; padding: 1.25rem 0; background: none; border: none;
  cursor: pointer; text-align: left; font-size: 1.0625rem; font-weight: 600;
  color: var(--color-text); font-family: var(--font-body); gap: 1rem;
}
.faq-item__question:hover { color: var(--color-primary); }
.faq-item__icon {
  font-size: 1.5rem; font-weight: 300; color: var(--color-primary);
  flex-shrink: 0; transition: transform var(--transition);
}
.faq-item__answer {
  max-height: 0; overflow: hidden; transition: max-height 0.3s ease;
  padding: 0; color: var(--color-muted); line-height: 1.7;
}
.faq-item__answer p { padding-bottom: 1.25rem; }

/* ---- CTA SECTION ---- */
.cta-section {
  background: var(--color-primary); color: #fff; padding: 3.5rem 0; text-align: center;
}
.cta-section h2 { color: #fff; }
.cta-section p { color: rgba(255,255,255,0.85); max-width: 600px; margin: 0 auto 1.5rem; font-size: 1.125rem; }
.cta-section .btn-group { justify-content: center; }
.cta-section .btn--primary { background: #fff; color: var(--color-primary); border-color: #fff; }
.cta-section .btn--primary:hover { background: var(--color-bg-alt); color: var(--color-primary-dark); border-color: var(--color-bg-alt); }
.cta-section .btn--outline { color: #fff; border-color: #fff; border-width: 2px; background: rgba(255,255,255,0.15); }
.cta-section .btn--outline:hover { background: #fff; color: var(--color-primary); }

/* ---- CHECKLIST ---- */
.checklist { list-style: none; padding: 0; }
.checklist li {
  display: flex; align-items: flex-start; gap: 0.75rem;
  padding: 0.5rem 0; font-size: 1rem;
}
.checklist li svg { flex-shrink: 0; color: var(--color-success); margin-top: 0.25rem; }

/* ---- PROCESS STEPS ---- */
.process-step {
  display: flex; align-items: flex-start; gap: 1.25rem; padding: 1.25rem 0;
}
.process-step__number {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--color-primary); color: #fff; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 1rem;
}
.process-step__content h4 { margin-bottom: 0.25rem; }
.process-step__content p { color: var(--color-muted); font-size: 0.9375rem; }

/* ---- GALLERY ---- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(0.7rem, 1.5vw, 1rem);
}
.gallery-showcase {
  background:
    linear-gradient(180deg, #fff 0%, var(--color-bg-alt) 100%);
}
.gallery-showcase .container {
  max-width: 1240px;
}
.gallery-section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin: 2.25rem 0 0.9rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(31,41,55,0.12);
}
.gallery-section-title h3 {
  margin: 0;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
}
.gallery-section-title span {
  color: var(--color-muted);
  font-size: 0.92rem;
  font-weight: 600;
}
.gallery-item {
  position: relative; overflow: hidden; border-radius: var(--radius);
  aspect-ratio: 4/3; cursor: pointer; background: var(--color-bg-alt);
  box-shadow: 0 14px 32px rgba(31,41,55,0.12);
  isolation: isolate;
  border: 0;
}
.gallery-grid--mosaic { grid-template-columns: repeat(4, 1fr); grid-auto-flow: dense; }
.gallery-grid--mosaic .gallery-item:nth-child(6n + 1) { grid-column: span 2; grid-row: span 2; }
.gallery-grid--mosaic .gallery-item:nth-child(6n + 4) { grid-column: span 2; }
.gallery-caption {
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.75rem;
  display: inline-flex;
  align-items: center;
  width: auto;
  max-width: calc(100% - 1.5rem);
  padding: 0.46rem 0.68rem;
  border-radius: 7px;
  color: #fff;
  font-weight: 700;
  font-size: 0.78rem;
  line-height: 1.25;
  opacity: 1;
  transform: translateY(0);
  background: rgba(17,24,39,0.78);
  border: 1px solid rgba(255,255,255,0.22);
  backdrop-filter: blur(8px);
  transition: transform var(--transition), background var(--transition);
  z-index: 2;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}
.gallery-item::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(17,24,39,0.02) 0%, rgba(17,24,39,0.18) 100%),
    linear-gradient(90deg, rgba(17,24,39,0.22) 0%, rgba(17,24,39,0) 44%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.16);
}
.gallery-item:not([data-caption]) .gallery-caption { display: none; }
.gallery-item:hover .gallery-caption { transform: translateY(-2px); background: rgba(17,24,39,0.88); }
.gallery-item .img-placeholder { display: none; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.45s ease, filter 0.45s ease; }
.gallery-item:hover img { transform: scale(1.045); filter: saturate(1.08) contrast(1.04); }
.gallery-item:focus-within,
.gallery-item:hover {
  box-shadow: var(--shadow-premium);
}
.gallery-filter { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2rem; justify-content: center; }
.gallery-filter button {
  padding: 0.5rem 1.25rem; border: 1px solid var(--color-border);
  border-radius: 999px; background: #fff; cursor: pointer;
  font-family: var(--font-body); font-size: 0.875rem; font-weight: 500;
  transition: all var(--transition); color: var(--color-text);
}
.gallery-filter button:hover, .gallery-filter button.active {
  background: var(--color-primary); color: #fff; border-color: var(--color-primary);
}
@media (max-width: 767px) {
  .gallery-grid--mosaic { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid--mosaic .gallery-item:nth-child(n) { grid-column: auto; grid-row: auto; }
  .gallery-caption { left: 0.5rem; right: 0.5rem; bottom: 0.5rem; max-width: calc(100% - 1rem); font-size: 0.68rem; padding: 0.38rem 0.48rem; }
  .gallery-section-title { display: block; }
  .gallery-section-title span { display: block; margin-top: 0.2rem; }
}
@media (max-width: 639px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---- HOMEPAGE WORK PREVIEW ---- */
.work-preview {
  background:
    linear-gradient(180deg, rgba(249,250,251,0.96), rgba(255,255,255,0.98)),
    radial-gradient(circle at 12% 10%, rgba(196,30,36,0.08), transparent 36%);
}
.work-preview__header {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.72fr);
  gap: 2rem;
  align-items: end;
  margin-bottom: 1.8rem;
}
.work-preview__header h2 { margin-bottom: 0; }
.work-preview__header p {
  color: var(--color-muted);
  margin-bottom: 0;
}
.work-strip {
  display: grid;
  grid-template-columns: 1.22fr 0.9fr 0.9fr;
  grid-auto-rows: 220px;
  gap: 0.9rem;
}
.work-tile {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  color: #fff;
  background: var(--color-bg-dark);
  box-shadow: var(--shadow-md);
  min-width: 0;
}
.work-tile--large {
  grid-row: span 2;
}
.work-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, filter 0.5s ease;
}
.work-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(17,24,39,0) 24%, rgba(17,24,39,0.5) 66%, rgba(17,24,39,0.86) 100%),
    linear-gradient(90deg, rgba(17,24,39,0.42) 0%, rgba(17,24,39,0) 56%);
  pointer-events: none;
}
.work-tile__caption {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 2;
  color: #fff;
  font-weight: 800;
  line-height: 1.22;
  max-width: 21rem;
  text-shadow: 0 1px 2px rgba(0,0,0,0.55);
}
.work-tile__caption::before {
  content: attr(data-kicker);
  display: block;
  margin-bottom: 0.34rem;
  color: rgba(255,255,255,0.92);
  font-size: 0.68rem;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-shadow: none;
}
.work-tile__caption::after {
  content: attr(data-caption);
  display: block;
}
.work-tile:hover { color: #fff; }
.work-tile:hover img {
  transform: scale(1.045);
  filter: saturate(1.06) contrast(1.04);
}
@media (max-width: 900px) {
  .work-preview__header { grid-template-columns: 1fr; align-items: start; }
  .work-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 190px; }
}
@media (max-width: 639px) {
  .work-strip { grid-template-columns: 1fr; grid-auto-rows: 220px; }
  .work-tile--large { grid-row: span 1; }
  .work-tile__caption { font-size: 0.94rem; }
}

/* ---- PORTFOLIO QUALITY REPAIR MODULES ---- */
.story-section,
.feature-section,
.split-section,
.process-section {
  position: relative;
}
.feature-band {
  overflow: hidden;
}
.feature-band .container {
  position: relative;
}
.feature-band .container::before {
  content: "";
  position: absolute;
  top: -1.5rem;
  left: 1.5rem;
  width: 84px;
  height: 4px;
  border-radius: 999px;
  background: var(--color-primary);
}
.media-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow-premium);
  background: var(--color-bg-alt);
}
.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.story-panel {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 2rem);
  box-shadow: var(--shadow-md);
}
.proof-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--color-border);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}
.proof-strip__item {
  background: #fff;
  padding: 1.25rem;
}
.proof-strip__item strong {
  display: block;
  color: var(--color-primary);
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}
.proof-strip__item span { color: var(--color-muted); font-size: 0.92rem; }
.service-feature-list {
  display: grid;
  gap: 1.25rem;
}
.insight-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}
.insight-row {
  display: grid;
  grid-template-columns: minmax(170px, 0.34fr) minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2rem);
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--color-border);
}
.insight-row:last-child { border-bottom: 0; }
.insight-row h3 {
  color: var(--color-primary);
  font-size: 1.1rem;
  margin-bottom: 0;
}
.insight-row p {
  color: var(--color-muted);
  margin-bottom: 0;
}
.section-dark .insight-list {
  border-color: rgba(255,255,255,0.18);
}
.section-dark .insight-row {
  border-color: rgba(255,255,255,0.18);
}
.section-dark .insight-row h3 { color: var(--color-primary-light); }
.section-dark .insight-row p { color: rgba(255,255,255,0.78); }
.service-feature {
  display: grid;
  grid-template-columns: minmax(180px, 0.42fr) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: stretch;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.service-feature:nth-child(even) {
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.42fr);
}
.service-feature:nth-child(even) .service-feature__img {
  order: 2;
}
.service-feature__img {
  position: relative;
  min-height: 220px;
  background: var(--color-bg-alt);
  overflow: hidden;
}
.service-feature__body {
  padding: clamp(1.25rem, 3vw, 2rem);
}
.service-feature__body h3 {
  margin-bottom: 0.5rem;
}
.service-feature__body p {
  color: var(--color-muted);
}
.section-dark .service-feature {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.14);
  color: #fff;
}
.section-dark .service-feature__body h3 {
  color: #fff;
}
.section-dark .service-feature__body p {
  color: rgba(255,255,255,0.78);
}
.proof-rail {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.proof-pill {
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 1rem;
  color: rgba(255,255,255,0.86);
}
.proof-pill strong {
  display: block;
  color: #fff;
  margin-bottom: 0.25rem;
}
.route-matrix {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}
.route-matrix__row {
  display: grid;
  grid-template-columns: minmax(150px, 0.28fr) minmax(0, 1fr) minmax(160px, 0.24fr);
  gap: clamp(1rem, 3vw, 1.5rem);
  align-items: center;
  padding: 1rem 0;
  border-top: 1px solid var(--color-border);
}
.route-matrix__row:last-child {
  border-bottom: 1px solid var(--color-border);
}
.route-matrix__row strong {
  color: var(--color-primary);
  font-size: 1.05rem;
}
.route-matrix__row p {
  color: var(--color-muted);
  margin: 0;
}
.route-matrix__tag {
  justify-self: start;
  border: 1px solid rgba(196,30,36,0.22);
  background: rgba(196,30,36,0.07);
  color: var(--color-primary-dark);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 700;
}
.service-card-section .card-body p,
.blog-index-grid .card-body p {
  color: var(--color-muted);
}
.reviews-empty-state {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-md);
}
.reviews-empty-state h2,
.reviews-empty-state h3 {
  margin-bottom: 0.75rem;
}
.review-confidence-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}
.review-confidence-item {
  border-top: 3px solid var(--color-primary);
  background: var(--color-bg-alt);
  border-radius: var(--radius);
  padding: 1.1rem;
}
.review-confidence-item strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.35rem;
}
.review-confidence-item span {
  display: block;
  color: var(--color-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}
.blog-article-section article {
  max-width: 860px;
  margin: 0 auto;
}
.blog-article-section article p,
.blog-article-section article li {
  font-size: 1.0625rem;
}
.article-callout {
  border-left: 4px solid var(--color-primary);
  background: linear-gradient(90deg, rgba(196,30,36,0.08), rgba(249,250,251,0.95));
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.75rem 0;
}
.article-link-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}
.article-link-panel a {
  display: block;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1rem;
  color: var(--color-text);
  background: #fff;
  box-shadow: var(--shadow);
}
.article-link-panel a:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: translateY(-2px);
}
.article-link-panel strong {
  display: block;
  margin-bottom: 0.25rem;
}
.article-link-panel span {
  color: var(--color-muted);
  font-size: 0.9rem;
}
@media (max-width: 767px) {
  .proof-rail {
    grid-template-columns: 1fr;
  }
  .hero-conversion .proof-rail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    margin-top: 0.85rem;
  }
  .hero-conversion .proof-pill {
    padding: 0.55rem;
    font-size: 0;
    line-height: 1.15;
  }
  .hero-conversion .proof-pill strong {
    font-size: 0.72rem;
    margin-bottom: 0;
  }
  .proof-strip { grid-template-columns: 1fr 1fr; }
  .review-confidence-grid { grid-template-columns: 1fr 1fr; }
  .article-link-panel { grid-template-columns: 1fr; }
  .insight-row { grid-template-columns: 1fr; }
  .route-matrix__row {
    grid-template-columns: 1fr;
    align-items: start;
  }
  .service-feature,
  .service-feature:nth-child(even) {
    grid-template-columns: 1fr;
  }
  .service-feature:nth-child(even) .service-feature__img {
    order: 0;
  }
  .hero-compact {
    padding: 2.5rem 0 2.25rem;
    min-height: 0;
  }
  .hero-compact h1 {
    font-size: clamp(1.85rem, 8vw, 2.55rem);
  }
}
@media (max-width: 479px) {
  .proof-strip { grid-template-columns: 1fr; }
  .review-confidence-grid { grid-template-columns: 1fr; }
}

/* ---- CONTACT FORM ---- */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-weight: 600; margin-bottom: 0.375rem; font-size: 0.9375rem; }
.form-input, .form-textarea {
  width: 100%; padding: 0.75rem 1rem; border: 1px solid var(--color-border);
  border-radius: var(--radius); font-family: var(--font-body); font-size: 1rem;
  transition: border-color var(--transition); background: #fff;
}
.form-input:focus, .form-textarea:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(196,30,36,0.1); }
.form-textarea { resize: vertical; min-height: 120px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 639px) { .form-row { grid-template-columns: 1fr; } }
.thanks-msg { text-align: center; padding: 3rem 2rem; }
.thanks-msg h2 { color: var(--color-success); margin-bottom: 0.5rem; }

/* ---- FOOTER ---- */
.footer {
  background: var(--color-bg-dark); color: rgba(255,255,255,0.7);
  padding: 4rem 0 0;
}
.footer__grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 2rem;
  padding-bottom: 3rem; border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer__brand p { font-size: 0.875rem; line-height: 1.7; margin-top: 1rem; }
.footer__brand img { height: 42px; width: auto; }
.footer__social {
  display: flex; gap: 0.75rem; margin-top: 1rem;
}
.footer__social a {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.7); transition: all var(--transition);
}
.footer__social a:hover { background: var(--color-primary); color: #fff; }
.footer h4 { color: #fff; font-size: 1rem; margin-bottom: 1rem; }
.footer ul li { margin-bottom: 0.5rem; }
.footer ul a { color: rgba(255,255,255,0.7); font-size: 0.875rem; }
.footer ul a:hover { color: #fff; }
.footer__contact-item {
  display: flex; align-items: center; gap: 0.75rem;
  margin-bottom: 0.75rem; font-size: 0.875rem;
}
.footer__contact-item svg { flex-shrink: 0; color: var(--color-primary-light); }
.footer__contact-item a { color: rgba(255,255,255,0.7); }
.footer__contact-item a:hover { color: #fff; }
.footer__bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  padding: 1.5rem 0; font-size: 0.8125rem; gap: 1rem;
}
.footer__legal { display: flex; gap: 1.5rem; }
.footer__legal a { color: rgba(255,255,255,0.5); }
.footer__legal a:hover { color: #fff; }
.footer__credit { color: rgba(255,255,255,0.4); }
.footer__credit a { color: rgba(255,255,255,0.5); }
.footer__credit a:hover { color: #fff; }

@media (max-width: 1023px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 639px) {
  .footer__grid { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; text-align: center; }
}

/* ---- AREA PAGE SPECIALS ---- */
.nearby-areas { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.nearby-areas a {
  padding: 0.5rem 1rem; border: 1px solid var(--color-border);
  border-radius: 999px; font-size: 0.875rem; font-weight: 500;
  color: var(--color-text); background: #fff;
}
.nearby-areas a:hover { border-color: var(--color-primary); color: var(--color-primary); background: rgba(196,30,36,0.04); }

/* Blog cards */
.blog-card .card-body { padding: 1.25rem 1.5rem; }
.blog-card__date { font-size: 0.8125rem; color: var(--color-muted); margin-bottom: 0.5rem; }
.blog-card__excerpt { font-size: 0.9375rem; color: var(--color-muted); }

/* Article */
.article-header { margin-bottom: 2rem; }
.article-meta { font-size: 0.875rem; color: var(--color-muted); margin-bottom: 1rem; }
.article-body h2 { margin-top: 2.5rem; margin-bottom: 1rem; font-size: 1.5rem; }
.article-body h3 { margin-top: 2rem; margin-bottom: 0.75rem; font-size: 1.25rem; }
.article-body ul, .article-body ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.article-body li { margin-bottom: 0.5rem; list-style: disc; }
.article-body ol li { list-style: decimal; }
.article-body img { border-radius: var(--radius); margin: 1.5rem 0; }
.article-body table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
.article-body th, .article-body td { padding: 0.75rem 1rem; border: 1px solid var(--color-border); text-align: left; }
.article-body th { background: var(--color-bg-alt); font-weight: 600; }
.author-box {
  display: flex; gap: 1rem; align-items: center;
  padding: 1.5rem; background: var(--color-bg-alt); border-radius: var(--radius);
  margin-top: 2rem;
}
.author-box__avatar {
  width: 56px; height: 56px; border-radius: 50%; background: var(--color-primary);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 1.25rem; flex-shrink: 0;
}
.author-box__name { font-weight: 600; }
.author-box__bio { font-size: 0.875rem; color: var(--color-muted); }

/* Review stars */
.stars { color: #F59E0B; letter-spacing: 2px; }

/* ---- IMAGE CONTAINER FIX ---- */
/* Images outside card-img need a positioned parent with dimensions */
div:has(> .img-placeholder):not(.card-img):not(.card__img):not(.gallery-item) {
  position: relative; aspect-ratio: 4/3; border-radius: var(--radius);
  overflow: hidden; background: var(--color-bg-alt);
}

/* ---- FOOTER CONTACT ALIGNMENT ---- */
.footer ul li:has(svg) {
  display: flex; align-items: center; gap: 0.75rem;
}

/* ---- KEYBOARD & MOTION ACCESSIBILITY ---- */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--color-bg-dark);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ---- PRINT ---- */
@media print {
  .header, .footer, .mobile-phone-bar, .cta-section, .btn-group { display: none; }
  body { font-size: 12pt; color: #000; }
  a { color: #000; text-decoration: underline; }
}

/* --- Address Autocomplete Dropdown --- */
.address-dropdown{position:absolute;top:100%;left:0;right:0;z-index:1000;background:#fff;border:1px solid #ddd;border-top:none;border-radius:0 0 8px 8px;box-shadow:0 4px 12px rgba(0,0,0,.1);list-style:none;margin:0;padding:0;max-height:240px;overflow-y:auto}
.address-dropdown__item{padding:10px 14px;cursor:pointer;font-size:14px;line-height:1.4;border-bottom:1px solid #f0f0f0;transition:background .15s}
.address-dropdown__item:last-child{border-bottom:none}
.address-dropdown__secondary{color:#888;font-size:13px}
.address-dropdown__item--active,.address-dropdown__item:hover{background:var(--color-primary-light,#f0f7ff)}

/* ---- BLOG ARCHIVE EDITORIAL LAYOUT ---- */
.section--alt { background: var(--color-bg-alt); }
.blog-section-heading {
  max-width: 760px;
  margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
}
.blog-section-heading h2 { margin-bottom: 0.7rem; }
.blog-section-heading p { color: var(--color-muted); font-size: 1.025rem; }
.blog-section-heading--split {
  max-width: none;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: end;
}
.blog-section-heading--split p { margin-bottom: 1rem; }

.blog-feature-grid .blog-card {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  min-height: 420px;
  overflow: hidden;
  border: 0;
  box-shadow: var(--shadow-lg);
}
.blog-feature-grid .card-img { aspect-ratio: auto; min-height: 420px; }
.blog-feature-grid .card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 5vw, 4rem);
  background: var(--color-bg-dark);
}
.blog-feature-grid .blog-card__date { color: rgba(255,255,255,0.68); }
.blog-feature-grid .card-body h3 { font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.15; }
.blog-feature-grid .card-body h3 a,
.blog-feature-grid .card-body p { color: #fff; }
.blog-feature-grid .card-link { color: #fff; margin-top: 0.5rem; }

.blog-curated-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1.25rem;
}
.blog-curated-grid .blog-card { grid-column: span 2; }
.blog-curated-grid .blog-card:nth-child(-n + 2) { grid-column: span 3; }
.blog-curated-grid .card-img { aspect-ratio: 16 / 9; }
.blog-curated-grid .card-body h3 { font-size: 1.08rem; line-height: 1.35; }
.blog-curated-grid .blog-card__excerpt { font-size: 0.875rem; }

.blog-series-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 2rem;
  border-bottom: 1px solid var(--color-border);
}
.blog-series-grid .blog-card {
  border: 0;
  border-top: 1px solid var(--color-border);
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}
.blog-series-grid .blog-card:hover {
  box-shadow: none;
  transform: none;
  background: var(--color-bg-alt);
}
.blog-series-grid .card-img { display: none; }
.blog-series-grid .card-body {
  display: grid;
  grid-template-columns: 105px minmax(0, 1fr) auto;
  gap: 0.9rem;
  align-items: center;
  min-height: 104px;
  padding: 1rem;
}
.blog-series-grid .blog-card__date { margin: 0; font-variant-numeric: tabular-nums; }
.blog-series-grid .card-body h3 { margin: 0; font-size: 1rem; line-height: 1.4; }
.blog-series-grid .blog-card__excerpt { display: none; }
.blog-series-grid .card-link { font-size: 0; gap: 0; }
.blog-series-grid .card-link svg { width: 18px; height: 18px; }

.blog-evergreen-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
}
.blog-evergreen-grid .card-img { aspect-ratio: 16 / 9; }
.blog-evergreen-grid .card-body { padding: 1.15rem; }
.blog-evergreen-grid .card-body h3 { font-size: 1.05rem; line-height: 1.35; }
.blog-evergreen-grid .blog-card__excerpt { display: none; }

@media (max-width: 1023px) {
  .blog-feature-grid .blog-card { grid-template-columns: 1fr 0.85fr; }
  .blog-curated-grid .blog-card,
  .blog-curated-grid .blog-card:nth-child(-n + 2) { grid-column: span 3; }
  .blog-series-grid { grid-template-columns: 1fr; }
  .blog-evergreen-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 639px) {
  .blog-section-heading--split { grid-template-columns: 1fr; gap: 0.35rem; }
  .blog-feature-grid .blog-card { grid-template-columns: 1fr; min-height: 0; }
  .blog-feature-grid .card-img { min-height: 0; aspect-ratio: 4 / 3; }
  .blog-feature-grid .card-body { padding: 1.6rem; }
  .blog-feature-grid .card-body h3 { font-size: 1.55rem; }
  .blog-curated-grid { grid-template-columns: 1fr; }
  .blog-curated-grid .blog-card,
  .blog-curated-grid .blog-card:nth-child(-n + 2) {
    grid-column: auto;
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr);
  }
  .blog-curated-grid .card-img { aspect-ratio: auto; min-height: 142px; }
  .blog-curated-grid .card-body { padding: 0.9rem; }
  .blog-curated-grid .blog-card__date { font-size: 0.72rem; }
  .blog-curated-grid .card-body h3 { font-size: 0.95rem; }
  .blog-curated-grid .blog-card__excerpt { display: none; }
  .blog-series-grid .card-body {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.45rem 0.75rem;
    min-height: 0;
    padding: 1rem 0.75rem;
  }
  .blog-series-grid .blog-card__date { grid-column: 1 / -1; }
  .blog-evergreen-grid { grid-template-columns: 1fr; }
  .blog-evergreen-grid .blog-card { display: grid; grid-template-columns: 108px minmax(0, 1fr); }
  .blog-evergreen-grid .card-img { aspect-ratio: auto; min-height: 132px; }
  .blog-evergreen-grid .card-body { padding: 0.9rem; }
  .blog-evergreen-grid .blog-card__date { font-size: 0.72rem; }
  .blog-evergreen-grid .card-body h3 { font-size: 0.95rem; }
}

/* Keep sections balanced when no matching project photograph exists. */
.photo-text-layout { grid-template-columns:minmax(0,1fr)!important; max-width:850px; margin-inline:auto; }

.article-table-scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin-block: 1.5rem; }
.article-table-scroll table { margin-block: 0; }
