/* Base styles for Rocky Top Rock website */

/* CSS Variables for easy theming */
:root {
  --primary: #EE6A24; /* warm landscaping orange */
  --dark: #2A2A2A;    /* charcoal */
  --gray: #6d6d6d;    /* medium gray for body text */
  --light: #F9F9F9;   /* light background */
  --white: #ffffff;
  --max-width: 1200px;
}

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

body {
  font-family: 'Montserrat', sans-serif;
  color: var(--dark);
  line-height: 1.6;
  background: var(--white);
}

/* Utility container for page content */
.container {
  width: 90%;
  max-width: var(--max-width);
  margin: 0 auto;
}

/* Navigation bar styles */
.navbar {
  /* Semi‑transparent header so the hero image shows through.  Setting
     opacity on the navbar applies to its children (logo included),
     giving the entire header a unified 50% transparency. */
  /* Use a semi‑transparent background color to keep the bar translucent
     while allowing the logo and other contents to remain fully opaque. */
  background-color: rgba(42, 42, 42, 0.5);
  padding: 0.5rem 0;
  /* Keep the nav bar fixed at the top so it floats over the hero image */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}

.navbar .container {
  /* Align logo and call‑to‑action button horizontally */
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Maintain inline block for the logo link */
.navbar .logo-link {
  display: inline-block;
}

.navbar .logo {
  height: 80px;
  width: auto;
  object-fit: contain;
}

/* Call to action button in the header */
.navbar .cta-header {
  background: var(--primary);
  color: var(--white);
  padding: 8px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s ease;
  /* Prevent the call button text from wrapping and set a base font size. */
  white-space: nowrap;
  font-size: 1rem;
}

/* Provide spacing between the call label and number inside the call button */
.navbar .cta-header .call-text {
  margin-right: 4px;
}

/* On very small screens hide the "Call Now" label in the header button
   to keep the button compact. The phone number remains visible. */
@media (max-width: 480px) {
  .navbar .cta-header .call-text {
    display: none;
  }
}

.navbar .cta-header:hover {
  background: #d95d1f;
}

/* Buttons */
.btn {
  display: inline-block;
  background: var(--primary);
  color: var(--white);
  padding: 12px 28px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s ease;
}

.btn:hover {
  background: #d95d1f;
}

/* Link buttons (less prominent) */
.btn-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.btn-link:hover {
  text-decoration: underline;
}

/* Hero section */

/* Hero section
   Use a dark overlay on top of a background image to ensure the
   headline and call‑to‑action remain legible. The image itself
   reinforces the rock and gravel delivery service while the overlay
   provides contrast. */
.hero {
  /* Layer a semi‑transparent gradient over the hero image */
  background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('assets/hero.jpg');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  color: var(--white);
  padding: 120px 0;
  text-align: center;
}

/* Landscape page hero
   Use a different background image for the landscaping & property projects page while
   retaining the same dark gradient overlay to keep text legible. */
.hero-landscape {
  background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('assets/service-landscape.jpg');
}

/* Driveways page hero
   Use a custom background image for the driveways page while keeping the dark overlay. */
.hero-driveway {
  background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('assets/hero-driveway.jpg');
}

/* Parking lots page hero
   Use a custom background image for the parking lots page with the same overlay. */
.hero-parking {
  background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('assets/hero-parking.jpg');
}

.hero h1 {
  font-size: 2.6rem;
  margin-bottom: 20px;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 30px;
  color: #e0e0e0;
}

/* Trust strip */
.trust-strip {
  background: var(--primary);
  color: var(--white);
  padding: 12px 0;
  font-size: 0.9rem;
}

.trust-strip ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  list-style: none;
}

.trust-strip li {
  font-weight: 600;
}

/* Section headings */
section {
  padding: 60px 0;
}

section h2 {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 40px;
  color: var(--dark);
}

/* Services */
.services {
  background: var(--light);
}

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

