@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Merriweather:wght@700&display=swap');

/* ════════════════════════════════════════════
   CSS VARIABLES
   ════════════════════════════════════════════ */
:root {
  --thvs-primary:   #1a2332;
  --thvs-accent:    #2563eb;
  --thvs-highlight: #10b981;
  --thvs-card-bg:   #ffffff;
  --thvs-text:      #111827;
  --thvs-border:    #e5e7eb;
  --thvs-bg:        #f8f9fa;
  --thvs-muted:     #6b7280;
  --thvs-radius:    8px;
  --thvs-radius-lg: 12px;
  --thvs-shadow:    0 1px 3px rgba(0,0,0,.05),0 1px 8px rgba(0,0,0,.04);
  --thvs-shadow-md: 0 4px 20px rgba(0,0,0,.09);
  --thvs-tr:        all .18s ease;
  --thvs-font:      'Inter', system-ui, -apple-system, sans-serif;
}
.thvs-wrap { font-family:var(--thvs-font); color:var(--thvs-text); }
.thvs-wrap * { box-sizing:border-box; margin:0; padding:0; }

/* ════════════════════════════════════════════
   HERO
   ════════════════════════════════════════════ */
.thvs-hero {
  background: linear-gradient(140deg, #0c1526 0%, #14213d 55%, #1a2d4a 100%);
  padding: 52px 40px 48px;
  border-radius: 14px;
  margin-bottom: 28px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.thvs-hero::before {
  content: '';
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 25% 60%, rgba(37,99,235,.18) 0%, transparent 55%),
              radial-gradient(ellipse at 80% 30%, rgba(16,185,129,.1) 0%, transparent 50%);
}
.thvs-hero-eyebrow {
  display: inline-block; font-size: 11px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  color: rgba(255,255,255,.45); margin-bottom: 14px;
  position: relative; z-index: 1;
}
.thvs-hero-title {
  font-family: 'Merriweather', Georgia, serif;
  font-size: clamp(22px, 3.5vw, 40px);
  color: #fff; margin: 0 0 10px; line-height: 1.2;
  position: relative; z-index: 1;
}
.thvs-hero-sub {
  font-size: 14px; color: rgba(255,255,255,.45);
  margin: 0 auto 34px; max-width: 400px; line-height: 1.6;
  position: relative; z-index: 1;
}
.thvs-hero-kpis {
  display: inline-flex; gap: 36px; justify-content: center;
  flex-wrap: wrap; position: relative; z-index: 1;
}
.thvs-kpi-num { font-size: 28px; font-weight: 700; color: #fff; line-height: 1; }
.thvs-kpi-lbl { font-size: 10px; color: rgba(255,255,255,.38); text-transform: uppercase; letter-spacing: .1em; margin-top: 4px; font-weight: 600; }

/* ════════════════════════════════════════════
   LAYOUT
   ════════════════════════════════════════════ */
.thvs-layout {
  display: grid;
  grid-template-columns: 248px 1fr;
  gap: 24px;
  align-items: start;
}
@media(max-width:900px){ .thvs-layout{ grid-template-columns:1fr; } }

/* ════════════════════════════════════════════
   FILTER SIDEBAR — no buttons, plain & clean
   ════════════════════════════════════════════ */
.thvs-sidebar {
  background: #fff;
  border: 1px solid var(--thvs-border);
  border-radius: var(--thvs-radius-lg);
  box-shadow: var(--thvs-shadow);
  position: sticky; top: 16px;
  overflow: hidden;
}
@media(max-width:900px){ .thvs-sidebar{ position:static; } }

/* Filter block */
.thvs-sf-block {
  padding: 14px 16px;
  border-bottom: 1px solid #f3f4f6;
}
.thvs-sf-block:last-of-type { border-bottom: none; }

.thvs-sf-label {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
  font-size: 10.5px; font-weight: 700; color: #9ca3af;
  text-transform: uppercase; letter-spacing: .08em;
}
.thvs-sf-clr {
  font-size: 10.5px; font-weight: 600; color: var(--thvs-accent);
  background: none; border: none; cursor: pointer;
  font-family: var(--thvs-font); padding: 0; line-height: 1;
  transition: opacity .15s;
}
.thvs-sf-clr:hover { opacity: .7; }

/* Search block */
.thvs-sf-search-block { padding: 12px 14px; }
.thvs-sf-search-wrap { position: relative; }
.thvs-sf-si {
  position: absolute; left: 9px; top: 50%;
  transform: translateY(-50%); color: #9ca3af; pointer-events: none;
}
.thvs-sf-search {
  width: 100%; padding: 8px 10px 8px 30px;
  border: 1px solid var(--thvs-border); border-radius: var(--thvs-radius);
  font-family: var(--thvs-font); font-size: 13px; color: var(--thvs-text);
  background: var(--thvs-bg); outline: none; transition: border-color .15s;
}
.thvs-sf-search:focus { border-color: #9ca3af; background: #fff; }
.thvs-sf-search::placeholder { color: #9ca3af; }

/* Searchable text input above options */
.thvs-sf-search-in {
  width: 100%; padding: 6px 9px;
  border: 1px solid var(--thvs-border); border-radius: var(--thvs-radius);
  font-family: var(--thvs-font); font-size: 12px; color: var(--thvs-text);
  background: var(--thvs-bg); outline: none; margin-bottom: 6px;
  transition: border-color .15s;
}
.thvs-sf-search-in:focus { border-color: #9ca3af; }
.thvs-sf-search-in::placeholder { color: #9ca3af; }

/* Options list — scrollable, no background colors */
.thvs-sf-options {
  max-height: 168px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 1px;
}
.thvs-sf-options-inline {
  max-height: none; flex-direction: row; flex-wrap: wrap; gap: 5px;
  overflow: visible;
}
.thvs-sf-opt {
  padding: 6px 9px;
  font-size: 12.5px; color: var(--thvs-muted);
  cursor: pointer; border-radius: 5px;
  transition: all .12s; line-height: 1.35;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: none; border: none; text-align: left; font-family: var(--thvs-font);
  display: block; width: 100%;
}
.thvs-sf-options-inline .thvs-sf-opt {
  width: auto; border: 1px solid var(--thvs-border); border-radius: 50px;
  padding: 4px 10px; font-size: 11.5px; font-weight: 500; color: var(--thvs-muted);
  background: var(--thvs-bg);
}
.thvs-sf-opt:hover { background: #f3f4f6; color: var(--thvs-text); }
.thvs-sf-options-inline .thvs-sf-opt:hover { background: #f3f4f6; }
.thvs-sf-opt.active {
  background: var(--thvs-primary); color: #fff; font-weight: 600;
}
.thvs-sf-options-inline .thvs-sf-opt.active {
  background: var(--thvs-primary); color: #fff; border-color: var(--thvs-primary);
}
.thvs-sf-opt-all { color: #9ca3af; font-size: 12px; }
.thvs-sf-opt-all.active { background: #f3f4f6; color: var(--thvs-text); }
.thvs-sf-options-inline .thvs-sf-opt-all.active { background: var(--thvs-bg2,#f1f3f5); border-color: #9ca3af; color: var(--thvs-text); }
.thvs-sf-opt[style*="display:none"] { display: none !important; }

/* GPA range */
.thvs-sf-range { display: grid; grid-template-columns: 1fr auto 1fr; gap: 6px; align-items: center; }
.thvs-sf-range-in {
  padding: 7px 8px; border: 1px solid var(--thvs-border); border-radius: var(--thvs-radius);
  font-family: var(--thvs-font); font-size: 12.5px; color: var(--thvs-text);
  background: var(--thvs-bg); width: 100%; outline: none; text-align: center;
  transition: border-color .15s;
}
.thvs-sf-range-in:focus { border-color: #9ca3af; }
.thvs-sf-range-sep { font-size: 12px; color: #9ca3af; text-align: center; }

/* Reset all */
.thvs-sf-footer { padding: 12px 16px; }
.thvs-sf-reset-all {
  width: 100%; padding: 8px 0; text-align: center;
  font-size: 12px; font-weight: 500; color: #9ca3af;
  background: none; border: 1px solid var(--thvs-border); border-radius: var(--thvs-radius);
  cursor: pointer; font-family: var(--thvs-font); transition: all .15s;
}
.thvs-sf-reset-all:hover { border-color: #9ca3af; color: var(--thvs-text); background: var(--thvs-bg); }

/* Mobile filter toggle */
.thvs-mob-filter-btn {
  display: none; align-items: center; gap: 6px; padding: 7px 12px;
  background: #fff; border: 1px solid var(--thvs-border); border-radius: var(--thvs-radius);
  font-family: var(--thvs-font); font-size: 13px; font-weight: 500; cursor: pointer; color: var(--thvs-text);
}
@media(max-width:900px){ .thvs-mob-filter-btn{ display:flex; } }

/* ════════════════════════════════════════════
   TOOLBAR
   ════════════════════════════════════════════ */
.thvs-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; flex-wrap: wrap; gap: 8px;
}
.thvs-result-info { font-size: 12.5px; color: var(--thvs-muted); }
.thvs-result-info strong { color: var(--thvs-text); font-weight: 600; }
.thvs-toolbar-right { display: flex; gap: 6px; align-items: center; }
.thvs-sort-sel {
  padding: 6px 10px; border: 1px solid var(--thvs-border); border-radius: var(--thvs-radius);
  font-family: var(--thvs-font); font-size: 12.5px; color: var(--thvs-text); background: #fff; outline: none;
}
.thvs-view-toggle { display: flex; background: #f1f3f5; border-radius: 6px; padding: 2px; }
.thvs-vbtn {
  width: 28px; height: 26px; border: none; background: none;
  display: flex; align-items: center; justify-content: center;
  border-radius: 4px; cursor: pointer; color: var(--thvs-muted); transition: var(--thvs-tr);
}
.thvs-vbtn.active { background: #fff; color: var(--thvs-text); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

/* Active chips */
.thvs-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; min-height: 2px; }
.thvs-chip {
  display: inline-flex; align-items: center; gap: 3px;
  background: #f1f3f5; border: 1px solid var(--thvs-border);
  color: var(--thvs-text); font-size: 11px; font-weight: 500;
  padding: 3px 8px; border-radius: 50px;
}
.thvs-chip-rm {
  background: none; border: none; width: 14px; height: 14px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 8px;
  cursor: pointer; color: var(--thvs-muted); transition: var(--thvs-tr); padding: 0;
}
.thvs-chip-rm:hover { background: var(--thvs-muted); color: #fff; }

/* ════════════════════════════════════════════
   CARDS GRID
   ════════════════════════════════════════════ */
.thvs-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.thvs-grid.list { grid-template-columns: 1fr; }
@media(max-width:1200px){ .thvs-grid{ grid-template-columns: repeat(2,1fr); } }
@media(max-width:640px)  { .thvs-grid{ grid-template-columns: 1fr; } }

.thvs-card {
  background: var(--thvs-card-bg); border: 1px solid var(--thvs-border);
  border-radius: var(--thvs-radius-lg); overflow: hidden;
  box-shadow: var(--thvs-shadow); transition: var(--thvs-tr);
  display: flex; flex-direction: column;
  animation: cardIn .28s ease both;
}
.thvs-card:hover { box-shadow: var(--thvs-shadow-md); border-color: #d1d5db; transform: translateY(-2px); }
@keyframes cardIn { from{opacity:0;transform:translateY(6px)} to{opacity:1;transform:none} }

.thvs-card-congrats {
  background: var(--thvs-highlight); color: #fff;
  font-size: 11px; font-weight: 500; padding: 7px 13px; text-align: center; line-height: 1.4;
}
.thvs-card-slider {
  position: relative; overflow: hidden; background: #f1f3f5; height: 170px;
}
.thvs-slider-track { display: flex; height: 100%; transition: transform .5s ease; }
.thvs-slide { flex-shrink: 0; width: 100%; height: 100%; }
.thvs-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thvs-slide-placeholder {
  width: 100%; height: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px; color: #c9cdd3;
}
.thvs-slide-placeholder-img {
  width: 52px; height: 52px; border-radius: 50%; background: #e5e7eb;
  display: flex; align-items: center; justify-content: center;
}
.thvs-slide-placeholder p { font-size: 11px; margin: 0; color: #c9cdd3; }
.thvs-slider-dots {
  position: absolute; bottom: 7px; left: 50%; transform: translateX(-50%); display: flex; gap: 4px;
}
.thvs-slider-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: rgba(255,255,255,.5); transition: var(--thvs-tr); cursor: pointer;
}
.thvs-slider-dot.active { background: #fff; width: 14px; border-radius: 3px; }

.thvs-card-body { padding: 13px 14px 10px; flex: 1; }
.thvs-card-name {
  font-size: 14.5px; font-weight: 700; color: var(--thvs-text); margin-bottom: 3px; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.thvs-card-univ {
  font-size: 12px; color: var(--thvs-muted); margin-bottom: 8px;
  display: flex; align-items: center; gap: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.thvs-card-meta { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.thvs-card-dest { font-size: 12px; color: var(--thvs-muted); }
.thvs-card-sep { color: #d1d5db; }
.thvs-card-tags { display: flex; flex-wrap: wrap; gap: 4px; }

/* Tags */
.thvs-tag {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 2px 7px; border-radius: 50px; font-size: 11px; font-weight: 600; white-space: nowrap;
}
.thvs-tag-program { background: #f3f4f6; color: #374151; }
.thvs-tag-intake  { background: #f3f4f6; color: #6b7280; }
.thvs-tag-gpa-high{ background: #ecfdf5; color: #059669; }
.thvs-tag-gpa-mid { background: #fffbeb; color: #d97706; }
.thvs-tag-gpa-low { background: #fff7ed; color: #ea580c; }
.thvs-tag-gap     { background: #f3f4f6; color: #6b7280; }
.thvs-tag-no-gap  { background: #ecfdf5; color: #059669; }
.thvs-tag-scholar { background: #fefce8; color: #854d0e; border: 1px solid #fef08a; }

.thvs-status {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 50px;
}
.thvs-status::before { content: ''; width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.st-active    { background: #ecfdf5; color: #059669; } .st-active::before    { background: #10b981; }
.st-graduated { background: #eff6ff; color: #2563eb; } .st-graduated::before { background: #3b82f6; }
.st-deferred  { background: #fffbeb; color: #d97706; } .st-deferred::before  { background: #f59e0b; }
.st-pending   { background: #f3f4f6; color: #6b7280; } .st-pending::before   { background: #9ca3af; }

.thvs-card-foot {
  padding: 10px 14px; border-top: 1px solid var(--thvs-border);
  background: var(--thvs-bg); display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.thvs-card-badges { display: flex; flex-wrap: wrap; gap: 4px; }
.thvs-card-view {
  font-size: 12px; font-weight: 600; color: var(--thvs-primary);
  background: none; border: 1px solid var(--thvs-border); border-radius: var(--thvs-radius);
  padding: 5px 11px; cursor: pointer; font-family: var(--thvs-font);
  transition: var(--thvs-tr); text-decoration: none; display: inline-block; white-space: nowrap;
}
.thvs-card-view:hover { background: var(--thvs-primary); border-color: var(--thvs-primary); color: #fff; }

/* ════════════════════════════════════════════
   PAGINATION
   ════════════════════════════════════════════ */
.thvs-pag { display: flex; justify-content: center; gap: 4px; margin-top: 28px; flex-wrap: wrap; }
.thvs-pag-btn {
  min-width: 34px; height: 34px; padding: 0 10px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--thvs-border); border-radius: var(--thvs-radius);
  background: #fff; font-family: var(--thvs-font); font-size: 13px; font-weight: 500;
  color: var(--thvs-muted); cursor: pointer; transition: var(--thvs-tr);
}
.thvs-pag-btn:hover { border-color: var(--thvs-primary); color: var(--thvs-primary); }
.thvs-pag-btn.active { background: var(--thvs-primary); border-color: var(--thvs-primary); color: #fff; }
.thvs-pag-btn:disabled { opacity: .4; cursor: default; }

/* ════════════════════════════════════════════
   LOADING / EMPTY
   ════════════════════════════════════════════ */
.thvs-loading {
  grid-column: 1/-1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 56px 20px; gap: 12px;
  color: var(--thvs-muted); font-size: 13px;
}
.thvs-spinner {
  width: 32px; height: 32px; border: 2.5px solid var(--thvs-border);
  border-top-color: var(--thvs-primary); border-radius: 50%; animation: spin .65s linear infinite;
}
@keyframes spin { to{ transform: rotate(360deg); } }
.thvs-empty { grid-column: 1/-1; text-align: center; padding: 52px 20px; color: var(--thvs-muted); }
.thvs-empty-icon { font-size: 40px; display: block; margin-bottom: 12px; }
.thvs-empty h3 { font-size: 17px; color: var(--thvs-text); margin: 0 0 6px; }
.thvs-empty p  { font-size: 13px; margin: 0; }

/* Lightbox */
.thvs-lightbox {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.9); display: none; align-items: center; justify-content: center; padding: 16px;
}
.thvs-lightbox.open { display: flex; }
.thvs-lb-img { max-width: 90vw; max-height: 88vh; object-fit: contain; border-radius: 8px; }
.thvs-lb-close,.thvs-lb-nav {
  position: fixed; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: #fff; font-size: 18px; width: 40px; height: 40px; transition: var(--thvs-tr);
  font-family: var(--thvs-font);
}
.thvs-lb-close:hover,.thvs-lb-nav:hover { background: rgba(255,255,255,.2); }
.thvs-lb-close { top: 14px; right: 14px; }
.thvs-lb-prev  { left: 14px; top: 50%; transform: translateY(-50%); }
.thvs-lb-next  { right: 14px; top: 50%; transform: translateY(-50%); }
.thvs-lb-cap {
  position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,.55); color: rgba(255,255,255,.8);
  font-size: 12px; padding: 4px 14px; border-radius: 50px; white-space: nowrap; font-family: var(--thvs-font);
}
