/* ==========================================================================
   NEW: Service Page Specific Micro-Components
   ========================================================================== */

/* --- Benefit Pills (Used in Boiler, Air Balancing, etc.) --- */
.benefit-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 25px;
  margin-bottom: 25px;
}

.benefit-pills .pill {
  background: rgba(0, 155, 77, 0.1); /* Light green tint */
  color: var(--primary-green);
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(0, 155, 77, 0.2);
  transition: all 0.3s ease;
}

.benefit-pills .pill i {
  font-size: 1rem;
}

.benefit-pills .pill:hover {
  background: var(--primary-green);
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(0, 155, 77, 0.2);
}

/* --- Content Block Enhancements --- */
.content-block ul {
  list-style: none;
  padding: 0;
  margin-top: 20px;
}

.content-block ul li {
  position: relative;
  padding-left: 35px;
  margin-bottom: 15px;
  font-size: 1.05rem;
  color: var(--dark-text);
  line-height: 1.6;
}

.content-block ul li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 2px;
  width: 24px;
  height: 24px;
  background: var(--primary-green);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: bold;
}

.content-block ul li strong {
  color: var(--primary-blue);
}

/* --- Feature Grid Enhancements --- */
.feature-grid .feature-card {
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  border: 1px solid transparent;
  background: var(--white); /* Ensure white background */
  position: relative;
  overflow: hidden;
  display: flex; /* Flexbox for better vertical spacing */
  flex-direction: column;
  align-items: center; /* Center content */
}

.feature-grid .feature-card p {
  margin-bottom: 15px;
  flex-grow: 1; /* Pushes the link to the bottom if cards have different heights */
}

.feature-grid .feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 155, 77, 0.1);
}

.feature-grid .feature-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 15px auto;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: linear-gradient(
    135deg,
    var(--primary-blue),
    #0056b3
  ); /* Fixed undefined var */
  color: white !important; /* Force white icon container color */
  box-shadow: 0 4px 10px rgba(0, 51, 102, 0.3);
}

.feature-grid .feature-icon i {
  color: white !important; /* Explicitly force icon itself to be white */
}

/* --- Feature Card Link (Added) --- */
.related-link {
  display: inline-flex;
  align-items: center;
  margin-top: auto; /* Pushes to bottom in flex container */
  font-weight: 600;
  color: var(--primary-blue);
  text-decoration: none;
  transition: all 0.2s ease;
  padding: 8px 16px;
  border-radius: 5px;
  background-color: rgba(0, 51, 102, 0.05);
}

.related-link:hover {
  background-color: var(--primary-blue);
  color: var(--white);
  transform: translateY(-2px);
  text-decoration: none;
}

.related-link i {
  margin-left: 8px;
  transition: transform 0.2s ease;
}

.related-link:hover i {
  transform: translateX(3px);
}

/* --- Sidebar Contact Card --- */
.contact-card-sidebar {
  background: var(--white);
  padding: 25px;
  border-radius: 12px;
  margin-top: 30px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-soft);
}

.contact-card-sidebar h4 {
  margin-bottom: 15px;
  color: var(--primary-blue);
  font-size: 1.2rem;
  font-weight: 600;
  border-bottom: 2px solid rgba(0, 0, 0, 0.05);
  padding-bottom: 10px;
}

.contact-card-sidebar p {
  margin-bottom: 12px;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--dark-text);
}

.contact-card-sidebar p:last-child {
  margin-bottom: 0;
}

.contact-card-sidebar i {
  color: var(--primary-green);
  width: 20px;
  text-align: center;
  font-size: 1.1rem;
}

/* --- Related Services Grid --- */
.related-services-mini {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid var(--border-color);
}

.related-services-mini h3,
.related-services-mini h4 {
  font-size: 1.3rem;
  color: var(--primary-blue);
  margin-bottom: 20px;
}

.related-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 15px 25px; /* row gap, column gap */
}

.related-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  color: var(--primary-blue);
  font-weight: 500;
  text-decoration: none;
  padding: 8px 12px;
  background-color: rgba(0, 51, 102, 0.03); /* Very light blue bg */
  border-radius: 6px;
  transition: all 0.2s ease;
}

.related-item:hover {
  background-color: var(--primary-blue);
  color: var(--white);
  text-decoration: none;
  transform: translateY(-2px);
}

.related-item i {
  color: var(--primary-green);
  transition: color 0.2s;
}

.related-item:hover i {
  color: var(--white);
}

/* --- Comparison Table Styling --- */
.service-table {
  width: 100%;
  border-collapse: separate; /* Allows for border-radius */
  border-spacing: 0;
  margin: 25px 0;
  font-size: 1rem;
  background-color: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border-color);
}

.service-table th {
  background-color: var(--primary-blue);
  color: var(--white);
  text-align: left;
  padding: 18px 25px;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.5px;
}

.service-table td {
  padding: 20px 25px;
  vertical-align: middle;
  border-bottom: 1px solid var(--border-color);
  color: var(--dark-text);
  line-height: 1.6;
}

.service-table tr:last-child td {
  border-bottom: none;
}

.service-table tr:nth-child(even) {
  background-color: #fafbfc;
}

.service-table tr:hover {
  background-color: rgba(0, 51, 102, 0.02);
}

.service-table-icon {
  color: var(--primary-green);
  font-size: 1.2rem;
  margin-right: 12px;
  width: 24px;
  text-align: center;
}

.service-table strong {
  color: var(--primary-blue);
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}

/* --- Responsive Table (Horizontal Scroll) --- */
@media screen and (max-width: 768px) {
  .content-block {
    position: relative;
    overflow: hidden; /* Prevent spillover */
  }

  /* Force table to be scrollable */
  .service-table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap; /* Keep columns in one line */
    border: 1px solid var(--border-color);
    box-shadow: none;
  }

  .service-table th,
  .service-table td {
    padding: 12px 15px;
    font-size: 0.9rem;
    white-space: normal; /* Allow text wrapping inside cells */
    min-width: 150px; /* Ensure columns don't squash */
  }

  /* Add a scroll hint shadow */
  .service-table::-webkit-scrollbar {
    height: 6px;
  }
  .service-table::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
  }
}

/* ==========================================================================
   NEW: Scroll Animations (Matches script.js IntersectionObserver)
   ========================================================================== */
.fade-in-section,
.slide-up,
.zoom-in {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.8s ease-out,
    transform 0.8s ease-out;
  will-change: opacity, transform;
}

.fade-in-section.is-visible,
.slide-up.is-visible,
.zoom-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delay for children if needed */
.feature-grid .feature-card:nth-child(1) {
  transition-delay: 0.1s;
}
.feature-grid .feature-card:nth-child(2) {
  transition-delay: 0.2s;
}
.feature-grid .feature-card:nth-child(3) {
  transition-delay: 0.3s;
}
.feature-grid .feature-card:nth-child(4) {
  transition-delay: 0.4s;
}
