/* Fonts are loaded via <link> in the <head> (non render-blocking) */

:root {
  /* Color Palette */
  --primary: #dc2626; /* AGM Red */
  --primary-hover: #b91c1c;
  --primary-light: #fef2f2;
  --secondary: #0284c7; /* Water Blue */
  --secondary-hover: #0369a1;
  --secondary-light: #f0f9ff;
  --accent: #eab308; /* Star Gold */
  --dark-bg: #0f172a; /* Slate 900 */
  --dark-card: #1e293b; /* Slate 800 */
  --light-bg: #f8fafc; /* Slate 50 */
  --light-card: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  
  /* Fonts */
  --font-headings: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  /* Transitions & Shadows */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --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: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  
  /* Layout constraints */
  --max-width: 1280px;
}

/* Dark Mode Overrides */
[data-theme="dark"] {
  --light-bg: #0f172a;
  --light-card: #1e293b;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border: #334155;
  --primary-light: #31101b;
  --secondary-light: #0c2b3e;
}

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

html {
  scroll-behavior: smooth;
}

/* Keep anchored sections clear of the sticky header */
section[id] {
  scroll-margin-top: 90px;
}

body {
  font-family: var(--font-body);
  background-color: var(--light-bg);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headings);
  font-weight: 700;
  line-height: 1.25;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

button, input, select, textarea {
  font-family: inherit;
}

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

ul {
  list-style: none;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--light-bg);
}
::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: var(--radius-full);
  border: 2px solid var(--light-bg);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Typography Utilities */
.text-center { text-align: center; }
.section-subtitle {
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 0.1em;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}
.section-title {
  font-size: 2.25rem;
  color: var(--dark-bg);
  margin-bottom: 1rem;
}
[data-theme="dark"] .section-title {
  color: #ffffff;
}

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

.section-padding {
  padding: 5rem 0;
}

/* Flex / Grid Utilities */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.8rem;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
  box-shadow: var(--shadow-md);
}
.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background-color: var(--secondary);
  color: #ffffff;
  box-shadow: var(--shadow-md);
}
.btn-secondary:hover {
  background-color: var(--secondary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-outline {
  background-color: transparent;
  color: var(--text-main);
  border: 2px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Top Info Bar */
.top-bar {
  background-color: #f1f5f9;
  color: #475569;
  font-size: 0.85rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}
[data-theme="dark"] .top-bar {
  background-color: #0b0f19;
  color: #94a3b8;
  border-color: #1e293b;
}
.top-bar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.top-info-left, .top-info-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.top-info-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.social-links {
  display: flex;
  gap: 1rem;
}
.social-links a:hover {
  color: var(--primary);
}

/* Sticky Header */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
[data-theme="dark"] header {
  background-color: rgba(15, 23, 42, 0.9);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.logo-icon {
  width: 45px;
  height: 45px;
}
.logo-text {
  display: flex;
  flex-direction: column;
}
.logo-title {
  font-size: 1.5rem;
  color: var(--primary);
  font-weight: 800;
  line-height: 1;
}
.logo-subtitle {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  font-weight: 600;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-weight: 600;
  color: var(--text-main);
  position: relative;
  padding: 0.25rem 0;
}
.nav-link:hover, .nav-link.active {
  color: var(--primary);
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  transition: var(--transition);
}
.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.header-right-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* Theme Toggle Button */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-main);
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.theme-toggle:hover {
  background-color: var(--primary-light);
  color: var(--primary);
}
.theme-toggle svg {
  width: 20px;
  height: 20px;
}
.theme-toggle .moon { display: block; }
.theme-toggle .sun { display: none; }
[data-theme="dark"] .theme-toggle .moon { display: none; }
[data-theme="dark"] .theme-toggle .sun { display: block; }

/* Mobile-only call button in header */
.mobile-call-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  background-color: var(--primary);
  color: #ffffff;
  box-shadow: var(--shadow-md);
  flex-shrink: 0;
}

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 101;
}
.hamburger span {
  width: 25px;
  height: 3px;
  background-color: var(--text-main);
  border-radius: var(--radius-full);
  transition: var(--transition);
}
.hamburger.open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
}
.hamburger.open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Hero Section */
.hero {
  position: relative;
  padding: 8rem 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #ffffff;
  display: flex;
  align-items: center;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 30%, rgba(2, 132, 199, 0.6) 100%);
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 650px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.hero-badge {
  align-self: flex-start;
  background-color: var(--primary);
  color: #ffffff;
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  animation: pulse 2s infinite;
}
.hero-title {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.15;
}
.hero-desc {
  font-size: 1.1rem;
  opacity: 0.9;
  line-height: 1.6;
}
.hero-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

