/* Improved Home Page Sections */

/* Services Overview Section - KEEPING AS IS */
.services-overview {
  padding: 100px 0;
  background: #ffffff;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  margin-top: 60px;
}

.service-card {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 40px 30px;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.service-card:hover {
  transform: translateY(-10px);
  border-color: var(--color-accent);
  box-shadow: 0 20px 40px rgba(0, 78, 146, 0.15);
}

.service-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--color-primary), #0066cc);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 25px;
  font-size: 2rem;
  color: white;
  transition: all 0.3s ease;
}

.service-card:hover .service-icon {
  background: linear-gradient(135deg, var(--color-accent), #ff6b1a);
  transform: scale(1.1) rotate(5deg);
}

.service-card h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--color-primary);
  margin-bottom: 15px;
  font-weight: 700;
}

.service-card p {
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
  flex-grow: 1;
}

.service-card .btn-link {
  color: var(--color-accent);
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: gap 0.3s ease;
}

.service-card .btn-link:hover {
  gap: 12px;
}

/* Redesigned Intro Section (Stats) */
.intro-section {
  padding: 100px 0;
  background-color: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.intro-content .section-tag {
  margin-bottom: 15px;
}

.intro-content .section-title {
  text-align: left;
  margin-bottom: 20px;
}

.intro-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.stat-card {
  background: white;
  padding: 25px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
  transition: transform 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
  border-color: var(--color-primary);
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: 5px;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

/* Redesigned Featured Projects Section - BENTO GRID */
.featured-projects {
  padding: 100px 0;
  background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
}

.projects-bento-grid {
  display: grid;
  /* 2 columns, but first item will span */
  grid-template-columns: 2fr 1fr;
  grid-auto-rows: 300px;
  gap: 30px;
  margin-top: 60px;
}

.bento-item {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.bento-item:hover .bento-img {
  transform: scale(1.05);
}

.bento-item.large {
  grid-row: span 2;
  /* Takes up full height */
}

.bento-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.bento-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 30px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.bento-item:hover .bento-overlay {
  background: linear-gradient(to top, rgba(0, 78, 146, 0.9), transparent);
}

.bento-tag {
  display: inline-block;
  background: var(--color-accent);
  color: white;
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 10px;
  align-self: flex-start;
}

.bento-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 5px;
  line-height: 1.2;
}

.bento-desc {
  font-size: 1rem;
  opacity: 0.9;
  margin-bottom: 15px;
}

.bento-link {
  color: white;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.bento-item:hover .bento-link {
  opacity: 1;
  transform: translateY(0);
}

/* Redesigned Why Choose Us - SPLIT IMAGE/TEXT */
.why-choose {
  padding: 0;
  /* Full width split */
  background: white;
  color: var(--color-text-dark);
  position: relative;
  overflow: hidden;
}

.why-split-container {
  display: flex;
  min-height: 600px;
}

.why-image-side {
  flex: 1;
  background-image: url("../images/projects/civil-engineering-30.jpg");
  /* Ensure this exists or use Unsplash */
  background-size: cover;
  background-position: center;
  position: relative;
}

.why-image-side::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 31, 63, 0.4);
  /* Blue overlay */
}

.why-content-side {
  flex: 1;
  padding: 80px 60px;
  background: #001f3f;
  /* Dark Navy Background */
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.why-content-side .section-title {
  color: white;
  text-align: left;
  font-size: 3rem;
}

.why-content-side .section-subtitle {
  color: rgba(255, 255, 255, 0.8);
  text-align: left;
  margin: 0 0 40px 0;
}

.benefits-list {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.benefit-box {
  display: flex;
  gap: 20px;
}

.benefit-icon {
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
  font-size: 1.5rem;
  flex-shrink: 0;
}

.benefit-text h4 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: white;
}

.benefit-text p {
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
  font-size: 0.95rem;
}

/* Redesigned CTA Section - IMPACT IMAGE */
.cta-section {
  padding: 160px 0;
  background-image: url("../../assets/images/projects/civil-engineering-35.jpg");
  /* Or unsplash */
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  /* Parallax effect */
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  /* Dark overlay */
}

.cta-content {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.cta-section h2 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 25px;
  line-height: 1.1;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.cta-section p {
  font-size: 1.4rem;
  opacity: 1;
  margin-bottom: 50px;
  color: rgba(255, 255, 255, 0.9);
}

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

.btn-lg {
  padding: 18px 40px;
  font-size: 1.1rem;
}

/* Section Headers - General */
.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-tag {
  display: inline-block;
  background: rgba(255, 140, 26, 0.1);
  color: var(--color-accent);
  padding: 8px 20px;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 20px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--color-text-dark);
  margin-bottom: 20px;
  line-height: 1.2;
}

.section-subtitle {
  font-size: 1.2rem;
  color: var(--color-text-muted);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Responsive Design */
@media (max-width: 992px) {
  .projects-bento-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 300px;
  }

  .bento-item.large {
    grid-row: span 1;
  }

  .why-split-container {
    flex-direction: column;
  }

  .why-image-side {
    min-height: 300px;
  }

  .intro-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .section-title {
    font-size: 2.2rem;
  }

  .cta-section {
    padding: 80px 20px;
    /* Reduced vertical from 160px, added horizontal padding */
  }

  .cta-section h2 {
    font-size: 2rem;
  }

  .cta-content p {
    font-size: 1.1rem;
  }

  .intro-stats {
    grid-template-columns: 1fr;
  }

  /* Why Choose Us Mobile Padding */
  .why-content-side {
    padding: 50px 25px;
  }

  .section-header {
    margin-bottom: 30px;
  }

  /* Force stack CTA buttons and constrain width so they don't touch edges */
  .cta-buttons {
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 15px;
  }

  .cta-buttons .btn {
    width: 100%;
    max-width: 320px;
    justify-content: center;
  }
}

/* Industrial Design Updates */

/* Hero Warning Stripe */
.hero-section::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 8px;
  background: repeating-linear-gradient(45deg,
      var(--construction-orange),
      var(--construction-orange) 10px,
      var(--construction-yellow) 10px,
      var(--construction-yellow) 20px);
  z-index: 10;
}

/* Industrial Dark Section (e.g. Services Overview) */
.section.industrial-dark {
  background-color: #1a1a1a;
  color: white;
  border-top: 4px solid #4a5568;
  border-bottom: 4px solid #4a5568;
  position: relative;
  overflow: hidden;
}

.section.industrial-dark::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(255, 140, 26, 0.02) 10px, rgba(255, 140, 26, 0.02) 20px);
  pointer-events: none;
}

