/* styles.css - Modern, Mobile-First, Accessible Stylesheet for SlabLeakRepair.work Casa Grande, AZ */
:root {
  --primary: #0e2a47; /* Deep Navy */
  --primary-light: #1b3d63;
  --primary-dark: #071728;
  --accent: #d94f00; /* High-contrast Emergency Orange/Amber for Phone CTA */
  --accent-hover: #b84000;
  --accent-bg: #fff5ed;
  --text-main: #1f2937;
  --text-muted: #4b5563;
  --text-light: #f3f4f6;
  --bg-light: #f8fafc;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;
  --border-focus: #2563eb;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius: 8px;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max-width: 1140px;
}

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

html {
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-main);
  background-color: var(--bg-light);
  scroll-behavior: smooth;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-bottom: 70px; /* Space for sticky mobile phone bar */
}

@media (min-width: 769px) {
  body {
    padding-bottom: 0;
  }
}

a {
  color: var(--primary);
  text-decoration: underline;
  transition: color 0.2s ease;
}

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

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

h1, h2, h3, h4 {
  color: var(--primary);
  line-height: 1.25;
  margin-bottom: 0.75rem;
  font-weight: 700;
}

h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

h2 {
  font-size: 1.5rem;
  margin-top: 2rem;
  padding-bottom: 0.3rem;
  border-bottom: 2px solid var(--border-color);
}

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

p {
  margin-bottom: 1.25rem;
  color: var(--text-main);
}

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

li {
  margin-bottom: 0.5rem;
}

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

/* Top Notice Bar */
.top-notice-bar {
  background-color: var(--primary-dark);
  color: #ffffff;
  font-size: 0.875rem;
  padding: 0.5rem 0;
  text-align: center;
}

.top-notice-bar a {
  color: #fed7aa;
  font-weight: 700;
  text-decoration: none;
  margin-left: 0.5rem;
}

.top-notice-bar a:hover {
  text-decoration: underline;
}

/* Header & Navigation */
.site-header {
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

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

.brand-logo {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
  display: flex;
  flex-direction: column;
}

.brand-logo span {
  color: var(--accent);
}

.brand-sub {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.nav-toggle-btn {
  background: none;
  border: 1px solid var(--border-color);
  font-size: 1.5rem;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--primary);
  display: block;
}

.main-nav {
  display: none;
  width: 100%;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #ffffff;
  border-bottom: 2px solid var(--primary);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-md);
}

.main-nav.active {
  display: block;
}

.nav-list {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.nav-link {
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  padding: 0.5rem 0;
  display: block;
  font-size: 1rem;
}

.nav-link:hover {
  color: var(--accent);
}

.nav-item-dropdown {
  position: relative;
}

.dropdown-menu {
  list-style: none;
  padding-left: 1rem;
  margin-top: 0.25rem;
  margin-bottom: 0;
  display: none;
  border-left: 2px solid var(--border-color);
}

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

.dropdown-menu li {
  margin-bottom: 0.35rem;
}

.dropdown-menu a {
  font-size: 0.95rem;
  color: var(--text-muted);
  text-decoration: none;
}

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

.header-cta-btn {
  background-color: var(--accent);
  color: #ffffff !important;
  font-weight: 700;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius);
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  min-width: 44px;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.header-cta-btn:hover {
  background-color: var(--accent-hover);
  color: #ffffff !important;
}

@media (min-width: 860px) {
  .nav-toggle-btn {
    display: none;
  }

  .main-nav {
    display: block !important;
    position: static;
    width: auto;
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
  }

  .nav-list {
    flex-direction: row;
    align-items: center;
    gap: 1.25rem;
  }

  .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 250px;
    background: #ffffff;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 0.75rem 0.5rem;
  }

  .nav-item-dropdown:hover .dropdown-menu {
    display: block;
  }

  .dropdown-menu li {
    padding: 0.25rem 0.5rem;
    margin-bottom: 0;
  }
}

/* Breadcrumbs */
.breadcrumbs-bar {
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-color);
  padding: 0.5rem 0;
  font-size: 0.875rem;
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
  gap: 0.5rem;
}

.breadcrumb-list li+li::before {
  content: "/";
  padding-right: 0.5rem;
  color: var(--text-muted);
}

.breadcrumb-list a {
  text-decoration: none;
  color: var(--text-muted);
}

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

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: #ffffff;
  padding: 2.5rem 0 3rem 0;
  text-align: center;
}

.hero-section h1 {
  color: #ffffff;
  font-size: 2.2rem;
  max-width: 850px;
  margin-left: auto;
  margin-right: auto;
}

