/* Using variables from header.css for consistency */
:root {
  --section-padding: 4.5rem 1.5rem;
  --section-max-width: 1100px;
}

/* ─── Full Page Gradient Background ───────────────────── */
.gradient-bg {
  background: linear-gradient(
    180deg,
    #ffffff 0%,
    #f2f8fb 30%,
    #e6f5f3 100%
  );
  width: 100%;
  padding-bottom: 2rem;
}

/* ─── Global Section & Button Styles ──────────────────── */
.section {
  max-width: var(--section-max-width);
  margin: 0 auto;
  padding: var(--section-padding);
}
.section-title {
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  color: var(--text-dark);
  text-align: center;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}
.section-subtitle {
  max-width: 720px;
  margin: 0 auto 3rem auto;
  color: var(--text-medium);
  font-size: clamp(1rem, 2.5vw, 1.1rem);
  text-align: center;
}


/* ─── Services Hero ───────────────────────────────────── */
.services-hero { padding: 5rem 1.5rem 6rem; text-align: center; }
.hero-inner { max-width: 800px; margin: 0 auto; }
.hero-title { font-size: clamp(2.8rem, 7vw, 4rem); font-weight: 700; margin-bottom: 1rem; }
.hero-subtitle { font-size: 1.25rem; max-width: 650px; margin: 0 auto 2.5rem auto; }
.hero-buttons { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }

/* ─── Features Section ────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 4rem;
}
.feature-card {
  background: var(--background-white);
  padding: 2.5rem 2rem;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.03);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.feature-card:hover { transform: translateY(-8px); box-shadow: 0 12px 25px rgba(0,0,0,0.07); }
.feature-icon {
  width: 60px; height: 60px; margin: 0 auto 1.5rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-green));
  color: white; font-size: 1.75rem;
}
.feature-card h3 { font-size: 1.3rem; margin-bottom: 0.75rem; }
.feature-card p { color: var(--text-medium); font-size: 0.95rem; line-height: 1.6; }

/* ─── Use Cases Section ────────────────────────────────── */
#use-cases { background-color: var(--background-white); padding: 0; border-radius: 24px; margin-top: 2rem; overflow: hidden; }
.use-case-box { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 3rem; }
.use-case-image img { width: 100%; height: 100%; object-fit: cover; }
.use-case-text { padding: 3rem; }
.use-case-text h2 { font-size: 2.25rem; margin-bottom: 1rem; }
.use-case-text > p { font-size: 1.1rem; color: var(--text-medium); margin-bottom: 2rem; }
.feature-list { list-style: none; padding-left: 0; margin-bottom: 2rem; }
.feature-list li { margin-bottom: 1rem; padding-left: 1.75rem; position: relative; color: var(--text-medium); }
.feature-list li::before {
  content: "✓"; color: var(--primary-green); font-weight: bold; position: absolute; left: 0; font-size: 1.2rem; top: -2px;
}
.feature-list strong { color: var(--text-dark); }

/* ─── How It Works Timeline (Video Placeholder) ───────────────────── */
.how-it-works-timeline-section {
  text-align: center;
  position: relative;
  background-color: var(--background-white);
  border-radius: 24px;
  margin-top: 2rem;
  padding: 4rem 1.5rem;
}
.timeline-container {
  position: relative;
  max-width: 800px;
  margin: 2rem auto 0;
}

/* The vertical line */
.timeline-container::after {
  content: '';
  position: absolute;
  width: 3px;
  background-color: #e2f5ec; /* Light green */
  top: 10px;
  bottom: 10px;
  left: 50%;
  margin-left: -1.5px;
  z-index: 1;
}

.timeline-item {
  padding: 1rem 3rem;
  position: relative;
  width: 50%;
  box-sizing: border-box;
}

/* Place items on the left and right */
.timeline-item:nth-child(odd) { left: 0; }
.timeline-item:nth-child(even) { left: 50%; }

