/*
 * Thulo Host — Visa Students Plugin v4.0
 * Frontend Stylesheet
 *
 * 60/30/10 Colour System:
 *   60% — Base (neutral white/stone)  : #FFFFFF, #F8F9FB, #F1F3F7
 *   30% — Navy (primary brand)        : --th-navy  = #0F2140
 *   10% — Accent (CTA / highlight)    : --th-gold  = #D4A843
 *
 * All selectors are namespaced under .th-vis or #th-vis-app
 * to guarantee zero conflict with any WordPress theme.
 * ============================================================
 */

/* ─── Google Fonts (loaded once) ─────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=DM+Serif+Display:ital@0;1&display=swap');

/* ─── Design Tokens ──────────────────────────── */
.th-vis,
.th-vis-profile {
  /* 60% — Base */
  --th-base:        #FFFFFF;
  --th-base-2:      #F8F9FB;
  --th-base-3:      #F1F3F7;
  --th-base-4:      #E4E8F0;
  --th-base-5:      #CBD2DE;

  /* 30% — Navy */
  --th-navy:        #0F2140;
  --th-navy-75:     rgba(15,33,64,.75);
  --th-navy-50:     rgba(15,33,64,.50);
  --th-navy-10:     rgba(15,33,64,.08);
  --th-navy-05:     rgba(15,33,64,.04);
  --th-navy-light:  #1A3358;

  /* 10% — Gold accent */
  --th-gold:        #D4A843;
  --th-gold-dark:   #B88A2E;
  --th-gold-light:  #FDF5E3;
  --th-gold-border: rgba(212,168,67,.35);

  /* Semantic colours */
  --th-green:       #16A34A;
  --th-green-bg:    #F0FDF4;
  --th-blue:        #2563EB;
  --th-blue-bg:     #EFF6FF;
  --th-amber:       #D97706;
  --th-amber-bg:    #FFFBEB;
  --th-red:         #DC2626;
  --th-red-bg:      #FEF2F2;
  --th-purple:      #7C3AED;
  --th-purple-bg:   #F5F3FF;

  /* Text */
  --th-text-h:      #0F2140;   /* headings */
  --th-text-b:      #1E2E46;   /* body      */
  --th-text-m:      #5A6A82;   /* muted     */
  --th-text-s:      #8A97A8;   /* subtle    */

  /* Link */
  --th-link:        #2563EB;
  --th-link-hover:  #1D4ED8;

  /* Borders & shadows */
  --th-border:      #E4E8F0;
  --th-border-2:    #CBD2DE;
  --th-shadow-xs:   0 1px 2px rgba(15,33,64,.06);
  --th-shadow-sm:   0 1px 4px rgba(15,33,64,.07), 0 2px 8px rgba(15,33,64,.05);
  --th-shadow:      0 2px 8px rgba(15,33,64,.08), 0 4px 18px rgba(15,33,64,.06);
  --th-shadow-md:   0 4px 20px rgba(15,33,64,.12), 0 8px 32px rgba(15,33,64,.08);
  --th-shadow-lg:   0 8px 40px rgba(15,33,64,.16);

  /* Geometry */
  --th-r-sm:   6px;
  --th-r:      10px;
  --th-r-lg:   14px;
  --th-r-xl:   20px;

  /* Transition */
  --th-ease:   all .2s cubic-bezier(.4,0,.2,1);

  /* Typography */
  --th-font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --th-font-display: 'DM Serif Display', Georgia, serif;
}

/* ─── Scoped Reset ──────────────────────────── */
.th-vis *,
.th-vis *::before,
.th-vis *::after,
.th-vis-profile *,
.th-vis-profile *::before,
.th-vis-profile *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
.th-vis,
.th-vis-profile {
  font-family: var(--th-font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--th-text-b);
  -webkit-font-smoothing: antialiased;
}

/* ═══════════════════════════════════════════════
   HERO BANNER
═══════════════════════════════════════════════ */
.th-hero {
  background: var(--th-navy);
  border-radius: var(--th-r-xl);
  padding: 64px 48px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin-bottom: 32px;
}
/* Radial glow layers */
.th-hero::before {
  content: '';
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 70% at 20% 50%, rgba(212,168,67,.15) 0%, transparent 70%),
    radial-gradient(ellipse 50% 60% at 85% 30%, rgba(37,99,235,.12) 0%, transparent 70%);
}
/* Gold bottom accent line */
.th-hero::after {
  content: '';
  position: absolute; bottom: 0; left: 15%; right: 15%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--th-gold), transparent);
}
.th-hero-inner { position: relative; z-index: 1; }

.th-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.13);
  color: rgba(255,255,255,.6);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 5px 16px;
  border-radius: 50px;
  margin-bottom: 20px;
}
.th-hero-eyebrow::before { content: '🎓'; font-size: 12px; }

