/* ============================================================
   Texas Foundation Repair — main.css
   Static site stylesheet. No framework, no build tool required.
   ============================================================ */

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

:root {
  --color-primary:     #1a3a5c;
  --color-primary-dk:  #122a44;
  --color-accent:      #e05c2a;
  --color-accent-dk:   #c44d20;
  --color-text:        #1f2937;
  --color-text-muted:  #6b7280;
  --color-bg:          #ffffff;
  --color-bg-light:    #f5f7fa;
  --color-bg-cta:      #1a3a5c;
  --color-border:      #e5e7eb;
  --color-border-dk:   #d1d5db;
  --font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --radius:    6px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,.10), 0 2px 6px rgba(0,0,0,.06);
  --max-w:     1160px;
  --header-h:  68px;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); }
a:hover { color: var(--color-accent); }

/* ── Layout Utilities ─────────────────────────────────────── */
.container   { max-width: var(--max-w); margin-inline: auto; padding-inline: 1.25rem; }
.text-center { text-align: center; }
.two-col     { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }

@media (max-width: 768px) { .two-col { grid-template-columns: 1fr; gap: 2rem; } }

/* ── Typography ───────────────────────────────────────────── */
h1, h2, h3, h4 { line-height: 1.25; color: var(--color-primary); }
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 700; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem);    font-weight: 700; margin-bottom: .75rem; }
h3 { font-size: 1.15rem; font-weight: 600; margin-bottom: .5rem; }
p  { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }
ul { padding-left: 1.25rem; }
li { margin-bottom: .35rem; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn-primary,
.btn-secondary,
.btn-call,
.btn-cta {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .65rem 1.4rem; border-radius: var(--radius);
  font-size: .95rem; font-weight: 600; text-decoration: none;
  transition: background .15s, color .15s, transform .1s;
  cursor: pointer; border: 2px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background: var(--color-accent); color: #fff;
  border-color: var(--color-accent);
}
.btn-primary:hover {
  background: var(--color-accent-dk); border-color: var(--color-accent-dk); color: #fff;
}
.btn-secondary {
  background: transparent; color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-secondary:hover {
  background: var(--color-primary); color: #fff;
}
.btn-large { padding: .85rem 2rem; font-size: 1.05rem; }
.btn-block { display: flex; justify-content: center; width: 100%; }

.btn-primary:active, .btn-secondary:active { transform: scale(.98); }

/* ── Header / Nav ─────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 200;
  background: var(--color-primary);
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
}
.header-inner {
  max-width: var(--max-w); margin-inline: auto;
  padding-inline: 1.25rem;
  height: var(--header-h);
  display: flex; align-items: center; gap: 1.5rem;
}

/* Logo */
.site-logo { text-decoration: none; flex-shrink: 0; }
.logo-text  {
  font-size: 1.15rem; font-weight: 700; color: #fff;
  letter-spacing: -.01em;
}

/* Desktop Nav */
.site-nav { flex: 1; }
.nav-list  {
  list-style: none; display: flex; gap: .25rem; align-items: center; padding: 0;
}
.nav-item  { position: relative; }
.nav-toggle {
  background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,.88); font-size: .9rem; font-weight: 500;
  padding: .5rem .75rem; border-radius: var(--radius);
  display: flex; align-items: center; gap: .3rem;
  font-family: inherit;
  transition: background .15s;
}
.nav-toggle:hover,
.nav-toggle[aria-expanded="true"] { background: rgba(255,255,255,.12); color: #fff; }
.chevron { font-size: .7rem; transition: transform .15s; }
.nav-toggle[aria-expanded="true"] .chevron { transform: rotate(180deg); }

/* Active nav state */
.nav-item > a.active,
.nav-item > a.active:hover { color: #fff; font-weight: 700; }
.dropdown li a.active { color: var(--color-primary); font-weight: 700; background: var(--color-bg-light); }

/* Dropdown */
.dropdown {
  display: none; position: absolute; top: calc(100% + 6px); left: 0;
  background: #fff; border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: .5rem 0;
  box-shadow: var(--shadow-md); min-width: 220px;
  list-style: none; z-index: 300;
}
.dropdown.open { display: block; }
.dropdown li a {
  display: block; padding: .55rem 1.1rem;
  color: var(--color-text); font-size: .9rem; text-decoration: none;
}
.dropdown li a:hover { background: var(--color-bg-light); color: var(--color-primary); }

/* Header CTA */
.header-cta { display: flex; align-items: center; gap: .75rem; flex-shrink: 0; }
.btn-call {
  color: #fff; font-size: .88rem; font-weight: 600; text-decoration: none;
  padding: .4rem .85rem; border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.3);
  background: rgba(255,255,255,.08);
  transition: background .15s;
}
.btn-call:hover { background: rgba(255,255,255,.18); color: #fff; }
.btn-cta {
  background: var(--color-accent); color: #fff;
  border-color: var(--color-accent); font-size: .88rem;
  padding: .45rem 1rem;
}
.btn-cta:hover { background: var(--color-accent-dk); color: #fff; }

/* Mobile menu button */
.mobile-menu-toggle {
  display: none; background: none; border: none; cursor: pointer;
  padding: .5rem; color: #fff; margin-left: auto;
}
.hamburger, .hamburger::before, .hamburger::after {
  display: block; width: 22px; height: 2px; background: currentColor;
  transition: transform .2s;
}
.hamburger { position: relative; }
.hamburger::before, .hamburger::after {
  content: ''; position: absolute; left: 0;
}
.hamburger::before { top: -6px; }
.hamburger::after  { top:  6px; }

/* Mobile nav */
.mobile-nav {
  background: var(--color-primary-dk); padding: 1rem 1.25rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,.1);
}
.mobile-nav ul { list-style: none; padding: 0; }
.mobile-nav li { padding: .3rem 0; }
.mobile-nav a { color: rgba(255,255,255,.9); text-decoration: none; font-size: .95rem; }
.mobile-nav strong { color: rgba(255,255,255,.55); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; display: block; margin-top: .75rem; margin-bottom: .25rem; }
.mobile-call-btn {
  display: block; margin-top: 1rem; padding: .75rem;
  background: var(--color-accent); color: #fff; text-align: center;
  border-radius: var(--radius); font-weight: 600; text-decoration: none;
}

@media (max-width: 900px) {
  .site-nav, .header-cta { display: none; }
  .mobile-menu-toggle { display: block; }
}

/* ── Sections ─────────────────────────────────────────────── */
.section        { padding: 4rem 0; }
.section-light  { background: var(--color-bg-light); }
.section-cta    { background: var(--color-bg-cta); color: #fff; }
.section-cta h2 { color: #fff; }
.section-cta p  { color: rgba(255,255,255,.85); }

.section-title { text-align: center; margin-bottom: 2rem; }
.section-intro { text-align: center; max-width: 700px; margin-inline: auto; margin-bottom: 2.5rem; color: var(--color-text-muted); font-size: 1.05rem; }

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dk) 100%);
  color: #fff; padding: 5rem 0 4rem;
}
.hero-inner { max-width: var(--max-w); margin-inline: auto; padding-inline: 1.25rem; }
.hero-content { max-width: 640px; }
.hero-headline { color: #fff; margin-bottom: 1rem; }
.hero-subline  { color: rgba(255,255,255,.82); font-size: 1.1rem; margin-bottom: 2rem; }
.hero-actions  { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ── Page Hero (inner pages) ──────────────────────────────── */
.page-hero { background: var(--color-primary); color: #fff; padding: 3rem 0; }
.page-title    { color: #fff; margin-bottom: .75rem; }
.page-subtitle { color: rgba(255,255,255,.78); max-width: 640px; margin-bottom: 1.5rem; }

/* ── Trust Grid ───────────────────────────────────────────── */
.trust-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem; margin-top: 2rem;
}
.trust-item {
  background: #fff; border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.trust-icon { font-size: 2rem; margin-bottom: .75rem; }
.trust-item h3 { margin-bottom: .5rem; }

/* ── Services Grid ────────────────────────────────────────── */
.services-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}
.service-card {
  background: #fff; border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .15s, transform .15s;
}
.service-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.service-card-title { font-size: 1.05rem; margin-bottom: .5rem; }
.service-card-title a { text-decoration: none; color: var(--color-primary); }
.service-card-title a:hover { color: var(--color-accent); }
.service-card-desc  { font-size: .9rem; color: var(--color-text-muted); margin-bottom: 1rem; }
.service-card-link  { font-size: .88rem; font-weight: 600; color: var(--color-accent); text-decoration: none; }
.service-card-link:hover { text-decoration: underline; }

/* ── Warning List ─────────────────────────────────────────── */
.warning-list { margin: 1rem 0 1.5rem; }
.warning-list li { margin-bottom: .6rem; padding-left: .25rem; }

/* ── CTA Card ─────────────────────────────────────────────── */
.cta-card {
  background: var(--color-primary); color: #fff;
  border-radius: var(--radius-lg); padding: 2rem;
}
.cta-card h3  { color: #fff; font-size: 1.25rem; margin-bottom: .75rem; }
.cta-card p   { color: rgba(255,255,255,.82); margin-bottom: 1.25rem; }
.cta-sub { font-size: .85rem; color: rgba(255,255,255,.65); margin-top: .75rem; }

/* ── Inline CTA ───────────────────────────────────────────── */
.inline-cta {
  background: var(--color-bg-light); border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  padding: 2rem; margin: 2.5rem 0;
}
.inline-cta h3 { margin-bottom: .5rem; }
.inline-cta p  { color: var(--color-text-muted); margin-bottom: 1.25rem; }

/* ── Content Layout (service pages) ──────────────────────── */
.content-layout {
  display: grid; grid-template-columns: 1fr 340px; gap: 3rem; align-items: start;
}
.main-content .intro-text { font-size: 1.05rem; color: var(--color-text-muted); margin-bottom: 2rem; }
.main-content h2 { margin-top: 2rem; margin-bottom: .75rem; }

/* ── Sidebar ──────────────────────────────────────────────── */
.sidebar { position: sticky; top: calc(var(--header-h) + 1.5rem); }
.sidebar-cta {
  background: var(--color-primary); color: #fff;
  border-radius: var(--radius-lg); padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.sidebar-cta h3   { color: #fff; margin-bottom: .5rem; font-size: 1.05rem; }
.sidebar-cta p    { color: rgba(255,255,255,.8); font-size: .9rem; margin-bottom: 1rem; }
.sidebar-sub      { font-size: .8rem; color: rgba(255,255,255,.6); margin-top: .75rem; }
.sidebar-related,
.sidebar-city     {
  background: #fff; border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: 1.25rem;
  margin-bottom: 1.25rem;
}
.sidebar-related h3,
.sidebar-city h3  { font-size: .95rem; margin-bottom: .75rem; }
.sidebar-related ul { list-style: none; padding: 0; }
.sidebar-related li { padding: .3rem 0; border-bottom: 1px solid var(--color-border); }
.sidebar-related li:last-child { border: none; }
.sidebar-related a { font-size: .9rem; text-decoration: none; }
.sidebar-related a:hover { color: var(--color-accent); }

@media (max-width: 900px) {
  .content-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}

/* ── Breadcrumb ───────────────────────────────────────────── */
.breadcrumb-nav { padding: .75rem 0; background: var(--color-bg-light); border-bottom: 1px solid var(--color-border); }
.breadcrumb-nav .container { max-width: var(--max-w); margin-inline: auto; padding-inline: 1.25rem; }
.breadcrumb-list { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem; padding: 0; font-size: .85rem; }
.breadcrumb-item { display: flex; align-items: center; color: var(--color-text-muted); }
.breadcrumb-item::after { content: '›'; margin-left: .3rem; color: var(--color-border-dk); }
.breadcrumb-item:last-child::after { display: none; }
.breadcrumb-item a { color: var(--color-primary); text-decoration: none; }
.breadcrumb-item a:hover { text-decoration: underline; }
.breadcrumb-item.current { color: var(--color-text); }

/* ── Nearby Tags ──────────────────────────────────────────── */
.nearby-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.nearby-tag {
  background: var(--color-bg-light); border: 1px solid var(--color-border);
  border-radius: 100px; padding: .25rem .75rem;
  font-size: .82rem; color: var(--color-text-muted);
}
.nearby-label { font-size: .82rem; color: var(--color-text-muted); margin-bottom: .25rem; }

/* ── Footer ───────────────────────────────────────────────── */
.site-footer { background: var(--color-primary-dk); color: rgba(255,255,255,.8); padding: 3.5rem 0 0; }
.footer-inner {
  max-width: var(--max-w); margin-inline: auto; padding-inline: 1.25rem;
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 2.5rem;
}
.footer-site-name  { font-size: 1.1rem; font-weight: 700; color: #fff; margin-bottom: .4rem; }
.footer-tagline    { font-size: .88rem; color: rgba(255,255,255,.6); margin-bottom: 1rem; }
.footer-phone      { color: #fff; font-weight: 600; font-size: 1.05rem; text-decoration: none; }
.footer-phone:hover { color: var(--color-accent); }
.footer-col-heading { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: rgba(255,255,255,.45); margin-bottom: .75rem; font-weight: 600; }
.footer-col ul { list-style: none; padding: 0; }
.footer-col li { padding: .25rem 0; }
.footer-col a  { color: rgba(255,255,255,.75); text-decoration: none; font-size: .9rem; }
.footer-col a:hover { color: #fff; }
.footer-cta { display: inline-block; margin-top: 1rem; }
.footer-bottom {
  max-width: var(--max-w); margin-inline: auto; padding-inline: 1.25rem;
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 1.5rem; padding-bottom: 1.5rem;
  border-top: 1px solid rgba(255,255,255,.1);
  margin-top: 2.5rem;
}
.footer-bottom p { font-size: .82rem; color: rgba(255,255,255,.45); margin: 0; }
.footer-bottom a { font-size: .82rem; color: rgba(255,255,255,.45); text-decoration: none; }
.footer-bottom a:hover { color: rgba(255,255,255,.75); }

@media (max-width: 900px) {
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media (max-width: 560px) {
  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: .5rem; text-align: center; }
}

/* ── Accessibility ────────────────────────────────────────── */
:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 2px;
}
.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;
}

/* ── Print ────────────────────────────────────────────────── */
@media print {
  .site-header, .mobile-menu-toggle, .site-footer, .sidebar-cta { display: none; }
  .content-layout { grid-template-columns: 1fr; }
}
