/* ==========================================================================
   WordPress-specific adjustments layered on top of the theme design system
   ========================================================================== */

/* ---------- Admin bar ---------- */
body.admin-bar .site-header { top: 32px; }
body.admin-bar .mobile-nav { top: 32px; }
body.admin-bar .anchors-wrap { top: calc(var(--header-h) + 32px); }

@media (max-width: 782px) {
  body.admin-bar .site-header { top: 46px; }
  body.admin-bar .mobile-nav { top: 46px; }
  body.admin-bar .anchors-wrap { top: auto; }
}

/* ---------- Misc core classes ---------- */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}
.screen-reader-text:focus {
  background: #fff;
  clip: auto !important;
  clip-path: none;
  color: var(--navy);
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 15px 23px 14px;
  top: 5px;
  width: auto;
  z-index: 100000;
}

.custom-logo-link { display: inline-flex; align-items: center; }
.brand__img.custom-logo { height: 34px; width: auto; }
.site-header.is-stuck .brand__img.custom-logo { height: 29px; }
@media (max-width: 720px) {
  .brand__img.custom-logo { height: 28px; }
  .site-header.is-stuck .brand__img.custom-logo { height: 26px; }
}

/* Honeypot field — hidden from humans, available to bots. */
.hp-field {
  position: absolute !important;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Blog / archive listings ---------- */
.post-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}
.post-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.75rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
}
.post-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.post-card h2 { font-size: 1.35rem; line-height: 1.2; }
.post-card h2 a:hover { color: var(--blue); }
.post-card p { font-size: 0.9rem; color: var(--body); }
.post-card .link-arrow { margin-top: auto; padding-top: 0.5rem; }

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 2.5rem;
}
.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.84rem;
  color: var(--navy);
  background: #fff;
}
.pagination .page-numbers:hover { border-color: var(--navy); }
.pagination .current { background: var(--navy); border-color: var(--navy); color: #fff; }

.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  font-weight: 500;
}
.post-nav a:hover { color: var(--blue); }
.entry-meta { font-size: 0.85rem; color: rgba(255, 255, 255, 0.55); }

/* ---------- Search ---------- */
.search-form__label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.4rem;
}
.search-form__row { display: flex; gap: 0.5rem; }
.search-form__input {
  flex: 1;
  min-width: 0;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: #fff;
  font-size: 0.9rem;
}
.search-form__input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(2, 80, 248, 0.1);
}

/* ---------- Comments ---------- */
.comment-list { display: grid; gap: 1.25rem; }
.comment-list .comment-body {
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: #fff;
}
.comment-list .children { margin-top: 1rem; padding-left: 1.5rem; }
.comment-form p { margin-bottom: 1rem; }
.comment-form label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--navy); margin-bottom: 0.35rem; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: #fbfcff;
  font-size: 0.9rem;
}
.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(2, 80, 248, 0.1);
}
.comment-form .submit { cursor: pointer; }

/* ---------- Content (Gutenberg / classic) ---------- */
.prose .wp-block-image img,
.prose img { border-radius: var(--r-md); }
.prose figure { margin: 1.5rem 0; }
.prose figcaption {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}
.prose blockquote {
  margin: 1.5rem 0;
  padding: 0.25rem 0 0.25rem 1.25rem;
  border-left: 3px solid var(--amber);
  font-family: var(--font-display);
  font-size: 1.15rem;
  line-height: 1.45;
  color: var(--navy);
}
.prose blockquote p { margin-bottom: 0; font-size: inherit; color: inherit; }
.prose h2,
.prose h3 { scroll-margin-top: 120px; }
.prose ol { list-style: decimal; margin: 0.5rem 0 1.1rem 1.35rem; display: grid; gap: 0.45rem; }
.prose ol li { display: list-item; font-size: 0.96rem; }
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.9rem;
}
.prose th,
.prose td {
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.prose th { color: var(--navy); font-weight: 600; }
.prose code {
  background: var(--soft);
  border-radius: 4px;
  padding: 0.1rem 0.35rem;
  font-size: 0.875em;
}
.prose .wp-block-button__link { border-radius: 999px; }

.alignleft { float: left; margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.aligncenter { margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text,
.gallery-caption { font-size: 0.8rem; color: var(--muted); }
.sticky { display: block; }
.bypostauthor { display: block; }

/* ---------- Forms: success/error notice links ---------- */
.form-status a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Footer / menus rendered by core ---------- */
.footer__links li { display: contents; }
.footer__legal li { display: contents; }

/* ---------- Print ---------- */
@media print {
  .site-header,
  .topbar,
  .mobile-nav,
  .wa-float,
  .site-footer,
  .anchors-wrap { display: none !important; }
  body { color: #000; }
  .hero,
  .page-hero {
    background: #fff !important;
    color: #000 !important;
  }
  .hero h1,
  .page-hero h1 { color: #000 !important; }
}
