/*
Theme Name: PF Theme
Theme URI: https://100bestpropfirms.com/
Author: 100BPF
Description: Lightweight theme for PF Core directory.
Version: 1.5
*/

/* ============================================================
   GLOBAL VARIABLES
   ============================================================ */
:root{
  --bg:#0e0f14;
  --panel:#151823;
  --muted:#8a92a6;
  --text:#e9ecf1;
  --accent:#39c6ff;
  --ok:#2bd17e;
  --warn:#ffb020;
  --bad:#ff5d5d;
  --bd:#1f2433;
}

/* ============================================================
   BASE
   ============================================================ */
*{box-sizing:border-box}

html,body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font:14px/1.5 system-ui,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
}

a{
  color:inherit;
  text-decoration:none;
}

/* ============================================================
   PAGE WRAPPERS
   ============================================================ */

#pf-main{
  padding:0;
  max-width:none;
  margin:0;
}

.wrap{
  max-width:1200px;
  margin:auto;
  padding:20px;
}

/* ============================================================
   DIRECTORY HEADER (Centered, Clean, Modern)
   ============================================================ */

.pf-directory-header {
  text-align: center;
  padding: 36px 0 24px;
  max-width: 900px;
  margin: 0 auto;
}

.pf-directory-header .logo {
  display: none; /* remove blue mark */
}

.pf-directory-header h1 {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 14px;
  color: var(--text);
}

.pf-directory-header .sub {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
  max-width: 800px;
  margin: 0 auto;
}

/* Slight fade-in animation (optional) */
.pf-directory-header h1,
.pf-directory-header .sub {
  opacity: 0;
  transform: translateY(8px);
  animation: pfFadeIn 0.4s ease forwards;
}

.pf-directory-header .sub {
  animation-delay: 0.1s;
}

@keyframes pfFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile adjustments */
@media (max-width: 900px) {
  .pf-directory-header {
    padding: 28px 0 18px;
  }
  .pf-directory-header h1 {
    font-size: 26px;
  }
  .pf-directory-header .sub {
    font-size: 14px;
  }
}

/* ============================================================
   HEADER CARD (first row of listing, centered labels)
   ============================================================ */

.card.card--header {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0 14px 6px;
  margin: 0 0 4px;
  cursor: default;
}

/* left cell: "Firm" */
.card.card--header .id {
  display: flex;
  align-items: center;
  justify-content: center;
}

.card.card--header .header-label {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
}

/* middle header: same grid as .stats */
.stats.stats--header {
  display: grid;
  grid-template-columns: repeat(5, minmax(90px, 1fr)) minmax(140px, 1.8fr);
  gap: 8px;
}

