/* ── Foreclosure Decoded — Learn / Article Index ────────────────────────────
   Companion to styles.css. Vars, resets, and global typography live there.
   ─────────────────────────────────────────────────────────────────────────── */

/* ── Action bar ──────────────────────────────────────────────────────────── */
.learn-action-bar {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 90;
}
.learn-action-bar__inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: 52px;
}
@media (max-width: 900px) { .learn-action-bar__inner { padding: 0.65rem 1rem; gap: 0.75rem; } }
@media (max-width: 640px) { .learn-action-bar__inner { flex-wrap: wrap; padding: 0.65rem 1rem 0.5rem; row-gap: 0.4rem; } }

.learn-breadcrumb {
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--navy);
  white-space: nowrap;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.learn-breadcrumb__sep { color: #d1d5db; font-weight: 300; }
.learn-breadcrumb__cur { color: var(--text-muted); font-weight: 600; }
@media (max-width: 640px) { .learn-breadcrumb { display: none; } }

.learn-search-wrap {
  position: relative;
  flex: 1;
  max-width: 460px;
  margin: 0 auto;
}
@media (max-width: 640px) { .learn-search-wrap { max-width: none; width: 100%; order: 3; } }

.learn-search {
  width: 100%;
  padding: 0.38rem 0.75rem 0.38rem 1.9rem;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  font-size: 0.78rem;
  font-family: inherit;
  background: white;
  color: var(--navy);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.learn-search:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(31,122,114,.12); }

.learn-search-icon {
  position: absolute;
  left: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  pointer-events: none;
}

.learn-pills {
  display: flex;
  gap: 0.3rem;
  align-items: center;
  flex-shrink: 0;
  overflow-x: auto;
  padding: 0.45rem 0;
  padding-right: 16px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  scroll-behavior: smooth;
}
.learn-pills::-webkit-scrollbar { display: none; }
@media (max-width: 640px) { .learn-pills { order: 2; width: 100%; padding: 0.15rem 0 0.4rem; } }

.learn-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.64rem;
  font-weight: 700;
  padding: 0.22rem 0.6rem;
  border-radius: 20px;
  border: 1px solid #e5e7eb;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  background: #f8fafc;
  color: #374151;
  transition: all 0.12s;
}
.learn-pill:hover  { border-color: var(--teal); color: var(--teal); background: rgba(31,122,114,.06); }
.learn-pill.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.learn-pill-dot    { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }

/* ── Page wrapper ─────────────────────────────────────────────────────────── */
.learn-page {
  max-width: 1300px;
  margin: 0 auto;
  padding: 1.5rem 32px 3rem;
}
@media (max-width: 1024px) { .learn-page { padding: 1.25rem 24px 3rem; } }
@media (max-width: 640px)  { .learn-page { padding: 1rem 16px 2rem; } }

.learn-columns {
  display: grid;
  grid-template-columns: 1fr 295px;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 1100px) { .learn-columns { grid-template-columns: 1fr 260px; gap: 1.5rem; } }
@media (max-width: 860px)  { .learn-columns { grid-template-columns: 1fr; } }
.learn-columns--nosidebar  { grid-template-columns: 1fr !important; }

.learn-main { min-width: 0; }

/* ── Featured card ────────────────────────────────────────────────────────── */
.lfc {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  background: white;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  transition: transform 0.2s, box-shadow 0.2s;
  min-height: 260px;
  margin-bottom: 1.75rem;
  text-decoration: none;
  color: inherit;
}
.lfc:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.1); text-decoration: none; }
.lfc:hover .lfc__title { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 640px) { .lfc { grid-template-columns: 1fr; min-height: auto; } }

.lfc__img { overflow: hidden; background: #f1f5f9; }
.lfc__img svg { width: 100%; height: 100%; display: block; }
.lfc__img-ph  { width: 100%; height: 100%; }

.lfc__body {
  padding: 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-left: 1px solid #e5e7eb;
}
@media (max-width: 640px) { .lfc__body { border-left: none; border-top: 1px solid #e5e7eb; padding: 1.25rem; } }

.lfc__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 0.2rem 0.55rem;
  border-radius: 20px;
  margin-bottom: 0.5rem;
  align-self: flex-start;
}
.lfc__label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--teal);
  margin-bottom: 0.15rem;
}
.lfc__title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
  margin: 0 0 0.75rem;
}
.lfc__excerpt {
  font-size: 0.83rem;
  color: #6b7280;
  line-height: 1.65;
  flex: 1;
  margin-bottom: 1rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
.lfc__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid #e5e7eb;
}
.lfc__meta { font-size: 0.72rem; color: #6b7280; display: flex; flex-direction: column; gap: 0.08rem; }
.lfc__meta strong { color: #374151; font-size: 0.78rem; }
.lfc__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--teal);
  color: white;
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  flex-shrink: 0;
}

