/* =========================================================
   Lawyers of Ontario – Blog index + Practice areas
   Load AFTER resources.css and directory.css.
   Upload to /assets/css/sections.css
   ========================================================= */

/* ---------- Category chips (blog) ---------- */
.lo-dir .lo-chips { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 8px; }
.lo-dir .lo-chips a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px;
  border: 1px solid #34466D; color: #E3E8F0; text-decoration: none; font-weight: 600; font-size: 14px;
}
.lo-dir .lo-chips a:hover { background: #24355A; color: #fff; }
.lo-dir .lo-chips a[aria-current="true"] { background: var(--lo-accent); border-color: var(--lo-accent); color: var(--lo-navy); }

.lo-dir .lo-searchline { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 10px; max-width: 560px; }
.lo-dir .lo-searchline input {
  flex: 1 1 260px; min-height: 48px; border-radius: 8px; border: 1px solid #3A4A6B; background: #1C2C4F;
  color: #fff; padding: 0 16px; font: inherit; font-size: 15px;
}
.lo-dir .lo-searchline input::placeholder { color: #9AA6BD; }

/* ---------- Post cards ---------- */
.lo-dir .lo-posts { margin-top: 22px; display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.lo-dir .lo-post {
  position: relative; background: #fff; border: 1px solid var(--lo-line); border-radius: 12px; overflow: hidden;
  display: flex; flex-direction: column; transition: box-shadow .15s, transform .15s;
}
.lo-dir .lo-post:hover { box-shadow: 0 10px 26px rgba(20,33,61,.10); transform: translateY(-2px); }
.lo-dir .lo-post__img { aspect-ratio: 16 / 9; background: var(--lo-navy); overflow: hidden; }
.lo-dir .lo-post__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lo-dir .lo-post__body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.lo-dir .lo-post__cat { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #8A6414; }
.lo-dir .lo-post h3 { margin: 0; font-family: var(--lo-serif); font-size: 20px; line-height: 1.3; color: var(--lo-navy); }
.lo-dir .lo-post h3 a { text-decoration: none; }
.lo-dir .lo-post h3 a::after { content: ""; position: absolute; inset: 0; }
.lo-dir .lo-post p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--lo-body); }
.lo-dir .lo-post__meta {
  margin-top: auto; padding-top: 14px; border-top: 1px solid #EEF0F3;
  display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--lo-muted);
}
.lo-dir .lo-post__meta .lo-logo { width: 32px; height: 32px; border-radius: 6px; font-size: 13px; }
.lo-dir .lo-post__meta strong { color: var(--lo-navy); font-weight: 700; }
.lo-dir .lo-post__meta a { position: relative; z-index: 1; color: var(--lo-navy); font-weight: 700; }

/* Lead (first) post spans the full row on the unfiltered first page */
@media (min-width: 900px) {
  .lo-dir .lo-posts--lead > .lo-post:first-child { grid-column: 1 / -1; flex-direction: row; }
  .lo-dir .lo-posts--lead > .lo-post:first-child .lo-post__img { flex: 0 0 55%; aspect-ratio: auto; min-height: 340px; }
  .lo-dir .lo-posts--lead > .lo-post:first-child .lo-post__body { padding: 36px 40px; justify-content: center; }
  .lo-dir .lo-posts--lead > .lo-post:first-child h3 { font-size: 30px; }
  .lo-dir .lo-posts--lead > .lo-post:first-child p { font-size: 17px; }
}

/* ---------- Practice-area cards ---------- */
.lo-dir .lo-areas-grid { margin-top: 28px; display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.lo-dir .lo-pa {
  position: relative; background: #fff; border: 1px solid var(--lo-line); border-radius: 12px; padding: 22px;
  display: flex; flex-direction: column; gap: 10px; transition: box-shadow .15s, transform .15s, border-color .15s;
}
.lo-dir .lo-pa:hover { box-shadow: 0 10px 26px rgba(20,33,61,.10); transform: translateY(-2px); border-color: var(--lo-navy); }
.lo-dir .lo-pa__icon {
  width: 52px; height: 52px; border-radius: 12px; background: var(--lo-navy); display: flex; align-items: center; justify-content: center;
}
.lo-dir .lo-pa__icon svg { width: 28px; height: 28px; stroke: var(--lo-accent); }
.lo-dir .lo-pa h3 { margin: 4px 0 0; font-family: var(--lo-serif); font-size: 20px; color: var(--lo-navy); }
.lo-dir .lo-pa h3 a { text-decoration: none; }
.lo-dir .lo-pa h3 a::after { content: ""; position: absolute; inset: 0; border-radius: 12px; }
.lo-dir .lo-pa p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--lo-body); }
.lo-dir .lo-pa__foot { margin-top: auto; padding-top: 12px; display: flex; justify-content: space-between; font-size: 14px; font-weight: 700; color: var(--lo-navy); }
.lo-dir .lo-pa__count { color: var(--lo-muted); font-weight: 600; }