/* each label cell */
.kpi.kpi--header {
  border: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* vertical separators between columns */
.kpi.kpi--header:not(:first-child) {
  position: relative;
}

.kpi.kpi--header:not(:first-child)::before {
  content: '';
  position: absolute;
  left: -4px;
  top: 50%;
  transform: translateY(-50%);
  height: 16px;
  border-left: 1px solid rgba(255,255,255,0.10);
}

/* sortable header labels */
.kpi.kpi--header.pf-sort {
  cursor: pointer;
}

.kpi.kpi--header.pf-sort::after {
  content: '';
  border: 4px solid transparent;
  border-top-color: rgba(255,255,255,0.25);
  margin-left: 4px;
  margin-top: 1px;
  transition: transform 0.15s ease, border-top-color 0.15s ease;
}

.kpi.kpi--header.pf-sort.pf-sort-active::after {
  border-top-color: var(--accent);
}

.kpi.kpi--header.pf-sort.pf-sort-desc::after {
  transform: rotate(180deg);
}

/* right cell: "Actions" */
.actions.actions--header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

/* thin rule above the whole listing for separation */
.list::before {
  content: '';
  display: block;
  max-width: 1200px;
  margin: 0 auto 8px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* mobile: header not needed when cards stack */
@media (max-width: 900px) {
  .card.card--header {
    display: none;
  }
}


/* ============================================================
   FILTERS
   ============================================================ */
.filters{
  position:sticky;
  top:0;
  z-index:5;
  background:linear-gradient(180deg,rgba(14,15,20,.98),rgba(14,15,20,.90));
  backdrop-filter:saturate(120%) blur(6px);
  border-bottom:1px solid var(--bd);
}

.filters .bar{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
  padding:12px 0;
}

/* FILTER CHIP: label vs value */
.chip{
  display:flex;
  align-items:center;
  gap:8px;
  background:var(--panel);
  border:1px solid var(--bd);
  color:var(--text);
  padding:8px 10px;
  border-radius:10px;
}

/* label: lighter/muted */
.chip span:first-child{
  font-size:12px;
  color:var(--muted);
  letter-spacing:0.02em;
}

/* value: stronger */
.chip select{
  background:transparent;
  border:0;
  color:var(--text);
  outline:0;
  font-size:13px;
  font-weight:600;
  padding:2px 0;
  cursor:pointer;
  appearance:none;
}

.chip select option{
  background:#05070b;
  color:var(--text);
}

/* Styled select + dropdown options */
.chip select{
  background:transparent;
  border:0;
  color:var(--text);
  outline:0;
  font-size:13px;
  font-weight:500;
  padding:2px 0;
  cursor:pointer;
  appearance:none;
}

.chip select:focus{
  outline:none;
}

/* Dropdown list items: dark background, light text */
.chip select option{
  background:#05070b;        /* matches dark theme */
  color:var(--text);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn{
  border:1px solid var(--bd);
  background:var(--panel);
  color:var(--text);
  padding:8px 10px;
  border-radius:10px;
  cursor:pointer;
}

/* ============================================================
   DIRECTORY LIST
   ============================================================ */
.list{
  display:grid;
  gap:12px;
  margin:16px 0 80px;
}

/* ============================================================
   CARDS
   ============================================================ */
.card{
  display:grid;
  grid-template-columns:220px 1fr 220px;
  gap:16px;
  background:var(--panel);
  border:1px solid var(--bd);
  border-radius:14px;
  padding:14px;
  position:relative;
}

.id{
  display:flex;
  gap:12px;
  align-items:center;
}

/* LOGO CONTAINER */
.logo2{
  width:140px;
  height:140px;
  border-radius:32px;
  background:radial-gradient(circle at 10% 0%, #151c2d 0,#0b0f18 40%,#05070b 100%);
  border:1px solid rgba(255,255,255,0.06);
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;

  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.06),
    0 0 0 1px rgba(0,0,0,0.7),
    0 12px 24px rgba(0,0,0,0.7);

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    filter 0.25s ease;

  cursor:pointer;
}

.logo2 img.firm-logo{
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:inherit;
  transition:transform 0.3s ease, filter 0.3s ease;
}

/* Hover */
.logo2:hover img.firm-logo{
  transform:scale(1.08);
  filter:brightness(1.15);
}

.logo2:hover{
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.1),
    0 0 0 1px rgba(0,0,0,0.7),
    0 0 12px rgba(57,198,255,0.45),
    0 0 28px rgba(57,198,255,0.35);
  transform:perspective(600px) rotateX(4deg) rotateY(-4deg);
}

/* Mobile logo scale */
@media (max-width:900px){
  .logo2{
    width:100px;
    height:100px;
    border-radius:24px;
  }
}

.name{font-weight:700;}
.meta{color:var(--muted);font-size:12px;}

/* ============================================================
   STATS
   ============================================================ */
.stats{
  display:grid;
  /* 5 normal columns + 1 wider column for Available Platforms */
  grid-template-columns:repeat(5,minmax(90px,1fr)) minmax(140px,1.8fr);
  gap:8px;
}

.kpi{
  border:1px dashed var(--bd);
  border-radius:10px;
  padding:8px;
}

.kpi .t{
  color:var(--muted);
  font-size:11px;
}

.kpi .v{
  font-weight:700;
  margin-top:2px;
}

.kpi.rate .v {
  font-size: 18px;
  font-weight: 700;
}

/* ============================================================
   ACTIONS
   ============================================================ */
.actions{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:8px;
}

.pill{
  font-size:12px;
  border:1px solid var(--bd);
  padding:6px 10px;
  border-radius:999px;
  background:rgba(255,255,255,.07);
}

.badge{
  font-size:11px;
  color:#000;
  background:var(--accent);
  padding:4px 8px;
  border-radius:999px;
}

.btn-ghost{
  background:transparent;
  border:1px solid var(--bd);
}

.compare{
  display:flex;
  align-items:center;
  gap:6px;
  color:var(--muted);
  font-size:13px;
}

/* ============================================================
   EXPANDABLE ROWS
   ============================================================ */
.expand{
  grid-column:1/-1;
  margin-top:8px;
  border-top:1px solid var(--bd);
  padding-top:10px;
  display:none;
}

.expand.open{
  display:block;
}

.tabs{
  display:flex;
  gap:8px;
  margin-bottom:8px;
}

.tab{
  font-size:12px;
  border:1px solid var(--bd);
  padding:6px 10px;
  border-radius:8px;
  cursor:pointer;
}

.tab[aria-selected="true"]{
  outline:2px solid var(--accent);
}

.rows{
  display:grid;
  grid-template-columns:160px 1fr;
  gap:10px;
}

.rows .k{
  color:var(--muted);
}

.rows .v{
  color:var(--text);
}

/* ============================================================
   COMPARE BAR
   ============================================================ */
.cmp-bar{
  position:fixed;
  left:0; right:0; bottom:0;
  background:#0b0d12;
  border-top:1px solid var(--bd);
  padding:10px 16px;
  display:none;
  z-index:10;
}

.cmp-in{
  max-width:1200px;
  margin:auto;
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:space-between;
}

.cmp-list{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.cmp-pill{
  background:var(--panel);
  border:1px solid var(--bd);
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
}

.cmp-actions{
  display:flex;
  gap:8px;
}

/* ============================================================
   RATING COLORS
   ============================================================ */
.rate[data-v^="4."] .v{ color:var(--ok); }
.rate[data-v^="3."] .v{ color:var(--warn); }
.rate[data-v^="2."] .v,
.rate[data-v^="1."] .v{ color:var(--bad); }

/* Glow based on rating */
.card[data-rating^="4."] .logo2{
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.08),
    0 0 0 1px rgba(0,0,0,0.7),
    0 0 0 3px rgba(57,198,255,0.35),
    0 0 32px rgba(57,198,255,0.35);
}

.card[data-rating^="3."] .logo2{
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.06),
    0 0 0 1px rgba(0,0,0,0.7),
    0 0 0 3px rgba(255,176,32,0.3),
    0 0 24px rgba(255,176,32,0.25);
}

.card[data-rating^="1."] .logo2,
.card[data-rating^="2."] .logo2{
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.04),
    0 0 0 1px rgba(0,0,0,0.7),
    0 0 0 3px rgba(255,93,93,0.3),
    0 0 24px rgba(255,93,93,0.25);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width:900px){
  .card{
    grid-template-columns:1fr;
    gap:12px;
  }
  .stats{
    grid-template-columns:repeat(2,minmax(120px,1fr));
    margin-top:0;
  }
  .actions{
    position:static;
    align-items:flex-start;
  }
  .kpi{
    padding:10px;
  }
}