/* ── Section header ───────────────────────────────────────────────────────── */
.learn-section-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.875rem;
  gap: 1rem;
}
.learn-section-hd__left h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 0.1rem;
  font-family: 'Poppins', sans-serif;
}
.learn-section-hd__left p { font-size: 0.75rem; color: #9ca3af; margin: 0; font-style: italic; }

.sidebar-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.28rem 0.65rem;
  border-radius: 20px;
  border: 1px solid #e5e7eb;
  background: white;
  color: #6b7280;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.sidebar-toggle-btn:hover  { background: #f1f5f9; color: var(--navy); border-color: #d1d5db; }
.sidebar-toggle-btn.active { background: #f1f5f9; color: var(--navy); border-color: #d1d5db; }

/* ── Article card list ────────────────────────────────────────────────────── */
.learn-card-grid { display: flex; flex-direction: column; gap: 0.75rem; }

.lcard {
  display: flex;
  flex-direction: row;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  background: white;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s, transform 0.15s;
}
.lcard:hover { box-shadow: 0 3px 10px rgba(0,0,0,.09); transform: translateY(-1px); text-decoration: none; }
.lcard:hover .lcard__title { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 560px) { .lcard { flex-direction: column; } }

.lcard__img { flex: 0 0 26%; overflow: hidden; background: #f1f5f9; flex-shrink: 0; }
.lcard__img-ph { width: 100%; height: 100%; }
@media (max-width: 860px) { .lcard__img { flex: 0 0 32%; } }
@media (max-width: 560px) { .lcard__img { flex: none; width: 100%; height: 130px; } }

.lcard__body {
  flex: 1;
  min-width: 0;
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  border-left: 1px solid #e5e7eb;
}
@media (max-width: 560px) { .lcard__body { border-left: none; border-top: 1px solid #e5e7eb; } }

.lcard__meta-top { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 0.1rem; }
.lcard__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.18rem 0.5rem;
  border-radius: 20px;
}
.lcard__chip-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.lcard__badge-premium {
  font-size: 0.55rem;
  font-weight: 700;
  background: var(--navy);
  color: white;
  padding: 0.12rem 0.4rem;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.lcard__badge-free {
  font-size: 0.55rem;
  font-weight: 700;
  background: rgba(31,122,114,.12);
  color: var(--teal);
  padding: 0.12rem 0.4rem;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.lcard__title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.35;
  margin: 0;
  font-family: 'Poppins', sans-serif;
}
.lcard__excerpt { font-size: 0.74rem; color: #6b7280; line-height: 1.5; margin: 0; }
.lcard__foot {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.2rem;
  font-size: 0.66rem;
  color: #9ca3af;
}
.lcard__foot-sep { color: #d1d5db; }

/* ── Loading / empty states ───────────────────────────────────────────────── */
.learn-loading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #64748b;
  font-size: 0.875rem;
  padding: 3rem 0;
}
.learn-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #e2e8f0;
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: l-spin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes l-spin { to { transform: rotate(360deg); } }
.learn-empty { padding: 3rem 0; text-align: center; color: #6b7280; font-size: 0.9rem; }

/* ── Sidebar ──────────────────────────────────────────────────────────────── */
.learn-sidebar-v5 {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: sticky;
  top: 68px;
}
@media (max-width: 860px) {
  .learn-sidebar-v5 { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
}
@media (max-width: 540px) { .learn-sidebar-v5 { grid-template-columns: 1fr; } }

.ls-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.ls-card__head {
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
  padding: 0.6rem 1rem;
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #9ca3af;
}
.ls-card__body        { padding: 0.4rem 0.5rem; }
.ls-card__body--picks { padding: 0.75rem 1rem; }

.ls-cat-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.38rem 0.45rem;
  border-radius: 6px;
  font-size: 0.78rem;
  color: #6b7280;
  cursor: pointer;
  width: 100%;
  background: none;
  border: none;
  font-family: inherit;
  transition: background 0.15s;
  text-align: left;
}
.ls-cat-row:hover { background: #f8fafc; color: var(--navy); }
.ls-cat-row.active { background: var(--navy); color: white; font-weight: 600; }
.ls-cat-row.active .ls-cat-badge { background: rgba(255,255,255,.2); color: rgba(255,255,255,.85); }
.ls-cat-dot   { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.ls-cat-name  { flex: 1; }
.ls-cat-badge {
  margin-left: auto;
  font-size: 0.65rem;
  padding: 0.08rem 0.4rem;
  border-radius: 20px;
  background: rgba(0,0,0,.06);
  flex-shrink: 0;
}

.ls-pick {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.625rem 0;
  border-bottom: 1px solid #f1f5f9;
}
.ls-pick:last-child  { border-bottom: none; padding-bottom: 0; }
.ls-pick:first-child { padding-top: 0; }
.ls-pick__num   { font-size: 1.3rem; font-weight: 800; color: #c4c9d4; min-width: 24px; line-height: 1; }
.ls-pick__title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.35;
  text-decoration: none;
  display: block;
}
.ls-pick__title:hover { color: var(--teal); }
.ls-pick__meta  { font-size: 0.66rem; color: #9ca3af; margin-top: 0.15rem; }
