/* ==========================================================================
   Blog (blog.html + blog-<slug>.html — generated by scripts/build-blog.mjs). Loads after site.css; reuses .oz-crumbs, .oz-pill,
   .oz-post (cards), .oz-head2, .oz-band. Mobile first: one column; from 1024px the sidebar sits on the right.
   ========================================================================== */

.bl-page [hidden] { display: none !important; } /* a class `display` would otherwise beat the hidden attribute */

/* ---- List: title + category chips ---------------------------------------- */
.bl-hero { padding-block: 4px var(--s-2); }
.bl-hero__head { max-width: 720px; }
.bl-hero h1 { margin: var(--s-1) 0 12px; font-size: 2rem; line-height: 1.2; text-wrap: balance; }
.bl-hero__lead { max-width: 60ch; color: var(--oz-text-2); }
@media (min-width: 1024px) { .bl-hero h1 { font-size: 2.5rem; } }

.bl-chips { margin-top: var(--s-3); }
.bl-chips ul { display: flex; gap: 8px; margin: 0; padding: 2px 0; overflow-x: auto; list-style: none; scrollbar-width: none; }
.bl-chips ul::-webkit-scrollbar { display: none; }
.bl-chips li { flex: none; }
.bl-chips a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1.5px solid var(--oz-line);
  border-radius: 999px;
  background: #fff;
  color: var(--c-text);
  font-size: .9375rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color .2s ease, background-color .2s ease, color .2s ease;
}
.bl-chips a:hover { border-color: var(--oz-navy); }
.bl-chips a[aria-current="true"] { border-color: var(--oz-navy); background: var(--oz-navy); color: #fff; }

/* ---- Layout (list + article): content + sidebar ---------------------------- */
.bl-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-5); margin-block: var(--s-3) var(--s-6); }
.bl-main { min-width: 0; }
@media (min-width: 1024px) {
  /* the text column takes all the room the sidebar leaves (no empty strip between them) */
  .bl-layout { grid-template-columns: minmax(0, 1fr) 360px; gap: var(--s-6); align-items: start; }
}
/* tall screens: the sidebar follows the reader instead of leaving a blank column under it (it is ~800px high) */
@media (min-width: 1024px) and (min-height: 860px) {
  .bl-side { position: sticky; top: calc(var(--bar-h) + var(--s-3)); }
}

/* ---- Article cards: one markup, two looks (.is-lead = the newest one, large) -- */
.bl-list { margin: 0; padding: 0; list-style: none; }
.bl-item { padding-block: 18px; border-top: 1px solid var(--oz-line); }
.bl-item:first-child:not(:has(.is-lead)) { border-top: 0; }
.bl-item:has(.is-lead) { padding-top: 0; padding-bottom: 26px; border-top: 0; }
.bl-item:has(.is-lead) + .bl-item { border-top: 0; }

.bl-post { position: relative; display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 14px; align-items: start; }
.bl-post__media { aspect-ratio: 1; overflow: hidden; border-radius: 12px; background: var(--oz-line); }
.bl-post__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease-out); }
.bl-post:hover .bl-post__media img { transform: scale(1.05); }
.bl-post__body { min-width: 0; }
.bl-post__cat { font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--oz-navy-2); }
.bl-post__new { display: none; }
.bl-post h2 { margin: 4px 0 0; font-size: 1.0625rem; line-height: 1.35; letter-spacing: -.01em; }
.bl-post h2 a { color: inherit; text-decoration: none; }
.bl-post h2 a::after { content: ""; position: absolute; inset: 0; z-index: 1; } /* whole card clickable */
.bl-post:hover h2 a { color: var(--oz-navy-2); }
.bl-post:has(h2 a:focus-visible) { outline: 3px solid var(--c-accent); outline-offset: 4px; border-radius: 12px; }
.bl-post h2 a:focus-visible { outline: none; }
.bl-post__ex { display: none; margin-top: 8px; font-size: .9375rem; line-height: 1.6; color: var(--oz-text-2); }
.bl-post__more { display: none; align-items: center; gap: 6px; margin-top: 10px; font-size: .875rem; font-weight: 700; color: var(--oz-orange); }
.bl-post__more .icon { transition: transform .2s ease; }
.bl-post:hover .bl-post__more .icon { transform: translateX(3px); }

.bl-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; margin: 8px 0 0; font-size: .8125rem; color: var(--oz-text-2); }
.bl-meta .icon { margin-right: -4px; }