.th-hero-title {
  font-family: var(--th-font-display);
  font-size: clamp(26px, 4vw, 48px);
  color: #ffffff;
  line-height: 1.15;
  letter-spacing: -.02em;
  margin-bottom: 12px;
}
.th-hero-title em {
  color: var(--th-gold);
  font-style: italic;
}
.th-hero-sub {
  font-size: 15px;
  color: rgba(255,255,255,.48);
  max-width: 460px;
  margin: 0 auto 44px;
  line-height: 1.7;
}

/* KPI row */
.th-hero-kpis {
  display: flex;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}
.th-hero-kpi {
  padding: 0 36px;
  border-right: 1px solid rgba(255,255,255,.1);
}
.th-hero-kpi:last-child { border-right: none; }
.th-kpi-num {
  font-family: var(--th-font-display);
  font-size: 38px;
  color: #ffffff;
  line-height: 1;
  margin-bottom: 5px;
}
.th-kpi-lbl {
  font-size: 10.5px;
  font-weight: 700;
  color: rgba(255,255,255,.35);
  text-transform: uppercase;
  letter-spacing: .1em;
}
@media(max-width:680px) {
  .th-hero { padding: 40px 20px 36px; }
  .th-hero-kpi { padding: 0 20px; }
  .th-kpi-num { font-size: 28px; }
}

/* ═══════════════════════════════════════════════
   MAIN LAYOUT: SIDEBAR + CONTENT
═══════════════════════════════════════════════ */
.th-layout {
  display: grid;
  grid-template-columns: 264px 1fr;
  gap: 24px;
  align-items: start;
}
@media(max-width:960px) { .th-layout { grid-template-columns: 1fr; } }

/* ═══════════════════════════════════════════════
   FILTER SIDEBAR
═══════════════════════════════════════════════ */
.th-sidebar {
  background: var(--th-base);
  border: 1px solid var(--th-border);
  border-radius: var(--th-r-lg);
  box-shadow: var(--th-shadow-sm);
  position: sticky;
  top: 20px;
  overflow: hidden;
}
@media(max-width:960px) { .th-sidebar { position: static; } }

/* Sidebar header */
.th-sb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 18px;
  background: var(--th-base-2);
  border-bottom: 1px solid var(--th-border);
}
.th-sb-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--th-text-h);
}
.th-sb-title svg { color: var(--th-text-m); }

/* Reset all link */
.th-sb-resetall {
  font-size: 12px;
  font-weight: 600;
  color: var(--th-text-m);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--th-font-body);
  padding: 4px 8px;
  border-radius: var(--th-r-sm);
  transition: var(--th-ease);
  text-decoration: none;
}
.th-sb-resetall:hover {
  background: var(--th-base-3);
  color: var(--th-text-h);
}

/* Search block */
.th-sb-search {
  padding: 12px 14px;
  border-bottom: 1px solid var(--th-border);
}
.th-sb-search-wrap { position: relative; }
.th-sb-search-wrap svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--th-text-s);
  pointer-events: none;
  flex-shrink: 0;
}
.th-sb-search-input {
  width: 100%;
  padding: 9px 12px 9px 34px;
  font-family: var(--th-font-body);
  font-size: 13px;
  color: var(--th-text-b);
  background: var(--th-base-2);
  border: 1.5px solid var(--th-border);
  border-radius: var(--th-r);
  outline: none;
  transition: var(--th-ease);
}
.th-sb-search-input:focus {
  border-color: var(--th-navy);
  background: var(--th-base);
  box-shadow: 0 0 0 3px rgba(15,33,64,.08);
}
.th-sb-search-input::placeholder { color: var(--th-text-s); }

/* Filter block */
.th-sb-block {
  padding: 14px 16px;
  border-bottom: 1px solid var(--th-base-3);
}
.th-sb-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.th-sb-label {
  font-size: 10.5px;
  font-weight: 800;
  color: var(--th-text-s);
  text-transform: uppercase;
  letter-spacing: .09em;
}
/* Per-filter clear — hidden until active */
.th-sb-clr {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--th-gold-dark);
  background: var(--th-gold-light);
  border: none;
  cursor: pointer;
  font-family: var(--th-font-body);
  padding: 2px 8px;
  border-radius: 50px;
  display: none;
  transition: var(--th-ease);
}
.th-sb-clr.on { display: inline-block; }
.th-sb-clr:hover { background: var(--th-gold); color: #fff; }

/* Inline search for lists */
.th-sb-list-search {
  width: 100%;
  padding: 7px 10px;
  margin-bottom: 8px;
  font-family: var(--th-font-body);
  font-size: 12px;
  color: var(--th-text-b);
  background: var(--th-base-2);
  border: 1.5px solid var(--th-border);
  border-radius: var(--th-r);
  outline: none;
  transition: var(--th-ease);
}
.th-sb-list-search:focus { border-color: var(--th-navy); }
.th-sb-list-search::placeholder { color: var(--th-text-s); }

/* Scrollable option list */
.th-sb-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  max-height: 190px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--th-base-4) transparent;
}
.th-sb-list::-webkit-scrollbar { width: 4px; }
.th-sb-list::-webkit-scrollbar-thumb { background: var(--th-base-4); border-radius: 2px; }

