/* ============================================================
   JOBSNIPS — Testimonials Page
   ============================================================ */

/* ── Override nav logo to white on dark hero (no scroll needed) ── */
#nav .nav-logo-icon .logo-w-stroke { stroke: #ffffff; }
#nav .nav-logo-icon .logo-w-fill   { fill:   #ffffff; }

/* ══════════════════════════════════════
   HERO
══════════════════════════════════════ */
#tm-hero {
  position: relative;
  background: var(--bg);
  padding: 150px 0 90px;
  overflow: hidden;
}

.tm-hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(41,171,226,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(41,171,226,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

/* Two-column layout */
.tm-hero-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.tm-hero-inner {
  display: flex;
  flex-direction: column;
}

/* Stats row */
.tm-hero-stats {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 40px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 24px;
  width: fit-content;
}

.tm-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0 24px;
}
.tm-stat:first-child { padding-left: 0; }
.tm-stat:last-child  { padding-right: 0; }

.tm-stat-num {
  font-size: 26px;
  font-weight: 800;
  color: var(--cyan);
  line-height: 1;
}
.tm-stat-lbl {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  white-space: nowrap;
}

.tm-stat-sep {
  width: 1px;
  height: 36px;
  background: var(--border);
  flex-shrink: 0;
}

/* ── Hero right: card stack ── */
.tm-hero-cards-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  user-select: none;
}

.tm-hero-cards {
  position: relative;
  width: 240px;
  height: 360px;
  cursor: pointer;
}

/* Each card — default = hidden (no position class) */
.tm-hc {
  position: absolute;
  inset: 0;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
  transition:
    transform 0.38s cubic-bezier(0.25,0.46,0.45,0.94),
    opacity   0.38s cubic-bezier(0.25,0.46,0.45,0.94),
    z-index   0s 0s;
  will-change: transform, opacity;
  /* Hidden state (no position class assigned) */
  opacity: 0;
  z-index: 0;
  transform: translateX(0) rotate(0deg) scale(0.65);
  pointer-events: none;
}

.tm-hc-video-wrap {
  position: absolute;
  inset: 0;
}
.tm-hc-video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Front: center, full opacity, highest z */
.tm-hc--front {
  transform: translateX(0) rotate(0deg) scale(1);
  opacity: 1;
  z-index: 3;
  pointer-events: auto;
}

/* Mid: slightly behind + tilted right */
.tm-hc--mid {
  transform: translateX(28px) rotate(5deg) scale(0.92);
  opacity: 0.6;
  z-index: 2;
  pointer-events: none;
}

/* Back: furthest behind + tilted left */
.tm-hc--back {
  transform: translateX(-28px) rotate(-5deg) scale(0.84);
  opacity: 0.3;
  z-index: 1;
  pointer-events: none;
}

/* Hover: lift the stack slightly */
.tm-hero-cards:hover .tm-hc--front {
  transform: translateX(0) rotate(0deg) scale(1.02) translateY(-6px);
}

/* Live label on front card */
.tm-hc-label {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(11,19,32,0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(41,171,226,0.25);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tm-hc-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  flex-shrink: 0;
  animation: tm-pulse 1.8s ease-in-out infinite;
}

@keyframes tm-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.75); }
}

/* "Watch their stories" link */
.tm-hero-cta-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--cyan);
  text-decoration: none;
  opacity: 0.75;
  transition: opacity 0.2s;
  animation: tm-bob 2.2s ease-in-out infinite;
}
.tm-hero-cta-link:hover { opacity: 1; }

@keyframes tm-bob {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(4px); }
}


/* ══════════════════════════════════════
   FEATURED VIDEO
══════════════════════════════════════ */
#tm-featured {
  background: var(--cream);
  padding: 80px 0;
}

.tm-featured-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

.tm-featured-video-wrap {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  aspect-ratio: 16 / 9;
  background: #0B1320;
}

.tm-featured-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tm-featured-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--cyan);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 6px;
}