/* The icon circle */
.timeline-icon {
  position: absolute;
  width: 50px;
  height: 50px;
  right: -25px;
  background-color: var(--background-white);
  border: 3px solid var(--primary-green);
  top: 50%;
  transform: translateY(-50%);
  border-radius: 50%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--primary-green);
}

.timeline-item:nth-child(even) .timeline-icon {
  left: -25px;
}

.timeline-content {
  padding: 1rem 1.5rem;
  position: relative;
  border-radius: 8px;
  text-align: left;
}

.timeline-item:nth-child(odd) .timeline-content {
  text-align: right;
}

.timeline-content h3 {
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
  color: var(--primary-blue);
}

.timeline-content p {
  font-size: 0.95rem;
  color: var(--text-medium);
}

.section-button-wrapper {
  text-align: center;
  margin-top: 3rem;
}

/* --- Responsive for Timeline --- */
@media (max-width: 768px) {
  .how-it-works-timeline-section { padding: 3rem 1rem; }

  /* On small screens, move the line to the left */
  .timeline-container::after {
    left: 25px;
  }
  
  /* Full-width items */
  .timeline-item {
    width: 100%;
    padding-left: 60px;
    padding-right: 15px;
  }
  
  /* All items on the left side */
  .timeline-item:nth-child(odd),
  .timeline-item:nth-child(even) {
    left: 0;
  }
  
  /* Position the icon on the line */
  .timeline-icon {
    left: 0;
  }

  /* FIX: Override the desktop style for even items to ensure correct positioning on mobile */
  .timeline-item:nth-child(even) .timeline-icon {
    left: 0;
  }

  /* All text aligns left */
  .timeline-content,
  .timeline-item:nth-child(odd) .timeline-content {
    text-align: left;
  }
}

/* ─── FAQ Section ────────────────────────────────────── */
.faq-container { max-width: 800px; margin: 0 auto; }
.faq-item {
  background: var(--background-white);
  border-radius: 12px;
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: margin-bottom 0.3s ease;
}
.faq-item.active { margin-bottom: 1.5rem; }
.faq-question {
  display: flex; justify-content: space-between; align-items: center;
  width: 100%; padding: 1.5rem; background: none; border: none;
  text-align: left; font-size: 1.1rem; font-weight: 600; cursor: pointer; color: var(--text-dark);
}
.faq-question i {
  font-size: 1.2rem; transition: transform 0.3s ease, color 0.3s ease; color: var(--primary-blue);
}
.faq-item.active .faq-question i { transform: rotate(180deg); color: var(--primary-green); }
.faq-answer {
  max-height: 0; overflow: hidden; transition: max-height 0.4s ease, padding 0.4s ease;
}
.faq-answer p { padding: 0 1.5rem 1.5rem; line-height: 1.7; color: var(--text-medium); }

/* ─── CTA Section ────────────────────────────────────── */
#cta-section {
  background-color: var(--footer-bg);
  color: var(--text-light);
  border-radius: 24px;
  margin-top: 2rem;
}
.cta-content { text-align: center; padding: 4rem 1.5rem; }
.cta-content h2 { font-size: 2.25rem; margin-bottom: 1rem; }
.cta-content p { color: rgba(255, 255, 255, 0.8); max-width: 600px; margin: 0 auto 2rem auto; }
#cta-section .btn-primary {
  background-color: var(--accent-yellow); color: var(--text-dark); border-color: var(--accent-yellow);
}
#cta-section .btn-primary:hover {
  background-color: #ffcf40; border-color: #ffcf40; box-shadow: 0 4px 15px rgba(255,196,0,0.2);
}

/* ─── Animations & Responsive ────────────────────────── */
.fade-in, .stagger-children > * {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.fade-in.visible, .stagger-children > *.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 900px) {
  .use-case-box { grid-template-columns: 1fr; }
  .use-case-image img { max-height: 400px; object-fit: cover; }
  .use-case-text { text-align: center; }
}

@media (max-width: 768px) {
  .section { padding: 3.5rem 1.5rem; }
}