.th-sb-opt {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  border-radius: var(--th-r-sm);
  font-size: 13px;
  color: var(--th-text-m);
  cursor: pointer;
  transition: background .12s;
  user-select: none;
  line-height: 1.3;
}
.th-sb-opt:hover { background: var(--th-base-2); color: var(--th-text-b); }
.th-sb-opt input[type="radio"] {
  accent-color: var(--th-navy);
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  cursor: pointer;
}
/* Selected state */
.th-sb-opt:has(input:checked) {
  color: var(--th-navy);
  font-weight: 700;
  background: var(--th-navy-10);
}
.th-sb-opt-all { color: var(--th-text-s); font-size: 12px; }

/* Pill toggles — intake, year, scholarship */
.th-sb-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.th-sb-pill {
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  border: 1.5px solid var(--th-border);
  border-radius: 50px;
  background: var(--th-base);
  color: var(--th-text-m);
  cursor: pointer;
  font-family: var(--th-font-body);
  transition: var(--th-ease);
  line-height: 1.35;
}
.th-sb-pill:hover {
  border-color: var(--th-navy-50);
  color: var(--th-navy);
}
.th-sb-pill.active {
  background: var(--th-navy);
  border-color: var(--th-navy);
  color: #ffffff;
  font-weight: 700;
}

/* GPA range */
.th-sb-range {
  display: grid;
  grid-template-columns: 1fr 18px 1fr;
  gap: 6px;
  align-items: center;
}
.th-sb-range-in {
  width: 100%;
  padding: 8px 6px;
  font-family: var(--th-font-body);
  font-size: 13px;
  color: var(--th-text-b);
  background: var(--th-base-2);
  border: 1.5px solid var(--th-border);
  border-radius: var(--th-r);
  text-align: center;
  outline: none;
  transition: var(--th-ease);
}
.th-sb-range-in:focus { border-color: var(--th-navy); background: var(--th-base); }
.th-sb-range-sep {
  font-size: 13px;
  color: var(--th-text-s);
  text-align: center;
}

/* Mobile filter toggle button */
.th-mob-filter-btn {
  display: none;
  align-items: center;
  gap: 7px;
  padding: 8px 15px;
  font-family: var(--th-font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--th-navy);
  background: var(--th-base);
  border: 1.5px solid var(--th-border);
  border-radius: var(--th-r);
  cursor: pointer;
  transition: var(--th-ease);
}
.th-mob-filter-btn:hover { border-color: var(--th-navy); background: var(--th-navy-05); }
@media(max-width:960px) { .th-mob-filter-btn { display: flex; } }

/* ═══════════════════════════════════════════════
   TOOLBAR (SORT + VIEW TOGGLE)
═══════════════════════════════════════════════ */
.th-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 10px;
  flex-wrap: wrap;
}
.th-toolbar-left  { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.th-toolbar-right { display: flex; align-items: center; gap: 8px; }

.th-result-info {
  font-size: 13px;
  color: var(--th-text-m);
}
.th-result-info strong {
  color: var(--th-text-h);
  font-weight: 700;
}

.th-sort-select {
  padding: 7px 13px;
  font-family: var(--th-font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--th-text-b);
  background: var(--th-base);
  border: 1.5px solid var(--th-border);
  border-radius: var(--th-r);
  outline: none;
  cursor: pointer;
  transition: var(--th-ease);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235A6A82' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
}
.th-sort-select:focus { border-color: var(--th-navy); }

/* View toggle */
.th-view-toggle {
  display: flex;
  background: var(--th-base-2);
  border: 1px solid var(--th-border);
  border-radius: var(--th-r);
  padding: 3px;
  gap: 2px;
}
.th-view-btn {
  width: 32px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--th-text-s);
  border-radius: 7px;
  cursor: pointer;
  transition: var(--th-ease);
}
.th-view-btn:hover { color: var(--th-text-b); background: var(--th-base-3); }
.th-view-btn.active {
  background: var(--th-base);
  color: var(--th-navy);
  box-shadow: var(--th-shadow-xs);
}

