/* cards.css — Services section */

/* ══════════════════════════════
   SECTION SHARED
══════════════════════════════ */
.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3.5rem;
}

.section-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 0.8rem;
}

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin-bottom: 1rem;
}

.section-sub {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
}

/* ══════════════════════════════
   SERVICES SECTION
══════════════════════════════ */
.services {
  padding: 6rem 2rem;
  position: relative;
}

/* subtle top separator */
.services::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--purple), transparent);
}

/* ══════════════════════════════
   GRID
══════════════════════════════ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.service-card.svc-hidden {
  display: none;
}

.service-card.svc-visible {
  display: flex;
}

/* ══════════════════════════════
   CARD
══════════════════════════════ */
.service-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-card);
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  cursor: default;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  will-change: transform;
}

/* glow layer — revealed on hover via opacity */
.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-card);
  background: radial-gradient(ellipse at top left, rgba(124,92,62,0.12), transparent 70%);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.service-card:hover {
  transform: translateY(-8px);
  border-color: rgba(124,92,62, 0.55);
  box-shadow:
    0 0 0 1px rgba(124,92,62,0.2),
    0 8px 32px rgba(124,92,62,0.2),
    0 2px 8px rgba(0,0,0,0.4);
}

.service-card:hover::before {
  opacity: 1;
}

/* ── Icon ── */
.card-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(124,92,62, 0.12);
  border: 1px solid rgba(124,92,62, 0.2);
  transition: var(--transition);
  position: relative;
  z-index: 1;
}

.service-card:hover .card-icon {
  background: rgba(124,92,62, 0.22);
  border-color: rgba(124,92,62, 0.45);
}

.card-icon svg {
  stroke: var(--cyan);
  transition: var(--transition);
}

.service-card:hover .card-icon svg {
  stroke: #fff;
  filter: drop-shadow(0 0 6px rgba(229,72,59,0.6));
}

/* ── Title ── */
.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  position: relative;
  z-index: 1;
  transition: var(--transition);
}

.service-card:hover .card-title {
  color: #fff;
}

/* ── Description ── */
.card-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
  position: relative;
  z-index: 1;
  flex: 1;
  transition: color 0.3s ease;
}

.service-card:hover .card-desc {
  color: rgba(255, 255, 255, 0.80);
}

/* ── Arrow link ── */
.card-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #7C5C3E;
  background: none;
  border: none;
  outline: none;
  padding: 0;
  text-decoration: none;
  position: relative;
  z-index: 1;
  margin-top: auto;
  transition: all 0.2s ease;
  width: fit-content;
  cursor: pointer;
  font-family: inherit;
}