/* Meta side */
.tm-featured-meta {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.tm-featured-quote {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: clamp(17px, 1.8vw, 21px);
  line-height: 1.6;
  color: var(--bg);
  margin: 0;
  padding-left: 20px;
  border-left: 3px solid var(--cyan);
}

.tm-featured-author {
  display: flex;
  align-items: center;
  gap: 14px;
}

.tm-author-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bg) 0%, var(--bg2) 100%);
  color: var(--cyan);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 2px solid rgba(41,171,226,0.3);
}

.tm-author-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--bg);
}
.tm-author-role {
  font-size: 12px;
  color: rgba(11,19,32,0.5);
  margin-top: 2px;
}

.tm-stars {
  display: flex;
  gap: 3px;
  align-items: center;
}


/* ══════════════════════════════════════
   VIDEO GRID
══════════════════════════════════════ */
#tm-grid {
  background: var(--bg2);
  padding: 80px 0 100px;
  scroll-margin-top: 80px;
}

.tm-grid-header {
  margin-bottom: 48px;
}
.tm-grid-header .display-sm {
  color: #fff;
}

/* 5-card grid: 3 top row, 2 centered bottom row */
.tm-videos {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 28px;
}

/* Each card spans 2 of 6 columns → 3 per row */
.tm-card {
  grid-column: span 2;
}

/* Cards 4 & 5: shift inward by 1 column each to center the pair */
.tm-card:nth-child(4) { grid-column: 2 / 4; }
.tm-card:nth-child(5) { grid-column: 4 / 6; }

/* Card */
.tm-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), border-color 0.22s var(--ease);
}
.tm-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 48px rgba(0,0,0,0.35);
  border-color: rgba(41,171,226,0.35);
}

.tm-card-video-wrap {
  aspect-ratio: 9 / 16;
  background: #07101f;
  overflow: hidden;
  position: relative;
}

.tm-card-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tm-card-meta {
  padding: 16px 18px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tm-card-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tm-card-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tm-card-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}
.tm-card-role {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.tm-card-stars {
  color: #F59E0B;
  font-size: 12px;
  letter-spacing: 1px;
  flex-shrink: 0;
}


/* ══════════════════════════════════════
   CTA STRIP
══════════════════════════════════════ */
#tm-cta {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 72px 0;
}

.tm-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.tm-cta-actions {
  display: flex;
  gap: 14px;
  flex-shrink: 0;
}


/* ══════════════════════════════════════
   SCROLL REVEAL
══════════════════════════════════════ */
.reveal-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal-up.revealed {
  opacity: 1;
  transform: translateY(0);
}


/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 1024px) {
  .tm-hero-layout {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .tm-hero-cards-wrap {
    flex-direction: row;
    justify-content: flex-start;
    gap: 40px;
  }
  /* On tablet: 2-column grid, all cards span 1 column */
  .tm-videos {
    grid-template-columns: repeat(2, 1fr);
  }
  .tm-card             { grid-column: span 1; }
  .tm-card:nth-child(4){ grid-column: span 1; }
  .tm-card:nth-child(5){ grid-column: span 1; }
  .tm-featured-inner {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

@media (max-width: 768px) {
  #tm-hero { padding: 130px 0 60px; }
  .tm-hero-stats { padding: 16px 20px; }
  .tm-stat { padding: 0 16px; }
  .tm-stat-num { font-size: 20px; }
  .tm-cta-inner { flex-direction: column; text-align: center; }
  .tm-cta-actions { justify-content: center; flex-wrap: wrap; }
}

@media (max-width: 640px) {
  .tm-videos { grid-template-columns: 1fr; }
  .tm-card             { grid-column: 1 / -1; }
  .tm-card:nth-child(4){ grid-column: 1 / -1; }
  .tm-card:nth-child(5){ grid-column: 1 / -1; }
  .tm-hero-stats { flex-direction: column; gap: 12px; align-items: flex-start; }
  .tm-stat-sep { display: none; }
  .tm-stat { padding: 0; align-items: flex-start; }
  .tm-hero-cards-wrap { flex-direction: column; }
}
