/* styles.css - Modern, Mobile-First, Accessible Stylesheet for SlabLeakRepair.work Yuma, 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;
}

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

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

.top-notice-bar a {
  color: #ffffff;
  font-weight: 700;
  text-decoration: underline;
}

/* Header */
.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: 0.75rem 1.25rem;
}

.brand-logo {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: -0.5px;
}

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

.brand-sub {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Navigation */
.main-nav {
  display: flex;
  align-items: center;
}

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

.nav-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.5rem 0.25rem;
}

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

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

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #ffffff;
  min-width: 260px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 0.5rem 0;
  z-index: 1001;
}

.dropdown-menu li {
  margin: 0;
}

.dropdown-menu a {
  display: block;
  padding: 0.6rem 1rem;
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border-bottom: 1px solid #f1f5f9;
}

.dropdown-menu a:hover, .dropdown-menu a:focus {
  background-color: var(--bg-light);
  color: var(--accent);
}

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

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

.header-cta-btn:hover, .header-cta-btn:focus {
  background-color: var(--accent-hover);
  transform: translateY(-1px);
}

/* Hamburger toggle for mobile */
.nav-toggle-btn {
  display: none;
  background: none;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 0.5rem;
  font-size: 1.25rem;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  color: var(--primary);
}

/* Breadcrumbs */
.breadcrumb-nav {
  background: #edf2f7;
  padding: 0.6rem 0;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border-color);
}

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

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

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

.hero-content {
  max-width: 800px;
}

.hero-section h1 {
  color: #ffffff;
  font-size: 2.35rem;
}

.hero-tagline {
  font-size: 1.15rem;
  line-height: 1.6;
  color: #e2e8f0;
  margin-bottom: 1.75rem;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.btn-primary-phone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: var(--accent);
  color: #ffffff !important;
  text-decoration: none !important;
  font-size: 1.25rem;
  font-weight: 800;
  padding: 0.9rem 1.75rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  min-height: 48px;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn-primary-phone:hover, .btn-primary-phone:focus {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: #cbd5e1;
}

.hero-badge-item {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
}

/* Main Content Area */
.main-layout {
  padding: 2.5rem 0;
}

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

/* Callout Box / In-content CTA */
.call-action-box {
  background-color: var(--accent-bg);
  border-left: 5px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  margin: 2rem 0;
  box-shadow: var(--shadow-sm);
}

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

.call-action-box p {
  margin-bottom: 1rem;
  color: #374151;
}

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

.call-action-btn-large:hover, .call-action-btn-large:focus {
  background-color: var(--accent-hover);
}

/* Warning & Safety Alerts */
.safety-alert-box {
  background-color: #fef2f2;
  border-left: 5px solid #dc2626;
  padding: 1.25rem;
  margin: 1.5rem 0;
  border-radius: var(--radius);
}

.safety-alert-box h4 {
  color: #991b1b;
  margin-top: 0;
  font-size: 1.1rem;
}

.safety-alert-box p {
  color: #7f1d1d;
  margin-bottom: 0.5rem;
}

.safety-alert-box ul {
  color: #7f1d1d;
  margin-bottom: 0;
}

/* Grid Layouts for Services & Features */
.service-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 1.75rem 0;
}

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

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

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

.service-card a.card-link {
  font-weight: 700;
  color: var(--primary);
  text-decoration: underline;
  margin-top: 0.75rem;
  display: inline-block;
}

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

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

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

.faq-question:hover {
  background-color: var(--bg-light);
}

.faq-answer {
  padding: 0 1.25rem 1.25rem;
  color: var(--text-main);
  line-height: 1.6;
}

/* Footer */
.site-footer {
  background-color: var(--primary-dark);
  color: #d1d5db;
  padding: 3rem 0 2rem;
  margin-top: auto;
  border-top: 4px solid var(--accent);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-col h4 {
  color: #ffffff;
  font-size: 1.1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.5rem;
}

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

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

.footer-links a {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.9rem;
}

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

.footer-phone-cta {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--accent) !important;
  text-decoration: none;
  display: inline-block;
  margin: 0.5rem 0 1rem;
}

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

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

/* Sticky Mobile Phone Bar */
.sticky-mobile-call {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--accent);
  color: #ffffff;
  z-index: 9999;
  text-align: center;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1rem;
  font-size: 1.15rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
  min-height: 52px;
}

.sticky-mobile-call:hover, .sticky-mobile-call:focus {
  background-color: var(--accent-hover);
  color: #ffffff;
}

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

/* Mobile Media Queries */
@media (max-width: 768px) {
  .nav-toggle-btn {
    display: block;
  }

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

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

  .nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    width: 100%;
  }

  .dropdown-menu {
    position: static;
    display: block;
    box-shadow: none;
    border: none;
    background: #f8fafc;
    margin-left: 1rem;
    width: 100%;
  }

  .hero-section h1 {
    font-size: 1.85rem;
  }

  .hero-cta-group {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-primary-phone {
    width: 100%;
    text-align: center;
  }

  .content-block {
    padding: 1.25rem;
  }
}
