.hero-section {
  position: relative;
  width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  height: 400px;
  background-image: url('/assets/images/hero.jpg');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.2);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1170px;
  padding: 0 30px;
  width: 100%;
}

.hero-content h1 {
  font-size: 60px;
  font-weight: 500;
  margin: 0 0 10px 0;
  line-height: 1.2;
  font-family: 'Raleway', Arial, Helvetica, sans-serif;
}

.hero-content h2 {
  font-size: 22px;
  font-weight: 500;
  margin: 0;
  line-height: 1.2;
  font-family: 'Raleway', Arial, Helvetica, sans-serif;
  opacity: 1 !important;
  color: white !important;
}

@media (max-width: 768px) {
  .hero-section {
    height: 300px;
  }

  .hero-content h1 {
    font-size: 36px;
  }

  .hero-content h2 {
    font-size: 18px;
  }

  .hero-content {
    padding: 0 20px;
  }
}

@media (max-width: 480px) {
  .hero-section {
    height: 250px;
  }

  .hero-content h1 {
    font-size: 28px;
  }

  .hero-content h2 {
    font-size: 16px;
  }
}

/* About Section - Clean and Optimized */
.about-section {
  padding: 150px 0 105px 0;
  background-color: #ffffff;
}

.container {
  max-width: 1170px;
  margin: 0 auto;
  padding: 0 30px;
}

.about-grid {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  align-items: flex-start;
}

.about-item {
  flex: 1;
  padding: 0;
  min-width: 0; /* Prevent flex items from overflowing */
  display: flex;
  flex-direction: column;
}

.about-item:first-child {
  flex: 0 0 25%;
  max-width: 25%;
}

.about-item:nth-child(2) {
  flex: 0 0 35%;
  max-width: 35%;
}

.about-item:last-child {
  flex: 0 0 35%;
  max-width: 35%;
}

.about-item h2 {
  font-size: 36px;
  font-weight: 500;
  margin: 0 0 35px 0;
  font-family: 'Raleway', Arial, Helvetica, sans-serif;
  color: #333;
}

.about-item h3 {
  font-size: 22px;
  font-weight: 400;
  margin: 0;
  font-style: italic;
  color: #666;
  line-height: 1.4;
}

.about-separator {
  border: none;
  border-top: 3px solid #e2e3e8;
  margin: 0 0 35px 0;
  max-width: 170px;
  width: 100%;
}

.about-image {
  width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.content-separator {
  border: none;
  border-top: 1px solid #e2e3e8;
  margin: 10px 0;
  width: 100%;
}

.about-text {
  color: #666;
  line-height: 1.6;
}

.about-text p {
  margin: 0 0 20px 0;
  font-size: 15px;
}

.about-text p:last-child {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .about-section {
    padding: 100px 0 70px 0;
  }

  .about-grid {
    flex-direction: column;
    gap: 40px;
  }

  .about-item h2 {
    font-size: 28px;
  }

  .about-item h3 {
    font-size: 18px;
  }
}

/* Quote Section - Clean and Optimized */
.quote-section {
  padding: 130px 0 120px 0;
  background-color: #f8f9fa;
  border-top: 1px solid #e9ecef;
}

.quote-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4%;
  align-items: center;
}

.quote-title {
  border-right: 3px solid #e0dede;
  padding-right: 4%;
}

.quote-title h2 {
  font-size: 36px;
  font-weight: 500;
  margin: 0;
  font-family: 'Raleway', Arial, Helvetica, sans-serif;
  color: #333;
  text-align: right;
}

.quote-content {
  padding-left: 4%;
}

.quote-content blockquote {
  margin: 0;
  padding: 0;
  border: none;
  font-style: normal;
}

.quote-content blockquote p {
  font-size: 28px;
  font-weight: 400;
  margin: 0 0 15px 0;
  font-style: italic;
  color: #666;
  line-height: 1.4;
}

.quote-content cite {
  font-size: 18px;
  font-weight: 500;
  color: #999;
  font-style: normal;
}

@media (max-width: 768px) {
  .quote-section {
    padding: 80px 0 90px 0;
  }

  /* Keep 2-column layout on mobile but adjust for better mobile display */
  .quote-grid {
    grid-template-columns: 1fr 2fr;
    gap: 20px;
  }

  .quote-title {
    border-right: 3px solid #e0dede;
    border-bottom: none;
    padding-right: 15px;
    padding-bottom: 0;
  }

  .quote-title h2 {
    text-align: right;
    font-size: 24px;
  }

  .quote-content {
    padding-left: 15px;
    padding-top: 0;
  }

  .quote-content blockquote p {
    font-size: 20px;
  }

  .quote-content cite {
    font-size: 16px;
  }

  .quote-content blockquote p {
    font-size: 20px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    margin: 0 0 8px 0 !important; /* Reduce spacing between quote and author */
  }

  .quote-content cite {
    font-size: 16px;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .quote-title h2 {
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  /* Additional constraints for very small screens */
  @media (max-width: 480px) {
    .about-item h2 {
      font-size: 24px;
    }

    .about-item h3 {
      font-size: 16px;
    }

    .about-text p {
      font-size: 14px;
      line-height: 1.4;
    }

    .quote-title h2 {
      font-size: 20px;
    }

    .quote-content blockquote p {
      font-size: 18px;
      margin: 0 0 6px 0 !important; /* Even tighter spacing on very small screens */
    }

    .quote-content cite {
      font-size: 14px;
    }
  }
}

/* Services Sections with improved styling */
.services-section {
  position: relative;
  width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  overflow: hidden;
}

/* Lateral parallax effect */
.services-section:nth-child(odd) {
  background-position-x: calc(50% + var(--scroll-x, 0px) * 1px);
}

.services-section:nth-child(even) {
  background-position-x: calc(50% - var(--scroll-y, 0px) * 1px);
}

.services-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: -200vw;
  right: -200vw;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

.services-content {
  position: relative;
  z-index: 2;
  max-width: 1170px;
  padding: 0 30px;
}

.services-content h2 {
  font-size: 48px;
  font-weight: 500;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 3px;
  font-family: 'Raleway', Arial, Helvetica, sans-serif;
  text-shadow:
    0 0 10px rgba(0, 0, 0, 0.8),
    0 0 20px rgba(0, 0, 0, 0.6),
    0 0 30px rgba(0, 0, 0, 0.4),
    2px 2px 4px rgba(0, 0, 0, 0.9);
  color: #ffffff;
}

.services-content p {
  font-size: 18px;
  margin: 20px 0 0 0;
  font-weight: 300;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
  color: #ffffff;
}

/* Fallback colors if images don't load */
.renovation { background-color: #2c3e50; }
.rehabilitation { background-color: #34495e; }
.agrandissement { background-color: #2c3e50; }
.neuf { background-color: #34495e; }
.voirie { background-color: #2c3e50; }

@media (max-width: 768px) {
  .services-section {
    height: 250px;
    background-attachment: scroll;
  }

  .services-content h2 {
    font-size: 32px;
  }

  .services-content p {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .services-section {
    height: 200px;
  }

  .services-content h2 {
    font-size: 24px;
    letter-spacing: 2px;
  }

  .services-content p {
    font-size: 14px;
  }
}