/* Parts the static design did not have: search, pager, gallery, tags, comments, ad slots.
   :where() keeps these rules weak so style.css can always override them. */
.searchbar { display: flex; gap: 10px; max-width: var(--wrap); margin: 0 auto; padding: 12px var(--pad); }
.searchbar[hidden] { display: none; }
.searchbar input { flex: 1; min-width: 0; height: 44px; padding: 0 14px; border: 2px solid var(--line); border-radius: 6px; font: 500 16px var(--f-ui); }
:where(.pager) { display: flex; justify-content: space-between; gap: 16px; margin-top: 28px; }
:where(.pager) .btn[rel="next"] { margin-left: auto; }
:where(.empty) { max-width: var(--wrap); margin: 0 auto; padding: 24px var(--pad) 64px; }
.art-video { position: relative; aspect-ratio: 16 / 9; margin-bottom: 24px; }
.art-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 6px; }
.body img, .body iframe, .body video { max-width: 100%; }
.body img { height: auto; }
/* videos pasted into the text have a fixed small height */
.body iframe[src*="youtube.com/embed"] { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; }
:where(.gallery) { display: grid; gap: 16px; margin: 24px 0; }
:where(.gallery) figure { margin: 0; }
:where(.gallery) figcaption { font-size: 12px; color: var(--soft); padding-top: 6px; }
:where(.tags) { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; font-size: 13px; color: var(--soft); }
.author .avatar { overflow: hidden; }
.author .avatar img { width: 100%; height: 100%; object-fit: cover; }
.poll-done[hidden] { display: none; }
:where(.comments) { margin: 40px 0; }
:where(.comment) { padding: 14px 0; border-bottom: 1px solid var(--line); }
:where(.comment-form) { display: grid; gap: 10px; margin-top: 20px; }
:where(.comment-form) input, :where(.comment-form) textarea { padding: 12px; border: 2px solid var(--line); border-radius: 6px; font: 16px var(--f-ui); }
.hp { position: absolute; left: -9999px; }
.ad-slot { max-width: 100%; }
.ad-slot:empty { display: none; }
[data-slot][hidden], .ad-slot[hidden] { display: none !important; }
.fx-down { color: var(--red); font-size: 11px; }
.weather strong, .fx strong { color: var(--ink); }
/* CMS quotes are plain <blockquote>, the design styled .quote */
.body blockquote { margin: 8px 0 30px; padding: 4px 0 4px 24px; border-left: 4px solid var(--red); font: 700 22px/1.55 var(--f-body); color: var(--ink); }
.body blockquote p { margin: 0; font: inherit; }

/* Home page sections filled from categories (themes/dritare/sections) */
.hsec { max-width: var(--wrap); margin: 0 auto; padding: 48px var(--pad) 0; }
.hsec:last-child { padding-bottom: 48px; }
.hsec-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 24px; }
.hsec-feature { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.hsec-big .ph { aspect-ratio: 16 / 10; margin-bottom: 14px; }
.hsec-big h3 { font-size: clamp(26px, 2.6vw, 36px); line-height: 1.05; }
.hsec-feature .row .ph { flex-basis: 160px; }
.hsec-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 28px; align-items: start; }
.hsec-columns .dot-label { margin-bottom: 16px; }
@media (max-width: 1099px) {
  .hsec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hsec-feature { grid-template-columns: minmax(0, 1fr); }
  .hsec-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .hsec { padding: 30px 16px 0; }
  .hsec-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .hsec-columns { grid-template-columns: minmax(0, 1fr); }
  .hsec-feature { gap: 18px; }
  .hsec-feature .row .ph { flex-basis: 116px; }
}

/* long CMS category names must not break the menu into two lines */
.mainnav a { white-space: nowrap; }
.mainnav ul { overflow-x: auto; scrollbar-width: none; }
/* the dividing lines must not be squeezed away when the menu is long */
.mainnav li.div { flex: 0 0 1px; }
@media (min-width: 1400px) { .mainnav ul { column-gap: 14px; } }
@media (min-width: 1100px) and (max-width: 1399px) { .mainnav ul { column-gap: 9px; font-size: 14.5px; } }
@media (min-width: 1100px) and (max-width: 1199px) { .mainnav ul { column-gap: 7px; font-size: 13.5px; } }

/* playlists loaded on click */
.thumbs[aria-busy] { opacity: .4; pointer-events: none; }
.thumbs-msg { margin: 0; padding: 28px 0; color: #e4e4e7; }

/* main slider: 100px taller than 16:9 on tablet and desktop */
@media (min-width: 768px) { .slider .ph { aspect-ratio: auto; padding-top: calc(56.25% + 100px); } }
/* category and date follow the title; the room for a second line stays below them, so the page does not jump */
.slide-title h1 { min-height: 0; }
.slide-text { min-height: calc(2 * clamp(30px, 3.8vw, 52px) + 52px); }
@media (max-width: 767px) { .slide-text { min-height: 134px; } }

/* ads inside the article: no label, no space above or below inside the ad box */
.art .ad-label { display: none; }
.art .ad-band { padding-top: 0; padding-bottom: 0; }
.art [data-slot] { margin-bottom: 20px; }

/* the first ad under the menu */
.leader .ad-leader { width: 100%; display: flex; flex-direction: column; align-items: center; }
.leader .ad-label { display: none; }
.leader:has([data-slot][hidden]) { display: none; }
