/* ==========================================================================
   AS Webverse: WordPress integration styles
   Loaded after style.css (the original design stylesheet). Covers markup that
   WordPress or ACF editor content produces and that the static design did not
   need: editor content wrappers, admin bar, pagination, single posts,
   form states, and replacements for the design's inline styles.
   ========================================================================== */

/* ---------- Accessibility helpers ---------- */
.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;
}

/* ---------- Admin bar offset for the fixed header ---------- */
.admin-bar .site-header {
  top: 32px;
}
.admin-bar .mobile-drawer {
  top: 32px;
  height: calc(100% - 32px);
}
@media (max-width: 782px) {
  .admin-bar .site-header,
  .admin-bar .mobile-drawer {
    top: 46px;
  }
  .admin-bar .mobile-drawer {
    height: calc(100% - 46px);
  }
}
@media (max-width: 600px) {
  /* The admin bar scrolls away on small screens. */
  .admin-bar .site-header {
    top: 0;
  }
}

/* ---------- Editor (WYSIWYG) content inside design columns ----------
   The design styles direct-child paragraphs (".about-content > p"); editor
   content is wrapped, so mirror those rules. */
.about-text p {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.75;
  margin-bottom: 14px;
}
.about-text p + p {
  /* Second paragraph = "mission" emphasis in the design. */
  font-weight: 500;
}
.split-text {
  margin-bottom: 26px;
}
.split-text p {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.75;
  margin-bottom: 26px;
}
.split-text p:last-child {
  margin-bottom: 0;
}
.faq-answer-inner p:last-child {
  margin-bottom: 0;
}

/* ---------- Replacements for inline styles in the static design ---------- */
.section.page-intro {
  padding-bottom: 0;
}
.section.page-intro .section-head {
  margin-bottom: 60px;
}
.section.page-intro:has(+ .portfolio-section) .section-head {
  margin-bottom: 40px;
}
.section.page-intro + .section {
  padding-top: 0;
}
.contact-intro {
  color: var(--text-muted);
  font-size: 15.5px;
  line-height: 1.7;
}

/* Team avatar gradients (cycled). */
.team-avatar-circle {
  background: linear-gradient(135deg, #1e3fa8, #3e7bfa);
}
.team-init-card:nth-child(3n + 2) .team-avatar-circle {
  background: linear-gradient(135deg, #3e7bfa, #7fb0ff);
}
.team-init-card:nth-child(3n + 3) .team-avatar-circle {
  background: linear-gradient(135deg, #6fa0ff, #a9c8ff);
}

/* Logo images in the "trusted by" bar. */
.trusted-logo img {
  max-height: 32px;
  width: auto;
  filter: grayscale(1);
  opacity: 0.7;
}

/* FAQ without promo images: single column. */
.faq-section.faq-no-visuals {
  display: block;
  max-width: 860px;
}

/* ---------- Cards rendered as links ---------- */
a.insight-img-wrap {
  display: block;
}
.insight-body h3 a {
  color: inherit;
}
.insight-body h3 a:hover {
  color: var(--blue-primary);
}

/* ---------- Contact form states ---------- */
.form-honeypot {
  position: absolute !important;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form-error {
  color: #b42318;
  background: #fef3f2;
  border: 1px solid #fecdca;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 14px;
  margin-bottom: 18px;
}
.contact-form [type="submit"][aria-busy="true"] {
  opacity: 0.7;
  cursor: progress;
}

/* ---------- Pagination ---------- */
.pagination-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 50px;
}
.pagination-nav .page-numbers {
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-color);
  background: var(--white);
  color: var(--navy-dark);
  font-weight: 600;
  font-size: 14px;
  transition:
    background var(--dur-fast),
    color var(--dur-fast),
    border-color var(--dur-fast);
}
.pagination-nav a.page-numbers:hover,
.pagination-nav .page-numbers.current {
  background: var(--blue-primary);
  border-color: var(--blue-primary);
  color: var(--white);
}
.pagination-nav .page-numbers.dots {
  border-color: transparent;
  background: none;
}

/* ---------- Empty states / 404 ---------- */
.empty-state {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  color: var(--text-muted);
}
.search-form {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}
.search-form label {
  flex: 1;
  margin: 0;
}
.search-form .search-field {
  width: 100%;
  height: 48px;
  padding: 0 18px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  font-size: 15px;
}
.search-form .search-submit {
  height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--blue-primary);
  color: var(--white);
  font-weight: 600;
}
.error-404 {
  padding-bottom: 100px;
}
.error-404-actions {
  max-width: 560px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.error-404-actions .search-form {
  width: 100%;
}

/* ---------- Prose: WordPress block content ---------- */
.prose h3 {
  font-size: 19px;
  margin: 30px 0 12px;
  color: var(--navy-deep);
}
.prose ol {
  padding-left: 22px;
  margin-bottom: 16px;
}
.prose a {
  color: var(--blue-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.prose img,
.prose .wp-block-image img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
}
.prose figure {
  margin: 30px 0;
}
.prose figcaption {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 8px;
  text-align: center;
}
.prose blockquote {
  margin: 30px 0;
  padding: 6px 0 6px 22px;
  border-left: 3px solid var(--blue-primary);
  font-size: 18px;
  color: var(--navy-dark);
}
.prose .alignleft {
  float: left;
  margin: 6px 24px 16px 0;
}
.prose .alignright {
  float: right;
  margin: 6px 0 16px 24px;
}
.prose .aligncenter {
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Post navigation (blog details) ---------- */
.post-navigation .nav-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.post-navigation a {
  display: block;
  height: 100%;
  padding: 20px 22px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition:
    border-color var(--dur-fast),
    box-shadow var(--dur-fast);
}
.post-navigation a:hover {
  border-color: var(--blue-primary);
  box-shadow: var(--shadow-md);
}
.post-navigation .nav-next {
  text-align: right;
  grid-column: 2;
}
.post-navigation .nav-subtitle {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.post-navigation .nav-title {
  font-weight: 700;
  color: var(--navy-deep);
}
@media (max-width: 575px) {
  .post-navigation .nav-links {
    grid-template-columns: 1fr;
  }
  .post-navigation .nav-next {
    grid-column: 1;
  }
  .search-form {
    flex-direction: column;
  }
}