/* ============================================================
   ICONS
   ============================================================ */
.pf-gfx{
  display:inline-block;
  vertical-align:middle;
  margin-right:4px;
}

.pf-gfx img{
  max-width:28px;
  max-height:28px;
  width:auto;
  height:auto;
  display:inline-block;
}

.kpi-platforms .v-platforms{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:4px;
}

.kpi-platforms .v-platforms .pf-gfx{
  display:inline-flex;
  align-items:center;
}

/* ============================================================
   RATING DISPLAY
   ============================================================ */
.rating-main{
  font-size:22px;
  font-weight:700;
  color:var(--ok);
  line-height:1.2;
}

.rating-sub{
  font-size:12px;
  color:var(--text);
  opacity:0.9;
  margin-top:3px;
}

/* -----------------------------------------------------------
   Rich HTML blocks inside tab panels (.rows .v)
   ----------------------------------------------------------- */

.rows .v {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
}

.rows .v h4 {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.rows .v p {
  margin: 0 0 4px;
  font-size: 13px;
  line-height: 1.45;
}

.rows .v ul,
.rows .v ol {
  margin: 2px 0 4px 1.3em;
  padding: 0;
}

.rows .v li {
  margin: 0 0 2px;
  font-size: 13px;
  line-height: 1.4;
}

.rows .v h4 + p {
  margin-top: 0;
}

.rows .v > :last-child {
  margin-bottom: 0;
}

.rows .v strong {
  font-weight: 600;
}

.rows .v em {
  font-style: italic;
}

/* Hide per-row KPI labels; use only the top header row */
.stats .kpi .t {
  display: none;
}

/* Bring values up a bit since labels are removed */
.stats .kpi .v {
  margin-top: 0;
  font-size: 14px;
}