/* the large one: image on top (phones), image beside the text (≥768px) */
.bl-post.is-lead { grid-template-columns: minmax(0, 1fr); gap: 0; overflow: hidden; border: 1px solid var(--oz-line); border-radius: 16px; background: #fff; box-shadow: var(--sh-1); }
.bl-post.is-lead .bl-post__media { aspect-ratio: 16 / 10; border-radius: 0; }
.bl-post.is-lead .bl-post__body { padding: 18px 18px 22px; }
.bl-post.is-lead .bl-post__new { display: inline; }
.bl-post.is-lead h2 { margin-top: 8px; font-size: 1.5rem; line-height: 1.25; }
.bl-post.is-lead .bl-post__ex,
.bl-post.is-lead .bl-post__more { display: block; }
.bl-post.is-lead .bl-post__more { display: inline-flex; }
.bl-post.is-lead .bl-post__ex { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

@media (min-width: 640px) {
  .bl-post { grid-template-columns: 220px minmax(0, 1fr); gap: 20px; }
  .bl-post__media { aspect-ratio: 4 / 3; }
  .bl-post h2 { font-size: 1.1875rem; }
  .bl-post__ex { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .bl-post__more { display: inline-flex; }
}
@media (min-width: 768px) {
  .bl-post.is-lead { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: stretch; }
  .bl-post.is-lead .bl-post__media { aspect-ratio: auto; min-height: 300px; }
  .bl-post.is-lead .bl-post__body { align-self: center; padding: 28px 30px; }
  .bl-post.is-lead h2 { font-size: 1.75rem; }
}

.bl-empty { padding: var(--s-5) var(--s-3); border-radius: 16px; background: var(--oz-gray); text-align: center; }
.bl-empty h2 { margin-bottom: 8px; font-size: 1.5rem; }
.bl-empty p { max-width: 46ch; margin: 0 auto var(--s-3); color: var(--oz-text-2); }
.bl-empty__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* ---- Sidebar ---------------------------------------------------------------- */
.bl-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-3); min-width: 0; align-content: start; }
.bl-widget { padding: 20px; border: 1px solid var(--oz-line); border-radius: 16px; background: #fff; }
.bl-widget h2 { margin-bottom: 12px; font-size: 1.0625rem; line-height: 1.3; letter-spacing: -.01em; }
.bl-widget p { margin-bottom: 14px; font-size: .9375rem; color: var(--oz-text-2); }
.bl-widget--tint { border-color: transparent; background: var(--c-primary-soft); }
/* boxes added in WordPress (Appearance › Widgets › Blog sidebar): lists, pictures and text like the built-in ones */
.bl-widget ul:not(.bl-cats):not(.bl-tours) { margin: 0; padding: 0; list-style: none; }
.bl-widget ul:not(.bl-cats):not(.bl-tours) a { display: flex; align-items: center; min-height: 44px; border-bottom: 1px solid var(--oz-line); color: inherit; font-weight: 500; text-decoration: none; }
.bl-widget ul:not(.bl-cats):not(.bl-tours) li:last-child a { border-bottom: 0; }
.bl-widget img { max-width: 100%; height: auto; border-radius: var(--oz-radius); }
.bl-widget__btn { width: 100%; white-space: normal; text-align: center; }
.bl-cats { margin: 0; padding: 0; list-style: none; }
.bl-cats a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; border-bottom: 1px solid var(--oz-line); color: inherit; font-weight: 500; text-decoration: none; }
.bl-cats li:last-child a { border-bottom: 0; }
.bl-cats a:hover { color: var(--oz-navy-2); }
.bl-cats small { color: var(--oz-text-2); font-variant-numeric: tabular-nums; }
.bl-tours { display: grid; gap: 12px; margin: 0 0 14px; padding: 0; list-style: none; }
.bl-tour { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; align-items: center; min-height: 56px; color: inherit; text-decoration: none; }
.bl-tour img { width: 72px; height: 56px; border-radius: 8px; object-fit: cover; }
.bl-tour b { display: -webkit-box; overflow: hidden; font-size: .875rem; line-height: 1.35; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.bl-tour:hover b { color: var(--oz-navy-2); }
.bl-tour small { display: block; margin-top: 2px; font-size: .8125rem; font-weight: 700; color: var(--oz-orange); }
.bl-tour small:empty { display: none; }
@media (min-width: 640px) and (max-width: 1023px) { /* tours on the right, spanning the two small widgets */
  .bl-side { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .bl-side > :nth-child(2) { grid-column: 2; grid-row: 1 / span 2; }
}

/* ---- Article ----------------------------------------------------------------- */
.bl-article { min-width: 0; max-width: 760px; }
@media (min-width: 1024px) { .bl-article { max-width: none; } } /* beside the sidebar it fills its column */
.bl-head__cat { font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.bl-head__cat a { display: inline-block; padding-block: 10px; color: var(--oz-navy-2); text-decoration: none; }
.bl-head__cat a:hover { text-decoration: underline; text-underline-offset: 3px; }
.bl-head h1 { margin: 0 0 4px; font-size: 1.875rem; line-height: 1.2; text-wrap: balance; }
.bl-head .bl-meta { margin-top: 10px; }
@media (min-width: 1024px) { .bl-head h1 { font-size: 2.5rem; } }

.bl-cover { margin: var(--s-3) 0 0; }
.bl-cover img { width: 100%; height: auto; aspect-ratio: 3 / 2; border-radius: 14px; object-fit: cover; }
.bl-lead { margin: var(--s-3) 0; font-size: 1.1875rem; line-height: 1.6; font-weight: 500; }
@media (min-width: 768px) { .bl-lead { font-size: 1.3125rem; } }

.bl-toc { margin: var(--s-3) 0; border-radius: 14px; background: var(--c-primary-soft); }
.bl-toc summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 0 20px; font-weight: 700; list-style: none; cursor: pointer; }
.bl-toc summary::-webkit-details-marker { display: none; }
.bl-toc summary small { font-weight: 400; color: var(--oz-text-2); }
.bl-toc summary .icon { flex: none; transition: transform .2s ease; }
.bl-toc[open] summary .icon { transform: rotate(180deg); }
.bl-toc summary:focus-visible { outline: 3px solid var(--c-accent); outline-offset: -3px; border-radius: 14px; }
.bl-toc ol { margin: 0; padding: 0 20px 14px 44px; }
.bl-toc li { break-inside: avoid; padding-left: 4px; }
.bl-toc li::marker { font-weight: 700; color: var(--oz-navy-2); }
.bl-toc a { display: flex; align-items: center; min-height: 44px; color: inherit; font-size: .9375rem; line-height: 1.35; text-decoration: none; }
.bl-toc a:hover { color: var(--oz-navy-2); text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 768px) { .bl-toc ol { columns: 2; column-gap: 56px; } }

.bl-prose { font-size: 1.0625rem; line-height: 1.75; }
@media (min-width: 1280px) { .bl-prose { font-size: 1.125rem; } } /* the column is ~870px wide beside the sidebar: a bigger size keeps lines near 90 characters */
.bl-prose > * + * { margin-top: 1.1em; }
.bl-prose h2 { margin-top: 2.1em; font-size: clamp(1.4rem, 1.2rem + 1vw, 1.75rem); line-height: 1.25; text-wrap: balance; }
.bl-prose h2 + * { margin-top: .7em; }
.bl-prose h3 { margin-top: 1.7em; font-size: 1.1875rem; line-height: 1.35; }
.bl-prose ul, .bl-prose ol { padding-left: 1.4em; } /* base.css only resets ul[role=list] */
.bl-prose ul { list-style: disc; }
.bl-prose ol { list-style: decimal; }
.bl-prose li + li { margin-top: .35em; }
.bl-prose li::marker { color: var(--oz-navy-2); }
.bl-prose a { color: var(--oz-navy-2); text-decoration: underline; text-underline-offset: 3px; }
.bl-prose a:hover { color: var(--oz-orange); }
.bl-prose .oz-pill, .bl-prose .oz-pill:hover { color: #fff; text-decoration: none; }

.bl-fig img { width: 100%; height: auto; border-radius: 12px; }
.bl-strip { display: flex; gap: 10px; padding-bottom: 8px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin; border-radius: 12px; }
.bl-strip img { flex: 1 0 auto; width: auto; max-width: none; height: 240px; object-fit: cover; border-radius: 12px; scroll-snap-align: start; }
.bl-strip img { -webkit-user-drag: none; }
.bl-strip.is-draggable { cursor: grab; }
.bl-strip.is-dragging { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; user-select: none; } /* snap would fight the drag */
.bl-strip:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 2px; }
@media (min-width: 768px) { .bl-strip img { height: 320px; } }

.bl-table { overflow-x: auto; border: 1px solid var(--oz-line); border-radius: 12px; }
.bl-table:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 2px; }
.bl-table table { width: 100%; border-collapse: collapse; font-size: .9375rem; line-height: 1.5; }
.bl-table th, .bl-table td { padding: 12px 16px; border-bottom: 1px solid var(--oz-line); text-align: left; vertical-align: top; }
.bl-table thead th { background: var(--oz-gray); font-size: .8125rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.bl-table tbody th { font-weight: 600; }
.bl-table tbody tr:last-child > * { border-bottom: 0; }

.bl-cta .oz-pill { height: auto; min-height: 48px; padding-block: 12px; max-width: 100%; white-space: normal; text-align: left; }

.bl-end { display: grid; gap: var(--s-3); margin-top: var(--s-6); padding: var(--s-4) var(--s-3); border-radius: 16px; background: var(--oz-gray); }
.bl-end h2 { margin-bottom: 8px; font-size: 1.375rem; }
.bl-end p { max-width: 52ch; color: var(--oz-text-2); }
.bl-end__actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media (min-width: 768px) { .bl-end { padding: var(--s-4); } }

/* ---- Keep reading ---------------------------------------------------------- */
.bl-more__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 640px) { .bl-more__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .bl-more__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

@media (prefers-reduced-motion: reduce) {
  .bl-post__media img, .bl-post__more .icon, .bl-toc summary .icon, .bl-chips a { transition: none; }
  .bl-post:hover .bl-post__media img { transform: none; }
}
