/* ============================================
   American Plumbing Inc. - Main Stylesheet
   ============================================ */

/* CSS Variables */
:root {
  --primary-blue: #1e40af;
  --secondary-blue: #3b82f6;
  --accent-red: #dc2626;
  --text-dark: #1f2937;
  --text-light: #6b7280;
  --bg-light: #f9fafb;
  --bg-section: #f3f4f6;
  --white: #ffffff;
  --border-color: #e5e7eb;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
  --border-radius: 8px;
  --max-width: 1200px;
  /* Navigation theme */
  --nav-bg: #0b1a4b;
  --nav-link: rgba(255, 255, 255, 0.9);
  --nav-link-hover: #ffffff;
  --nav-accent: #1f6feb;
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background: var(--white);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 700;
  margin-bottom: 1rem;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

/* Use Montserrat for headings to match original site */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  color: var(--text-dark);
}

h3 {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
}

p {
  margin-bottom: 1rem;
  color: var(--text-light);
}

/* ============================================
 Header & Navigation
 ============================================ */
header {
  background: var(--nav-bg);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--white);
}

.logo-image {
  height: 56px;
  width: auto;
}

@media (max-width: 768px) {
  .logo-image {
    height: 44px;
  }
}

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

.nav-links a {
  color: var(--nav-link);
  font-weight: 500;
  transition: color 0.3s ease;
}

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

@media (max-width: 768px) {
  /* When the mobile menu opens with white background, revert link color */
  .nav-links a {
    color: var(--text-dark);
  }
}

.cta-button {
  background: var(--nav-accent);
  color: var(--white) !important;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 1px 2px rgba(0, 0, 0, 0.15);
}

.cta-button:hover {
  background: #1a5fd1;
  transform: translateY(-1px);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--white);
  margin: 3px 0;
  transition: 0.3s;
  border-radius: 2px;
}

/* ============================================
 Hero Section
 ============================================ */
.hero {
  padding: 8rem 0;
  min-height: 70vh;
  background: url('../assets/images/toiletSinkHero.webp') center/cover no-repeat;
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.60); /* light neutral overlay (0.60) to match reference */
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-text h1 {
  margin-bottom: 1.5rem;
}

/* Hero typography to mimic reference site */
.hero-kicker {
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 1rem; /* push kicker down slightly */
  margin-bottom: 0.75rem;
}

.hero-headline {
  font-family: 'Montserrat', 'Lato', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(2.25rem, 6vw, 4.5rem);
  line-height: 1.1;
  color: #e9efff;
}

.hero-headline .line {
  display: block; /* force each span to a new line */
}

.hero-subline {
  margin-top: 0.75rem;
  font-weight: 700;
  color: rgba(30, 58, 138, 1); /* use primary blue tone in hero */
}

/* Hero color scheme overrides to match reference site */
.hero .hero-headline {
  color: var(--primary-blue);
}

.hero .hero-kicker {
  color: var(--primary-blue);
}

.hero .btn-primary {
  background: var(--accent-red);
  color: var(--white);
  border: 2px solid #000;
}

.hero .btn-primary:hover {
  background: #b91c1c;
  border-color: #000;
}

.hero .btn-secondary {
  background: transparent;
  color: var(--text-dark);
  border: 2px solid var(--text-dark);
}

.hero .btn-secondary:hover {
  background: var(--text-dark);
  color: var(--white);
}

.hero .badge strong,
.hero .badge span {
  color: var(--text-dark);
}

.benefits-strip {
  background: var(--white);
  padding: 2.5rem 0 1rem;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  text-align: center;
  align-items: start;
}

.benefit-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--accent-red);
}

.benefit-text {
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.3;
}

.section-divider {
  border: 0;
  border-top: 1px solid rgba(31, 41, 55, 0.15);
  margin: 1.5rem 0 2rem;
}

.hero-name {
  display: block;
  font-size: clamp(2.5rem, 6vw, 4rem);
  margin-bottom: 0.5rem;
}

.hero-title {
  display: block;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 500;
  opacity: 0.95;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1rem;
}

