/* BiPlus ALS block sections (homepage and every Gutenberg page). Also loaded as editor style, so selectors stay class-based. */

body.biplus-canvas { background-color: var(--surface); background-image: var(--bleed-ambient); background-repeat: no-repeat; }
.biplus-canvas .site-content > .ast-container { max-width: none; padding: 0; display: block; }
.biplus-canvas .entry-content > * { margin-top: 0; margin-bottom: 0; }

.bp-section, .editor-styles-wrapper .bp-section {
  font-family: var(--font-body); color: var(--fg-1); font-size: 16px; line-height: 1.6; font-weight: 500;
}
/* Section spacing. ".entry-content >" matches the specificity of Astra's inline default block padding
   (48px on all sides for top-level groups) and wins on source order; modifiers below use the same prefix. */
.entry-content > .bp-section, .editor-styles-wrapper .bp-section { padding: var(--sp-9) 0; }
/* Pages without Astra layout meta get 20px article padding from .ast-single-post; canvas pages are edge to edge. */
body.biplus-canvas.ast-page-builder-template .site-main > article { padding: 0; }
.bp-inner { max-width: 1200px; margin: 0 auto; padding: 0 var(--sp-5); }
.bp-section .wp-block-heading { font-family: var(--font-heading); color: var(--ink); margin: 0; }
/* .wp-block-heading doubles specificity so Astra's customizer heading weights don't win */
.bp-section h1.wp-block-heading { font-weight: 800; }
.bp-section h2.wp-block-heading { font-size: 44px; line-height: 1.12; font-weight: 800; letter-spacing: -0.8px; }
/* h3 follows the token .h3: Manrope, not UTM Avo (UTM Avo only ships regular + bold) */
.bp-section h3.wp-block-heading { font-family: var(--font-body); font-size: 20px; line-height: 1.3; font-weight: 800; letter-spacing: -0.2px; }
/* Grid children: drop WP block-gap margins, the grid gap does the spacing */
.bp-grid > *, .bp-logos > *, .bp-card > *, .bp-coll > *,
.bp-hero__card > *, .bp-head > * { margin-block: 0 !important; }
.bp-head { display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp-4); }
.bp-section p { margin: 0; }
.bp-section a { color: var(--ink); }

.bp-lead { font-size: 18px; line-height: 1.6; font-weight: 500; color: var(--gray-mid); max-width: 720px; }
.bp-head { margin-bottom: var(--sp-7); }
.bp-center { display: flex; justify-content: center; margin-top: var(--sp-7); }
.bp-center .wp-block-buttons { justify-content: center; }

/* Gold highlighter under the accent phrase: ink text stays readable, gold carries the brand */
mark.bp-mark {
  background: linear-gradient(transparent 62%, var(--y-soft) 62%); color: inherit; padding: 0 2px;
}

/* ---------- Hero ---------- */
.entry-content > .bp-hero { padding: var(--sp-9) 0 var(--sp-10); }
.bp-hero__cols { align-items: center !important; gap: var(--sp-8) !important; }
.bp-section .bp-hero__title { font-size: 60px !important; line-height: 1.06 !important; font-weight: 800; letter-spacing: -1.5px; margin-bottom: var(--sp-5) !important; }
.bp-hero .bp-lead { margin-bottom: var(--sp-6); }
.bp-hero .wp-block-buttons { gap: var(--sp-3); }
.bp-hero__card {
  background: var(--y-pale); border-radius: var(--r-hero); padding: var(--sp-7); box-shadow: var(--shadow-hero);
  position: relative; overflow: hidden;
}
.bp-hero__card::after { /* card motif: one big pale circle top-right */
  content: ""; position: absolute; width: 260px; height: 260px; border-radius: 50%;
  background: var(--y-soft); top: -110px; right: -90px; z-index: 0;
}
.bp-hero__card > * { position: relative; z-index: 1; }
.bp-section p.bp-hero__note { font-size: 17px; line-height: 1.55; font-weight: 600; color: var(--ink); margin-top: var(--sp-5); max-width: 380px; }
.bp-hero__badge { margin: 0 0 var(--sp-6) !important; }
.bp-hero__badge img { max-width: 260px; height: auto; background: var(--surface); border-radius: var(--r-card); padding: var(--sp-4) var(--sp-5); }

