/*
 * Global stylesheet for DFW Garage Pros
 *
 * This file defines the typography, colour palette and layout rules used
 * across all pages of the site. The palette uses soothing, warm tones
 * inspired by 2025 design trends and plenty of whitespace for a
 * clean, uncluttered layout. Bold headings employ expressive typefaces
 * to capture attention while keeping the overall design minimal.
 */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Open Sans', sans-serif;
  background-color: var(--light-color);
  color: var(--text-dark);
  line-height: 1.6;
}

/* Colour palette */
:root {
  --primary-color: #2a3c41;      /* deep teal */
  --secondary-color: #a67b5b;    /* mocha brown */
  --accent-color: #7c9473;       /* muted sage green */
  --light-color: #f7f4f0;        /* off white */
  --dark-color: #1e1e1e;         /* dark tone */
  --text-dark: #333333;          /* primary text */
  --text-light: #f7f7f7;         /* text on dark backgrounds */
  --max-width: 1100px;
  --border-radius: 8px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  line-height: 1.3;
  color: var(--primary-color);
}
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; margin-bottom: 1rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }
p { margin-bottom: 1rem; color: var(--text-dark); font-size: 1rem; }
a { color: var(--primary-color); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  width: 90%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

/* Top bar */
.top-bar {
  background-color: var(--primary-color);
  color: var(--text-light);
  font-size: 0.9rem;
}
.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
}
.top-bar .logo {
  font-weight: 700;
  letter-spacing: 1px;
}
.top-bar .contact-info a {
  color: var(--text-light);
  margin-left: 1rem;
  display: inline-flex;
  align-items: center;
}
.top-bar .contact-info i { margin-right: 0.25rem; }

/* Navigation */
.navbar {
  background-color: var(--light-color);
  border-bottom: 1px solid #ddd;
  position: sticky;
  top: 0;
  z-index: 999;
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 0;
}
.nav-brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}
.nav-menu {
  list-style: none;
  display: flex;
  align-items: center;
}
.nav-menu li { margin-left: 1.5rem; }
.nav-menu a {
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
  color: var(--primary-color);
  transition: color 0.3s ease;
}
.nav-menu a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0%;
  height: 2px;
  background-color: var(--secondary-color);
  transition: width 0.3s ease;
}
.nav-menu a:hover::after,
.nav-menu a.active::after { width: 100%; }
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle .hamburger,
.nav-toggle .hamburger::before,
.nav-toggle .hamburger::after {
  content: '';
  display: block;
  height: 2px;
  width: 100%;
  background-color: var(--primary-color);
  transition: all 0.3s ease;
  border-radius: 2px;
}
.nav-toggle .hamburger::before { transform: translateY(-6px); }
.nav-toggle .hamburger::after { transform: translateY(4px); }

/* Transform hamburger into an 'X' when active */
.nav-toggle.active .hamburger {
  transform: rotate(45deg);
}
.nav-toggle.active .hamburger::before {
  transform: rotate(-90deg) translateX(-6px);
}
.nav-toggle.active .hamburger::after {
  opacity: 0;
}

/* Hero section */
.hero {
  position: relative;
  background-image: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('images/hero.jpg');
  background-size: cover;
  background-position: center;
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 70vh;
  text-align: center;
}
.hero-content {
  max-width: 800px;
  padding: 1rem;
}
.hero h1 {
  font-size: 3rem;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 1rem;
}
.hero p {
  font-size: 1.2rem;
  color: var(--text-light);
  margin-bottom: 2rem;
}
.btn-primary {
  display: inline-block;
  background-color: var(--secondary-color);
  color: var(--text-light);
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  transition: background-color 0.3s ease;
}
.btn-primary:hover {
  background-color: var(--primary-color);
}

/* Sections */
section { padding: 4rem 0; }
.section-alt {
  background-image: url('images/background.jpg');
  background-size: cover;
  background-position: center;
  color: var(--text-light);
}

/* Make headings and paragraphs within alternate sections white for better contrast */
.section-alt h2,
.section-alt h3,
.section-alt h4,
.section-alt p {
  color: var(--text-light);
}

/* Services overview */
.services-overview h2 { text-align: center; margin-bottom: 2rem; }
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 2rem;
}
.service-card {
  background-color: var(--light-color);
  border-radius: var(--border-radius);
  padding: 2rem;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
}
.service-card:hover { transform: translateY(-5px); }
.service-card svg {
  width: 40px;
  height: 40px;
  fill: var(--secondary-color);
  margin-bottom: 1rem;
}

/* Reasons / Why choose us */
.reasons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}
.reason {
  background-color: var(--light-color);
  border-radius: var(--border-radius);
  padding: 2rem;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* In alternate coloured sections, reason cards should be semi‑transparent and white text */
.section-alt .reason {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--text-light);
  box-shadow: none;
}
.section-alt .reason h3 {
  color: var(--text-light);
}
.section-alt .reason svg {
  fill: var(--secondary-color);
}
.reason h3 { margin-bottom: 0.5rem; }

/* Size and colour for icons in the reasons section */
.reason svg {
  width: 40px;
  height: 40px;
  fill: var(--secondary-color);
  margin-bottom: 1rem;
}

/* Testimonials */
.testimonials {
  background-color: var(--primary-color);
  color: var(--text-light);
}
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}
.testimonial {
  background-color: rgba(255,255,255,0.1);
  border-radius: var(--border-radius);
  padding: 2rem;
  position: relative;
}
.testimonial::before {
  content: "\201C";
  font-size: 4rem;
  position: absolute;
  top: -20px;
  left: 10px;
  color: var(--secondary-color);
}
.testimonial p { font-style: italic; }
.testimonial .author {
  margin-top: 1rem;
  font-weight: 600;
}

/* Footer */
footer {
  background-color: var(--primary-color);
  color: var(--text-light);
  padding: 2rem 0;
}
footer .footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}
footer h4 {
  color: var(--secondary-color);
  margin-bottom: 1rem;
}
footer a {
  color: var(--text-light);
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}
footer a:hover { text-decoration: underline; }
footer .rights {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.85rem;
}

/* Contact form */
.contact-form {
  background-color: var(--light-color);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.contact-form label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--primary-color);
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1.5rem;
  border: 1px solid #ccc;
  border-radius: var(--border-radius);
  font-family: inherit;
  font-size: 1rem;
}
.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}
.contact-form button {
  display: inline-block;
  background-color: var(--secondary-color);
  color: var(--text-light);
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.3s ease;
}
.contact-form button:hover {
  background-color: var(--primary-color);
}

/* Responsive navigation */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--light-color);
    flex-direction: column;
    width: 200px;
    max-height: 0;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    transition: max-height 0.3s ease;
  }
  .nav-menu.open { max-height: 500px; }
  .nav-menu li {
    margin: 0;
    border-bottom: 1px solid #ddd;
  }
  .nav-menu a {
    padding: 0.75rem 1rem;
    display: block;
  }
}

/* Smaller devices adjustments */
@media (max-width: 600px) {
  .hero { height: 60vh; }
  .hero h1 { font-size: 2.2rem; }
  .hero p { font-size: 1rem; }
  section { padding: 3rem 0; }
}