/* Basic Reset & Body Styles */
:root {
  /* Top Grade Plumbing Brand Colors */
  --primary-brand-blue: #2D5C9A; /* Darker blue from logo */
  --secondary-brand-blue: #3C71BB; /* Lighter blue from logo */
  --primary-accent-grey: #58595B; /* NEW ACCENT COLOR: Dark grey from logo */
  --dark-hover-grey: #3A3A3A; /* Slightly darker grey for hover states, close to black */
  --background-light-blue: #E8F2FF; /* Very light blue for alternating sections */

  /* General Text Colors */
  --text-dark: #333;
  --text-medium: #555;
  --text-light: #666;
  --text-lighter: #ccc;
  --text-footer: #bbb;
  --text-black: #000000; /* Pure black for specific high-contrast text if needed */
}

body {
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: #f4f4f4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 0;
}

/* Header */
header {
  background-color: var(--primary-brand-blue);
  color: #fff;
  padding: 10px 0;
  border-bottom: 5px solid var(--primary-accent-grey); /* NEW ACCENT: Grey */
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.logo img {
  height: 50px;
  vertical-align: middle;
}

header nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

header nav ul li {
  display: inline;
  margin-left: 20px;
}

header nav a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

header nav a:hover {
  color: var(--primary-accent-grey); /* NEW ACCENT: Grey on hover */
}

.contact-header {
  display: flex;
  align-items: center;
  gap: 15px;
}

.contact-header .phone-number {
  color: #fff;
  font-size: 1.2em;
  font-weight: bold;
  text-decoration: none; /* Keep this for the default state (no underline) */
  white-space: nowrap;
  transition: font-size 0.3s ease, text-decoration 0.3s ease; /* Add transition for smooth effect */
}

/* Add a new rule for the hover state */
.contact-header .phone-number:hover {
  font-size: 1.3em; /* Slightly bigger on hover, adjust as needed */
  text-decoration: underline; /* Underline on hover */
}

.button {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  text-align: center;
  transition: background-color 0.3s ease, transform 0.2s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  background-color: var(--primary-accent-grey); /* NEW ACCENT: Grey */
  color: #fff;
  border: none;
}

.button.primary:hover {
  background-color: var(--dark-hover-grey); /* Darker grey for hover */
}

.button.secondary {
  background-color: var(--secondary-brand-blue); /* Lighter Brand Blue */
  color: #fff;
  border: 2px solid var(--secondary-brand-blue);
}

.button.secondary:hover {
  background-color: #0056b3; /* Slightly darker shade for hover */
  border-color: #0056b3;
}

/* Hero Section */
.hero {
  background: #fff url('../images/plumbing-bg.jpg') no-repeat center center/cover;
  color: var(--primary-brand-blue);
  text-align: center;
  padding: 80px 20px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.85);
  z-index: 1;
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: 3em;
  margin-bottom: 20px;
  color: var(--primary-brand-blue);
  line-height: 1.2;
}

.hero p {
  font-size: 1.3em;
  margin-bottom: 30px;
  color: var(--text-medium);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.hero-ctas .button {
  margin: 0 10px;
  font-size: 1.1em;
  padding: 12px 25px;
}

/* General Section Styling */
section {
  padding: 60px 0;
  margin-bottom: 20px;
  background-color: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  border-radius: 8px;
}

section:nth-of-type(even) {
  background-color: var(--background-light-blue);
}

section h2 {
  text-align: center;
  font-size: 2.5em;
  color: var(--primary-brand-blue);
  margin-bottom: 30px;
  position: relative;
  padding-bottom: 15px;
}

section h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: var(--primary-accent-grey); /* NEW ACCENT: Grey */
  border-radius: 2px;
}

/* Services Overview */
.service-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  text-align: center;
}

.service-item {
  background-color: #fff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.service-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.service-item img {
  height: 80px;
  margin-bottom: 20px;
}

