/* Learning section (index.php #learning) - blog posts, text only (no images); sits between the case note and the Playbook */
.learning-section { background: var(--sand); padding-block: clamp(4.5rem, 7vw, 7rem); overflow-anchor: none; }
.learning-section :where(h2, h3, p:not(.eyebrow)) { margin: 0; }

.learning-head { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 2rem clamp(2rem, 6vw, 6rem); align-items: end; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.learning-head > p { color: #4d463d; }

/* Blog cards - three columns on desktop */
.learning-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2vw, 1.75rem); }
.learning-card { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-top: 2px solid var(--gold); padding: clamp(1.75rem, 2.6vw, 2.5rem); transition: transform .25s ease, box-shadow .25s ease; }
.learning-card-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 2.25rem; }
.learning-tag { color: var(--bronze); border: 1px solid var(--bronze); font-size: .66rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; padding: .4rem .7rem; }
.learning-time { color: #6f5930; font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.learning-card { cursor: pointer; }
.learning-card:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.learning-card-top { flex-wrap: wrap; }
.learning-card h3 { font-family: var(--display); font-weight: 400; font-size: clamp(1.7rem, 2.2vw, 2.1rem); line-height: 1.12; margin-bottom: .9rem; }
.learning-card > p { color: #4d463d; margin-bottom: 1.75rem; }
.learning-card .learning-more { margin-top: auto; padding-top: 1.1rem; border-top: 1px solid var(--line); }

.learning-more { color: var(--ink); font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }

@media (hover: hover) {
  .learning-card:hover { transform: translateY(-4px); box-shadow: 0 22px 40px -28px rgba(23, 20, 16, .4); }
}
@media (prefers-reduced-motion: reduce) {
  .learning-card { transition: none; }
  .learning-card:hover { transform: none; }
}

/* Page numbers: six posts per page, so the section stays the same height however many posts exist */
.learning-pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .5rem; margin-top: clamp(1.75rem, 3vw, 2.5rem); }
.learning-pager[hidden] { display: none; }
.pager-btn { min-width: 44px; height: 44px; padding: 0 .9rem; border: 1px solid var(--line); background: transparent; color: var(--ink); font: 700 .72rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; cursor: pointer; transition: background .18s, color .18s, border-color .18s; }
.pager-btn[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.pager-btn:disabled { opacity: .35; cursor: default; }
.pager-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.pager-gap { padding: 0 .25rem; color: #6f5930; }
@media (hover: hover) {
  .pager-btn:not(:disabled):not([aria-current="page"]):hover { border-color: var(--ink); }
}
@media (max-width: 640px) {
  .pager-label { display: none; }
  .pager-btn { min-width: 40px; height: 40px; padding: 0 .6rem; }
}

.learning-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem 2.5rem; margin-top: 2.5rem; }

@media (max-width: 1000px) {
  .learning-grid { grid-template-columns: repeat(2, 1fr); }
  .learning-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  .learning-head { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .learning-grid { grid-template-columns: 1fr; }
}
