/**
 * Shared UI components — buttons, FAQ accordion, testimonials, reveal.
 * Loaded globally so location, course, and page templates match the homepage.
 */

/* Inline SVG icons — prevent global svg { max-width: 100% } blow-up */
.ptenp-icon {
  width: 20px;
  height: 20px;
  max-width: 20px;
  max-height: 20px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

/* Buttons */
.ptenp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 50px;
  padding: 0 23px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.ptenp-btn svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.ptenp-btn:hover {
  transform: translateY(-2px);
}

.ptenp-btn--primary {
  color: #fff;
  background: var(--gradient-accent);
  box-shadow: 0 12px 28px rgba(178, 34, 34, 0.32);
}

.ptenp-btn--primary:hover {
  box-shadow: 0 16px 34px rgba(178, 34, 34, 0.4);
}

.ptenp-btn--outline {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.06);
}

.ptenp-btn--outline:hover {
  color: var(--color-primary);
  background: #fff;
  border-color: #fff;
}

.ptenp-btn--white {
  color: var(--color-primary);
  background: #fff;
}

.ptenp-btn--outline-white {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.6);
  background: transparent;
}

.ptenp-btn--outline-white:hover {
  color: var(--color-primary, #0a0a0a);
  background: #fff;
  border-color: #fff;
}

/* About page — featured trainer */
.ptenp-about-team {
  background:
    radial-gradient(circle at 15% 20%, rgba(178, 34, 34, 0.14), transparent 42%),
    radial-gradient(circle at 85% 80%, rgba(178, 34, 34, 0.08), transparent 38%),
    #0a0a0a;
  color: #fff;
}

.ptenp-about-team__head {
  max-width: 720px;
  margin: 0 auto clamp(28px, 4vw, 40px);
  text-align: center;
}

body.ptenp-about-page .floating-cta,
body:has(.ptenp-about-team) .floating-cta {
  display: none;
}

.ptenp-trainer-showcase {
  max-width: 1040px;
  margin: 0 auto;
  padding: clamp(24px, 3vw, 36px);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.ptenp-about-team .ptenp-trainer-showcase__row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: clamp(28px, 4vw, 48px);
}

.ptenp-trainer-showcase__content {
  flex: 1 1 0;
  min-width: 0;
}

.ptenp-trainer-showcase__photo {
  flex: 0 0 320px;
  width: 320px;
  max-width: 36%;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.ptenp-trainer-showcase__photo img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 12%;
}

.ptenp-trainer-showcase__photo-fallback {
  aspect-ratio: 4 / 5;
  display: grid;
  place-items: center;
  font-size: 3rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #1a1a1a, #3a1010);
}

.ptenp-trainer-showcase__name {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 2.8vw, 2rem);
  font-weight: 700;
  line-height: 1.15;
  color: #fff;
}

.ptenp-trainer-showcase__role {
  margin: 0 0 16px;
  color: var(--color-accent, #b22222);
  font-size: 0.95rem;
  font-weight: 600;
}

.ptenp-trainer-showcase__bio {
  margin: 0 0 20px;
  font-size: 0.95rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.78);
  max-width: 54ch;
}

.ptenp-trainer-showcase__metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.ptenp-trainer-showcase__metric {
  min-width: 128px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.ptenp-trainer-showcase__metric strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: #fff;
  line-height: 1.2;
}

.ptenp-trainer-showcase__metric span {
  display: block;
  margin-top: 2px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.62);
}

.ptenp-trainer-showcase__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.ptenp-trainer-showcase__tag {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(178, 34, 34, 0.14);
  border: 1px solid rgba(178, 34, 34, 0.32);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.78rem;
  font-weight: 600;
}

.ptenp-trainer-showcase__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 768px) {
  .ptenp-about-team .ptenp-trainer-showcase__row {
    flex-direction: column;
    text-align: center;
  }

  .ptenp-trainer-showcase__photo {
    flex: none;
    width: 100%;
    max-width: 280px;
    order: -1;
    margin-inline: auto;
  }

  .ptenp-trainer-showcase__bio {
    margin-inline: auto;
  }

  .ptenp-trainer-showcase__metrics,
  .ptenp-trainer-showcase__tags,
  .ptenp-trainer-showcase__actions {
    justify-content: center;
  }

  .ptenp-trainer-showcase__actions .ptenp-btn {
    width: 100%;
  }
}