/* Emergency Ribbon */
.emergency-ribbon {
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: #ffffff;
  padding: 1.5rem 0;
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 5;
}
.emergency-ribbon-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.emergency-text {
  font-size: 1.25rem;
  font-weight: 700;
  font-family: var(--font-headings);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.emergency-icon {
  font-size: 1.5rem;
  animation: shake 0.5s infinite;
}
.emergency-btn {
  background-color: #ffffff;
  color: var(--primary);
  padding: 0.8rem 1.8rem;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}
.emergency-btn:hover {
  background-color: var(--light-bg);
  transform: scale(1.05);
}

/* Services Tabs Section */
.services-tabs-container {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
  margin-top: 3rem;
}

.services-tab-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-right: 1px solid var(--border);
  padding-right: 2rem;
}
.services-tab-btn {
  text-align: left;
  background: none;
  border: none;
  padding: 1rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.services-tab-btn:hover {
  background-color: var(--primary-light);
  color: var(--primary);
}
.services-tab-btn.active {
  background-color: var(--primary);
  color: #ffffff;
}
.services-tab-btn .arrow-icon {
  opacity: 0;
  transition: var(--transition);
}
.services-tab-btn.active .arrow-icon {
  opacity: 1;
  transform: translateX(4px);
}

.services-tab-content-panel {
  display: none;
  grid-template-columns: 1fr 1.2fr;
  gap: 2.5rem;
  align-items: center;
  animation: fadeIn 0.4s ease-out;
}
.services-tab-content-panel.active {
  display: grid;
}
.services-panel-info {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.services-panel-title {
  font-size: 2rem;
  color: var(--dark-bg);
}
[data-theme="dark"] .services-panel-title {
  color: #ffffff;
}
.services-panel-desc {
  color: var(--text-muted);
}
.services-panel-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.services-panel-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}
.services-panel-list svg {
  color: var(--primary);
  flex-shrink: 0;
}
.services-panel-image {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4/3;
  position: relative;
  background-color: #e2e8f0;
}
.services-panel-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Our Work / Before After Slider */
.work-section {
  background-color: var(--light-bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.work-intro {
  max-width: 650px;
  margin: 0 auto 3rem auto;
}
.slider-container {
  position: relative;
  width: 100%;
  max-width: 800px;
  height: 480px;
  margin: 0 auto;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  user-select: none;
}
.slider-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
.slider-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.slider-img-after {
  z-index: 10;
}
.slider-img-before {
  z-index: 20;
  width: 50%; /* JS will change this */
  overflow: hidden;
  border-right: 2px solid #ffffff;
}
/* Ensure the inner image stretches to full parent container width even if width of before-wrap is less */
.slider-img-before img {
  width: 800px;
  max-width: none;
  height: 480px;
}
.slider-handle {
  position: absolute;
  z-index: 30;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  background-color: #ffffff;
  cursor: ew-resize;
  transform: translateX(-50%);
}
.slider-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background-color: var(--primary);
  color: #ffffff;
  border: 3px solid #ffffff;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}
.slider-label {
  position: absolute;
  bottom: 1.5rem;
  z-index: 25;
  background-color: rgba(15, 23, 42, 0.75);
  color: #ffffff;
  padding: 0.3rem 0.8rem;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.slider-label.label-before {
  left: 1.5rem;
}
.slider-label.label-after {
  right: 1.5rem;
}

/* Project Selection Tabs for Before-After Slider */
.work-project-tabs {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}
.project-tab-btn {
  background-color: var(--light-card);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 0.6rem 1.4rem;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}
.project-tab-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}
.project-tab-btn.active {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: var(--shadow-md);
}

/* Call to Action Banner */
.cta-banner {
  background: linear-gradient(135deg, var(--dark-bg) 0%, #1e293b 100%);
  color: #ffffff;
  padding: 4rem 0;
}
.cta-banner-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.cta-banner-text {
  max-width: 700px;
}
.cta-banner-title {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

/* How It Works Process Cards */
.process-grid {
  margin-top: 3.5rem;
}
.process-card {
  position: relative;
  background-color: var(--light-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2.75rem 1.75rem 2rem 1.75rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.process-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}
.process-step-num {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background-color: var(--primary);
  color: #ffffff;
  font-family: var(--font-headings);
  font-weight: 800;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
}
.process-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.25rem auto;
  border-radius: var(--radius-full);
  background-color: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.process-title {
  font-size: 1.25rem;
  color: var(--dark-bg);
  margin-bottom: 0.75rem;
}
[data-theme="dark"] .process-title {
  color: #ffffff;
}
.process-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Testimonial Slider */
.reviews-section {
  background-color: var(--light-bg);
}
/* Slides are stacked in the same grid cell so the container always
   fits the tallest quote — no clipping on narrow screens */
.testimonials-slider {
  max-width: 800px;
  margin: 3rem auto 0 auto;
  display: grid;
  overflow: hidden;
}
.testimonial-slide {
  grid-area: 1 / 1;
  width: 100%;
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.5s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
  padding: 0.5rem 0;
}
.testimonial-slide.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}
.testimonial-avatar {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-full);
  margin-bottom: 1rem;
  border: 3px solid var(--primary);
  overflow: hidden;
}
.testimonial-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.testimonial-quote {
  font-size: 1.15rem;
  font-style: italic;
  font-weight: 500;
  color: var(--text-main);
  max-width: 600px;
  margin-bottom: 1rem;
  position: relative;
}
.testimonial-quote::before, .testimonial-quote::after {
  content: '"';
  font-family: var(--font-headings);
  font-size: 2rem;
  color: var(--primary-light);
  line-height: 1;
}
.testimonial-author {
  font-weight: 700;
  font-family: var(--font-headings);
  font-size: 1.05rem;
}
.testimonial-stars {
  display: flex;
  gap: 0.25rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.slider-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}
.slider-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background-color: var(--border);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}
.slider-dot.active {
  background-color: var(--primary);
  width: 25px;
}

/* Our Team Grid */
.team-grid {
  margin-top: 3rem;
}
.team-card {
  background-color: var(--light-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
}
.team-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}
.team-image {
  height: 280px;
  overflow: hidden;
  position: relative;
  background-color: #cbd5e1;
}
.team-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}
.team-card:hover .team-image img {
  transform: scale(1.05);
}
.team-details {
  padding: 1.5rem;
  text-align: center;
}
.team-name {
  font-size: 1.25rem;
  color: var(--dark-bg);
  margin-bottom: 0.25rem;
}
[data-theme="dark"] .team-name {
  color: #ffffff;
}
.team-role {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}
.team-socials {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
}
.team-social-icon {
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: var(--transition);
}
.team-social-icon:hover {
  background-color: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

/* Contact & Form Section */
.contact-section {
  position: relative;
  background-color: var(--light-bg);
  border-top: 1px solid var(--border);
}
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: center;
  margin-top: 3rem;
}
.contact-visual-side {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.contact-plumber-svg {
  width: 100%;
  max-width: 420px;
  height: auto;
  filter: drop-shadow(var(--shadow-lg));
}
.contact-badge-box {
  position: absolute;
  bottom: 2rem;
  background-color: var(--light-card);
  border: 1px solid var(--border);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 1rem;
}
.contact-badge-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background-color: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}
.contact-badge-info h4 {
  font-size: 0.95rem;
  font-weight: 700;
}
.contact-badge-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.contact-form-side {
  background-color: var(--light-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 3rem;
  box-shadow: var(--shadow-lg);
}
.form-title {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}
.form-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}
.booking-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.form-group-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
.form-control {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.form-control label {
  font-weight: 600;
  font-size: 0.9rem;
}
.form-input, .form-textarea, .form-select {
  padding: 0.8rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background-color: var(--light-bg);
  color: var(--text-main);
  font-size: 0.95rem;
  transition: var(--transition);
  width: 100%;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}
.form-textarea {
  resize: vertical;
  min-height: 120px;
}
.form-error-msg {
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 500;
  display: none;
}
.form-input.error, .form-textarea.error {
  border-color: var(--primary);
  background-color: #fff1f2;
}
.form-input.error + .form-error-msg, .form-textarea.error + .form-error-msg,
.form-select.error + .form-error-msg {
  display: block;
}
.form-select.error {
  border-color: var(--primary);
}

.form-submit-error {
  display: none;
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
  margin-top: 0.75rem;
}
.form-submit-error.visible {
  display: block;
}
.form-submit-error a {
  text-decoration: underline;
}

.btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

/* Success Modal / State */
.form-success-state {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 0;
  animation: fadeIn 0.4s ease-out;
}
.success-icon-wrap {
  width: 70px;
  height: 70px;
  background-color: #dcfce7;
  color: #15803d;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.25rem;
  margin-bottom: 1.5rem;
  animation: scaleUp 0.3s ease-out;
}
.success-title {
  font-size: 1.5rem;
  color: #15803d;
  margin-bottom: 0.5rem;
}
.success-desc {
  color: var(--text-muted);
  max-width: 360px;
  margin-bottom: 1.5rem;
}

/* Accordion FAQ */
.faq-section {
  background-color: var(--light-card);
}
.faq-container {
  max-width: 800px;
  margin: 3rem auto 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: var(--transition);
}
.faq-item:hover {
  border-color: var(--primary);
}
.faq-trigger {
  width: 100%;
  background: none;
  border: none;
  padding: 1.25rem 1.5rem;
  text-align: left;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
}
.faq-trigger:hover {
  color: var(--primary);
}
.faq-icon-arrow {
  transition: var(--transition);
  flex-shrink: 0;
}
.faq-item.open .faq-icon-arrow {
  transform: rotate(180deg);
  color: var(--primary);
}
.faq-item.open {
  border-color: var(--primary);
}
.faq-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  background-color: var(--light-bg);
}
.faq-panel-content {
  padding: 1.25rem 1.5rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

/* Trust Badges Bar */
.trust-badges-bar {
  background-color: #f8fafc;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 3rem 0;
}
[data-theme="dark"] .trust-badges-bar {
  background-color: #0b0f19;
}
.trust-badge-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
}
.trust-badge-icon-wrap {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-full);
  background-color: #ffffff;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  transition: var(--transition);
}
.trust-badge-item:hover .trust-badge-icon-wrap {
  transform: translateY(-5px);
  background-color: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}
.trust-badge-title {
  font-size: 1.05rem;
  font-weight: 700;
  font-family: var(--font-headings);
}
.trust-badge-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 200px;
}