/* ─── Active filter chips ─── */
.th-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
  min-height: 1px;
}
.th-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: var(--th-navy-10);
  border: 1px solid var(--th-navy-10);
  color: var(--th-navy);
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 50px;
  animation: th-chip-in .15s ease;
}
@keyframes th-chip-in { from{opacity:0;transform:scale(.9)} to{opacity:1;transform:scale(1)} }
.th-chip-rm {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border: none;
  background: none;
  color: var(--th-navy-50);
  cursor: pointer;
  border-radius: 50%;
  font-size: 10px;
  transition: var(--th-ease);
  font-family: var(--th-font-body);
  padding: 0;
}
.th-chip-rm:hover { background: var(--th-navy); color: #fff; }

/* ═══════════════════════════════════════════════
   SKELETON LOADER
═══════════════════════════════════════════════ */
.th-skeleton-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 18px;
}
@media(max-width:1100px) { .th-skeleton-grid { grid-template-columns: repeat(2,1fr); } }
@media(max-width:600px)  { .th-skeleton-grid { grid-template-columns: 1fr; } }

.th-skel-card {
  background: var(--th-base);
  border: 1px solid var(--th-border);
  border-radius: var(--th-r-lg);
  overflow: hidden;
}
.th-skel {
  background: linear-gradient(90deg, var(--th-base-3) 25%, var(--th-base-2) 50%, var(--th-base-3) 75%);
  background-size: 200% 100%;
  animation: th-shine 1.5s ease infinite;
  border-radius: var(--th-r-sm);
}
@keyframes th-shine { 0%{background-position:200% 0} 100%{background-position:-200% 0} }
.th-skel-img  { height: 175px; border-radius: 0; }
.th-skel-body { padding: 15px; }
.th-skel-h    { height: 16px; width: 65%; margin-bottom: 11px; }
.th-skel-m    { height: 12px; width: 45%; margin-bottom: 8px; }
.th-skel-t    { height: 12px; width: 80%; }

/* ═══════════════════════════════════════════════
   STUDENT CARDS
═══════════════════════════════════════════════ */
.th-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 18px;
}
.th-grid.th-list { grid-template-columns: 1fr; }
@media(max-width:1100px) { .th-grid { grid-template-columns: repeat(2,1fr); } }
@media(max-width:600px)  { .th-grid { grid-template-columns: 1fr; } }

/* ── Card ── */
.th-card {
  background: var(--th-base);
  border: 1px solid var(--th-border);
  border-radius: var(--th-r-lg);
  overflow: hidden;
  box-shadow: var(--th-shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
  animation: th-card-in .3s ease both;
}
.th-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--th-shadow-md);
  border-color: var(--th-base-5);
}
@keyframes th-card-in { from{opacity:0;transform:translateY(10px)} to{opacity:1;transform:none} }

/* Featured gold accent strip */
.th-card.th-featured { border-top: 3px solid var(--th-gold); }

/* Congrats banner */
.th-card-congrats {
  background: linear-gradient(135deg, var(--th-green), #22C55E);
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  padding: 7px 14px;
  text-align: center;
  line-height: 1.4;
  letter-spacing: .01em;
}

/* Image slider */
.th-slider {
  position: relative;
  overflow: hidden;
  background: var(--th-base-3);
  height: 175px;
  flex-shrink: 0;
}
.th-slider-track {
  display: flex;
  height: 100%;
  transition: transform .5s cubic-bezier(.4,0,.2,1);
}
.th-slide { flex-shrink: 0; width: 100%; height: 100%; }
.th-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Placeholder */
.th-slide-ph {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--th-base-5);
}
.th-slide-ph-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--th-base-4);
  display: flex;
  align-items: center;
  justify-content: center;
}
.th-slide-ph p {
  font-size: 11.5px;
  color: var(--th-text-s);
  margin: 0;
}
/* Dots */
.th-slider-dots {
  position: absolute;
  bottom: 9px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  z-index: 2;
}
.th-slider-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,.5);
  cursor: pointer;
  transition: var(--th-ease);
}
.th-slider-dot.active {
  background: #ffffff;
  width: 15px;
  border-radius: 3px;
}

/* Card body */
.th-card-body { padding: 15px 16px 12px; flex: 1; }

.th-card-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--th-text-h);
  margin-bottom: 4px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -.01em;
}
.th-card-univ {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  font-size: 12.5px;
  color: var(--th-text-m);
  margin-bottom: 10px;
  line-height: 1.4;
}
.th-card-univ svg { flex-shrink: 0; margin-top: 1px; }
.th-card-univ span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Meta row: flag + status */
.th-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.th-card-dest {
  font-size: 12.5px;
  color: var(--th-text-m);
  font-weight: 500;
}
.th-card-sep { color: var(--th-base-5); font-size: 12px; }

/* Tags row */
.th-card-tags { display: flex; flex-wrap: wrap; gap: 5px; }

