:root {
  --color-primary: #0f2744;
  --color-primary-dark: #0a1b30;
  --color-primary-light: #1e3a5f;
  --color-accent: #0284c7;
  --color-accent-hover: #0369a1;
  --color-sky-glow: #38bdf8;
  --color-cyan: #06b6d4;
  --color-emergency: #dc2626;
  --color-emergency-dark: #b91c1c;
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-surface-alt: #f1f5f9;
  --color-text: #1e293b;
  --color-text-muted: #64748b;
  --color-text-light: #94a3b8;
  --color-border: #e2e8f0;
  --color-border-dark: #334155;

  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  --container-width: 1200px;
}

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

html {
  font-family: var(--font-sans);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img, svg {
  display: block;
  max-width: 100%;
}

/* Icon Safety Shield */
.icon, svg.icon, .phone-icon, .header-icon, .btn-icon {
  max-width: 24px !important;
  max-height: 24px !important;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.15s ease, opacity 0.15s ease;
}

a:hover {
  color: var(--color-accent-hover);
}

h1, h2, h3, h4, h5, h6 {
  color: var(--color-primary-dark);
  letter-spacing: -0.02em;
  line-height: 1.25;
  font-weight: 700;
}

h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: 1.25rem;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.25rem;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1.25rem;
  color: #334155;
  font-size: 1.05rem;
  line-height: 1.7;
}

ul, ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
  color: #334155;
}

li {
  margin-bottom: 0.5rem;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Micro Top Urgency Bar */
.top-micro-bar {
  background-color: var(--color-primary-dark);
  color: #f1f5f9;
  font-size: 0.8125rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.top-micro-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.dispatch-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #22c55e;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

.top-bar-links {
  display: inline-flex;
  align-items: center;
  gap: 1.25rem;
}

.top-bar-links a {
  color: #cbd5e1;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.top-bar-links a:hover {
  color: #ffffff;
}

/* Main Sticky Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--color-primary);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.5rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #ffffff;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand-logo:hover {
  color: #ffffff;
}

.logo-badge {
  background: linear-gradient(135deg, var(--color-accent) 0%, #0369a1 100%);
  color: #ffffff;
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 900;
  box-shadow: var(--shadow-sm);
  letter-spacing: 0.05em;
}

.brand-text-block {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.1;
  color: #ffffff;
}

.brand-subtitle {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-sky-glow);
  font-weight: 600;
}

/* Nav Menu */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  color: #e2e8f0;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.5rem 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: color 0.15s ease;
}

.nav-link:hover, .nav-item.active > .nav-link {
  color: var(--color-sky-glow);
}

/* Dropdown */
.nav-item.has-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 260px;
  background-color: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--color-border);
  padding: 0.5rem 0;
  display: none;
  flex-direction: column;
  z-index: 110;
}

.nav-item.has-dropdown:hover .dropdown-menu,
.nav-item.has-dropdown:focus-within .dropdown-menu,
.dropdown-menu.is-active {
  display: flex;
}

.dropdown-link {
  padding: 0.6rem 1.25rem;
  color: var(--color-text);
  font-size: 0.9rem;
  font-weight: 500;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.dropdown-link:hover {
  background-color: var(--color-surface-alt);
  color: var(--color-accent);
}

.header-cta-block {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-weight: 700;
  font-size: 1rem;
  border-radius: var(--radius-md);
  transition: all 0.15s ease;
  white-space: nowrap;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-accent) 0%, #0369a1 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
}

.btn-primary:hover {
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.45);
}

.btn-secondary {
  background-color: #ffffff;
  color: var(--color-primary);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background-color: var(--color-surface-alt);
  color: var(--color-primary-dark);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.55rem 1.15rem;
  font-size: 0.875rem;
  white-space: nowrap;
}

.btn-emergency {
  background: linear-gradient(135deg, var(--color-emergency) 0%, var(--color-emergency-dark) 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35);
}

.btn-emergency:hover {
  color: #ffffff;
  transform: translateY(-2px);
}

.btn-call-header {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: #ffffff;
  padding: 0.6rem 1.25rem;
  font-size: 0.95rem;
  box-shadow: 0 3px 8px rgba(34, 197, 94, 0.3);
}

.btn-call-header:hover {
  color: #ffffff;
  transform: translateY(-2px);
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: #ffffff;
  padding: 0.5rem;
  cursor: pointer;
}

/* Breadcrumbs */
.breadcrumbs {
  background-color: var(--color-surface-alt);
  border-bottom: 1px solid var(--color-border);
  padding: 0.65rem 0;
  font-size: 0.875rem;
}

.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0;
  padding: 0;
}

.breadcrumbs li {
  display: inline-flex;
  align-items: center;
  margin: 0;
  color: var(--color-text-muted);
}

.breadcrumbs li + li::before {
  content: "/";
  padding: 0 0.55rem;
  color: var(--color-text-light);
}

.breadcrumbs li[aria-current="page"] {
  color: var(--color-primary);
  font-weight: 600;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
  color: #ffffff;
  padding: 3.5rem 0 4rem;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 40%;
  height: 100%;
  background: radial-gradient(circle at 70% 30%, rgba(56, 189, 248, 0.12) 0%, transparent 60%);
  pointer-events: none;
}

.hero-content {
  max-width: 800px;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background-color: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--color-sky-glow);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero h1 {
  color: #ffffff;
  margin-bottom: 1.25rem;
}