/* Footer styling */
footer {
  background-color: #0b0f19;
  color: #94a3b8;
  padding: 5rem 0 2rem 0;
  border-top: 2px solid var(--primary);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 4rem;
}
.footer-col {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.footer-col-title {
  color: #ffffff;
  font-size: 1.15rem;
  position: relative;
  padding-bottom: 0.5rem;
}
.footer-col-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background-color: var(--primary);
}
.footer-about-text {
  font-size: 0.9rem;
  line-height: 1.7;
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.footer-links a {
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.footer-links a::before {
  content: '→';
  color: var(--primary);
  transition: var(--transition);
}
.footer-links a:hover {
  color: #ffffff;
  padding-left: 5px;
}
.footer-links a:hover::before {
  color: #ffffff;
}
.footer-areas span {
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.footer-areas span::before {
  content: '→';
  color: var(--primary);
}

.footer-contact-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.footer-contact-item {
  display: flex;
  gap: 0.75rem;
  font-size: 0.9rem;
}
.footer-contact-icon {
  color: var(--primary);
  margin-top: 0.2rem;
  flex-shrink: 0;
}
.footer-newsletter-text {
  font-size: 0.9rem;
  line-height: 1.6;
}
.newsletter-form {
  display: flex;
  gap: 0.5rem;
}
.newsletter-input {
  background-color: #1e293b;
  border: 1px solid #334155;
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.8rem;
  color: #ffffff;
  font-size: 0.9rem;
  flex-grow: 1;
  width: 100%;
}
.newsletter-input:focus {
  outline: none;
  border-color: var(--primary);
}
.newsletter-btn {
  background-color: var(--primary);
  color: #ffffff;
  border: none;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
}
.newsletter-btn:hover {
  background-color: var(--primary-hover);
}

.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
}
.footer-bottom-links {
  display: flex;
  gap: 1.5rem;
}
.footer-bottom-links a:hover {
  color: #ffffff;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes scaleUp {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(220, 38, 38, 0); }
  100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}
@keyframes shake {
  0% { transform: rotate(0); }
  25% { transform: rotate(5deg); }
  50% { transform: rotate(0); }
  75% { transform: rotate(-5deg); }
  100% { transform: rotate(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .services-tabs-container {
    grid-template-columns: 1fr;
  }
  .services-tab-list {
    flex-direction: row;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding-right: 0;
    padding-bottom: 1rem;
    scrollbar-width: thin;
  }
  .services-tab-btn {
    white-space: nowrap;
  }
  .services-tab-btn .arrow-icon {
    display: none;
  }
  .contact-wrapper {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .contact-visual-side {
    order: 2;
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .top-bar {
    display: none; /* Hide top bar on mobile for simplicity */
  }
  .hamburger {
    display: flex;
  }
  .mobile-call-btn {
    display: flex; /* Phone stays one tap away once the top bar is hidden */
  }
  .nav-links {
    position: fixed;
    top: 73px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 73px);
    background-color: var(--light-card);
    flex-direction: column;
    padding: 3rem 2rem;
    gap: 2rem;
    align-items: flex-start;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
    border-top: 1px solid var(--border);
    overflow-y: auto;
  }
  .nav-links.open {
    left: 0;
  }
  .header-right-actions {
    gap: 0.75rem;
  }
  .header-right-actions .btn {
    display: none; /* Hide Quote button in header on mobile */
  }
  .hero {
    padding: 5rem 0;
  }
  .hero-title {
    font-size: 2.25rem;
  }
  .hero-buttons {
    flex-wrap: wrap;
  }
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
  .emergency-ribbon-content {
    justify-content: center;
    text-align: center;
  }
  .emergency-text {
    font-size: 1.05rem;
    justify-content: center;
  }
  .process-grid {
    gap: 2.5rem; /* room for the floating step numbers when cards stack */
  }
  .services-tab-content-panel {
    grid-template-columns: 1fr;
  }
  .services-panel-title {
    font-size: 1.5rem;
  }
  .slider-container {
    height: 320px;
  }
  .slider-img-before img {
    height: 320px;
    width: 100%; /* Resize dynamically */
  }
  .contact-form-side {
    padding: 1.75rem 1.25rem;
  }
  .cta-banner-title {
    font-size: 1.5rem;
  }
  .cta-banner-content {
    justify-content: center;
    text-align: center;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .footer-bottom {
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 560px) {
  .section-title {
    font-size: 1.75rem;
  }
  .section-padding {
    padding: 3.5rem 0;
  }
  .hero-title {
    font-size: 1.9rem;
  }
  .hero-desc {
    font-size: 1rem;
  }
  .hero-buttons .btn {
    width: 100%;
  }
  /* Stack paired form fields and option cards on small phones */
  .form-group-2 {
    grid-template-columns: 1fr;
  }
  .slider-container {
    height: 240px;
  }
  .slider-img-before img {
    height: 240px;
  }
  .slider-label {
    bottom: 0.75rem;
    font-size: 0.7rem;
  }
  .slider-label.label-before {
    left: 0.75rem;
  }
  .slider-label.label-after {
    right: 0.75rem;
  }
  .testimonial-quote {
    font-size: 1rem;
  }
  .emergency-btn {
    width: 100%;
    justify-content: center;
  }
}
