/* WordPress-only additions on top of style.css: post/page layouts, cards
   with real thumbnails, editor content typography, required WP classes. */

/* Language variants of translated posts: only the active one is shown, even
   where theme CSS gives spans/divs an explicit display value */
[data-lang-only][hidden] { display: none !important; }

/* Fixed header must clear the admin bar for logged-in users */
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }

/* Post, page and archive layouts — leave room under the fixed header */
.tm-single,
.tm-archive { padding-top: clamp(7.5rem, 15vh, 10rem); }
.tm-narrow { max-width: 46rem; margin-inline: auto; }
.tm-back { display: inline-flex; margin-bottom: 1.75rem; }
.tm-single-title { margin: 0.75rem 0 1rem; }
.tm-single .blog-meta { margin: 0; }
.tm-single-cover {
  max-width: 64rem;
  margin: 2.5rem auto 0;
  border-radius: var(--r-lg);
  overflow: hidden;
}
/* Portrait photos would otherwise fill more than a whole screen */
.tm-single-cover img { display: block; width: 100%; height: auto; max-height: min(34rem, 70vh); object-fit: cover; }

.tm-post-nav {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-weight: 500;
}
.tm-post-nav a { color: var(--brand-navy); }
.tm-post-nav a:hover { color: var(--blue); }
.tm-post-nav span:last-child { text-align: right; }

/* Content written in the block editor */
.entry-content {
  margin-top: 2.5rem;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--ink-2);
}
.entry-content > * { margin-block: 0 1.25rem; }
.entry-content > :last-child { margin-bottom: 0; }
.entry-content h2,
.entry-content h3,
.entry-content h4 { color: var(--brand-navy); line-height: 1.25; letter-spacing: -0.015em; }
.entry-content h2 { font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.75rem); margin-top: 2.5rem; }
.entry-content h3 { font-size: 1.25rem; margin-top: 2rem; }
.entry-content h4 { font-size: 1.0625rem; margin-top: 1.75rem; }
.entry-content a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.entry-content a:hover { color: var(--brand-navy); }
.entry-content strong { color: var(--ink); }
.entry-content ul,
.entry-content ol { padding-left: 1.4em; }
.entry-content li + li { margin-top: 0.4em; }
.entry-content blockquote {
  margin-inline: 0;
  padding-left: 1.25rem;
  border-left: 3px solid var(--blue);
  color: var(--ink);
  font-style: italic;
}
.entry-content img { max-width: 100%; height: auto; border-radius: var(--r-md); }
.entry-content figure { margin-inline: 0; }
.entry-content figcaption,
.wp-caption-text { margin-top: 0.5rem; font-size: 0.875rem; text-align: center; color: var(--ink-2); }
.entry-content code { font-family: var(--font-mono); font-size: 0.9em; }
.entry-content pre {
  padding: 1rem 1.25rem;
  border-radius: var(--r-md);
  background: var(--bg-alt);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.9em;
  line-height: 1.6;
}
.entry-content table { width: 100%; border-collapse: collapse; font-size: 0.95em; }
.entry-content th,
.entry-content td { padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--line); text-align: left; }
.entry-content hr { border: 0; border-top: 1px solid var(--line); margin-block: 2.5rem; }

/* Privacy policy link under the form's consent checkbox, aligned with its
   text (checkbox 20px + the .consent gap) */
.consent-link { display: inline-flex; margin: 0.4rem 0 0 calc(20px + 0.85rem); font-size: 0.875rem; }

/* Team cards open the member's page: the link sits on the name and is
   stretched over the whole card, so it's one clear link for screen readers */
.team-card-linked { position: relative; }
.team-card-link { color: inherit; }
.team-card-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.team-card-link:focus-visible { outline: none; }
.team-card-linked:focus-within { outline: 2px solid var(--blue); outline-offset: 6px; border-radius: var(--r-md); }
.team-card-linked:hover .team-name { color: var(--blue); }
.team-more { display: inline-flex; margin-top: 1rem; }

/* Team member page */
.tm-member-grid { margin-top: 0.25rem; }
.tm-member-photo { position: sticky; top: 7rem; }
.tm-member .tm-single-title { margin-top: 0.5rem; }
.tm-member-lead { margin-top: 0; color: var(--ink); }
.tm-member .team-tags { margin-top: 1.25rem; }
.tm-member-bio { margin-top: 2rem; }
@media (max-width: 767.98px) {
  .tm-member-photo { position: static; max-width: 22rem; }
}

/* Blog cards with a real featured image over the gradient placeholder */
.blog-media-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.blog-media .blog-media-badge { z-index: 2; }

/* Pagination */
.tm-pagination { margin-top: 3rem; }
.tm-pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; }
.tm-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  height: 2.75rem;
  padding: 0 0.9rem;
  border-radius: var(--r-pill);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--brand-navy);
  font-weight: 500;
}
.tm-pagination .page-numbers.current { background: var(--brand-navy); color: #fff; box-shadow: none; }
.tm-pagination a.page-numbers:hover { box-shadow: inset 0 0 0 1px var(--blue); color: var(--blue); }

/* Classes WordPress itself outputs */
.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.alignleft { float: left; margin: 0.4rem 1.5rem 1rem 0; }
.alignright { float: right; margin: 0.4rem 0 1rem 1.5rem; }
.aligncenter { display: block; margin-inline: auto; }
.wp-caption { max-width: 100%; }
.sticky,
.bypostauthor,
.gallery-caption { /* required by the theme review checklist */ }
