/* =============================================================
   Ngwino Car Doctor — Stylesheet
   Mobile-first layout using Flexbox & CSS Grid, with breakpoints
   for tablets (768px) and desktops (1024px).
   ============================================================= */

/* ----- Reset & Base ----- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, sans-serif;
  background-color: #f8f8f8;
  color: #333;
  line-height: 1.6;
}

h1, h2, h3 {
  color: #333;
  line-height: 1.3;
  margin-bottom: 0.6em;
}

p {
  color: #666;
  margin-bottom: 1em;
}

a {
  color: #007bff;
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

img {
  max-width: 100%;
  display: block;
}

ul {
  list-style: none;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

section {
  padding: 50px 0;
}

section h2 {
  text-align: center;
  font-size: 1.8rem;
  margin-bottom: 0.4em;
}

.section-intro {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 2em auto;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background-color: #007bff;
  color: #fff;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: #0060cc;
  text-decoration: none;
}

.section-cta {
  text-align: center;
  margin-top: 2em;
}

/* ----- Header ----- */
.site-header {
  background-color: #285A8C;
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 15px;
  padding-bottom: 15px;
  flex-wrap: wrap;
}

.shop-name {
  font-size: 1.4rem;
  font-weight: bold;
  color: #fff;
}

/* Hamburger button, hidden on desktop via media query below */
.menu-toggle {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
}

/* Nav is collapsed by default on mobile; JS toggles the .open class */
.main-nav {
  flex-basis: 100%;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.main-nav.open {
  max-height: 300px;
}

.nav-list {
  display: flex;
  flex-direction: column;
  padding-top: 10px;
}

.nav-list li {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.nav-link {
  display: block;
  padding: 12px 0;
  color: #fff;
}

.nav-link:hover,
.nav-link:focus {
  color: #f8f8f8;
  text-decoration: underline;
}

/* ----- Hero ----- */
.hero {
  background-image: linear-gradient(rgba(40, 90, 140, 0.75), rgba(40, 90, 140, 0.75)), url("images/hero-background.jpg");
  background-size: cover;
  background-position: center;
  color: #fff;
}

.hero-overlay {
  padding: 80px 0;
}

.hero-content {
  text-align: center;
}

.hero h1 {
  color: #fff;
  font-size: 1.8rem;
}

.hero .tagline {
  color: #f0f0f0;
  font-size: 1.1rem;
  margin-bottom: 1.5em;
}

/* ----- Intro / Key Strengths ----- */
.intro {
  background-color: #fff;
}

.key-strengths {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 2em;
}

.strength-card {
  background-color: #f8f8f8;
  border-left: 4px solid #007bff;
  padding: 20px;
  border-radius: 4px;
}

/* ----- Services ----- */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 25px;
}

.service-card {
  background-color: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.service-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background-color: #ddd;
}

.service-card h3,
.service-card p {
  padding-left: 18px;
  padding-right: 18px;
}

.service-card h3 {
  margin-top: 18px;
}

.service-card p {
  padding-bottom: 18px;
}

/* ----- About ----- */
.about {
  background-color: #fff;
}

.testimonials {
  margin-top: 2.5em;
}

.testimonials h3 {
  text-align: center;
  margin-bottom: 1em;
}

.testimonial-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.testimonial-card {
  background-color: #f8f8f8;
  padding: 20px;
  border-radius: 4px;
  font-style: italic;
}

.testimonial-card cite {
  display: block;
  margin-top: 10px;
  font-style: normal;
  font-weight: bold;
  color: #333;
}

/* ----- Portfolio ----- */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.portfolio-item img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  background-color: #ddd;
  border-radius: 4px;
}

/* ----- Contact ----- */
.contact {
  background-color: #fff;
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

.emergency-banner {
  background-color: #285A8C;
  color: #fff;
  padding: 12px 18px;
  border-radius: 4px;
  font-weight: bold;
  margin-bottom: 1.2em;
}

.contact-details li {
  margin-bottom: 0.6em;
  color: #333;
}

.form-note {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 1.2em;
}

.contact-form .form-group {
  margin-bottom: 18px;
}

.contact-form label {
  display: block;
  font-weight: bold;
  margin-bottom: 6px;
}

.required {
  color: #c0392b;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: inherit;
  font-size: 1rem;
}

.contact-form input.input-error,
.contact-form textarea.input-error {
  border-color: #c0392b;
}

.error-message {
  display: block;
  color: #c0392b;
  font-size: 0.85rem;
  margin-top: 4px;
  min-height: 1.1em;
}

.form-success {
  color: #1e7e34;
  font-weight: bold;
  margin-top: 15px;
}

/* ----- Footer ----- */
.site-footer {
  background-color: #285A8C;
  color: #fff;
  padding: 30px 0;
}

.footer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

.footer-links a {
  color: #f0f0f0;
}

.footer-links a:hover,
.footer-links a:focus {
  color: #fff;
}

/* =============================================================
   Tablet breakpoint (768px+)
   ============================================================= */
@media (min-width: 768px) {
  .key-strengths {
    grid-template-columns: repeat(3, 1fr);
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .testimonial-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .portfolio-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero h1 {
    font-size: 2.3rem;
  }

  .footer-container {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* =============================================================
   Desktop breakpoint (1024px+)
   ============================================================= */
@media (min-width: 1024px) {
  /* Hamburger hidden, nav shown inline */
  .menu-toggle {
    display: none;
  }

  .main-nav {
    flex-basis: auto;
    max-height: none;
    overflow: visible;
  }

  .nav-list {
    flex-direction: row;
    padding-top: 0;
  }

  .nav-list li {
    border-top: none;
    margin-left: 25px;
  }

  .nav-link {
    padding: 0;
  }

  .hero h1 {
    font-size: 2.8rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
  }

  .contact-layout {
    grid-template-columns: 1fr 2fr;
  }
}