.card-arrow svg {
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.service-card:hover .card-arrow {
  color: #7C5C3E;
  text-decoration: underline;
  cursor: pointer;
}

.service-card:hover .card-arrow svg {
  transform: translateX(4px);
}

body:not(.light-mode) .card-arrow {
  color: #A87850;
}

body:not(.light-mode) .service-card:hover .card-arrow {
  color: #A87850;
}

/* ══════════════════════════════
   RESPONSIVE
══════════════════════════════ */
@media (max-width: 900px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .services-grid {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .services {
    padding: 4rem 1rem;
    overflow-x: hidden;
  }

  .service-card {
    width: 100%;
    min-width: 0;
    padding: 1.5rem 1.25rem;
    word-wrap: normal;
    overflow-wrap: normal;
    white-space: normal;
  }

  .card-title,
  .card-desc {
    word-wrap: normal;
    overflow-wrap: normal;
    white-space: normal;
  }

  /* Disable card lift on touch — prevents stale hover states */
  .service-card:hover,
  .review-card:hover {
    transform: none;
  }
}

/* ══════════════════════════════
   HOW IT WORKS SECTION
══════════════════════════════ */
.how-it-works {
  padding: 6rem 2rem;
  position: relative;
}

.how-it-works::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
}

/* ── Steps track ── */
.steps-track {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
}

/* Horizontal connector line — exempt from stagger animation */
.steps-connector.steps-connector {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

.steps-connector {
  position: absolute;
  top: 38px; /* align with centre of step-num-wrap */
  left: calc(16.67% + 28px);
  right: calc(16.67% + 28px);
  height: 2px;
  background: linear-gradient(90deg,
    rgba(124,92,62,0.6),
    rgba(229,72,59,0.6),
    rgba(124,92,62,0.6));
  z-index: 0;
}

/* ── Step card ── */
.step-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  position: relative;
  z-index: 1;
  padding: 0 0.5rem 2rem;
  cursor: default;
  border-radius: var(--radius-card);
  transition: var(--transition);
}

.step-card:hover {
  background: var(--bg-secondary);
  padding: 1rem 0.5rem 2rem;
}

/* ── Number badge ── */
.step-num-wrap {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(124,92,62, 0.12);
  border: 2px solid rgba(124,92,62, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
  position: relative;
}

.step-num-wrap::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid rgba(124,92,62, 0.2);
  transition: var(--transition);
}

.step-card:hover .step-num-wrap {
  background: rgba(124,92,62, 0.25);
  border-color: var(--purple);
  box-shadow: 0 0 20px rgba(124,92,62, 0.35);
}

.step-card:hover .step-num-wrap::after {
  border-color: rgba(124,92,62, 0.4);
}

.step-num {
  font-size: 1rem;
  font-weight: 800;
  color: var(--cyan);
  letter-spacing: 1px;
}

/* ── Step icon ── */
.step-icon {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.step-icon svg {
  stroke: var(--cyan);
  transition: var(--transition);
}

.step-card:hover .step-icon {
  background: rgba(124,92,62, 0.12);
  border-color: rgba(124,92,62, 0.3);
}

.step-card:hover .step-icon svg {
  stroke: #fff;
  filter: drop-shadow(0 0 6px rgba(229,72,59,0.5));
}

/* ── Step text ── */
.step-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  transition: var(--transition);
}

.step-card:hover .step-title {
  color: #fff;
}

.step-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
  transition: color 0.3s ease;
}

.step-card:hover .step-desc {
  color: rgba(255, 255, 255, 0.75);
}

.step-card:hover .step-num {
  color: var(--cyan); /* keep cyan, prevent inherit override */
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .steps-track {
    grid-template-columns: 1fr;
    gap: 0;
    max-width: 100%;
  }

  .steps-connector { display: none; }

  .step-card {
    flex-direction: row;
    text-align: left;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .step-card:last-child { border-bottom: none; }

  .step-num-wrap { flex-shrink: 0; }

  .step-icon { display: none; }

  .how-it-works { padding: 4rem 1.2rem; }
}

/* ══════════════════════════════
   TESTIMONIALS SECTION
══════════════════════════════ */
.testimonials {
  padding: 6rem 2rem;
  position: relative;
}

.testimonials::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--purple), transparent);
}

/* ── Grid ── */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
  align-items: start;
}

/* ── Card ── */
.review-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-card);
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  cursor: default;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.review-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-card);
  background: radial-gradient(ellipse at top left, rgba(124,92,62,0.1), transparent 65%);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.review-card:hover {
  transform: translateY(-6px);
  background: var(--bg-secondary);
  border-color: rgba(124,92,62, 0.45);
  box-shadow:
    0 0 0 1px rgba(124,92,62,0.15),
    0 8px 28px rgba(124,92,62,0.18),
    0 2px 8px rgba(0,0,0,0.4);
}

.review-card:hover::before { opacity: 1; }

/* Featured (centre) card — slightly elevated by default */
.review-card--featured {
  border-color: rgba(229,72,59, 0.25);
  background: rgba(229,72,59, 0.04);
}

.review-card--featured::before {
  background: radial-gradient(ellipse at top left, rgba(229,72,59,0.1), transparent 65%);
}

.review-card--featured:hover {
  background: var(--bg-secondary);
  border-color: rgba(229,72,59, 0.55);
  box-shadow:
    0 0 0 1px rgba(229,72,59,0.2),
    0 8px 28px rgba(229,72,59,0.18),
    0 2px 8px rgba(0,0,0,0.4);
}

