/*
 * News: the list (home.php, archive.php), the post (single.php) and the news card (template-parts/post-card.php).
 * Mobile first. Brand (TQ): yellow only on clickable elements, cypress only decorative, text left-aligned.
 */

/* List head */
.ev-blog__title { margin: 4px 0 0; }
.ev-blog__lead { max-width: 720px; margin: 14px 0 0; color: var(--ev-ink-2); }
.ev-blog__cats { margin: 24px 0 0; }
.ev-main > .ev-section + .ev-blog__body { margin-top: 28px; }
.ev-blog__grid { margin-top: 20px; }
.ev-blog__empty { padding: 32px; background: var(--ev-surface); border-radius: var(--ev-radius-md); color: var(--ev-ink-2); }
.ev-blog .ev-pagination { margin-top: 32px; }

/* News card: the whole card is the link (stretched title link) */
.ev-post-card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--ev-surface); border-radius: var(--ev-radius-md); box-shadow: var(--ev-shadow-sm);
  transition: box-shadow 0.15s ease;
}
.ev-post-card:hover { box-shadow: var(--ev-shadow-md); }
.ev-post-card__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--ev-cypress-wash); }
.ev-post-card__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.ev-post-card:hover .ev-post-card__img { transform: scale(1.03); }
.ev-post-card__img--empty { display: block; }
.ev-post-card__body { display: flex; flex-direction: column; flex: 1; gap: 10px; padding: 20px; }
.ev-post-card__cat { color: var(--ev-cypress-deep); }
.ev-post-card__title { font-size: 19px; font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; }
.ev-post-card__title a { color: inherit; text-decoration: none; }
.ev-post-card__title a::after { content: ""; position: absolute; inset: 0; }
.ev-post-card__title a:focus-visible { outline: none; }
.ev-post-card:has(a:focus-visible) { outline: 2px solid var(--ev-ink); outline-offset: 2px; }
.ev-post-card__excerpt {
  margin: 0; color: var(--ev-ink-2);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden;
}
.ev-post-card__meta { display: flex; flex-wrap: wrap; gap: 6px; margin: auto 0 0; padding-top: 6px; font-size: 13px; color: var(--ev-ink-3); }

@media (min-width: 768px) {
  .ev-post-card--wide { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
  .ev-post-card--wide .ev-post-card__media { aspect-ratio: auto; min-height: 380px; }
  .ev-post-card--wide .ev-post-card__body { justify-content: center; gap: 14px; padding: 40px; }
  .ev-post-card--wide .ev-post-card__title { font-size: var(--ev-fs-title); line-height: 1.15; }
  .ev-post-card--wide .ev-post-card__excerpt { -webkit-line-clamp: 4; line-clamp: 4; font-size: 16px; }
  .ev-post-card--wide .ev-post-card__meta { margin-top: 8px; }
}

/* Post */
.ev-article__head { max-width: 900px; }
.ev-article__title { margin: 4px 0 0; }
.ev-article__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 18px 0 0; }
.ev-article__cat { padding: 6px 12px; font-size: 13px; }
.ev-article__facts { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; color: var(--ev-ink-3); }
.ev-article__lead { max-width: 760px; margin: 18px 0 0; font-size: 18px; line-height: 1.55; color: var(--ev-ink-2); }

.ev-article__cover { margin: 28px 0 0; }
.ev-article__img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--ev-radius-lg); background: var(--ev-cypress-wash);
}
.ev-article__cover figcaption { margin-top: 8px; font-size: 13px; color: var(--ev-ink-3); }

.ev-article__layout { display: grid; gap: 24px; margin-top: 24px; }
.ev-article__main { min-width: 0; }
.ev-article__content {
  padding: 24px 20px; background: var(--ev-surface); border-radius: var(--ev-radius-lg);
}
.ev-article__main .ev-share { margin: 20px 0 0; }

.ev-article__cta { display: grid; gap: 10px; padding: 24px; background: var(--ev-surface); border-radius: var(--ev-radius-lg); }
.ev-article__cta-title { margin: 0; font-size: 22px; font-weight: 700; line-height: 1.2; }
.ev-article__cta-text { margin: 0; color: var(--ev-ink-2); }
.ev-article__cta .ev-lead { padding: 4px 0 0; }
.ev-article__links { margin: 6px 0 0; padding: 0; list-style: none; }
.ev-article__links a,
.ev-article__all {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-weight: 700; color: var(--ev-ink); text-decoration: none;
}
.ev-article__links a { padding: 12px 0; border-top: 1px solid var(--ev-line); }
.ev-article__links a:hover, .ev-article__all:hover { text-decoration: underline; }

.ev-main > .ev-section + .ev-article__related { margin-top: 80px; }
.ev-article__related-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 24px; }

@media (min-width: 768px) {
  .ev-article__img { aspect-ratio: 21 / 9; }
  .ev-article__content { padding: 48px 56px; }
}
@media (min-width: 1024px) {
  .ev-article__layout { grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; align-items: start; margin-top: 32px; }
  .ev-article__aside { position: sticky; top: 110px; }
  .ev-main > .ev-section + .ev-article__related { margin-top: var(--ev-section-gap); }
}

/* Post text (Gutenberg): 16 px Medium, left-aligned, readable line length */
.ev-content { font-size: 16px; line-height: 1.7; color: var(--ev-ink-2); }
.ev-content > * { max-width: 720px; }
.ev-content > :first-child { margin-top: 0; }
.ev-content > :last-child { margin-bottom: 0; }
.ev-content p, .ev-content ul, .ev-content ol { margin: 0 0 1.1em; }
.ev-content h2 { margin: 1.8em 0 0.6em; font-size: 25px; line-height: 1.2; color: var(--ev-ink); }
.ev-content h3 { margin: 1.6em 0 0.5em; font-size: 19px; line-height: 1.3; color: var(--ev-ink); }
.ev-content strong { color: var(--ev-ink); font-weight: 700; }
.ev-content a { color: var(--ev-ink); font-weight: 700; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.ev-content a:hover { text-decoration-color: var(--ev-cypress); }
.ev-content ul, .ev-content ol { padding-left: 1.3em; }
.ev-content li { margin-bottom: 0.45em; }
.ev-content li::marker { color: var(--ev-cypress); font-weight: 700; }
.ev-content blockquote {
  margin: 1.6em 0; padding: 4px 0 4px 22px; border-left: 4px solid var(--ev-cypress);
  font-size: 19px; font-weight: 600; line-height: 1.5; color: var(--ev-ink);
}
.ev-content blockquote p:last-child { margin-bottom: 0; }
.ev-content figure { margin: 1.6em 0; }
.ev-content img { border-radius: var(--ev-radius-md); }
.ev-content figcaption { margin-top: 8px; font-size: 13px; color: var(--ev-ink-3); }
.ev-content table { width: 100%; margin: 1.6em 0; border-collapse: collapse; font-size: 15px; }
.ev-content th, .ev-content td { padding: 10px 12px; border-bottom: 1px solid var(--ev-line); text-align: left; }
.ev-content th { color: var(--ev-ink); font-weight: 700; background: var(--ev-cypress-wash); }
.ev-content .wp-block-table { overflow-x: auto; }
.ev-content hr { margin: 2em 0; border: 0; border-top: 1px solid var(--ev-line-strong); }

@media print {
  .ev-article__aside, .ev-article__related, .ev-article .ev-share { display: none; }
  .ev-article__content { padding: 0; }
}
