/* KE Course Finder (v11) — loads after ke-home.css / ke-home-rtl.css.
   Upload path: wp-content/themes/astra-child/ke-finder/ke-finder.css */

/* Current nav item */
.ke-finder nav.primary a[aria-current="page"] { color:var(--gold-light); box-shadow:inset 0 -2px 0 var(--gold); }

/* Hero */
.kf-hero { padding-top:18px; }
.kf-crumb { display:flex; flex-wrap:wrap; gap:8px; font-size:.82rem; color:#B7C4D6; margin-bottom:18px; }
.kf-crumb a { color:#E8EEF6; font-weight:600; }
.kf-crumb a:hover { color:var(--gold-light); }
.kf-hero-grid { align-items:stretch; padding-bottom:44px; }
.kf-hero h1 { max-width:20ch; }
.kf-stats {
  align-self:center; display:grid; grid-template-columns:1fr 1fr; gap:12px;
  background:linear-gradient(165deg, rgba(255,255,255,.10) 0%, rgba(11,31,58,.55) 100%);
  border:1px solid rgba(201,162,39,.38); border-radius:22px; padding:22px;
  box-shadow:0 22px 48px rgba(0,0,0,.32);
}
.kf-stat { background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.10); border-radius:16px; padding:18px 16px; }
.kf-stat strong { display:block; font-size:2rem; line-height:1.05; font-weight:700; color:var(--gold-light); letter-spacing:-0.03em; }
.kf-stat span { display:block; margin-top:6px; font-size:.82rem; font-weight:600; letter-spacing:.08em; text-transform:uppercase; color:#D5DEE9; }
.kf-venues { grid-column:1 / -1; margin:2px 0 0; font-size:.88rem; color:#D5DEE9; line-height:1.5; }

/* Category cards */
.kf-cats-section { padding:60px 0 56px; }
.kf-cats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.kf-cat {
  display:flex; flex-direction:column; justify-content:space-between; gap:10px; min-height:96px;
  background:#fff; border:1px solid #E6EEF5; border-radius:16px; padding:16px 16px 14px;
  box-shadow:var(--shadow-sm); color:var(--navy); text-decoration:none !important;
  position:relative; transition:border-color .2s, transform .2s, box-shadow .2s;
}
.kf-cat::before { content:""; position:absolute; inset-inline-start:0; top:16px; bottom:16px; width:3px; border-radius:2px; background:var(--gold); }
.kf-cat:hover { border-color:var(--gold); transform:translateY(-3px); box-shadow:var(--shadow); color:var(--navy); }
.kf-cat.is-on { border-color:var(--gold); background:var(--gold-dim); }
.kf-cat-name { font-weight:600; font-size:.95rem; line-height:1.35; padding-inline-start:8px; }
.kf-cat-count { font-size:.8rem; font-weight:600; color:var(--gold-dark); padding-inline-start:8px; }

/* Filter bar */
.kf-list { padding-top:60px; }
.kf-filters {
  display:grid; grid-template-columns:2fr repeat(4,minmax(0,1fr)) auto; gap:12px; align-items:end;
  background:#fff; border:1px solid var(--line); border-radius:18px; padding:16px; box-shadow:var(--shadow-sm); margin-bottom:18px;
}
.kf-field { display:flex; flex-direction:column; gap:6px; min-width:0; }
.kf-field label { font-size:.72rem; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--gold-dark); }
.kf-field select {
  width:100%; min-width:0; font:inherit; font-size:.92rem; color:var(--navy);
  background:#F6F3EB; border:1px solid var(--line); border-radius:10px; padding:10px 12px; cursor:pointer;
}
.kf-field select:focus { outline:2px solid var(--gold); outline-offset:1px; }
.kf-actions { display:flex; gap:8px; }
.kf-actions .btn { white-space:nowrap; padding-block:11px; }
.kf-count { font-size:.9rem; color:var(--muted); margin:0 0 14px; }
.kf-empty { background:#fff; border:1px dashed var(--line); border-radius:16px; padding:28px; color:var(--muted); text-align:center; }

/* Course grid (reuses .cards/.card from ke-home.css) */
.kf-grid .card .body { gap:8px; }
.kf-grid .tag { max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.kf-grid .kf-next { color:var(--navy-mid); font-weight:600; }
.kf-meta { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.kf-view { font-size:.82rem; font-weight:700; color:var(--gold-dark); white-space:nowrap; }
a.card:hover .kf-view { color:var(--navy); }
.kf-noimg { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; background:linear-gradient(160deg, var(--navy) 0%, var(--navy-mid) 100%); }
.kf-noimg img { position:static !important; width:64px !important; height:64px !important; border-radius:50%; opacity:.9; }

/* Pagination */
.kf-pager { display:flex; flex-wrap:wrap; justify-content:center; align-items:center; gap:6px; margin-top:28px; }
.kf-pg { min-width:40px; height:40px; padding:0 12px; display:inline-flex; align-items:center; justify-content:center; border-radius:999px; border:1px solid var(--line); background:#fff; color:var(--navy); font-weight:600; font-size:.9rem; }
a.kf-pg:hover { border-color:var(--gold); color:var(--gold-dark); }
.kf-pg.is-on { background:var(--navy); border-color:var(--navy); color:#fff; }
.kf-gap { color:var(--muted); padding:0 2px; }

/* RTL */
html[dir="rtl"] .kf-field label,
html[dir="rtl"] .kf-stat span { text-transform:none; letter-spacing:0; font-family:Cairo, Inter, sans-serif; }
html[dir="rtl"] .kf-stat strong { font-weight:600; }
html[dir="rtl"] .kf-pager .kf-prev,
html[dir="rtl"] .kf-pager .kf-next { font-family:Cairo, Inter, sans-serif; }

/* Responsive */
@media (max-width:1100px) {
  .kf-filters { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .kf-actions { grid-column:1 / -1; }
  .kf-cats { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (max-width:820px) {
  .kf-hero-grid { grid-template-columns:minmax(0,1fr); gap:24px; padding-bottom:32px; }
  .kf-stats { padding:16px; gap:10px; }
  .kf-stat { padding:14px 12px; }
  .kf-stat strong { font-size:1.6rem; }
  .kf-cats { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .kf-cat { min-height:84px; padding:14px 12px 12px; }
  .kf-cats-section, .kf-list { padding:44px 0; }
  .kf-filters { grid-template-columns:repeat(2,minmax(0,1fr)); padding:14px; }
  .kf-filters .kf-field:first-child { grid-column:1 / -1; }
  .kf-actions .btn { flex:1; }
}
@media (max-width:560px) {
  .kf-cat-name { font-size:.88rem; }
  .kf-cats .kf-cat:nth-child(n+9) { display:none; }
  /* Compact row cards on phones: image left, details right. */
  .kf-grid { grid-template-columns:minmax(0,1fr) !important; gap:10px; }
  .kf-grid .card { flex-direction:row; border-radius:16px; }
  .kf-grid .card .media { flex:0 0 112px; aspect-ratio:auto; min-height:100%; }
  .kf-grid .card .body { padding:12px 12px 12px; gap:5px; min-width:0; }
  .kf-grid .card h3 { font-size:.9rem; -webkit-line-clamp:3; }
  .kf-grid .tag { font-size:.6rem; padding:3px 7px; }
  .kf-grid .card .when { font-size:.78rem; }
  .kf-grid .card .price { font-size:1.05rem; }
  a.card:hover { transform:none; }
  .kf-pg { min-width:36px; height:36px; padding:0 10px; }
}
