/* ADFFY design layer (asm-adffy-design.php) */
:root{
  --adffy-navy:#0A2540;
  --adffy-blue:#2563EB;
  --adffy-grey:#F6F8FA;
  --adffy-line:#E3E9F0;
  --adffy-ink:#33475B;
}

/* Buttons: one system everywhere */
.wp-block-button__link,
.adffy-btn{
  border-radius:8px !important;
  font-weight:600;
  transition:background-color .2s ease,color .2s ease,border-color .2s ease;
}
.wp-block-button__link:hover{ filter:brightness(1.12); }

/* ---------- Hero ---------- */
.adffy-hero .wp-block-cover__background{ opacity:.8; }
.adffy-hero h1,
.adffy-hero .wp-block-heading,
.adffy-hero p{ color:#fff !important; }
.adffy-hero .wp-block-heading{
  font-size:clamp(2rem,4.5vw,3.4rem);
  line-height:1.15;
  text-align:center;
}
.adffy-hero .wp-block-columns{ max-width:920px; margin-left:auto; margin-right:auto; }
.adffy-hero .wp-block-column{ text-align:center; }
.adffy-hero .wp-block-buttons{ justify-content:center; }
.adffy-hero p{ font-size:1.15rem; }

/* ---------- Platform cards ---------- */
.adffy-cards{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
  gap:20px;
  margin:28px 0 44px;
}
.adffy-card{
  background:#fff;
  border:1px solid var(--adffy-line);
  border-radius:12px;
  padding:22px;
  box-shadow:0 1px 3px rgba(10,37,64,.05);
}
.adffy-badge{
  width:44px;height:44px;border-radius:50%;
  background:var(--adffy-navy);color:#fff;
  display:flex;align-items:center;justify-content:center;
  font-weight:700;font-size:15px;letter-spacing:.5px;
  margin-bottom:12px;
}
.adffy-card h3{ margin:0 0 8px; font-size:1.15rem; color:var(--adffy-navy); }
.adffy-card p{ margin:0 0 12px; color:var(--adffy-ink); }
.adffy-card-link{ color:var(--adffy-blue); font-weight:600; text-decoration:none; }
.adffy-card-link:hover{ text-decoration:underline; }

/* ---------- Stats band ---------- */
.adffy-stats{
  display:flex;flex-wrap:wrap;gap:16px;
  background:var(--adffy-grey);
  border-radius:12px;
  padding:30px 24px;
  margin:24px 0 44px;
}
.adffy-stat{ flex:1 1 180px; text-align:center; }
.adffy-stat-num{
  display:block;font-size:2.6rem;font-weight:800;
  color:var(--adffy-navy);line-height:1;
}
.adffy-stat-label{ display:block;margin-top:8px;color:var(--adffy-ink); }

/* ---------- FAQ ---------- */
.adffy-faq{
  border:1px solid var(--adffy-line);
  border-radius:10px;
  padding:14px 18px;
  margin:0 0 12px;
  background:#fff;
}
.adffy-faq summary{ cursor:pointer;font-weight:600;color:var(--adffy-navy); }
.adffy-faq p{ margin:10px 0 4px; }

/* ---------- Checklists ---------- */
.adffy-checklist{ list-style:none !important; padding-left:0 !important; }
.adffy-checklist li{ position:relative; padding-left:28px; margin-bottom:10px; }
.adffy-checklist li::before{
  content:"\2713";
  position:absolute;left:0;top:0;
  color:var(--adffy-blue);font-weight:700;
}

/* ---------- CTA band ---------- */
.adffy-cta{
  background:var(--adffy-navy);
  color:#fff;
  border-radius:14px;
  padding:42px 32px;
  text-align:center;
  margin:52px 0 8px;
}
.adffy-cta h2{ color:#fff !important; margin-top:0; }
.adffy-cta p{ color:#D7E3F4; }
.adffy-cta-btns{ margin:20px 0 6px; }
.adffy-btn{
  display:inline-block;
  padding:12px 26px;
  margin:6px;
  text-decoration:none !important;
}
.adffy-btn-light{ background:#fff; color:var(--adffy-navy) !important; }
.adffy-btn-light:hover{ background:#E8EEF7; }
.adffy-btn-outline{ border:2px solid #fff; color:#fff !important; }
.adffy-btn-outline:hover{ background:rgba(255,255,255,.12); }
.adffy-cta-meta{ margin-top:16px; font-size:.95rem; }

/* ---------- Inner pages ---------- */
body.page:not(.home) .site-main,
body.single-post .site-main{ padding-top:12px; }
@media (min-width:1200px){
  body.page:not(.home) .entry-content{ max-width:1140px; margin-left:auto; margin-right:auto; }
}

/* ---------- Footer ---------- */
.site-footer .widget h2,
.site-footer .widget h4{ color:var(--adffy-navy); }
.site-footer a:hover{ color:var(--adffy-blue); }
.adffy-wechat-qr{ width:140px;height:auto;border-radius:8px; }
.adffy-qr-caption{ font-size:.9rem; color:var(--adffy-ink); margin-top:6px; }

/* ---------- Back-to-top: lift clear of the bottom-right widget stack ---------- */
.back-to-top{ bottom:112px !important; z-index:90; }

/* ============ Round 3 (2026-11-10) ============ */

/* --- R3-1 Header slimming: target total <=115px --- */
.top-menu{ padding-top:0; padding-bottom:0; }
.top-menu a{ padding-top:.15rem; padding-bottom:.15rem; }
.top-menu svg{ width:16px; height:16px; }
.site-header .custom-logo-link{ width:46px; padding-top:.25rem; padding-bottom:.25rem; margin-right:.75rem; }
.site-branding .site-title{ line-height:1.2; }
.site-branding .site-description{ font-size:.85rem; line-height:1.25; margin-bottom:0; }
@media (min-width:54rem){
  .main-navigation{ margin-top:0; }
  .main-navigation a{ padding-top:.55rem; padding-bottom:.55rem; }
}
/* Dark-mode toggle hidden: B2B site does not need it; frees nav row space so
   the search icon stays on the same row as the menu. */
.dark-mode-menu-item{ display:none !important; }

/* --- R3-2 Hero: one centred column, one centre line --- */
.adffy-hero .wp-block-cover__inner-container{
  width:100%; max-width:920px; margin-left:auto; margin-right:auto;
}
.adffy-hero .wp-block-columns{
  width:100%; max-width:920px; margin-left:auto; margin-right:auto;
}
.adffy-hero .wp-block-column{ text-align:center; }
.adffy-hero h1.wp-block-heading{ text-align:center !important; }
.adffy-hero .wp-block-column > p{ text-align:center !important; }
.adffy-hero .wp-block-buttons{ justify-content:center !important; }

/* --- R3-3 Landing pages (155-160) + About (8) --- */
/* 3a: the real width constraint was the Customizer rule .site-wrapper{max-width:980px}
   (980 - 2x16px padding = 948px content). Widen wrapper to 1112px => 1080px content. */
body.page:is(.page-id-155,.page-id-156,.page-id-157,.page-id-158,.page-id-159,.page-id-160,.page-id-8) .site-wrapper{
  max-width:1112px;
}
/* 3b: navy title band (breadcrumbs live inside .entry-header) */
body.page:is(.page-id-155,.page-id-156,.page-id-157,.page-id-158,.page-id-159,.page-id-160,.page-id-8) .site-main{
  padding-top:0;
}
body.page:is(.page-id-155,.page-id-156,.page-id-157,.page-id-158,.page-id-159,.page-id-160,.page-id-8) .entry-header{
  background:var(--adffy-navy);
  margin:0 -1rem 2rem;
  padding:2.4rem 1rem 2rem;
}
body.page:is(.page-id-155,.page-id-156,.page-id-157,.page-id-158,.page-id-159,.page-id-160,.page-id-8) .entry-title{
  color:#fff; margin:0; line-height:1.2;
}
body.page:is(.page-id-155,.page-id-156,.page-id-157,.page-id-158,.page-id-159,.page-id-160,.page-id-8) .entry-header .breadcrumbs{
  color:#B9C9DE; margin:0 0 .55rem; font-size:.92rem;
}
body.page:is(.page-id-155,.page-id-156,.page-id-157,.page-id-158,.page-id-159,.page-id-160,.page-id-8) .entry-header .breadcrumbs a{
  color:#fff;
}
/* 3d: H2 section rhythm on landing pages */
body.page:is(.page-id-155,.page-id-156,.page-id-157,.page-id-158,.page-id-159,.page-id-160,.page-id-8) .entry-content h2{
  color:var(--adffy-navy);
  letter-spacing:.02em;
  margin-top:2.6rem;
  margin-bottom:.75rem;
}
body.page:is(.page-id-155,.page-id-156,.page-id-157,.page-id-158,.page-id-159,.page-id-160,.page-id-8) .entry-content h2:first-of-type{
  margin-top:1.2rem;
}

/* --- R3-4 Blog cards: equal height, clamped title/excerpt, bottom-aligned footer --- */
@media (min-width:54rem){
  body.blog .prespa-post-inner{ grid-template-columns:repeat(2,1fr); }
}
body.blog .prespa-post-inner article{ display:flex; flex-direction:column; }
body.blog .prespa-post-inner article .text-wrapper{
  display:flex; flex-direction:column; flex:1 1 auto;
}
body.blog .prespa-post-inner .entry-title{
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
body.blog .prespa-post-inner p.entry-content{
  display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden;
}
body.blog .prespa-post-inner .entry-footer{ margin-top:auto; }

/* ============ Round 4 (2026-11-10): targeted fixes ============ */

/* --- R4-1 Header: hide the site description inside the header only
   (the blogdescription option value itself is unchanged), hide the search
   toggle item in the primary menu, and drop the theme's 115px floor
   (.site-header{min-height:115px} in build/css/main.css) so the header
   can actually shrink. Estimate after fix: top bar ~29px (measured R3)
   + main row ~55px (logo link 46px tall + .25rem*2 padding = 54px,
   taller than the ~42px nav links) + 1px border = ~85px total. --- */
#masthead .site-description{ display:none !important; }
#masthead li.search-icon{ display:none !important; }
#masthead.site-header{ min-height:0; }

/* --- R4-2 Home hero: force true full-bleed centering.
   The cover already had .alignfull, but the round-3 browser measurement
   showed the text block ~250px left of viewport centre: the columns block
   inside carries .alignwide, whose theme rule
   .alignwide{margin-left:calc(25% - 25vw);margin-right:calc(25% - 25vw)}
   fights the centred 920px boxes. Pin the cover bleed and force auto
   margins with !important on cover, inner container and columns. --- */
.home .wp-block-cover.adffy-hero{
  width:100vw !important;
  max-width:100vw;
  margin-left:calc(50% - 50vw) !important;
  margin-right:calc(50% - 50vw) !important;
}
.adffy-hero .wp-block-cover__inner-container{
  margin-left:auto !important;
  margin-right:auto !important;
}
.adffy-hero .wp-block-columns{
  margin-left:auto !important;
  margin-right:auto !important;
}
.adffy-hero .wp-block-column{ min-width:0; }

/* --- R4-3 Blog list: real equal-height grid.
   Root cause of the R3 failure: Customizer setting
   post_archives_display=masonry made functions.php localize
   has_masonry_layout="1", and the theme JS (src/js/components/masonry.js,
   in build/js/app.js) deletes .prespa-post-inner on DOMContentLoaded and
   replaces it with #prespa-post-inner.masonry-layout holding two
   .masonry-column-* divs, distributing .post items round-robin -- the CSS
   selectors then matched nothing in the live DOM.
   Fix applied in wp-admin layer: set_theme_mod('post_archives_display',
   'grid') (theme's own supported option), so the served page now carries
   has_masonry_layout:"" and the JS returns early. The rules below then
   govern the real structure:
   .prespa-post-container > .prespa-post-inner > article.post
     > .text-wrapper > header.entry-header (h2.entry-title, .entry-meta)
                     + p.entry-content (excerpt)
                     + footer.entry-footer (.entry-meta .posted-on time)
   Supersedes the R3-4 clamp values (title 2->3 lines, excerpt 3->4). --- */
@media (min-width:54rem){
  body.blog .prespa-post-inner{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:2rem;
    align-items:stretch;
  }
}
body.blog .prespa-post-inner article{
  display:flex; flex-direction:column; height:100%;
}
body.blog .prespa-post-inner .entry-title{
  display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden;
}
body.blog .prespa-post-inner p.entry-content{
  display:-webkit-box; -webkit-line-clamp:4; -webkit-box-orient:vertical; overflow:hidden;
}

/* --- R4-4 Landing pages (155-160) + About (8): full-bleed title band.
   .entry-header sits in article (1080px content column, centred), so
   margin-left:calc(50% - 50vw) puts its left edge at viewport x=0 with
   width:100vw; padding-left/right:calc(50vw - 540px) re-align the H1 and
   breadcrumbs with the 1080px content column edges (at 1920px viewport:
   padding = 960-540 = 420px, content box = 1080px). Desktop only; below
   1200px the R3-3b container-width band stays in charge. --- */
@media (min-width:1200px){
  body.page:is(.page-id-155,.page-id-156,.page-id-157,.page-id-158,.page-id-159,.page-id-160,.page-id-8) .entry-header{
    width:100vw;
    max-width:100vw;
    margin-left:calc(50% - 50vw);
    margin-right:calc(50% - 50vw);
    padding-left:calc(50vw - 540px);
    padding-right:calc(50vw - 540px);
  }
}

/* R4 tail: blog card title zone fixed at 3 lines so summaries start aligned */
.prespa-post-inner article .entry-title { min-height: 4.2em; }

/* CTA prep note */
.adffy-cta-note { opacity: .85; font-size: .95em; max-width: 640px; margin-left: auto; margin-right: auto; }
