/* ==========================================================================
   WordPress glue — only the bits the static build did not need.
   Base design system: assets/css/styles.css
   ========================================================================== */

/* Fixed glass nav + admin bar */
body.admin-bar .nav { top: 32px; }
@media screen and (max-width: 782px) {
  body.admin-bar .nav { top: 46px; }
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 12px 0;
  font-size: 13px;
}
.skip-link:focus { left: 0; }

/* Screen-reader utility (WP core class) */
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Case-study card titles are links */
.csdet__hero h3 a,
.cse b a {
  color: inherit;
  text-decoration: none;
}
.csdet__hero h3 a:hover,
.cse b a:hover { color: var(--teal-d); }

/* Featured images inside post cards */
.post-card .cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Entry content (pages, posts, case-study body) */
.entry {
  max-width: 78ch;
  font-size: 16px;
  line-height: 1.8;
  color: var(--gray);
}
.entry > * + * { margin-top: 1.1em; }
.entry h2 {
  font-family: var(--f);
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  letter-spacing: -.02em;
  color: var(--ink);
  margin-top: 1.8em;
}
.entry h3 {
  font-family: var(--f);
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  letter-spacing: -.01em;
  color: var(--ink);
  margin-top: 1.5em;
}
.entry p { margin: 0; }
.entry a { color: var(--teal-d); text-decoration: underline; text-underline-offset: 2px; }
.entry ul, .entry ol { padding-left: 1.2em; display: grid; gap: 8px; }
.entry li::marker { color: var(--teal); }
.entry blockquote {
  margin: 1.6em 0;
  padding: 18px 22px;
  border-left: 3px solid var(--teal);
  background: var(--teal-l);
  border-radius: 0 14px 14px 0;
  color: var(--ink);
  font-size: 15.5px;
}
.entry img { max-width: 100%; height: auto; border-radius: 14px; }
.entry table { width: 100%; border-collapse: collapse; font-size: 14px; }
.entry th, .entry td { border-bottom: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.entry th { color: var(--ink); font-weight: 700; }
.entry code, .entry pre {
  font-family: var(--m);
  font-size: 13px;
  background: var(--soft);
  border-radius: 8px;
}
.entry code { padding: 2px 6px; }
.entry pre { padding: 16px; overflow-x: auto; }

.entry-media { margin: 0 0 clamp(22px, 3vw, 34px); }
.entry-media img { width: 100%; height: auto; border-radius: 18px; display: block; }

.entry-media img, .entry img { border: 1px solid var(--line); }

/* Page numbers */
.pager { margin-top: clamp(26px, 3.4vw, 40px); }
.pager .nav-links { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pager .page-numbers {
  min-width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  background: #fff;
}
.pager .page-numbers.current { background: var(--teal); border-color: var(--teal); color: #fff; }
.pager .page-numbers:hover { border-color: var(--teal); color: var(--teal-d); }

/* Prev / next case study links */
.postnav { display: flex; gap: 14px; justify-content: space-between; flex-wrap: wrap; }
.postnav__link {
  flex: 1 1 260px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  background: #fff;
  transition: border-color .2s, color .2s, transform .2s;
}
.postnav__link:hover { border-color: var(--teal); color: var(--teal-d); transform: translateY(-2px); }
.postnav__link--next { text-align: right; }

/* Comments */
.entry-comments { max-width: 78ch; margin-top: clamp(30px, 4vw, 48px); }
.entry-comments h2, .entry-comments h3 { font-family: var(--f); letter-spacing: -.02em; }
.comment-list { list-style: none; padding: 0; display: grid; gap: 18px; }
.comment-list .comment-body {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  font-size: 14px;
  color: var(--gray);
  background: #fff;
}
.comment-form { display: grid; gap: 12px; font-size: 13.5px; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
}

/* Core image alignment classes */
.alignleft { float: left; margin: 0 20px 16px 0; }
.alignright { float: right; margin: 0 0 16px 20px; }
.aligncenter { display: block; margin: 20px auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 12.5px; color: var(--gray); margin-top: 6px; }

/* ------------------------------------------------------------------
   Imported / Elementor pages (.rs-raw) — full-width, no double padding.
   ------------------------------------------------------------------ */
.rs-raw { width: 100%; }

/* Elementor renders imported sections inside its own wrappers. Neutralize
   the INNER wrapper chrome only — the section element itself is left alone
   because it carries the design-system classes (.hero, .sect, .sect--soft)
   with their padding, background and margins. */
.rs-raw .elementor-container,
.rs-raw .elementor-row,
.rs-raw .elementor-column,
.rs-raw .elementor-column-wrap,
.rs-raw .elementor-widget-wrap,
.rs-raw .elementor-element-populated,
.rs-raw .elementor-widget,
.rs-raw .elementor-widget-container {
  padding: 0;
  margin: 0;
}
.rs-raw .elementor-widget-text-editor { margin: 0; line-height: inherit; }
.rs-raw .elementor-widget-text-editor .elementor-widget-container > p { margin: 0; }
.elementor-section.elementor-section-full_width > .elementor-container { max-width: 100%; padding: 0; }

/* ------------------------------------------------------------------
   Hero layout across wrapper boundaries.
   The design system targets .hero>.wrap (direct child). Inside WordPress /
   Elementor wrappers .wrap sits deeper, so the same declarations are
   re-applied as descendant selectors — order mirrors styles.css.
   ------------------------------------------------------------------ */
.hero .wrap {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}
.hero--center .wrap { grid-template-columns: 1fr; text-align: center; max-width: 820px; }
.hero--news .wrap { padding-block: clamp(22px, 3vw, 38px); }
.hero .wrap { align-items: stretch; } /* v11: equal-height hero columns */
@media (max-width: 1024px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero--center .wrap { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------------
   Section rhythm (client request): a clear 60–80px gap below every
   section, on every page.
   - White sections carry no vertical padding of their own — the margin
     below them IS the visible gap.
   - Soft (tinted, rounded) sections keep their internal padding so the
     colored blocks breathe; the perceived gap between blocks is still
     the 60–80px margin.
   - Hero and the trust marquee get the same bottom gap.
   ------------------------------------------------------------------ */
main .sect {
  padding-block: 0;
  margin-bottom: clamp(60px, 6vw, 80px);
}
main .sect--soft {
  padding-block: clamp(48px, 6vw, 84px);
}
main .hero,
main .lmq {
  margin-bottom: clamp(60px, 6vw, 80px);
}

/* Header → hero gap. The nav is sticky in-flow, so the hero's own top
   padding is the visible space below it. Pin it to a generous, consistent
   value so the hero never crowds the menu on any page or breakpoint. */
main .hero {
  padding-top: clamp(72px, 8vw, 110px);
}

/* Elementor editor: hide the theme title block on imported pages. */
.elementor-page .rs-raw { overflow-x: clip; }

/* ------------------------------------------------------------------
   Floating WhatsApp button (toggle in Customizer).
   ------------------------------------------------------------------ */
.rs-wa-float {
  position: fixed;
  right: 18px;
  bottom: 78px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2fd07f, #1faf68);
  color: #fff;
  box-shadow: 0 10px 26px rgba(31, 175, 104, .35);
  transition: transform .2s;
}
.rs-wa-float:hover { transform: translateY(-3px) scale(1.04); color: #fff; }
.rs-wa-float svg { width: 24px; height: 24px; }
.rs-wa-float__tip {
  position: absolute;
  right: calc(100% + 10px);
  white-space: nowrap;
  background: var(--ink);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(6px);
  transition: opacity .2s, transform .2s;
}
.rs-wa-float:hover .rs-wa-float__tip { opacity: 1; transform: translateX(0); }
@media (max-width: 640px) {
  .rs-wa-float { bottom: 84px; right: 14px; }
  .rs-wa-float__tip { display: none; }
}

/* ------------------------------------------------------------------
   Compact newsletter card in the footer brand column (under
   "Read our Insights / Browse case studies"). Reuses the design
   system's .newsletter component; input + button share one row.
   ------------------------------------------------------------------ */
.foot-news { margin-top: 18px; }
.foot-news form { flex-direction: row; align-items: stretch; }
.foot-news input { flex: 1; min-width: 0; padding: 10px 12px; font-size: 12.5px; }
.foot-news .btn { flex: none; padding: 9px 14px; font-size: 12.5px; gap: 0; }
.foot-news .nl-ok { display: none; }
.foot-news.done form { display: none; }
.foot-news.done .nl-ok { display: block; }
@media (max-width: 640px) {
  .foot-news form { flex-direction: column; }
}

/* ------------------------------------------------------------------
   Blog article typography: justified body text (client request).
   ------------------------------------------------------------------ */
main .article p,
main .article li,
main .entry p,
main .entry li {
  text-align: justify;
  text-justify: inter-word;
}

/* ------------------------------------------------------------------
   Footer wordmark — compact, inside the "Find Us" column below the
   contact block (fills the empty space beside the newsletter card).
   ------------------------------------------------------------------ */
.foot__col .foot__word {
  font-size: clamp(1.5rem, 2.2vw, 2.2rem);
  line-height: 1.08;
  white-space: normal;
  text-align: left;
  margin-top: clamp(22px, 3vw, 36px);
}

/* ------------------------------------------------------------------
   Topbar marquee — sized like a topbar: slim strip, smaller type and
   icons, tighter gap (the design-system .lmq defaults are bulky).
   ------------------------------------------------------------------ */
.rs-topbar { padding-block: 7px; }
.rs-topbar .lmq__track { gap: 28px; animation-duration: 28s; }
.rs-topbar .lmq__track span { font-size: 10.5px; letter-spacing: .1em; gap: 7px; }
.rs-topbar .lmq__track span svg { width: 13px; height: 13px; }