.service-item h3 {
  color: var(--primary-brand-blue);
  font-size: 1.6em;
  margin-bottom: 15px;
}

.service-item p {
  font-size: 1em;
  color: var(--text-light);
}

/* Why Choose Us */
.why-choose-us ul {
  list-style: none;
  padding: 0;
  margin: 0 0 40px 0;
}

.why-choose-us ul li {
  /* Using the lighter brand blue for the SVG checkmark */
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="%233C71BB"><path d="M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"/></svg>') no-repeat left 8px;
  background-size: 24px 24px;
  padding-left: 40px;
  margin-bottom: 20px;
  font-size: 1.2em;
  color: var(--text-dark);
}

.why-choose-us strong {
  color: var(--primary-brand-blue);
}

.testimonials {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
}

.testimonials blockquote {
  background-color: var(--background-light-blue);
  border-left: 5px solid var(--secondary-brand-blue);
  padding: 25px;
  margin: 0;
  font-style: italic;
  font-size: 1.1em;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  flex: 1;
  min-width: 300px;
}

.testimonials cite {
  display: block;
  text-align: right;
  margin-top: 15px;
  font-weight: bold;
  color: var(--text-medium);
}

/* Service Area */
.service-area ul {
  list-style: none;
  padding: 0;
  text-align: center;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.service-area ul li {
  background-color: #f0f0f0;
  padding: 10px 20px;
  margin: 5px;
  border-radius: 20px;
  font-size: 1em;
  color: var(--text-medium);
  border: 1px solid #ddd;
  transition: background-color 0.3s ease;
}

.service-area ul li:hover {
  background-color: #e0e0e0;
}

/* Final CTA */
.final-cta {
  text-align: center;
  background-color: var(--primary-brand-blue);
  color: #fff;
  padding: 60px 20px;
  border-radius: 8px;
  margin-top: 40px;
}

.final-cta h2 {
  color: #fff;
  margin-bottom: 25px;
}

.final-cta p {
  font-size: 1.3em;
  margin-bottom: 35px;
}

.final-cta .button.large {
  font-size: 1.6em;
  padding: 15px 35px;
  margin-bottom: 25px;
}

.final-cta .phone-number-large {
  color: #fff;
  font-size: 2.2em;
  font-weight: bold;
  text-decoration: none;
  display: block;
  margin-top: 20px;
  transition: color 0.3s ease;
}

.final-cta .phone-number-large:hover {
  color: black;
}

/* Footer */
footer {
  background-color: var(--primary-accent-grey); /* Using the brand grey for the footer background */
  color: var(--text-lighter);
  padding: 40px 0;
  text-align: center;
}

footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  align-items: flex-start;
  gap: 30px;
}

.footer-info {
  flex-basis: 300px;
  text-align: left;
}
.footer-info img {
  height: 45px;
  margin-bottom: 15px;
  display: block;
}

.footer-info p,
.footer-nav li {
  margin-bottom: 8px;
  font-size: 0.95em;
  color: var(--text-footer);
}

.footer-info a {
  color: var(--secondary-brand-blue); /* Using secondary blue for footer links for slight contrast */
  text-decoration: none;
  transition: color 0.3s ease;
}
.footer-info a:hover {
  color: #fff;
}

.footer-nav ul {
  list-style: none;
  padding: 0;
  text-align: left;
}

.footer-nav a {
  color: var(--text-lighter);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: var(--secondary-brand-blue); /* Secondary blue on hover for footer nav */
}

.social-links {
  flex-basis: 150px;
  text-align: right;
}
.social-links img {
  height: 30px;
  margin-left: 10px;
}

.copyright {
  width: 100%;
  text-align: center;
  margin-top: 30px;
  font-size: 0.85em;
  color: #fff;
  border-top: 1px solid #444;
  padding-top: 20px;
}