/* ---------- Grids and cards ---------- */
.bp-grid { display: grid; gap: var(--sp-5); }
.bp-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.bp-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bp-card {
  background: var(--y-pale); border-radius: var(--r-outer); padding: var(--sp-6);
  display: flex; flex-direction: column; gap: var(--sp-3); box-shadow: var(--shadow-body);
  transition: box-shadow .18s cubic-bezier(.2,.7,.3,1);
}
.bp-card:hover { box-shadow: var(--shadow-hero); }
.bp-card--plain { background: var(--surface); border: 1px solid var(--line-soft); }
.bp-card p { color: var(--gray-mid); font-size: 15px; }
.bp-card__icon { margin: 0 0 var(--sp-2) !important; }
.bp-card__icon img { width: 48px; height: 48px; object-fit: contain; }
/* "Kết quả" line: shared check icon + text (solution cards and journey phases) */
.bp-section .bp-outcome { display: flex; align-items: flex-start; gap: var(--sp-2); font-size: 15px; line-height: 1.45; color: var(--ink); }
.bp-outcome .bp-ico { flex: 0 0 18px; margin-top: 2px; color: var(--ink); }
.bp-outcome strong { font-weight: 800; }
.bp-card__link { margin-top: auto !important; padding-top: var(--sp-2); }
.bp-card__link a { font-weight: 800; color: var(--ink) !important; text-decoration: underline; text-decoration-color: var(--y-deep); text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* ---------- Solutions: one lead card, two beside it, licensing as a wide row, one next step for the section ---------- */
.bp-bento {
  display: grid; gap: var(--sp-5); grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(0, 1fr));
  grid-template-areas: "itsm pmo cloud" "itsm lic lic";
}
.bp-bento > *, .bp-svc__text > *, .bp-svc__end > * { margin-block: 0 !important; }
.bp-bento--row { grid-template-areas: "itsm pmo cloud"; } /* no licensing card (/phan-mem/): one row of equal height */
.bp-svc--itsm { grid-area: itsm; } .bp-svc--pmo { grid-area: pmo; } .bp-svc--cloud { grid-area: cloud; } .bp-svc--license { grid-area: lic; }
.bp-svc { gap: var(--sp-5); box-shadow: none; }
.bp-svc:not(.bp-svc--itsm) { background: var(--surface); border: 1px solid var(--line-soft); }
.bp-svc:hover { box-shadow: var(--shadow-body); }
.bp-svc__apps { display: flex; align-items: center; gap: var(--sp-2); }
.bp-appicon { display: block; flex: none; }
.bp-svc__tile {
  width: 40px; height: 40px; border-radius: 10px; background: var(--dark); color: var(--text-light);
  display: inline-flex; align-items: center; justify-content: center;
}
.bp-ico--lg { width: 24px; height: 24px; }
.bp-svc__text { display: flex; flex-direction: column; gap: var(--sp-3); }
.bp-svc__end { margin-top: auto !important; display: grid; gap: var(--sp-3); padding-top: var(--sp-4); border-top: 1px solid var(--line-soft); }
.bp-card p.bp-svc__step { color: var(--ink); }
/* Lead: the pale-gold card of the zone, larger copy, the card motif circle */
.bp-svc--itsm { position: relative; overflow: hidden; padding: var(--sp-7) var(--sp-6) var(--sp-6); }
.bp-svc--itsm::after {
  content: ""; position: absolute; width: 240px; height: 240px; border-radius: 50%; background: var(--y-soft); top: -120px; right: -100px;
}
.bp-svc--itsm > * { position: relative; z-index: 1; }
.bp-svc--itsm .bp-svc__text p { font-size: 17px; color: var(--gray-mid); }
.bp-svc--itsm .bp-svc__end { border-top-color: var(--y-soft); }
.bp-svc .bp-svc__art { margin: auto 0 !important; }
.bp-svc__art img { display: block; width: 100%; max-width: 400px; height: auto; margin-inline: auto; }
.bp-svc--license .bp-appicon { box-sizing: border-box; width: 40px; height: 40px; padding: var(--sp-2); border-radius: 10px; background: var(--subtle); }
/* Licensing: a wide row, icon | what | result and quote step */
.bp-svc--license { flex-direction: row; align-items: flex-start; gap: var(--sp-6); }
.bp-svc--license .bp-svc__text { flex: 1 1 0; }
.bp-svc--license .bp-svc__end { flex: 1 1 0; margin-top: 0 !important; padding: 0 0 0 var(--sp-6); border-top: 0; border-left: 1px solid var(--line-soft); }
.bp-svc-cta { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: var(--sp-4) var(--sp-5); margin-top: var(--sp-7); }
.bp-svc-cta > * { margin: 0 !important; }
.bp-section p.bp-svc-cta__text { font-size: 18px; font-weight: 600; color: var(--ink); }

