/*
 * Eagle Dispatchers Website Style Sheet
 *
 * This stylesheet defines the colours, fonts and layout used throughout the
 * Eagle Dispatchers website.  The design is purposefully clean and modern
 * with generous white‑space, rounded corners and a clear hierarchy of
 * information.  All colours are derived from the company logo – a deep
 * navy and a bright red – and are exposed as CSS variables to make global
 * changes easy.  Media queries are used to ensure the layout adapts
 * gracefully to smaller devices.
 */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* Colour palette derived from the provided logo */
:root {
  --primary: #0a1f44;      /* dark navy for headings and navigation */
  --accent: #e32636;       /* vivid red for buttons and highlights */
  --bg-light: #f7f9fc;     /* very light grey background */
  --text-dark: #2e3a59;    /* dark grey for body text */
  --text-muted: #6c7a9a;   /* muted grey for secondary text */
  --border-radius: 0.5rem;
  --transition-speed: 0.3s;
}

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

body {
  font-family: 'Poppins', sans-serif;
  color: var(--text-dark);
  /* Apply a subtle overlay on top of the background image to maintain text readability */
  /* Reduce the opacity of the overlay even further so the background image is more visible */
  background: linear-gradient(rgba(255,255,255,0.6), rgba(255,255,255,0.6)), url('images/background.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  /* Keep the background image fixed while scrolling */
  background-attachment: fixed;
  line-height: 1.6;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-speed);
}
a:hover {
  color: var(--accent);
}

/* Container helpers */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 0;
}

/* Header and Navigation */
header {
  background-color: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
  /* Reduce the white bar so it consumes only about 15% of the viewport.
   * Hide overflow to ensure the entire logo sits within this space.
   */
  height: 15vh;
  overflow: hidden;
}
.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* Reduce vertical padding so the header’s white bar stays under
   * 15% of the viewport height. */
  padding: 0.5rem 0;
  /* Establish a positioning context for the logo. */
  position: relative;
  height: 100%;
}
/* Display the logo fully within the header.  Set its height to
 * approximately two-thirds of the header height so the entire
 * image is visible without overflowing.  Use a small left margin
 * so the logo starts near the left edge but not flush against it.
 */
.nav-logo img {
  height: 40vh;
  position: relative;
  margin-left: 1vw;
  top: 0;
  left: 0;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.nav-links a {
  font-weight: 500;
}
.btn-primary {
  background-color: var(--accent);
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background-color var(--transition-speed);
}
.btn-primary:hover {
  background-color: #c71d2e;
}

/* Mobile navigation toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
}
.nav-toggle span {
  width: 25px;
  height: 3px;
  background-color: var(--primary);
  margin-bottom: 4px;
  transition: transform var(--transition-speed);
}

/* Hero section */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 80vh;
  gap: 2rem;
}
.hero .hero-text {
  flex: 1;
}
.hero h1 {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 1rem;
}
.hero p {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.hero .hero-actions {
  display: flex;
  gap: 1rem;
}

/* Hide the call-now button on larger screens */
.call-now {
  display: none;
}

/* Responsive layout adjustments for hero actions on mobile */
@media (max-width: 768px) {
  .hero .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }
  /* Show call button only on mobile */
  .call-now {
    display: inline-block;
  }
  /* Optional: adjust spacing of buttons on mobile */
  .hero .hero-actions .btn-primary {
    width: fit-content;
  }
}
.hero .hero-image {
  flex: 1;
  height: 450px;
  background-size: cover;
  background-position: center;
  border-radius: var(--border-radius);
}

/* Features / Why choose us */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}
.feature {
  background-color: #ffffff;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  text-align: center;
}
.feature i {
  font-size: 2.5rem;
  color: var(--accent);
  margin-bottom: 1rem;
}
.feature h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
}
.feature p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Services grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}
.service {
  background-color: #ffffff;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
}
.service img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.service-content {
  padding: 1.5rem;
  flex: 1;
}
.service-content h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
}
.service-content p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* How it works */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}
.step {
  text-align: center;
}
.step-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.step h4 {
  font-size: 1.1rem;
  color: var(--primary);
  margin-bottom: 0.3rem;
}
.step p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Testimonials */
.testimonials {
  margin-top: 3rem;
}
.testimonial {
  background-color: #ffffff;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  margin-bottom: 2rem;
}
.testimonial p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.testimonial .author {
  font-weight: 600;
  color: var(--primary);
}

/* Form styling */
form {
  display: grid;
  gap: 1rem;
}
form label {
  font-weight: 500;
  color: var(--primary);
}
form input,
form select,
form textarea {
  padding: 0.75rem;
  border: 1px solid #dce0e8;
  border-radius: var(--border-radius);
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition-speed);
}
form input:focus,
form select:focus,
form textarea:focus {
  border-color: var(--accent);
}
form textarea {
  resize: vertical;
  min-height: 120px;
}
form .file-input {
  display: flex;
  flex-direction: column;
}
form .file-input input[type="file"] {
  padding: 0.5rem 0;
}

/* Footer */
footer {
  background-color: var(--primary);
  color: #ffffff;
  padding: 2rem 0;
}
.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}
.footer-content h4 {
  margin-bottom: 1rem;
  font-size: 1.1rem;
}
.footer-content ul li {
  list-style: none;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}
.footer-content a {
  color: #ffffff;
}
.footer-bottom {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 1rem;
}

/* Responsive styles */
@media (max-width: 768px) {
  .hero {
    flex-direction: column-reverse;
    text-align: center;
  }
  .hero .hero-image {
    height: 300px;
    margin-bottom: 1rem;
  }
  /* Allow the mobile menu to drop down below the header without being
   * clipped.  The header’s overflow is reset and the menu is
   * positioned directly below the nav wrapper. */
  header {
    overflow: visible;
  }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #ffffff;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: none;
  }
  .nav-links.active {
    display: flex;
  }
  .nav-toggle {
    display: flex;
  }
  .features {
    grid-template-columns: 1fr;
  }
  .services-grid {
    grid-template-columns: 1fr;
  }
  .footer-content {
    grid-template-columns: 1fr;
  }

  /* On smaller screens, reduce the logo height and remove the left margin
   * so the navigation layout remains usable. */
  .nav-logo img {
    /* On smaller screens, scale the logo to occupy less vertical space
     * while staying fully visible within the header. */
    height: 15vh;
    top: 0;
    margin-left: 1vw;
  }
}