/* Contact Page Specific Styles */
.contact-hero {
  background-color: var(--secondary-brand-blue);
  color: #fff;
  text-align: center;
  padding: 60px 20px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  margin-bottom: 40px;
  border-radius: 0 0 8px 8px;
}

.contact-hero h1 {
  color: #fff;
  font-size: 3em;
  margin-bottom: 15px;
}

.contact-hero p {
  font-size: 1.3em;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* --- REFACTORED CONTACT DETAILS CSS --- */
.contact-details .container {
  display: flex;
  flex-wrap: wrap; /* Allows items to wrap to the next line */
  gap: 2.5rem; /* Use rem for responsive spacing, approx 40px */
  justify-content: center; /* Centers items when there's space */
  align-items: flex-start;
  padding: 0 1rem; /* Add some horizontal padding to the container itself */
}

.contact-info,
.contact-form {
  /* Use flex-basis for initial sizing, allowing it to grow and shrink */
  flex-basis: calc(50% - 1.25rem); /* Roughly 50% minus half the gap */
  flex-grow: 1; /* Allows them to grow to fill available space */
  flex-shrink: 1; /* Allows them to shrink if necessary */

  /* Instead of a fixed min-width in px, use a flexible value */
  min-width: 280px; /* A minimum practical width for content readability */
  max-width: 600px; /* Optional: Prevents them from becoming too wide on very large screens when stacked */

  padding: 2rem; /* Use rem for responsive padding, approx 32px */
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  box-sizing: border-box; /* Ensures padding is included in the element's total width/height */
}

.contact-info h2, .contact-form h2 {
  font-size: 2.2em;
  color: var(--primary-brand-blue);
  margin-bottom: 1.5rem; /* Use rem for responsive margin */
  text-align: left;
  padding-bottom: 0.625rem; /* Use rem for responsive padding */
}
.contact-info h2::after, .contact-form h2::after {
  left: 0;
  transform: translateX(0);
}

.contact-info p {
  margin-bottom: 0.75rem; /* Use rem for responsive margin */
  font-size: 1.1em;
}

.contact-info strong {
  color: var(--primary-brand-blue);
}

.contact-info a {
  color: var(--secondary-brand-blue);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.contact-info a:hover {
  color: var(--primary-accent-grey); /* NEW ACCENT: Grey on hover */
}

.contact-info h3 {
  color: var(--primary-brand-blue);
  font-size: 1.5em;
  margin-top: 1.875rem; /* Use rem for responsive margin */
  margin-bottom: 0.9375rem; /* Use rem for responsive margin */
}

.contact-form form p {
  margin-bottom: 1.25rem; /* Use rem for responsive margin */
}

.contact-form label {
  display: block;
  margin-bottom: 0.5rem; /* Use rem for responsive margin */
  font-weight: bold;
  color: var(--text-medium);
  font-size: 1em;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 0.75rem; /* Use rem for responsive padding */
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1em;
  box-sizing: border-box; /* Crucial for preventing overflow with padding */
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: var(--secondary-brand-blue);
  outline: none;
  box-shadow: 0 0 0 3px rgba(60, 113, 187, 0.2);
}

.contact-form textarea {
  resize: vertical;
  min-height: 6.25rem; /* Use rem for responsive min-height */
}

.contact-form button[type="submit"] {
  background-color: var(--primary-brand-blue);
  color: #fff;
  padding: 0.875rem 1.875rem; /* Use rem for responsive padding */
  border: none;
  border-radius: 5px;
  font-size: 1.2em;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}

.contact-form button[type="submit"]:hover {
  background-color: #1a416b;
  transform: translateY(-2px);
  box-shadow: 0 5px 12px rgba(0,0,0,0.3);
}

.contact-form .hidden {
  display: none;
}

.service-area-map {
  text-align: center;
  padding-top: 2.5rem; /* Use rem */
  padding-bottom: 3.75rem; /* Use rem */
}

.service-area-map iframe {
  width: 100%;
  max-width: 900px; /* Keep this max-width, or consider em/rem if needed */
  height: 500px; /* This height can be adjusted for responsiveness, see below */
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}
/* --- END REFACTORED CONTACT DETAILS CSS --- */

/* Responsive Design */
@media (max-width: 992px) {
  .hero h1 {
    font-size: 2.5em;
  }
  .hero p {
    font-size: 1.1em;
  }
  section h2 {
    font-size: 2em;
  }
  .service-list {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
  .why-choose-us ul li {
    font-size: 1.1em;
  }
}

@media (max-width: 768px) {
  header .container {
    flex-direction: column;
    text-align: center;
  }

  header nav ul {
    margin-top: 15px;
  }

  header nav ul li {
    display: block;
    margin: 10px 0;
  }

  .contact-header .phone-number {
    margin-bottom: 5px;
    font-size: 1.1em; /* This is your base font size for smaller screens */
    /* Ensure transition is also here if you want it to apply */
    transition: font-size 0.3s ease, text-decoration 0.3s ease;
  }

  /* Add the hover rule within this media query for consistency */
  .contact-header .phone-number:hover {
    font-size: 1.2em; /* Slightly bigger than 1.1em base on hover for smaller screens */
    text-decoration: underline;
  }

  .hero {
    padding: 60px 20px;
  }
  .hero h1 {
    font-size: 2em;
  }
  .hero p {
    font-size: 1em;
  }
  .hero-ctas .button {
    display: block;
    margin: 10px auto;
    font-size: 1em;
    padding: 10px 20px;
  }

  section {
    padding: 40px 0;
  }
  section h2 {
    font-size: 1.8em;
  }

  .service-list {
    grid-template-columns: 1fr;
  }

  .why-choose-us ul li {
    font-size: 1em;
    padding-left: 35px;
    background-size: 20px 20px;
  }

  .final-cta {
    padding: 40px 20px;
  }
  .final-cta h2 {
    font-size: 1.8em;
  }
  .final-cta p {
    font-size: 1em;
  }
  .final-cta .button.large {
    font-size: 1.3em;
    padding: 12px 25px;
  }
  .final-cta .phone-number-large {
    font-size: 1.8em;
  }

  footer .container {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }
  .footer-info, .footer-nav, .social-links {
    width: 100%;
    text-align: center;
  }
  .footer-info img {
    margin: 0 auto 15px auto;
  }
  .footer-nav ul {
    text-align: center;
  }

  .contact-hero h1 {
    font-size: 2.5em;
  }
  .contact-hero p {
    font-size: 1.1em;
  }
  .contact-details .container {
    flex-direction: column; /* Stack columns on smaller screens */
    gap: 1.5rem; /* Adjust gap when stacked */
  }
  .contact-info, .contact-form {
    /* Remove flex-basis here, let them take full width */
    flex-basis: auto;
    width: 100%; /* Ensure they take full width in column layout */
    max-width: 100%; /* Ensure they don't exceed 100% of parent */
    padding: 1.5rem; /* Slightly reduce padding on smaller screens */
  }
  .contact-info h2, .contact-form h2 {
    font-size: 1.8em;
    text-align: center;
    margin-bottom: 1rem;
  }
  .contact-info h2::after, .contact-form h2::after {
    left: 50%;
    transform: translateX(-50%);
  }
  .service-area-map iframe {
    height: 300px; /* Adjust height for smaller screens */
  }
}

/* Optional: Even smaller screens, if needed */
@media (max-width: 480px) {
  .contact-info, .contact-form {
    padding: 1rem; /* Further reduce padding on very small screens */
  }
  .contact-info h2, .contact-form h2 {
    font-size: 1.6em; /* Smaller headings */
  }
  .contact-info p, .contact-form label, .contact-form input, .contact-form select, .contact-form textarea, .contact-form button {
    font-size: 0.95em; /* Slightly smaller text for better fit */
  }
}