/* ---------- Why BiPlus: open columns under an ink rule, no boxes ---------- */
.bp-why .bp-grid--3 { column-gap: var(--sp-7); }
.bp-why .bp-card--plain { background: none; border: 0; border-top: 2px solid var(--dark); border-radius: 0; box-shadow: none; padding: var(--sp-5) 0 0; }
.bp-why .bp-card__icon img { width: 40px; height: 40px; }
.bp-why .bp-card p { font-size: 16px; }

/* ---------- Clients ---------- */
.bp-clients { background: var(--subtle); }
.bp-logos { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--sp-4); }
.bp-logos .wp-block-image {
  margin: 0; background: var(--surface); border-radius: var(--r-card); height: 88px;
  display: flex; align-items: center; justify-content: center; padding: var(--sp-4); box-shadow: var(--shadow-body);
}
.bp-logos img { max-height: 44px; max-width: 120px; width: 100%; height: auto; object-fit: contain; }

/* ---------- Team ---------- */
.bp-team__cols { align-items: center !important; gap: var(--sp-8) !important; }
.bp-team h2.wp-block-heading { margin-bottom: var(--sp-4); }
.bp-team__photo { margin: 0; }
.bp-team__photo img { border-radius: var(--r-hero); box-shadow: var(--shadow-hero); width: 100%; height: auto; }

/* ---------- Process ---------- */
/* Engagement model: one ledger row per phase, buying-committee roles on the right */
.bp-journey { background: var(--subtle); }
.bp-journey__list { counter-reset: bp-phase; margin: 0 0 var(--sp-7); padding: 0; border-bottom: 1px solid var(--line-soft); }
.bp-journey__list > .bp-phase {
  counter-increment: bp-phase; margin: 0; padding: var(--sp-6) 0; border-top: 1px solid var(--line-soft);
  display: grid; column-gap: var(--sp-6); row-gap: var(--sp-2); align-items: start;
  grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1.7fr) minmax(0, .9fr);
  grid-template-areas: "num title desc who" "num title out who";
}
.bp-phase > * { margin: 0 !important; }
.bp-journey__list > .bp-phase::before {
  content: counter(bp-phase); grid-area: num; font-family: var(--font-heading); font-size: 44px; line-height: 1;
  font-weight: 800; color: var(--ink);
}
.bp-section h3.bp-journey__title { grid-area: title; font-family: var(--font-heading); font-size: 22px; line-height: 1.25; font-weight: 800; margin: 0; }
.bp-section .bp-journey__desc { grid-area: desc; color: var(--gray-mid); }
.bp-section .bp-journey__outcome { grid-area: out; font-size: 15px; color: var(--ink); }
.bp-section .bp-journey__who { grid-area: who; display: flex; flex-wrap: wrap; gap: var(--sp-2); justify-content: flex-end; }
.bp-role {
  font-family: var(--font-body); font-size: 13px; font-weight: 700; line-height: 1; color: var(--ink);
  padding: 7px 12px; border-radius: var(--r-pill); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line);
}

/* ---------- Blog ---------- */
.bp-posts .wp-block-post-template { gap: var(--sp-5); margin: 0; padding: 0; list-style: none; }
/* Post cards (home, /blog/, related posts): image flush to the top edge, 16:9 crop, clamped text, equal heights.
   ".bp-posts .wp-block-post.wp-block-post" beats Astra's .ast-article-single padding on single posts. */