/* Service item card */
.service-item {
  flex: 1 1 280px;
  background: var(--white);
  /* Remove the large top padding since images now occupy the top */
  padding: 24px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.service-item h3 {
  color: var(--primary);
  font-size: 1.3rem;
  margin-bottom: 12px;
}

.service-item p {
  color: var(--gray);
  margin-bottom: 16px;
  flex: 1;
}

/* Who we serve */
.who-list {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
}

.who-item {
  flex: 1 1 280px;
  padding: 20px;
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.who-item h3 {
  color: var(--primary);
  margin-bottom: 12px;
  font-size: 1.4rem;
}

.who-item p {
  color: var(--gray);
}

/* --------------------------------------------------------------------------
 * Images for service and project cards
 *
 * The images at the top of each card use the golden ratio (≈1.618:1) to
 * achieve a pleasing balance between width and height. We ensure they fill
 * the card width, crop excess using object-fit: cover, and round only the
 * top corners to integrate smoothly with the card background.
 */
.service-item img {
  width: 100%;
  height: auto;
  aspect-ratio: 1.618;
  object-fit: cover;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  margin-bottom: 16px;
}

.who-item img {
  width: 100%;
  height: auto;
  aspect-ratio: 1.618;
  object-fit: cover;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  margin-bottom: 12px;
}

/* How it works */
.steps {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
}

.step {
  flex: 1 1 250px;
  text-align: center;
  padding: 20px;
}

.step span {
  display: inline-block;
  width: 50px;
  height: 50px;
  line-height: 50px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  font-weight: 700;
  margin-bottom: 12px;
  font-size: 1.2rem;
}

.step h4 {
  color: var(--dark);
  margin-bottom: 8px;
  font-size: 1.2rem;
}

.step p {
  color: var(--gray);
}

/* Testimonials */
.testimonials {
  background: var(--light);
}

.testimonial-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 800px;
  margin: 0 auto;
}

.testimonial {
  background: var(--white);
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  font-style: italic;
  color: var(--gray);
}

/* Service area */
.service-area {
  text-align: center;
}

.service-area p {
  max-width: 700px;
  margin: 0 auto;
  color: var(--gray);
  margin-bottom: 20px;
}

/* Final CTA */
.final-cta {
  background: var(--dark);
  color: var(--white);
  text-align: center;
  padding: 60px 20px;
}

.final-cta h3 {
  font-size: 2rem;
  margin-bottom: 20px;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
}

/* Footer */
footer {
  background: var(--dark);
  color: var(--white);
  text-align: center;
  padding: 20px;
  font-size: 0.9rem;
}

/* Lead capture section styles */
.lead-capture {
  background: var(--light);
  padding: 60px 20px;
  text-align: center;
}

.lead-capture h2 {
  font-size: 2rem;
  margin-bottom: 16px;
  color: var(--dark);
}

.lead-capture p {
  color: var(--gray);
  margin-bottom: 24px;
}

/* Form container */
.quote-form {
  max-width: 600px;
  margin: 0 auto;
  display: grid;
  gap: 16px;
}

.quote-form input,
.quote-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
}

.quote-form textarea {
  resize: vertical;
  min-height: 120px;
}

.quote-form button {
  background: var(--primary);
  color: var(--white);
  border: none;
  padding: 12px 20px;
  border-radius: 5px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

.quote-form button:hover {
  background: #d95d1f;
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }
  .hero p {
    font-size: 1rem;
  }
  .service-list, .who-list, .steps {
    flex-direction: column;
  }
  .service-item, .who-item, .step {
    flex: 1 1 100%;
  }

  /*
   * On tablets and smaller screens the navigation bar logo should shrink so it doesn't
   * overwhelm the limited header space. Adjust the height of the logo for better
   * balance on devices under 768px wide. Because the logo's width is auto
   * and it uses object-fit: contain, scaling the height preserves aspect ratio.
   */
  .navbar .logo {
    height: 60px;
  }

  /* Reduce the CTA button font size and padding on tablets and smaller screens */
  .navbar .cta-header {
    font-size: 0.75rem;
    padding: 6px 14px;
  }
}

/*
 * Further reduce the logo size on very small screens (e.g. mobile phones).
 * When the viewport is less than 480px wide, the header bar has even less
 * vertical space, so we decrease the logo height to 50px. This ensures
 * the navigation remains compact while keeping the logo legible.
 */
@media (max-width: 480px) {
  .navbar .logo {
    height: 50px;
  }

  /* Further reduce the CTA button size on very small phones */
  .navbar .cta-header {
    font-size: 0.65rem;
    padding: 4px 10px;
  }
}