/* ── Badges / tags ── */
.th-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 9px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  line-height: 1;
}
/* Program */
.th-badge-prog   { background: var(--th-navy-10); color: var(--th-navy); }
/* Intake */
.th-badge-intake { background: var(--th-base-3);  color: var(--th-text-m); }
/* GPA */
.th-badge-gpa-h  { background: var(--th-green-bg); color: var(--th-green); }
.th-badge-gpa-m  { background: var(--th-amber-bg); color: var(--th-amber); }
.th-badge-gpa-l  { background: #FFF7ED; color: #EA580C; }
/* Gap */
.th-badge-gap    { background: var(--th-base-3); color: var(--th-text-m); }
.th-badge-no-gap { background: var(--th-green-bg); color: var(--th-green); }
/* Scholarship */
.th-badge-scholar { background: var(--th-gold-light); color: var(--th-gold-dark); border: 1px solid var(--th-gold-border); }
/* Visa */
.th-badge-visa   { background: var(--th-blue-bg); color: var(--th-blue); }

/* Status pills */
.th-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 50px;
  font-size: 11.5px;
  font-weight: 700;
}
.th-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.th-st-active    { background: var(--th-green-bg);  color: var(--th-green);  }
.th-st-active::before    { background: var(--th-green); }
.th-st-graduated { background: var(--th-blue-bg);   color: var(--th-blue);   }
.th-st-graduated::before { background: var(--th-blue); }
.th-st-deferred  { background: var(--th-amber-bg);  color: var(--th-amber);  }
.th-st-deferred::before  { background: var(--th-amber); }
.th-st-pending   { background: var(--th-base-3);    color: var(--th-text-m); }
.th-st-pending::before   { background: var(--th-base-5); }

/* Card footer */
.th-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 16px;
  border-top: 1px solid var(--th-base-3);
  background: var(--th-base-2);
}
.th-card-foot-badges { display: flex; flex-wrap: wrap; gap: 5px; }

/* View Profile button */
.th-btn-view-profile {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  font-family: var(--th-font-body);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--th-navy);
  background: var(--th-base);
  border: 1.5px solid var(--th-navy);
  border-radius: var(--th-r);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: var(--th-ease);
  letter-spacing: -.01em;
}
.th-btn-view-profile:hover {
  background: var(--th-navy);
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(15,33,64,.28);
}
.th-btn-view-profile:visited {
  color: var(--th-navy);
}
.th-btn-view-profile:hover:visited {
  color: #ffffff;
}

/* ═══════════════════════════════════════════════
   EMPTY STATE
═══════════════════════════════════════════════ */
.th-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 64px 20px;
  color: var(--th-text-m);
}
.th-empty-icon { font-size: 48px; display: block; margin-bottom: 16px; }
.th-empty h3   { font-size: 18px; font-weight: 800; color: var(--th-text-h); margin-bottom: 7px; }
.th-empty p    { font-size: 14px; color: var(--th-text-m); }

/* ═══════════════════════════════════════════════
   PAGINATION
═══════════════════════════════════════════════ */
.th-pag {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  margin-top: 36px;
  flex-wrap: wrap;
}
.th-pag-btn {
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--th-font-body);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--th-text-m);
  background: var(--th-base);
  border: 1.5px solid var(--th-border);
  border-radius: var(--th-r);
  cursor: pointer;
  transition: var(--th-ease);
}
.th-pag-btn:hover   { border-color: var(--th-navy); color: var(--th-navy); background: var(--th-navy-05); }
.th-pag-btn.active  { background: var(--th-navy); border-color: var(--th-navy); color: #ffffff; font-weight: 800; }
.th-pag-btn:disabled { opacity: .35; cursor: not-allowed; }
.th-pag-ellipsis    { color: var(--th-text-s); padding: 0 4px; font-size: 14px; }

/* ═══════════════════════════════════════════════
   PROFILE PAGE  (th-vis-profile scope)
═══════════════════════════════════════════════ */
.th-vis-profile { background: var(--th-base-2); min-height: 60vh; }
.th-pp-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 36px 22px 80px;
}

/* Breadcrumb */
.th-pp-bc {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 26px;
  font-size: 13px;
  color: var(--th-text-m);
  flex-wrap: wrap;
}
.th-pp-bc a {
  color: var(--th-text-m);
  text-decoration: none;
  font-weight: 500;
  transition: color .15s;
}
.th-pp-bc a:hover { color: var(--th-navy); text-decoration: underline; }
.th-pp-bc-sep   { color: var(--th-base-5); }
.th-pp-bc-cur   { color: var(--th-text-h); font-weight: 700; }

/* Hero card */
.th-pp-hero {
  background: var(--th-navy);
  border-radius: var(--th-r-xl);
  overflow: hidden;
  margin-bottom: 22px;
  box-shadow: var(--th-shadow);
  position: relative;
}
.th-pp-hero::before {
  content: '';
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 55% 70% at 85% 40%, rgba(212,168,67,.14) 0%, transparent 65%),
    radial-gradient(ellipse 40% 50% at 15% 70%, rgba(37,99,235,.1) 0%, transparent 60%);
}
.th-pp-hero-body {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 36px 40px 32px;
  flex-wrap: wrap;
}
@media(max-width:640px) {
  .th-pp-hero-body { flex-direction: column; text-align: center; padding: 28px 22px 24px; }
}