.bp-posts .wp-block-post.wp-block-post {
  background: var(--surface); border-radius: var(--r-outer); overflow: hidden; box-shadow: var(--shadow-body);
  display: flex; flex-direction: column; gap: var(--sp-2); margin: 0; padding: 0 0 var(--sp-5); height: 100%;
  transition: box-shadow .18s cubic-bezier(.2,.7,.3,1);
}
.bp-posts .wp-block-post:hover, .bp-posts .wp-block-post:focus-within { box-shadow: var(--shadow-hero); }
.bp-posts .wp-block-post > *:not(.wp-block-post-featured-image) { padding: 0 var(--sp-5); margin: 0; }
.bp-posts .wp-block-post-featured-image { margin: 0 0 var(--sp-2); aspect-ratio: 16 / 9; overflow: hidden; background: var(--subtle); }
.bp-posts .wp-block-post-featured-image a { display: block; height: 100%; }
.bp-posts .wp-block-post-featured-image img { width: 100%; height: 100% !important; object-fit: cover; display: block; }
/* No featured image: keep the same 16:9 slot so cards in a row stay aligned */
.bp-posts .wp-block-post:not(.has-post-thumbnail)::before { content: ""; display: block; aspect-ratio: 16 / 9; margin-bottom: var(--sp-2); background: var(--subtle); }
.bp-posts .wp-block-post-date { font-size: 13px; font-weight: 700; color: var(--gray); }
.bp-section .bp-posts h3.wp-block-post-title { font-family: var(--font-body); font-size: 18px !important; line-height: 1.35; font-weight: 800; letter-spacing: -0.1px; }
.bp-posts .wp-block-post-title a {
  text-decoration: none; color: var(--ink);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden;
}
.bp-posts .wp-block-post-title a:hover { text-decoration: underline; text-decoration-color: var(--y-deep); text-underline-offset: 3px; }
.bp-posts a:focus { outline: none; }
.bp-posts a:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; border-radius: var(--r-chip); }
.bp-posts .wp-block-post-excerpt { font-size: 15px; line-height: 1.55; color: var(--gray-mid); }
.bp-posts .wp-block-post-excerpt__excerpt {
  margin: 0; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}
@media (prefers-reduced-motion: reduce) { .bp-posts .wp-block-post.wp-block-post { transition: none; } }
.bp-posts .wp-block-post-excerpt__more-text { display: none; }

/* ---------- Contact ---------- */
.bp-contact { background: var(--cream); border-top: 1px solid var(--line-soft); }
.bp-contact h2.wp-block-heading { margin-bottom: var(--sp-4); }
.bp-contact .bp-lead { margin-bottom: var(--sp-5); }
.bp-contact__cols { gap: var(--sp-8) !important; align-items: flex-start !important; }
.bp-section p.bp-contact__alt { margin: 0; font-size: 15px; color: var(--gray-mid); }
.bp-contact__alt a { color: var(--ink); font-weight: 600; white-space: nowrap; }
.bp-section p.bp-form__note { margin-bottom: var(--sp-4); } /* ".bp-section p" zeroes the plugin's margin */
.bp-form-card { background: var(--surface); border-radius: var(--r-hero); padding: var(--sp-7); box-shadow: var(--shadow-hero); color: var(--ink); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .bp-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bp-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "itsm itsm" "pmo cloud" "lic lic"; }
  .bp-bento--row { grid-template-areas: "itsm itsm" "pmo cloud"; }
  .bp-logos { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .bp-journey__list > .bp-phase { grid-template-columns: 48px minmax(0, 1fr); grid-template-areas: "num title" "num desc" "num out" "num who"; }
  .bp-journey__list > .bp-phase::before { font-size: 32px; }
  .bp-section .bp-journey__who { justify-content: flex-start; padding-top: var(--sp-2); }
}
@media (max-width: 781px) {
  .entry-content > .bp-section { padding: var(--sp-8) 0; }
  .bp-section h2.wp-block-heading { font-size: 32px; }
  .bp-hero__title { font-size: 40px !important; }
  .bp-grid--3, .bp-grid--4 { grid-template-columns: 1fr; }
  .bp-bento { grid-template-columns: minmax(0, 1fr); grid-template-areas: "itsm" "pmo" "cloud" "lic"; }
  .bp-bento--row { grid-template-areas: "itsm" "pmo" "cloud"; }
  .bp-svc--license { flex-direction: column; gap: var(--sp-5); }
  .bp-svc--license .bp-svc__end { padding: var(--sp-4) 0 0; border-left: 0; border-top: 1px solid var(--line-soft); }
  .bp-svc--itsm { padding: var(--sp-6); }
  .bp-svc-cta { justify-content: flex-start; }
  .bp-journey__list > .bp-phase { grid-template-columns: minmax(0, 1fr); grid-template-areas: "num" "title" "desc" "out" "who"; }
  .bp-why .bp-grid--3 { row-gap: var(--sp-6); }
  .bp-logos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bp-posts .wp-block-post-template { grid-template-columns: 1fr !important; }
  .bp-hero__card, .bp-form-card { padding: var(--sp-6); }
}
@media (prefers-reduced-motion: reduce) { .bp-card, .bp-posts .wp-block-post { transition: none; } }