/* Text Color Overrides for Dark Section */
.section.industrial-dark .section-title {
  color: white;
}

.section.industrial-dark .section-subtitle,
.section.industrial-dark p {
  color: rgba(255, 255, 255, 0.8);
}

.section.industrial-dark .service-card {
  background: #2a2a2a;
  /* Dark card background */
  border-color: #4a5568;
}

.section.industrial-dark .service-card h3 {
  color: white;
}

.section.industrial-dark .service-card p {
  color: #94a3b8;
}

.section.industrial-dark .service-card:hover {
  border-color: var(--construction-orange);
  background: #333;
}

/* Industrial Stat Cards */
.intro-stats .stat-card {
  position: relative;
  border: 3px solid #e2e8f0;
  background: white;
  padding: 30px;
}

.intro-stats .stat-card::before,
.intro-stats .stat-card::after {
  content: '';
  position: absolute;
  top: 10px;
  width: 8px;
  height: 8px;
  background: linear-gradient(135deg, #718096, #2d3748);
  border-radius: 50%;
  z-index: 2;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.intro-stats .stat-card::before {
  left: 10px;
}

.intro-stats .stat-card::after {
  right: 10px;
}

/* Bento Grid Industrial Borders */
.bento-item {
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.bento-item::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 2px solid transparent;
  transition: border-color 0.3s ease;
  pointer-events: none;
  z-index: 5;
  border-radius: 20px;
}

.bento-item:hover::after {
  border-color: var(--construction-orange);
}

/* Why Choose Us - Enhanced Dark Pattern */
.why-content-side {
  position: relative;
  border-top: 4px solid var(--construction-orange);
}

.why-content-side::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(255, 140, 26, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 140, 26, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}