/* =========================================================
   Lawyers of Ontario – Resources page
   Everything is scoped under .lo-res so it won't affect
   the rest of the site. Upload to /assets/css/resources.css
   ========================================================= */

.lo-res {
  --lo-navy: #14213D;
  --lo-navy-2: #2B3A5C;
  --lo-navy-3: #3C4D72;
  --lo-ink: #1F2633;
  --lo-body: #3A4352;
  --lo-muted: #5A6372;
  --lo-line: #E3E6EB;
  --lo-line-2: #C9CFD9;
  --lo-bg: #F4F5F7;
  --lo-tint: #EEF1F6;
  --lo-accent: #D4A84B;      /* gold – swap for the brand accent */
  --lo-ok: #2C5E3F;
  --lo-serif: 'Source Serif 4', Georgia, serif;
  --lo-sans: 'Public Sans', system-ui, -apple-system, sans-serif;

  font-family: var(--lo-sans);
  color: var(--lo-ink);
  background: var(--lo-bg);
  line-height: 1.5;
}
.lo-res *, .lo-res *::before, .lo-res *::after { box-sizing: border-box; }
.lo-res a { color: var(--lo-navy); }
.lo-res a:hover { color: #0B1426; }
.lo-res .lo-wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.lo-res .sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------- Hero ---------- */
.lo-res .lo-hero { background: var(--lo-navy); color: #fff; padding: 56px 0 88px; }
.lo-res .lo-crumbs { font-size: 13px; color: #B9C2D3; margin-bottom: 18px; }
.lo-res .lo-crumbs a { color: #B9C2D3; }
.lo-res .lo-eyebrow {
  margin: 0 0 10px; font-size: 13px; letter-spacing: .12em;
  text-transform: uppercase; font-weight: 700; color: var(--lo-accent);
}
.lo-res .lo-hero h1 {
  margin: 0; font-family: var(--lo-serif); font-weight: 700;
  font-size: clamp(32px, 4.5vw, 48px); line-height: 1.1; max-width: 720px; color: #fff;
}
.lo-res .lo-hero p.lo-lead {
  margin: 18px 0 0; font-size: 18px; line-height: 1.6; color: #D5DBE6; max-width: 640px;
}
.lo-res .lo-search { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 10px; max-width: 560px; }
.lo-res .lo-search input {
  flex: 1 1 260px; min-height: 48px; border-radius: 6px; border: 1px solid #3A4A6B;
  background: #1C2C4F; color: #fff; padding: 0 16px; font: inherit; font-size: 15px;
}
.lo-res .lo-search input::placeholder { color: #9AA6BD; }

/* ---------- Buttons ---------- */
.lo-res .lo-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 6px; border: 1.5px solid transparent;
  font: inherit; font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.lo-res .lo-btn svg { width: 18px; height: 18px; }
.lo-res .lo-btn--navy { background: var(--lo-navy); color: #fff; }
.lo-res .lo-btn--navy:hover { background: #0B1426; color: #fff; }
.lo-res .lo-btn--outline { border-color: var(--lo-navy); color: var(--lo-navy); background: #fff; }
.lo-res .lo-btn--outline:hover { background: var(--lo-navy); color: #fff; }
.lo-res .lo-btn--accent { background: var(--lo-accent); color: var(--lo-navy); font-weight: 700; }
.lo-res .lo-btn--accent:hover { filter: brightness(1.06); color: var(--lo-navy); }
.lo-res .lo-btn--ghost { border-color: #fff; color: #fff; }
.lo-res .lo-btn--ghost:hover { background: #fff; color: var(--lo-navy); }

/* ---------- Badges ---------- */
.lo-res .lo-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.lo-res .lo-badge {
  font-size: 12px; font-weight: 600; background: var(--lo-tint); color: var(--lo-navy);
  padding: 5px 10px; border-radius: 4px;
}
.lo-res .lo-badge--solid {
  background: var(--lo-navy); color: #fff; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
}
.lo-res .lo-checked {
  display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--lo-ok); font-weight: 600;
}
.lo-res .lo-checked svg { width: 18px; height: 18px; flex: none; }

/* ---------- Featured resource ---------- */
.lo-res .lo-featured {
  margin-top: -40px; position: relative; background: #fff; border-radius: 12px;
  box-shadow: 0 10px 30px rgba(20,33,61,.10); display: flex; flex-wrap: wrap; overflow: hidden;
}
.lo-res .lo-featured__media {
  flex: 1 1 340px; background: #E9ECF2; display: flex; align-items: center;
  justify-content: center; padding: 40px 24px;
}
.lo-res .lo-featured__media img {
  width: 230px; height: auto; border-radius: 4px; box-shadow: 0 12px 28px rgba(20,33,61,.18); display: block;
}
.lo-res .lo-featured__body {
  flex: 999 1 440px; padding: 44px 44px 40px; display: flex; flex-direction: column; gap: 16px;
}
.lo-res .lo-featured h2 {
  margin: 0; font-family: var(--lo-serif); font-weight: 700; font-size: clamp(24px, 3vw, 32px);
  line-height: 1.2; color: var(--lo-navy);
}
.lo-res .lo-featured h2 a { text-decoration: none; }
.lo-res .lo-featured p { margin: 0; font-size: 17px; line-height: 1.65; color: var(--lo-body); }
.lo-res .lo-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

/* ---------- Section heads & filters ---------- */
.lo-res .lo-section { margin-top: 64px; }
.lo-res .lo-section-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px;
}
.lo-res .lo-section-head h2 {
  margin: 0; font-family: var(--lo-serif); font-weight: 700; font-size: 30px; color: var(--lo-navy);
}
.lo-res .lo-section-head p { margin: 6px 0 0; color: var(--lo-muted); font-size: 15px; }
.lo-res .lo-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.lo-res .lo-chip, .lo-res .lo-select {
  min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1.5px solid var(--lo-line-2);
  background: #fff; color: var(--lo-navy); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer;
}
.lo-res .lo-chip:hover { border-color: var(--lo-navy); }
.lo-res .lo-chip[aria-pressed="true"] { background: var(--lo-navy); border-color: var(--lo-navy); color: #fff; }
.lo-res .lo-select { padding: 0 14px; }

/* ---------- Card grid ---------- */
.lo-res .lo-grid {
  margin-top: 28px; display: grid; gap: 24px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.lo-res .lo-card {
  background: #fff; border: 1px solid var(--lo-line); border-radius: 10px; overflow: hidden;
  display: flex; flex-direction: column; transition: box-shadow .15s, transform .15s;
}
.lo-res .lo-card:hover { box-shadow: 0 8px 22px rgba(20,33,61,.10); transform: translateY(-2px); }
.lo-res .lo-card[hidden] { display: none; }
.lo-res .lo-card__media {
  height: 150px; background: var(--lo-navy); display: flex; align-items: flex-end; padding: 18px;
  position: relative; overflow: hidden;
}
.lo-res .lo-card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lo-res .lo-card__media svg { width: 36px; height: 36px; stroke: var(--lo-accent); position: relative; }
.lo-res .lo-card--guide .lo-card__media { background: var(--lo-navy-2); }
.lo-res .lo-card--template .lo-card__media { background: var(--lo-navy-3); }
.lo-res .lo-card__body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.lo-res .lo-card__meta {
  font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--lo-muted);
}
.lo-res .lo-card h3 {
  margin: 0; font-family: var(--lo-serif); font-size: 20px; line-height: 1.3; color: var(--lo-navy);
}
.lo-res .lo-card h3 a { text-decoration: none; }
/* makes the whole card clickable via the title link */
.lo-res .lo-card h3 a::after { content: ""; position: absolute; inset: 0; }
.lo-res .lo-card { position: relative; }
.lo-res .lo-card p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--lo-body); }
.lo-res .lo-card__foot {
  margin-top: auto; padding-top: 14px; border-top: 1px solid #EEF0F3; display: flex;
  justify-content: space-between; align-items: center; gap: 10px; font-size: 13px;
}
.lo-res .lo-card__foot .lo-checked { font-size: 13px; }
.lo-res .lo-card__foot .lo-more { font-weight: 700; font-size: 14px; }
.lo-res .lo-empty { margin-top: 24px; color: var(--lo-muted); }

/* ---------- Subscribe & CTA panels ---------- */
.lo-res .lo-panel {
  margin-top: 64px; background: #fff; border: 1px solid var(--lo-line); border-radius: 12px;
  padding: 36px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px;
}
.lo-res .lo-panel > div { flex: 1 1 360px; }
.lo-res .lo-panel h2 { margin: 0; font-family: var(--lo-serif); font-size: 24px; color: var(--lo-navy); }
.lo-res .lo-panel p { margin: 6px 0 0; color: var(--lo-body); font-size: 15px; line-height: 1.6; }
.lo-res .lo-panel form { flex: 1 1 380px; display: flex; flex-wrap: wrap; gap: 10px; }
.lo-res .lo-panel input {
  flex: 1 1 220px; min-height: 48px; border-radius: 6px; border: 1.5px solid var(--lo-line-2);
  padding: 0 14px; font: inherit; font-size: 15px;
}
.lo-res .lo-cta {
  margin: 32px 0 72px; background: var(--lo-navy); color: #fff; border-radius: 12px; padding: 44px 40px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px;
}
.lo-res .lo-cta > div:first-child { flex: 1 1 420px; }
.lo-res .lo-cta h2 { margin: 0; font-family: var(--lo-serif); font-size: 30px; line-height: 1.2; color: #fff; }
.lo-res .lo-cta p { margin: 10px 0 0; color: #D5DBE6; font-size: 16px; line-height: 1.6; }
.lo-res .lo-cta .lo-actions { margin: 0; }

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
  .lo-res .lo-hero { padding: 40px 0 72px; }
  .lo-res .lo-featured__body { padding: 28px 22px; }
  .lo-res .lo-panel, .lo-res .lo-cta { padding: 28px 22px; }
  .lo-res .lo-actions .lo-btn { flex: 1 1 100%; }
}