/* Avatar */
.th-pp-avatar {
  width: 100px;
  height: 100px;
  border-radius: var(--th-r-lg);
  border: 2.5px solid rgba(255,255,255,.2);
  overflow: hidden;
  background: rgba(255,255,255,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.th-pp-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.th-pp-avatar-ph  { color: rgba(255,255,255,.3); }

.th-pp-hero-info  { flex: 1; min-width: 0; }
.th-pp-name {
  font-family: var(--th-font-display);
  font-size: clamp(22px, 3.5vw, 34px);
  color: #ffffff;
  line-height: 1.15;
  margin-bottom: 7px;
  letter-spacing: -.01em;
}
.th-pp-sub {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13.5px;
  color: rgba(255,255,255,.5);
  margin-bottom: 14px;
  flex-wrap: wrap;
}
@media(max-width:640px) { .th-pp-sub { justify-content: center; } }
.th-pp-sub span { display: flex; align-items: center; gap: 5px; }
.th-pp-badges { display: flex; gap: 7px; flex-wrap: wrap; }
@media(max-width:640px) { .th-pp-badges { justify-content: center; } }
.th-pp-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 13px;
  border-radius: 50px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.8);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.th-pp-badge-gold  { background: rgba(212,168,67,.2); color: #FBBF24; border-color: rgba(212,168,67,.4); }
.th-pp-badge-green { background: rgba(22,163,74,.2);  color: #4ADE80; border-color: rgba(22,163,74,.4);  }

/* Congrats strip */
.th-pp-congrats {
  position: relative; z-index: 1;
  background: linear-gradient(90deg, var(--th-green), #22C55E);
  padding: 15px 40px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.th-pp-congrats-icon { font-size: 22px; flex-shrink: 0; margin-top: 2px; }
.th-pp-congrats-body { color: #ffffff; }
.th-pp-congrats-label { font-size: 10px; font-weight: 800; opacity: .75; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 3px; }
.th-pp-congrats-text  { font-size: 14px; font-weight: 600; line-height: 1.55; }

/* Main/Sidebar layout */
.th-pp-layout {
  display: grid;
  grid-template-columns: 1fr 296px;
  gap: 22px;
  margin-bottom: 28px;
}
@media(max-width:960px) { .th-pp-layout { grid-template-columns: 1fr; } }

/* Section card */
.th-pp-card {
  background: var(--th-base);
  border: 1px solid var(--th-border);
  border-radius: var(--th-r-lg);
  overflow: hidden;
  box-shadow: var(--th-shadow-sm);
  margin-bottom: 18px;
}
.th-pp-card:last-child { margin-bottom: 0; }
.th-pp-card-head {
  padding: 13px 20px;
  border-bottom: 1px solid var(--th-base-3);
  font-size: 11px;
  font-weight: 800;
  color: var(--th-text-s);
  text-transform: uppercase;
  letter-spacing: .1em;
  background: var(--th-base-2);
  display: flex;
  align-items: center;
  gap: 8px;
}
.th-pp-card-body { padding: 20px; }

/* Profile info rows */
.th-pp-rows { display: flex; flex-direction: column; gap: 14px; }
.th-pp-row  { display: flex; gap: 12px; align-items: flex-start; }
.th-pp-lbl  { font-size: 12px; font-weight: 700; color: var(--th-text-s); min-width: 108px; flex-shrink: 0; padding-top: 2px; }
.th-pp-val  { font-size: 14px; font-weight: 600; color: var(--th-text-h); flex: 1; line-height: 1.45; }

/* Slider on profile page */
.th-pp-slider-wrap {
  background: var(--th-base-3);
  border-radius: var(--th-r-lg);
  overflow: hidden;
  margin-bottom: 22px;
  box-shadow: var(--th-shadow-sm);
  position: relative;
}
.th-pp-slider-track { display: flex; height: 300px; transition: transform .5s cubic-bezier(.4,0,.2,1); }
.th-pp-slide { flex-shrink: 0; width: 100%; height: 100%; }
.th-pp-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.th-pp-slide-ph {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px; color: var(--th-base-5);
}
.th-pp-slide-ph p { font-size: 13px; color: var(--th-text-s); margin: 0; }
.th-pp-sdots {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 5px; z-index: 2;
}
.th-pp-sdot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.5); cursor: pointer; transition: var(--th-ease); }
.th-pp-sdot.active { background: #fff; width: 18px; border-radius: 3px; }
.th-pp-sarr {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(15,33,64,.4); border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: #fff; font-size: 20px; z-index: 2;
  transition: background .15s; line-height: 1;
}
.th-pp-sarr:hover { background: rgba(15,33,64,.65); }
.th-pp-sarr-l { left: 14px; }
.th-pp-sarr-r { right: 14px; }

/* Gallery */
.th-pp-gal-tabs {
  display: flex; gap: 0;
  background: var(--th-base-2); border-radius: var(--th-r); padding: 3px;
  margin-bottom: 15px; width: fit-content; overflow-x: auto; max-width: 100%;
}
.th-pp-gal-tab {
  padding: 5px 15px; font-size: 13px; font-weight: 600;
  color: var(--th-text-m); border-radius: 7px; cursor: pointer;
  border: none; background: none; font-family: var(--th-font-body);
  white-space: nowrap; transition: var(--th-ease);
}
.th-pp-gal-tab.active { background: var(--th-base); color: var(--th-text-h); box-shadow: var(--th-shadow-xs); }
.th-pp-gal-tab:hover:not(.active) { color: var(--th-text-b); }

.th-pp-gal-pane { display: none; }
.th-pp-gal-pane.open {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 9px;
}
@media(max-width:600px) { .th-pp-gal-pane.open { grid-template-columns: repeat(2,1fr); } }

.th-pp-gal-item {
  aspect-ratio: 1;
  border-radius: var(--th-r);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  background: var(--th-base-3);
}
.th-pp-gal-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .28s ease; }
.th-pp-gal-item:hover img { transform: scale(1.07); }
.th-pp-gal-overlay {
  position: absolute; inset: 0;
  background: rgba(15,33,64,.45);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .18s; font-size: 20px;
}
.th-pp-gal-item:hover .th-pp-gal-overlay { opacity: 1; }
.th-pp-gal-cap {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(15,33,64,.75));
  color: #fff; font-size: 10px; padding: 10px 8px 5px; line-height: 1.3;
  font-family: var(--th-font-body);
}
.th-pp-gal-empty {
  padding: 28px; text-align: center; font-size: 13px; color: var(--th-text-s);
}

/* Sidebar quick-view */
.th-pp-quick { display: flex; flex-direction: column; gap: 10px; }
.th-pp-qi {
  display: flex; align-items: center; gap: 13px;
  padding: 12px 15px;
  background: var(--th-base-2); border-radius: var(--th-r);
  border: 1px solid var(--th-base-3);
}
.th-pp-qi-icon {
  width: 38px; height: 38px; border-radius: 8px;
  background: var(--th-base); border: 1px solid var(--th-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.th-pp-qi-lbl { font-size: 10.5px; font-weight: 800; color: var(--th-text-s); text-transform: uppercase; letter-spacing: .07em; margin-bottom: 3px; }
.th-pp-qi-val { font-size: 14.5px; font-weight: 800; color: var(--th-text-h); }

/* Notes */
.th-pp-notes {
  background: var(--th-base-2); border: 1px solid var(--th-border);
  border-radius: var(--th-r-lg); padding: 16px 20px; margin-bottom: 20px;
}
.th-pp-notes h4 { font-size: 10.5px; font-weight: 800; color: var(--th-text-s); text-transform: uppercase; letter-spacing: .09em; margin-bottom: 8px; }
.th-pp-notes p  { font-size: 14px; color: var(--th-text-b); line-height: 1.7; }

/* Related students */
.th-pp-related-title {
  font-size: 18px; font-weight: 800; color: var(--th-text-h);
  margin-bottom: 18px; display: flex; align-items: center; gap: 9px; letter-spacing: -.01em;
}
.th-pp-related-grid {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 16px;
}
@media(max-width:960px) { .th-pp-related-grid { grid-template-columns: repeat(2,1fr); } }
@media(max-width:480px) { .th-pp-related-grid { grid-template-columns: 1fr 1fr; } }

.th-pp-rel-card {
  background: var(--th-base); border: 1px solid var(--th-border);
  border-radius: var(--th-r-lg); overflow: hidden; text-decoration: none;
  display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  box-shadow: var(--th-shadow-xs);
}
.th-pp-rel-card:hover { transform: translateY(-3px); box-shadow: var(--th-shadow-md); border-color: var(--th-base-5); }
.th-pp-rel-img { height: 90px; background: var(--th-base-3); overflow: hidden; flex-shrink: 0; }
.th-pp-rel-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .28s; }
.th-pp-rel-card:hover .th-pp-rel-img img { transform: scale(1.05); }
.th-pp-rel-img-ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--th-base-5); }
.th-pp-rel-body { padding: 11px 13px; flex: 1; }
.th-pp-rel-name { font-size: 13px; font-weight: 800; color: var(--th-text-h); margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.th-pp-rel-uni  { font-size: 11.5px; color: var(--th-text-s); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 7px; }
.th-pp-rel-foot { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }

/* ═══════════════════════════════════════════════
   LIGHTBOX
═══════════════════════════════════════════════ */
.th-lightbox {
  position: fixed; inset: 0; z-index: 999999;
  background: rgba(10,18,32,.95);
  display: none; align-items: center; justify-content: center; padding: 20px;
  backdrop-filter: blur(4px);
}
.th-lightbox.open { display: flex; }
.th-lb-img { max-width: 92vw; max-height: 88vh; object-fit: contain; border-radius: 8px; display: block; }
.th-lb-btn {
  position: fixed;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: #fff; font-size: 20px;
  transition: background .15s; font-family: var(--th-font-body); line-height: 1;
}
.th-lb-btn:hover { background: rgba(255,255,255,.22); }
.th-lb-close { top: 16px; right: 16px; }
.th-lb-prev  { left: 16px;  top: 50%; transform: translateY(-50%); }
.th-lb-next  { right: 16px; top: 50%; transform: translateY(-50%); }
.th-lb-cap {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%);
  background: rgba(15,33,64,.7); color: rgba(255,255,255,.85);
  font-size: 13px; padding: 6px 18px; border-radius: 50px;
  white-space: nowrap; font-family: var(--th-font-body);
}

/* ═══════════════════════════════════════════════
   STATS TEMPLATE
═══════════════════════════════════════════════ */
.th-stats-grid {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 16px;
}
@media(max-width:900px) { .th-stats-grid { grid-template-columns: repeat(2,1fr); } }
.th-stat-card {
  background: var(--th-base); border: 1px solid var(--th-border);
  border-radius: var(--th-r-lg); padding: 20px 18px; text-align: center;
  box-shadow: var(--th-shadow-xs);
  border-top: 3px solid transparent;
  transition: var(--th-ease);
}
.th-stat-card:hover { box-shadow: var(--th-shadow-sm); transform: translateY(-2px); }
.th-stat-c1 { border-top-color: var(--th-navy); }
.th-stat-c2 { border-top-color: var(--th-green); }
.th-stat-c3 { border-top-color: var(--th-blue); }
.th-stat-c4 { border-top-color: var(--th-gold); }
.th-stat-icon { font-size: 30px; margin-bottom: 9px; }
.th-stat-num  { font-family: var(--th-font-display); font-size: 38px; font-weight: 700; color: var(--th-text-h); line-height: 1; margin-bottom: 5px; }
.th-stat-lbl  { font-size: 11.5px; font-weight: 700; color: var(--th-text-s); text-transform: uppercase; letter-spacing: .08em; }

/* ═══════════════════════════════════════════
   ADDITIONS v4.2
═══════════════════════════════════════════ */

/* Visa category badge */
.th-badge-visa-cat {
  background: #EFF6FF;
  color: #2563EB;
  border: 1px solid #BFDBFE;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 50px;
}
.th-badge-visa-cat svg { flex-shrink: 0; }

/* Work visa */
.th-vis .th-badge-visa-cat[title*="Work"],
.th-vis .th-badge-visa-cat[data-cat="Work"] {
  background: #FFFBEB; color: #D97706; border-color: #FDE68A;
}
/* Dependent visa */
.th-vis .th-badge-visa-cat[data-cat="Dependent"] {
  background: #F5F3FF; color: #7C3AED; border-color: #DDD6FE;
}
/* PR visa */
.th-vis .th-badge-visa-cat[data-cat="Permanent Residency"] {
  background: #F0FDF4; color: #16A34A; border-color: #BBF7D0;
}

/* Rejected status */
.th-st-rejected {
  background: #FEF2F2; color: #DC2626;
}
.th-st-rejected::before { background: #DC2626; }

/* Skeleton — match 9-col grid */
.th-skeleton-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media(max-width:1100px) { .th-skeleton-grid { grid-template-columns: repeat(2,1fr); } }
@media(max-width:600px)  { .th-skeleton-grid { grid-template-columns: 1fr; } }

/* Hide page title on listing shortcode page */
.thvs-listing-page .entry-title,
.thvs-listing-page .page-title,
body:has(.th-vis) .entry-title,
body:has(.th-vis) .page-title {
  display: none !important;
}

/* Profile page breadcrumb — ensure our own breadcrumb shows */
.thvs-pp-bc { display: flex !important; }

/* Breadcrumb hide for profile page WP title */
.thvs-profile-page .entry-title,
.thvs-profile-page .page-title {
  display: none !important;
}

/* Social share grid responsive */
@media(max-width:480px) {
  .thvs-pp-share-grid { grid-template-columns: 1fr; }
}

/* Visa category filter pill on listing */
.th-sb-pill[data-sf="visa_category"].active {
  background: var(--th-navy);
  border-color: var(--th-navy);
  color: #fff;
}

/* 9 per page — ensure grid always 3-col on desktop */
@media(min-width:1101px) {
  .th-grid { grid-template-columns: repeat(3,1fr) !important; }
}

/* Manage link in admin forms */
.ta-manage-link {
  font-size: 10px; font-weight: 600; color: var(--ta-blue, #2563EB);
  text-decoration: none; margin-left: 6px; text-transform: none;
  letter-spacing: 0; padding: 1px 5px; background: #EFF6FF; border-radius: 3px;
}
.ta-manage-link:hover { background: #DBEAFE; }