.hero-description {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 2rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.hero-image {
  position: relative;
  display: none; /* Background image replaces this panel */
}

.hero-image img {
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
}

/* Trust Badges */
.trust-badges {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.badge {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.badge strong {
  font-size: 1.75rem;
  display: block;
}

.badge span {
  font-size: 0.9rem;
  opacity: 0.9;
}

/* Trust Badges (below hero) */
.trust-badges {
  background: var(--white);
  padding: 60px 0; /* 60px top/bottom */
  display: block; /* override older helper rules */
}

.trust-badges::after {
  content: '';
  display: block;
  border-top: 1px solid rgba(30, 42, 94, 0.35);
  margin: 24px auto 0;
  width: min(var(--max-width), calc(100% - 40px));
}

.trust-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  text-align: center;
  align-items: start;
}

.trust-item h3 {
  font-family: 'Montserrat', 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  color: #1e2a5e; /* navy */
  font-weight: 700;
  line-height: 1.3;
}

.trust-icon {
  color: #dc2626; /* red */
  font-size: 2.5rem; /* icon size */
  margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
  .trust-container {
    grid-template-columns: 1fr; /* stack vertically */
    gap: 1.25rem;
  }
}

/* ============================================
 Buttons
 ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  font-size: 1rem;
}

.btn-primary {
  background: var(--white);
  color: var(--primary-blue);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}

.btn-secondary:hover {
  background: var(--white);
  color: var(--primary-blue);
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

.phone-icon {
  width: 20px;
  height: 20px;
}

/* ============================================
 Services Section
 ============================================ */
.services {
  padding: 5rem 0;
  background: var(--bg-light);
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  margin-bottom: 1rem;
}

.section-header p {
  max-width: 700px;
  margin: 0 auto;
  font-size: 1.1rem;
}

/* Match reference styles for the Services section header */
.services .section-header h2 {
  color: var(--primary-blue);
  font-weight: 800;
  letter-spacing: 0.01em;
}

.services .section-header p {
  color: var(--text-dark);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.service-card {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.service-icon {
  position: relative;
  width: 100%;
  height: clamp(180px, 28vw, 240px);
  margin-bottom: 1rem;
  background: #ffffff;
  border-radius: var(--border-radius);
  overflow: hidden;
  display: block;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.service-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.0);
  transition: transform 0.5s ease;
}

/* Subtle image zoom on hover for sophistication */
.service-card:hover .service-icon img {
  transform: scale(1.06);
}

@media (max-width: 768px) {
  .service-icon {
    height: 160px;
  }
}

.service-card h3 {
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.service-link {
  color: var(--primary-blue);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  margin-top: 1rem;
  transition: gap 0.3s ease;
}

.service-link:hover {
  gap: 0.5rem;
}

/* ============================================
 Why Choose Us Section
 ============================================ */
.why-choose {
  padding: 5rem 0;
  background: var(--white);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  margin-top: 3rem;
}

.feature {
  text-align: center;
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.feature h3 {
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

/* ============================================
 Testimonials Section
 ============================================ */
.testimonials {
  padding: 5rem 0;
  background: var(--bg-light);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.testimonial-card {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
}

.stars {
  color: #fbbf24;
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.testimonial-text {
  font-style: italic;
  color: var(--text-dark);
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.testimonial-author {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
}

.testimonial-author strong {
  color: var(--text-dark);
  margin-bottom: 0.25rem;
}

.testimonial-author span {
  color: var(--text-light);
  font-size: 0.9rem;
}

/* ============================================
 Service Areas Section
 ============================================ */
.service-areas {
  padding: 4rem 0;
  background: var(--white);
}

.areas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.area-item {
  padding: 1rem;
  background: var(--bg-light);
  border-radius: var(--border-radius);
  text-align: center;
  font-weight: 500;
  color: var(--text-dark);
  transition: background 0.3s ease;
}

.area-item:hover {
  background: var(--primary-blue);
  color: var(--white);
}

/* ============================================
 Contact Section
 ============================================ */
.contact {
  padding: 5rem 0;
  background: var(--bg-light);
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  margin-top: 3rem;
}

.contact-card {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}

.contact-card h3 {
  color: var(--text-dark);
  margin-bottom: 1.5rem;
}

.contact-item {
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.contact-item strong {
  display: inline-block;
  min-width: 100px;
  color: var(--text-dark);
}

.contact-item a {
  color: var(--primary-blue);
  font-weight: 500;
}

.contact-item a:hover {
  text-decoration: underline;
}

/* CTA Box */
.cta-box {
  background: var(--primary-blue);
  color: var(--white);
  padding: 2rem;
  border-radius: var(--border-radius);
  text-align: center;
}

.cta-box h3 {
  color: var(--white);
  margin-bottom: 1rem;
}

.cta-box p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1.5rem;
}

.cta-box .btn {
  background: var(--white);
  color: var(--primary-blue);
}

/* Contact Form */
.contact-form {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
}

.contact-form h3 {
  color: var(--text-dark);
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
  font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-blue);
}

.form-group textarea {
  resize: vertical;
}

/* ============================================
 Footer
 ============================================ */
.footer {
  background: var(--text-dark);
  color: var(--white);
  padding: 3rem 0 1rem;
}

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

.footer-section h3,
.footer-section h4 {
  color: var(--white);
  margin-bottom: 1rem;
}

.footer-section p {
  color: rgba(255, 255, 255, 0.7);
}

.footer-section ul {
  list-style: none;
}

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

.footer-section a {
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: var(--white);
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-links a {
  font-size: 1.5rem;
  transition: transform 0.3s ease;
}

.social-links a:hover {
  transform: translateY(-3px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
}

/* ============================================
 Responsive Design
 ============================================ */
@media (max-width: 768px) {
  /* Navigation */
  .mobile-menu-toggle {
      display: flex;
  }
  
  .nav-links {
      display: none;
      position: absolute;
      top: 100%;
      left: 0;
      right: 0;
      background: var(--white);
      flex-direction: column;
      padding: 1rem;
      box-shadow: var(--shadow-md);
  }
  
  .nav-links.active {
      display: flex;
  }
  
  /* Hero */
  .hero-content {
      grid-template-columns: 1fr;
      text-align: center;
  }
  
  .hero-buttons {
      justify-content: center;
  }
  
  .trust-badges {
      justify-content: center;
  }
  
  .hero-image {
      margin-top: 2rem;
  }
  
  /* Services */
  .services-grid {
      grid-template-columns: 1fr;
  }
  
  /* Features */
  .features-grid {
      grid-template-columns: 1fr;
      gap: 2rem;
  }
  
  /* Testimonials */
  .testimonials-grid {
      grid-template-columns: 1fr;
  }
  
  /* Contact */
  .contact-content {
      grid-template-columns: 1fr;
  }
  
  .form-row {
      grid-template-columns: 1fr;
  }
  
  /* Footer */
  .footer-content {
      grid-template-columns: 1fr;
      text-align: center;
  }
  
  .social-links {
      justify-content: center;
  }
}

@media (max-width: 480px) {
  .container {
      padding: 0 15px;
  }
  
  h1 {
      font-size: 2rem;
  }
  
  h2 {
      font-size: 1.5rem;
  }
  
  .btn {
      width: 100%;
      justify-content: center;
  }
  
  .areas-grid {
      grid-template-columns: 1fr;
  }
}

/* ============================================
 Animations
 ============================================ */
@keyframes fadeIn {
  from {
      opacity: 0;
      transform: translateY(20px);
  }
  to {
      opacity: 1;
      transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

/* Smooth scrolling for all browsers */
html {
  scroll-behavior: smooth;
}

/* Focus styles for accessibility */
*:focus {
  outline: 2px solid var(--primary-blue);
  outline-offset: 2px;
}

button:focus,
a:focus {
  outline-offset: 4px;
}

/* Print styles */
@media print {
  header,
  .hero-buttons,
  .contact-form,
  .footer {
      display: none;
  }
  
  body {
      font-size: 12pt;
      color: #000;
  }
  
  a {
      color: #000;
      text-decoration: underline;
  }
}