/* ============================================
   SERVICES SECTION
   ============================================ */

#services {
  padding: 40px 0 30px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

#services .container {
  max-width: 1300px;
  width: 100%;
  padding-left: 16px;
  padding-right: 16px;
  margin: 0 auto;
}

/* ── Section title animate in ── */
#services .section-title {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease 0.1s, transform 0.6s ease 0.1s;
}

#services.in-view .section-title {
  opacity: 1;
  transform: translateY(0);
}

#services .section-title h2 {
  color: var(--text-primary);
}

#services .section-title p {
  color: var(--text-secondary);
  font-size: 17px;
}

/* ── Trader banner animate in ── */
.trader-banner {
  background: #2c1505;
  border-radius: var(--radius-md);
  padding: 24px 28px;
  margin-bottom: 36px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease 0.2s, transform 0.6s ease 0.2s;
}

#services.in-view .trader-banner {
  opacity: 1;
  transform: translateY(0);
}

.trader-banner-left {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.trader-icon {
  font-size: 32px;
  flex-shrink: 0;
  margin-top: 2px;
}

.trader-title {
  font-family: "Raleway", sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #ff6b00;
  margin: 0 0 6px;
}

.trader-sub {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.7;
  margin: 0;
  text-align: justify;
}

/* ── Grid ── */
.services-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-bottom: 60px;
}

/* ── Card — hidden until in-view ── */
.service-card {
  flex: 0 1 calc(33.333% - 20px);
  min-width: 260px;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease,
    box-shadow 0.35s ease;
}

/* Staggered reveal when section hits in-view */
#services.in-view .service-card:nth-child(1) { opacity: 1; transform: translateY(0); transition-delay: 0.1s; }
#services.in-view .service-card:nth-child(2) { opacity: 1; transform: translateY(0); transition-delay: 0.2s; }
#services.in-view .service-card:nth-child(3) { opacity: 1; transform: translateY(0); transition-delay: 0.3s; }
#services.in-view .service-card:nth-child(4) { opacity: 1; transform: translateY(0); transition-delay: 0.4s; }
#services.in-view .service-card:nth-child(5) { opacity: 1; transform: translateY(0); transition-delay: 0.5s; }
#services.in-view .service-card:nth-child(6) { opacity: 1; transform: translateY(0); transition-delay: 0.6s; }
#services.in-view .service-card:nth-child(7) { opacity: 1; transform: translateY(0); transition-delay: 0.7s; }

.service-card:hover {
  transform: translateY(-6px) !important;
  box-shadow: 0 16px 40px rgba(255, 107, 0, 0.2);
}

/* ── Image ── */
.service-img {
  height: 160px;
  overflow: hidden;
  transition: height 0.35s ease;
}

.service-card:hover .service-img {
  height: 140px;
}

.service-img-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.service-card:hover .service-img-photo {
  transform: scale(1.1);
  filter: saturate(1.15);
}

/* ── Overlay ── */
.service-overlay {
  background: linear-gradient(
    to top,
    rgba(44, 21, 5, 0.97) 0%,
    rgba(44, 21, 5, 0.88) 60%,
    rgba(44, 21, 5, 0.72) 100%
  );
  padding: 18px 20px 20px;
  transition: padding 0.3s ease;
}

.service-card:hover .service-overlay {
  background: linear-gradient(
    to top,
    rgba(44, 21, 5, 1) 0%,
    rgba(44, 21, 5, 0.95) 100%
  );
}

/* ── Title ── */
.service-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff !important;
  margin: 0 0 3px;
  font-family: "Raleway", sans-serif;
  letter-spacing: 0.3px;
  transition: transform 0.3s ease;
}

.service-card:hover .service-title {
  transform: translateX(2px);
}

/* ── Tamil subtitle ── */
.service-tamil {
  font-size: 12px;
  color: #ffcc00 !important;
  margin: 0 0 8px;
  font-weight: 500;
  letter-spacing: 0.3px;
  opacity: 0.9;
}

/* ── Description ── */
.service-desc {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.78) !important;
  margin: 0;
  line-height: 1.55;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.35s ease, opacity 0.3s ease;
}

.service-card:hover .service-desc {
  max-height: 80px;
  opacity: 1;
}

/* ── Tablet ── */
@media (max-width: 992px) {
  .service-card {
    flex: 0 1 calc(50% - 16px);
  }
}

@media (max-width: 600px) {
  #services {
    padding: 40px 0 20px;
  }

  /* ── Trader banner mobile fix ── */
  .trader-banner {
    padding: 16px 14px;
    gap: 12px;
    border-radius: 12px;
    margin-bottom: 24px;
  }

  .trader-banner-left {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  .trader-icon {
    font-size: 24px;
    margin-top: 0;
  }

  .trader-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 6px;
    line-height: 1.4;
  }

  .trader-sub {
    font-size: 12px;
    line-height: 1.7;
  }

  .trader-tagline {
    font-size: 12px;
    padding-top: 10px;
    letter-spacing: 0;
    line-height: 1.5;
  }

  /* ── Service cards mobile ── */
  .service-card {
    flex: 0 1 100%;
    min-width: 0;
  }

  .service-img {
    height: 140px;
  }

  .service-title {
    font-size: 14px;
  }

  .service-tamil {
    font-size: 12px;
  }

  .service-desc {
    max-height: none !important;
    opacity: 1 !important;
    overflow: visible;
  }

  .service-overlay {
    padding: 14px 16px 16px;
  }
}