.hero-lead {
  font-size: 1.2rem;
  color: #cbd5e1;
  margin-bottom: 1.75rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.hero-disclaimer {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  color: #94a3b8;
  font-size: 0.85rem;
}

.disclaimer-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* Page Layout */
.main-content {
  flex: 1;
  padding: 3rem 0;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2.5rem;
  align-items: start;
}

.full-content {
  max-width: 900px;
  margin: 0 auto;
}

/* Content Typography */
.article-body {
  font-size: 1.05rem;
  line-height: 1.75;
}

.article-body h2 {
  border-bottom: 2px solid var(--color-surface-alt);
  padding-bottom: 0.5rem;
  margin-top: 2.5rem;
}

.article-body h3 {
  margin-top: 1.75rem;
}

/* Callout Box / In-content Call Box */
.call-box {
  background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-primary) 100%);
  color: #ffffff;
  padding: 2rem;
  border-radius: var(--radius-lg);
  margin: 2.5rem 0;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
}

.call-box h3 {
  color: #ffffff;
  margin: 0;
  font-size: 1.4rem;
}

.call-box p {
  color: #e2e8f0;
  margin-bottom: 0.5rem;
}

.call-box .btn {
  margin-top: 0.5rem;
}

/* Boxed Services & Locations Grids */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.locations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.service-card, .area-card, .location-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
}

.service-card:hover, .area-card:hover, .location-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-accent);
}

.card-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  background-color: rgba(2, 132, 199, 0.1);
  color: var(--color-accent);
  margin-bottom: 0.85rem;
}

.card-badge.badge-emergency {
  background-color: rgba(220, 38, 38, 0.1);
  color: var(--color-emergency);
}

.card-badge.badge-hot {
  background-color: rgba(234, 88, 12, 0.1);
  color: #ea580c;
}

.card-badge.badge-repiping {
  background-color: rgba(147, 51, 234, 0.1);
  color: #9333ea;
}

.card-badge.badge-reroute {
  background-color: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.card-title {
  font-size: 1.25rem;
  margin: 0 0 0.75rem 0;
  color: var(--color-primary-dark);
}

.card-desc {
  font-size: 0.95rem;
  color: #475569;
  flex-grow: 1;
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 700;
  color: var(--color-accent);
  font-size: 0.9rem;
}

.card-link span.arrow {
  display: inline-block;
  transition: transform 150ms ease;
}

.service-card:hover .card-link span.arrow,
.area-card:hover .card-link span.arrow,
.location-card:hover .card-link span.arrow {
  transform: translateX(4px);
}

/* Sidebar Styles */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.sidebar-box {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.sidebar-box.urgent-box {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
  color: #ffffff;
  border: none;
}

.sidebar-box.urgent-box h3 {
  color: #ffffff;
  margin-top: 0;
}

.sidebar-box.urgent-box p {
  color: #cbd5e1;
  font-size: 0.95rem;
}

.sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-menu li {
  margin: 0;
  border-bottom: 1px solid var(--color-border);
}

.sidebar-menu li:last-child {
  border-bottom: none;
}

.sidebar-menu a {
  display: block;
  padding: 0.75rem 0;
  color: var(--color-text);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.15s ease, transform 0.15s ease;
}

.sidebar-menu a:hover {
  color: var(--color-accent);
  transform: translateX(3px);
}

/* FAQ Accordion / Box */
.faq-section {
  margin-top: 3rem;
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 2rem;
  border: 1px solid var(--color-border);
}

.faq-item {
  border-bottom: 1px solid var(--color-border);
  padding: 1.25rem 0;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.faq-answer {
  color: #475569;
  font-size: 0.98rem;
  margin-bottom: 0;
}

/* Footer */
.site-footer {
  background-color: var(--color-primary-dark);
  color: #94a3b8;
  padding: 4rem 0 2rem;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  color: #ffffff;
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-col p {
  color: #94a3b8;
  font-size: 0.9rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.6rem;
}

.footer-links a {
  color: #cbd5e1;
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: var(--color-sky-glow);
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.footer-contact-item svg {
  color: var(--color-sky-glow);
  margin-top: 0.15rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-hub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  font-size: 0.875rem;
}

.footer-hub-links a {
  color: var(--color-sky-glow);
  font-weight: 600;
}

.footer-legal {
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.5;
}

/* Sticky Mobile Call Bar (<768px) */
.mobile-call-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--color-primary-dark);
  padding: 0.75rem 1rem;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.25);
  z-index: 999;
}

.mobile-call-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: #ffffff;
  font-weight: 800;
  font-size: 1.05rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  width: 100%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Responsive Media Queries */
@media (max-width: 992px) {
  .content-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .site-header {
    height: auto;
  }

  .nav-menu {
    position: fixed;
    top: 4.5rem;
    left: -100%;
    width: 80%;
    max-width: 320px;
    height: calc(100vh - 4.5rem);
    background-color: var(--color-primary-dark);
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem;
    gap: 1rem;
    box-shadow: var(--shadow-xl);
    transition: left 0.3s ease;
    overflow-y: auto;
    z-index: 200;
  }

  .nav-menu.is-active {
    left: 0;
  }

  .nav-item.has-dropdown .dropdown-menu {
    position: static;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.05);
    border: none;
    box-shadow: none;
    margin-top: 0.5rem;
    display: none;
  }

  .nav-item.has-dropdown.open .dropdown-menu {
    display: flex;
  }

  .dropdown-link {
    color: #cbd5e1;
    padding: 0.5rem 1rem;
  }

  .mobile-toggle {
    display: block;
  }

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

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .mobile-call-bar {
    display: block;
  }

  body {
    padding-bottom: 4.5rem;
  }
}