/* Testimonials */
.ptenp-testimonials {
  background: #fff;
}

.ptenp-testimonials-grid {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.ptenp-testi-card {
  border-radius: var(--ptenp-radius-md, 14px);
  border: 1px solid #dae4f1;
  background: #fff;
  padding: 18px;
  box-shadow: var(--ptenp-shadow-sm, 0 8px 24px rgba(0, 0, 0, 0.08));
}

.ptenp-testi-rating {
  display: inline-flex;
  gap: 3px;
}

.ptenp-testi-rating svg {
  width: 14px;
  height: 14px;
  fill: var(--color-accent);
}

.ptenp-testi-score {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.77rem;
  font-weight: 700;
  color: #1c4f96;
  background: #ebf3ff;
  border-radius: 999px;
  padding: 5px 9px;
}

.ptenp-testi-score svg {
  width: 12px;
  height: 12px;
}

.ptenp-testi-text {
  margin: 13px 0;
  color: #1f314c;
  line-height: 1.72;
  font-size: 0.94rem;
}

.ptenp-testi-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ptenp-testi-avatar,
.ptenp-testi-avatar-img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.ptenp-testi-avatar {
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
}

.ptenp-av-1 {
  background: linear-gradient(135deg, #1655b8, #102b52);
}

.ptenp-av-2 {
  background: linear-gradient(135deg, #8c43d8, #5d2f93);
}

.ptenp-av-3 {
  background: linear-gradient(135deg, #16a074, #0f7756);
}

.ptenp-av-4 {
  background: linear-gradient(135deg, #ce9a22, #9a6f15);
}

.ptenp-testi-name {
  margin: 0;
  font-size: 0.93rem;
  font-weight: 700;
}

.ptenp-testi-meta {
  margin: 3px 0 0;
  color: var(--color-mid-gray, #6b7280);
  font-size: 0.81rem;
}

/* FAQ accordion */
.ptenp-faq {
  background: #fff;
}

.ptenp-faq-grid,
.ptenp-faq-list {
  margin-top: 36px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.ptenp-faq-item {
  border: 1px solid #dce6f2;
  border-radius: 14px;
  background: #fff;
  overflow: clip;
}

.ptenp-faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  font-weight: 700;
  line-height: 1.45;
}

.ptenp-faq-q {
  flex: 1;
  min-width: 0;
  padding-right: 8px;
  text-align: left;
}

.ptenp-faq-item summary::-webkit-details-marker {
  display: none;
}

.ptenp-faq-caret {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(178, 34, 34, 0.08);
  border: 1px solid rgba(178, 34, 34, 0.14);
  color: var(--color-accent);
  transition: transform 0.25s ease, background-color 0.2s ease;
  flex-shrink: 0;
  margin-left: auto;
}

.ptenp-faq-item summary:hover .ptenp-faq-caret {
  background: rgba(178, 34, 34, 0.14);
}

.ptenp-faq-caret svg {
  width: 14px;
  height: 14px;
}

.ptenp-faq-item[open] .ptenp-faq-caret {
  transform: rotate(180deg);
}

.ptenp-faq-body {
  padding: 0 20px 20px;
  color: #3d3d3d;
  line-height: 1.75;
}

.ptenp-faq-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 20px;
}

.ptenp-faq-tabs button,
.ptenp-faq-tabs .is-tab {
  min-height: 40px;
  border: 1px solid #d6e1ef;
  border-radius: 999px;
  background: #fff;
  color: var(--color-body-text, #1a1a1a);
  font-weight: 600;
  padding: 0 14px;
  cursor: pointer;
}

/* Reveal animation — near-zero opacity avoids NO_LCP in Lighthouse. */
.ptenp-reveal {
  opacity: 0.001;
  transform: translateY(24px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.ptenp-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.ptenp-delay-1 { transition-delay: 0.08s; }
.ptenp-delay-2 { transition-delay: 0.16s; }
.ptenp-delay-3 { transition-delay: 0.24s; }
.ptenp-delay-4 { transition-delay: 0.32s; }

@media (max-width: 1100px) {
  .ptenp-testimonials-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .ptenp-testimonials-grid {
    grid-template-columns: 1fr;
  }

  .ptenp-btn {
    min-height: var(--touch-min, 48px);
  }
}
