/* ══════════════════════════════════════════════════════
   Talk Partners — Character Cards
   ══════════════════════════════════════════════════════ */
.tp-browse-wrap {
  padding: 40px 0 0;
  background: #fff;
}
.tp-browse-title {
  font-family: 'Varela Round', sans-serif;
  font-size: 32px;
  font-weight: 700;
  color: #1A1A2E;
  text-align: center;
  margin: 0 0 10px 0;
}
.tp-browse-sub {
  font-family: 'Montserrat', sans-serif;
  font-size: 17px;
  color: #555;
  text-align: center;
  margin: 0 0 36px 0;
}
/* ── Outer block: name list LEFT + card panel RIGHT ── */
#tp-char-block {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  max-width: 900px;
  margin: 0 auto;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.10);
  overflow: hidden;
  height: 500px;
}
/* ── Left: name list ── */
.tp-name-list {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 160px;
  flex-shrink: 0;
  background: #f0f4ff;
  border-right: 2px solid #e0e8ff;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.tp-name-item {
  font-family: 'Varela Round', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #555;
  padding: 22px 20px;
  cursor: pointer;
  border-left: 4px solid transparent;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
  user-select: none;
}
.tp-name-item:hover,
.tp-name-item.tp-name-active {
  color: #0181FE;
  background: #fff;
  border-left-color: #0181FE;
}
/* ── Right: card panel ── */
.tp-card-panel {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  overflow: hidden;
}
/* ── Photo section ── */
.tp-card-photo {
  width: 32%;
  flex-shrink: 0;
  overflow: hidden;
}
.tp-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}
/* ── Text body ── */
.tp-card-body {
  flex: 1;
  padding: 22px 20px 18px;
  display: flex;
  flex-direction: column;
}
.tp-card-body h3 {
  font-family: 'Varela Round', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #1A1A2E;
  margin: 0 0 4px 0;
}
.tp-card-langs {
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #0181FE;
  margin: 0 0 10px 0;
}
.tp-card-desc {
  font-family: 'Montserrat', sans-serif;
  font-size: 18px;
  color: #555;
  line-height: 1.55;
  margin: 0 0 14px 0;
  overflow: visible;
}
/* ── QR row — sits directly below description, no gap ── */
.tp-card-qr {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}
.tp-card-qr img {
  width: 120px;
  height: 120px;
  border-radius: 10px;
  border: 2px solid #e0e8ff;
  flex-shrink: 0;
}
.tp-card-qr-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tp-card-qr-text span {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #1A1A2E;
}
.tp-card-qr-text a {
  font-family: 'Montserrat', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: #0181FE;
  text-decoration: underline;
}
/* ══════════════════════════════════════════════════════
   TABLET (481px – 900px)
   ══════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .tp-card-photo {
    width: 28%;
  }
  .tp-name-list {
    width: 130px;
  }
  .tp-name-item {
    font-size: 16px;
    padding: 18px 14px;
  }
}
/* ══════════════════════════════════════════════════════
   MOBILE (≤ 600px):
   - Name tabs: horizontal row at top (unchanged)
   - Card: two columns side by side — photo left, content right
   ══════════════════════════════════════════════════════ */
@media (max-width: 600px) {
  /* Outer block stacks vertically: tabs on top, card below */
  #tp-char-block {
    flex-direction: column;
    border-radius: 0;
  }

  /* Name tabs become a horizontal row at the top */
  .tp-name-list {
    width: 100%;
    flex-direction: row;
    border-right: none;
    border-bottom: 2px solid #e0e8ff;
    justify-content: space-around;
  }
  .tp-name-item {
    border-left: none;
    border-bottom: 4px solid transparent;
    padding: 14px 10px;
    font-size: 15px;
    text-align: center;
    flex: 1;
  }
  .tp-name-item:hover,
  .tp-name-item.tp-name-active {
    border-left-color: transparent;
    border-bottom-color: #0181FE;
  }

  /* Card panel: two columns side by side — fixed height so QR is always visible */
  .tp-card-panel {
    flex-direction: row;
    align-items: stretch;
    height: 460px;
    max-height: 460px;
  }

  /* Photo: left column, full height, fixed width */
  .tp-card-photo {
    width: 42%;
    flex-shrink: 0;
    overflow: hidden;
  }
  .tp-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
  }

  /* Body: right column — flex column with scrollable desc and pinned QR */
  .tp-card-body {
    flex: 1;
    padding: 14px 12px 10px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .tp-card-body h3 {
    font-size: 17px;
    margin-bottom: 4px;
  }
  .tp-card-langs {
    font-size: 11px;
    margin-bottom: 8px;
  }
  /* Description: scrollable, takes remaining space above QR */
  .tp-card-desc {
    font-size: 12px;
    line-height: 1.55;
    margin-bottom: 0;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    padding-bottom: 8px;
  }

  /* QR: fixed box always visible at bottom, separated by a subtle line */
  .tp-card-qr {
    flex-shrink: 0;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    border-top: 1px solid #e0e8ff;
    padding-top: 8px;
    margin-top: 0;
  }
  .tp-card-qr img {
    width: 64px;
    height: 64px;
  }
  .tp-card-qr-text {
    gap: 3px;
  }
  .tp-card-qr-text span,
  .tp-card-qr-text a {
    font-size: 12px;
  }

  .tp-browse-title { font-size: 26px; }
  .tp-browse-sub   { font-size: 14px; }
}
/* ── Override Astra container width on How It Works page ── */
.page-id-10 .entry-content,
.page-id-10 .ast-container,
.page-id-10 #primary,
.page-id-10 .site-content {
  max-width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
.page-id-10 .tp-browse-wrap {
  padding-left: 0 !important;
  padding-right: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
}
/* ── Remove wpautop empty p tags gap ── */
.page-id-10 .entry-content > p:empty,
.page-id-10 .entry-content > p:first-child:empty {
  display: none;
  margin: 0;
  padding: 0;
  height: 0;
}
.page-id-10 .entry-content > p:first-child {
  margin-top: 0;
  padding-top: 0;
}
/* ── Remove Astra 64px margin-top on #primary ── */
.page-id-10 #primary {
  margin-top: 0 !important;
}
/* ── Make character card block truly full width ── */
.page-id-10 #tp-char-block {
  max-width: 100% !important;
  width: 100% !important;
  border-radius: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
