/* Orange County Indexed: the Themes page (page-oci-themes.php, 2026-09-25).
   The toolbar (search, family pills, order), the families with their card grids, and the cards: the same duotone
   image treatment as the Explore page's theme cards (oci-round4.css) so the 28 pictured themes read as one set;
   the three without a picture carry a navy tile. Layout rules sit inside breakpoints or on the page's own classes. */

body.page-template-page-oci-themes .page-hero {
  background: linear-gradient(rgba(10, 35, 66, .88), rgba(0, 63, 99, .90)), url('../img/subjects/everyday-life.jpg') center 40% / cover no-repeat var(--ocpl-blue);
}
.otd [hidden] { display: none !important; }
.otd-section { padding: 28px 0 52px; background: var(--off-white); }

/* the toolbar */
.otd-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 0 0 12px; }
.otd-form { flex: 1 1 260px; max-width: 440px; display: flex; gap: 8px; }
.otd-form input { flex: 1 1 auto; min-width: 0; padding: 9px 12px; border: 1px solid var(--ocpl-blue-light); border-radius: var(--radius-md); font: inherit; font-size: var(--fs-sm); background: var(--white); color: var(--text); }
.otd-form input:focus-visible { outline: 3px solid var(--ocpl-blue); outline-offset: 1px; }
.otd-pills { display: flex; flex-wrap: wrap; gap: 6px 8px; }
.otd-pills a { display: inline-flex; align-items: baseline; gap: 6px; padding: 5px 12px; border: 1px solid var(--ocpl-blue-light); border-radius: var(--radius-pill); background: var(--white); font-size: var(--fs-xs); font-weight: 700; color: var(--ocpl-blue-dark); text-decoration: none; }
.otd-pills a span { font-weight: 400; color: var(--text-light); font-variant-numeric: tabular-nums; }
.otd-pills a:hover, .otd-pills a.is-on { background: var(--ocpl-blue); border-color: var(--ocpl-blue); color: var(--white); }
.otd-pills a:hover span, .otd-pills a.is-on span { color: rgba(255, 255, 255, .8); }
.otd-pills a:focus-visible { outline: 3px solid var(--ocpl-blue); outline-offset: 2px; }
.otd-sort { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-left: auto; font-size: var(--fs-xs); color: var(--text-mid); }
.otd-sort a { padding: 4px 2px; border-bottom: 2px solid transparent; font-weight: 700; color: var(--ocpl-blue-dark); text-decoration: none; }
.otd-sort a:hover { border-bottom-color: var(--ocpl-blue-light); }
.otd-sort a.is-on { border-bottom-color: var(--ocpl-blue); color: var(--heading); }
.otd-count { margin: 0 0 20px; font-size: var(--fs-sm); color: var(--text-mid); }

/* the families */
.otd-family { margin: 0 0 36px; }
.otd-family__h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin: 0 0 14px; padding-bottom: 8px; border-bottom: 2px solid var(--ocpl-blue); font-family: var(--font-display); font-size: 1.35rem; line-height: 1.2; color: var(--heading); }
.otd-family__h span { font-family: var(--font-sans); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-light); }

/* the cards */
.otd-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.otd-card { display: flex; flex-direction: column; min-width: 0; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; transition: box-shadow var(--transition-fast), transform var(--transition-fast); }
.otd-card:hover { box-shadow: 0 6px 18px rgba(0, 63, 99, .10); transform: translateY(-2px); }
.otd-card__pic { display: block; }
.otd-card__pic img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-bottom: 1px solid var(--border); filter: grayscale(1) sepia(.35) hue-rotate(165deg) saturate(1.35) brightness(.96) contrast(1.04); transition: filter var(--transition); }
.otd-card:hover .otd-card__pic img { filter: grayscale(1) sepia(.35) hue-rotate(165deg) saturate(1.5) brightness(1); }
.otd-card__tile { display: grid; place-items: center; aspect-ratio: 16 / 9; padding: 12px; background: linear-gradient(135deg, var(--ocpl-navy), var(--ocpl-blue)); border-bottom: 1px solid var(--border); color: rgba(255, 255, 255, .85); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; text-align: center; }
.otd-card__body { flex: 1; display: flex; flex-direction: column; padding: 14px 18px 16px; }
.otd-card__fam { margin: 0 0 4px; font-size: var(--fs-xs); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-light); }
.otd-family .otd-card__fam { display: none; }   /* the family heading stands right above; the label matters in the flat orders */
.otd-card h3 { margin: 0 0 6px; font-family: var(--font-display); font-size: 1.12rem; line-height: 1.25; color: var(--heading); }
.otd-card h3 a { color: inherit; text-decoration: none; }
.otd-card h3 a:hover { color: var(--ocpl-blue); }
.otd-card__blurb { margin: 0 0 8px; font-size: var(--fs-sm); line-height: 1.55; color: var(--text-mid); }
.otd-card__n { margin: 0 0 10px; font-size: var(--fs-xs); font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.otd-card__go { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: auto 0 0; font-size: var(--fs-sm); }
.otd-card__go a { font-weight: 700; color: var(--ocpl-blue-dark); text-decoration: none; }
.otd-card__go a:hover { text-decoration: underline; }
.otd-card__go a:first-child { color: var(--ocpl-blue); }
.otd-none { padding: 24px 0; font-size: var(--fs-md); color: var(--text-mid); }
.otd-grow { margin: 24px 0 0; max-width: 72ch; font-size: var(--fs-sm); line-height: 1.55; color: var(--text-mid); }

@media (max-width: 900px) {
  .otd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .otd-sort { margin-left: 0; }
}
@media (max-width: 560px) {
  .otd-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .otd-card { display: grid; grid-template-columns: 104px minmax(0, 1fr); }
  .otd-card__pic { height: 100%; }
  .otd-card__pic img, .otd-card__tile { width: 104px; height: 100%; min-height: 104px; aspect-ratio: auto; border-bottom: 0; border-right: 1px solid var(--border); }
  .otd-card__tile { font-size: 10px; padding: 8px; }
  .otd-card__body { padding: 10px 14px 12px; }
  .otd-card h3 { font-size: var(--fs-md); }
  .otd-card__blurb { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}
@media (pointer: coarse) {
  .otd-pills a, .otd-sort a { min-height: 44px; align-items: center; }
  .otd-form input { min-height: 44px; }
}