/* ── Quote icon ── */
.review-quote {
  flex-shrink: 0;
  line-height: 0;
}

/* ── Review text ── */
.review-text {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.7;
  flex: 1;
  position: relative;
  z-index: 1;
  transition: color 0.3s ease;
}

.review-card:hover .review-text { color: #ffffff; }

.review-card:hover .review-name { color: #ffffff; }

.review-card:hover .review-role { color: #A87850; }

.review-card:hover .review-stars { color: #f59e0b; }

/* ── Stars ── */
.review-stars {
  font-size: 1rem;
  color: #f59e0b;
  letter-spacing: 2px;
  line-height: 1;
  position: relative;
  z-index: 1;
}

.review-stars .gray { color: #4b5563; }

/* ── Author row ── */
.review-author {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  position: relative;
  z-index: 1;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.review-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
}

.review-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.review-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  transition: color 0.3s ease;
}

.review-role {
  font-size: 0.78rem;
  color: var(--text-muted);
  transition: color 0.3s ease;
}

/* ── Hidden reviews (show more) ── */
@keyframes revealCard {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.review-card.review-hidden {
  display: none;
}

.review-card.review-hidden.review-visible {
  display: flex;
  animation: revealCard 0.35s ease both;
}

/* Stagger animation delay for revealed cards */
.review-card.review-visible:nth-child(7)  { animation-delay: 0.00s; }
.review-card.review-visible:nth-child(8)  { animation-delay: 0.05s; }
.review-card.review-visible:nth-child(9)  { animation-delay: 0.10s; }
.review-card.review-visible:nth-child(10) { animation-delay: 0.15s; }
.review-card.review-visible:nth-child(11) { animation-delay: 0.20s; }
.review-card.review-visible:nth-child(12) { animation-delay: 0.25s; }
.review-card.review-visible:nth-child(13) { animation-delay: 0.30s; }
.review-card.review-visible:nth-child(14) { animation-delay: 0.35s; }
.review-card.review-visible:nth-child(15) { animation-delay: 0.40s; }

/* ── Show more / less button ── */
.reviews-toggle-wrap {
  display: flex;
  justify-content: center;
  margin-top: 2.5rem;
}

.reviews-show-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: 1.5px solid rgba(124,92,62, 0.45);
  color: #A87850;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.65rem 1.75rem;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: var(--transition);
}

.reviews-show-btn:hover {
  background: rgba(124,92,62, 0.1);
  border-color: #7C5C3E;
  color: #fff;
}

.reviews-show-btn .toggle-chevron {
  transition: transform 0.3s ease;
}

.reviews-show-btn.is-expanded .toggle-chevron {
  transform: rotate(180deg);
}

/* ── Review header row (stars + badge) ── */
.review-header-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

/* ── Verified badge ── */
.review-badge {
  font-size: 0.68rem;
  font-weight: 600;
  color: #E5483B;
  background: rgba(229,72,59, 0.1);
  border: 1px solid rgba(229,72,59, 0.25);
  border-radius: 20px;
  padding: 0.15rem 0.55rem;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

/* ── Stars — gray for empty ── */
.review-stars {
  color: #f59e0b;
  letter-spacing: 1px;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .reviews-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .review-badge {
    font-size: 10px !important;
    padding: 2px 6px !important;
  }

  .reviews-grid {
    grid-template-columns: 1fr;
    max-width: 100%;
    margin: 0 auto;
    width: 100%;
  }

  .review-card {
    width: 100%;
    min-width: 0;
    padding: 1.5rem 1.25rem;
    word-wrap: normal;
    overflow-wrap: normal;
    white-space: normal;
  }

  .review-text,
  .review-name,
  .review-role {
    word-wrap: normal;
    overflow-wrap: normal;
    white-space: normal;
  }

  .review-card:hover { transform: translateY(-3px); }
}

@media (max-width: 560px) {
  .testimonials {
    padding: 4rem 1rem;
    overflow-x: hidden;
  }
}