/* Practice-area page hero icon */
.lo-dir .lo-phero .lo-pa__icon { width: 88px; height: 88px; border-radius: 18px; background: #24355A; }
.lo-dir .lo-phero .lo-pa__icon svg { width: 46px; height: 46px; }

/* Help strip (practice-areas index) */
.lo-dir .lo-helpstrip {
  margin-top: 48px; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.lo-dir .lo-helpstrip a {
  display: flex; flex-direction: column; gap: 6px; padding: 22px; border-radius: 12px; background: #fff;
  border: 1px solid var(--lo-line); text-decoration: none;
}
.lo-dir .lo-helpstrip a:hover { border-color: var(--lo-navy); }
.lo-dir .lo-helpstrip strong { font-family: var(--lo-serif); font-size: 19px; color: var(--lo-navy); }
.lo-dir .lo-helpstrip span { font-size: 15px; line-height: 1.5; color: var(--lo-body); }
.lo-dir .lo-helpstrip em { font-style: normal; font-size: 14px; font-weight: 700; color: var(--lo-navy); margin-top: 4px; }

/* FAQ (built from H3 + answer by directory.js) */
.lo-dir .lo-faq details { border-top: 1px solid var(--lo-line); }
.lo-dir .lo-faq details:last-child { border-bottom: 1px solid var(--lo-line); }
.lo-dir .lo-faq summary {
  list-style: none; cursor: pointer; padding: 18px 40px 18px 0; position: relative;
  font-family: var(--lo-serif); font-size: 18px; font-weight: 700; color: var(--lo-navy);
}
.lo-dir .lo-faq summary::-webkit-details-marker { display: none; }
.lo-dir .lo-faq summary::after {
  content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  font-family: var(--lo-sans); font-size: 24px; font-weight: 400; color: var(--lo-muted);
}
.lo-dir .lo-faq details[open] summary::after { content: "–"; }
.lo-dir .lo-faq .lo-faq__a { padding: 0 0 18px; font-size: 16px; line-height: 1.7; color: var(--lo-body); }
.lo-dir .lo-faq .lo-faq__a > :first-child { margin-top: 0; }

/* Two-field search bar (practice-areas index) */
.lo-dir .lo-filterbar--2 { grid-template-columns: 1.2fr 1fr auto; max-width: 860px; }
@media (max-width: 860px) { .lo-dir .lo-filterbar--2 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .lo-dir .lo-filterbar--2 { grid-template-columns: 1fr; } }

/* Post with no image: navy panel with the scales icon */
.lo-dir .lo-post__ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: var(--lo-navy); }
.lo-dir .lo-post__ph svg { width: 56px; height: 56px; stroke: var(--lo-accent); opacity: .85; }
/* Paragraph spacing in rich-text areas */
.lo-dir .lo-rte p, .lo-dir .lo-rte ul, .lo-dir .lo-rte ol { margin: 0 0 14px; }