.hero-tagline {
  font-size: 1.15rem;
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1.75rem;
  color: #e2e8f0;
}

.hero-cta-btn {
  background-color: var(--accent);
  color: #ffffff !important;
  font-size: 1.2rem;
  font-weight: 700;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius);
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 48px;
  box-shadow: 0 4px 12px rgba(217, 79, 0, 0.4);
  transition: all 0.2s ease;
}

.hero-cta-btn:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
}

.hero-subtext {
  font-size: 0.875rem;
  color: #cbd5e1;
  margin-top: 0.75rem;
}

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

.content-wrapper {
  background: var(--bg-card);
  padding: 2rem 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

@media (min-width: 769px) {
  .content-wrapper {
    padding: 3rem 2.5rem;
  }
}

/* Call Boxes (Phone First) */
.call-box {
  background-color: var(--accent-bg);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 2rem 0;
  text-align: center;
}

.call-box h3 {
  color: var(--primary-dark);
  margin-top: 0;
  font-size: 1.35rem;
}

.call-box p {
  color: var(--text-main);
  margin-bottom: 1rem;
}

.call-box-btn {
  background-color: var(--accent);
  color: #ffffff !important;
  font-size: 1.15rem;
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  transition: background-color 0.2s ease;
}

.call-box-btn:hover {
  background-color: var(--accent-hover);
}

/* Safety & Urgent Warning Box */
.warning-box {
  background-color: #fef2f2;
  border-left: 4px solid #ef4444;
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.warning-box h4 {
  color: #991b1b;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.warning-box p {
  margin-bottom: 0.5rem;
  color: #7f1d1d;
  font-size: 0.95rem;
}

.warning-box p:last-child {
  margin-bottom: 0;
}

/* Grids & Cards */
.service-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin: 1.75rem 0;
}

@media (min-width: 640px) {
  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .service-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.service-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.5rem;
  background-color: #ffffff;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.service-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
}

.service-card h3 {
  font-size: 1.2rem;
  margin-top: 0;
}

.service-card p {
  flex-grow: 1;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.card-link {
  font-weight: 700;
  color: var(--primary);
  margin-top: 0.5rem;
  display: inline-block;
}

/* Step-by-Step Process */
.process-steps {
  list-style: none;
  padding-left: 0;
  counter-reset: step-counter;
  margin: 1.5rem 0;
}

.process-steps li {
  position: relative;
  padding-left: 3rem;
  margin-bottom: 1.5rem;
  counter-increment: step-counter;
}

.process-steps li::before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 0;
  width: 2.2rem;
  height: 2.2rem;
  background-color: var(--primary);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
}

.process-steps h4 {
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}

/* FAQ Accordion */
.faq-section {
  margin-top: 2.5rem;
}

.faq-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  text-align: left;
  background-color: #ffffff;
  border: none;
  padding: 1rem 1.25rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 48px;
}

.faq-question:hover {
  background-color: #f8fafc;
}

.faq-question::after {
  content: "+";
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
}

.faq-question[aria-expanded="true"]::after {
  content: "−";
}

.faq-answer {
  padding: 1rem 1.25rem 1.25rem 1.25rem;
  background-color: #fafbfc;
  border-top: 1px solid var(--border-color);
  font-size: 0.95rem;
  line-height: 1.6;
}

.faq-answer[hidden] {
  display: none;
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

/* Image styling */
.content-image {
  border-radius: var(--radius);
  margin: 1.5rem 0;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

/* Footer */
.site-footer {
  background-color: var(--primary-dark);
  color: #cbd5e1;
  padding: 3rem 0 1.5rem 0;
  margin-top: auto;
  font-size: 0.9rem;
}

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

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.footer-col h4 {
  color: #ffffff;
  font-size: 1.1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--primary-light);
  padding-bottom: 0.5rem;
}

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

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

.footer-links a {
  color: #cbd5e1;
  text-decoration: none;
}

.footer-links a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: #94a3b8;
}

.footer-bottom a {
  color: #cbd5e1;
}

/* Sticky Mobile Call Bar */
.mobile-call-bar {
  display: block;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: var(--primary-dark);
  padding: 0.65rem 1rem;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  text-align: center;
}

.mobile-call-bar a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: var(--accent);
  color: #ffffff !important;
  text-decoration: none !important;
  font-size: 1.1rem;
  font-weight: 700;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  min-height: 44px;
}

@media (min-width: 769px) {
  .mobile-call-bar {
    display: none;
  }
}
