/* =======================================================
   TRAINER CAROUSEL — front-end styles
   Scoped entirely with the "tpc-" prefix so it cannot
   clash with your active theme or page builder.
   ======================================================= */

.tpc-section, .tpc-section * {
  box-sizing: border-box;
}
.tpc-section ul, .tpc-section ol { list-style: none; margin: 0; padding: 0; }
.tpc-section img { max-width: 100%; display: block; }
.tpc-section button { font-family: inherit; }

.tpc-empty {
  text-align: center;
  padding: 32px;
  color: #6b7280;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Design tokens */
.tpc-section {
  --tpc-navy: #12243f;
  --tpc-accent: #c8932f;
  --tpc-bg: #f7f8fb;
  --tpc-text: #1a1f2b;
  --tpc-muted: #6b7280;
  --tpc-card-bg: #ffffff;
  --tpc-radius: 16px;
  --tpc-card-w: 250px;
  --tpc-gap: 24px;

  position: relative;
  width: 100%;
  background: var(--tpc-bg);
  padding: 64px 5vw 72px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--tpc-text);
  overflow: hidden;
}

/* Carousel wrapper + nav buttons */
.tpc-carousel-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 1280px;
  margin: 0 auto;
}

.tpc-viewport {
  flex: 1 1 auto;
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%);
          mask-image: linear-gradient(to right, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%);
}

.tpc-track {
  display: flex;
  align-items: stretch;
  gap: var(--tpc-gap);
  width: max-content;
  will-change: transform;
}

.tpc-nav {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid #e3e6ee;
  background: #ffffff;
  color: var(--tpc-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(18, 36, 63, 0.08);
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease, border-color 0.2s ease;
  z-index: 2;
}
.tpc-nav:hover {
  background: var(--tpc-navy);
  color: #fff;
  border-color: var(--tpc-navy);
}
.tpc-nav:active { transform: scale(0.94); }
.tpc-nav svg { pointer-events: none; }

/* Trainer card */
.tpc-card {
  flex: 0 0 var(--tpc-card-w);
  background: var(--tpc-card-bg);
  border-radius: var(--tpc-radius);
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(18, 36, 63, 0.07);
  border: 1px solid #edeff4;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.tpc-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 30px rgba(18, 36, 63, 0.14);
}

/* Perfect square image, always */
.tpc-card-img-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #dfe3ea;
  position: relative;
}
.tpc-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* Fallback avatar shown when a trainer has no photo yet */
.tpc-no-img {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--tpc-navy), #2a4a7a);
  color: #fff;
  font-size: 42px;
  font-weight: 700;
  text-transform: uppercase;
}

.tpc-card-body {
  padding: 16px 16px 18px;
  text-align: center;
}
.tpc-card-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--tpc-navy);
  margin: 0 0 4px;
  line-height: 1.3;
}
.tpc-card-role {
  font-size: 13px;
  font-weight: 500;
  color: var(--tpc-accent);
  margin: 0;
  line-height: 1.4;
}

/* Responsive breakpoints */
@media (min-width: 1400px) {
  .tpc-section { --tpc-card-w: 260px; --tpc-gap: 28px; }
}
@media (max-width: 1024px) {
  .tpc-section { --tpc-card-w: 220px; --tpc-gap: 20px; padding: 52px 4vw 60px; }
}
@media (max-width: 768px) {
  .tpc-section { --tpc-card-w: 180px; --tpc-gap: 16px; padding: 44px 4vw 52px; }
  .tpc-nav { width: 38px; height: 38px; }
  .tpc-viewport {
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
            mask-image: linear-gradient(to right, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
  }
}
@media (max-width: 480px) {
  .tpc-section { --tpc-card-w: 132px; --tpc-gap: 12px; padding: 40px 4vw 48px; }
  .tpc-carousel-wrapper { gap: 8px; }
  .tpc-nav { width: 32px; height: 32px; }
  .tpc-nav svg { width: 16px; height: 16px; }
  .tpc-card-name { font-size: 13.5px; }
  .tpc-card-role { font-size: 11.5px; }
  .tpc-card-body { padding: 10px 10px 14px; }
  .tpc-no-img { font-size: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .tpc-track { transition: none !important; }
}
