/* Homepage-aligned finish for the nine-language feature and comparison pages. */
:root {
  --w4r-blue: #1263f5;
  --w4r-blue-strong: #0757e6;
  --w4r-navy: #062654;
  --w4r-ink: #081b3a;
  --w4r-copy: #586b88;
  --w4r-muted: #7485a0;
  --w4r-line: #d8e5f7;
  --w4r-soft: #f4f8fe;
  --w4r-success: #12a267;
  --w4r-radius: 8px;
  --w4r-shadow: 0 18px 44px rgba(7, 35, 78, .08);
}

body.web4-template-feature,
body.web4-template-compare {
  background: #fff;
  color: var(--w4r-ink);
}

body.web4-template-feature main,
body.web4-template-compare main {
  overflow: hidden;
}

body.web4-template-feature main :is(h1, h2, h3, h4),
body.web4-template-compare main :is(h1, h2, h3, h4) {
  color: var(--w4r-ink);
  letter-spacing: 0;
}

body.web4-template-feature main :is(p, li, td),
body.web4-template-compare main :is(p, li, td) {
  color: var(--w4r-copy);
}

/* Preserve the established breadcrumb shell while bringing its scale closer to the homepage. */
body.web4-template-feature .breadcrumbs,
body.web4-template-compare .breadcrumbs {
  min-height: 300px !important;
  padding: 138px 0 72px !important;
  background-image: linear-gradient(115deg, #03152f 0%, #07346f 54%, #03152f 100%) !important;
}

body.web4-template-feature .breadcrumbs::after,
body.web4-template-compare .breadcrumbs::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .22;
  background-image: radial-gradient(circle at 16% 28%, rgba(85, 153, 255, .75) 0 1px, transparent 2px),
    radial-gradient(circle at 82% 64%, rgba(85, 153, 255, .6) 0 1px, transparent 2px);
  background-size: 92px 92px, 128px 128px;
}

body.web4-template-feature .breadcrumbs .container,
body.web4-template-compare .breadcrumbs .container {
  position: relative;
  z-index: 1;
}

/* Shared homepage-style section headings. */
body.web4-template-feature main :is(.section-title, .ma-section-heading),
body.web4-template-compare main .compare-heading {
  max-width: 900px;
  margin: 0 auto 34px;
  text-align: center;
}

body.web4-template-feature main :is(.section-title, .ma-section-heading) > :is(h2, h3),
body.web4-template-compare main .compare-heading > h2 {
  text-wrap: balance;
}

body.web4-template-feature main :is(.section-title, .ma-section-heading) > h2,
body.web4-template-compare main .compare-heading > h2 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.24;
}

body.web4-template-feature main :is(.section-title, .ma-section-heading) > h2::before,
body.web4-template-feature main :is(.section-title, .ma-section-heading) > h2::after,
body.web4-template-compare main .compare-heading > h2::before,
body.web4-template-compare main .compare-heading > h2::after {
  content: "";
  width: 32px;
  height: 2px;
  flex: 0 0 32px;
  background: linear-gradient(90deg, transparent, var(--w4r-blue));
}

body.web4-template-feature main :is(.section-title, .ma-section-heading) > h2::after,
body.web4-template-compare main .compare-heading > h2::after {
  background: linear-gradient(90deg, var(--w4r-blue), transparent);
}

/* Keep feature-page title rules visually attached to the localized H2 text. */
body.web4-template-feature main :is(.section-title, .ma-section-heading) > h2 {
  gap: 10px;
  width: fit-content;
  max-width: min(100%, 760px);
  margin-right: auto;
  margin-left: auto;
}

body.web4-template-feature main :is(.section-title, .ma-section-heading) > h2 > .web4-heading-text {
  display: block;
  min-width: 0;
  width: fit-content;
  max-width: min(620px, 22ch);
  flex: 0 1 auto;
  text-align: center;
}

body.web4-template-feature main :is(.section-title, .ma-section-heading) > h2::before,
body.web4-template-feature main :is(.section-title, .ma-section-heading) > h2::after {
  width: 28px;
  flex-basis: 28px;
}

body.web4-template-feature main :is(.section-title, .ma-section-heading) > p,
body.web4-template-compare main .compare-heading > p {
  max-width: 760px;
  margin: 13px auto 0;
  font-size: 16px;
  line-height: 1.75;
}

/* Legacy feature template: product-led hero, crisp information rails, low elevation. */
body.web4-template-feature .feature-detail-section:first-of-type {
  position: relative;
  padding: 70px 0 76px !important;
  background: linear-gradient(180deg, #fff 0%, #f6f9ff 100%) !important;
}

body.web4-template-feature .feature-detail-section:first-of-type::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .42;
  background-image: linear-gradient(rgba(18, 99, 245, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 99, 245, .045) 1px, transparent 1px);
  background-size: 54px 54px;
}

body.web4-template-feature .feature-detail-section:first-of-type > .container {
  position: relative;
  z-index: 1;
  min-height: 470px;
  gap: 54px;
}

body.web4-template-feature .feature-detail-section:first-of-type .feature-title {
  max-width: 560px;
  font-size: clamp(38px, 4.1vw, 54px);
  line-height: 1.08;
}

body.web4-template-feature .feature-detail-section:first-of-type .feature-lead {
  font-size: 17px;
  line-height: 1.78;
}

body.web4-template-feature .feature-detail-section:first-of-type .feature-hero-card {
  border-color: #cbdcf4 !important;
  background: rgba(255, 255, 255, .94) !important;
  box-shadow: 0 24px 56px rgba(7, 35, 78, .11) !important;
}

body.web4-template-feature :is(.feature-mini-card, .feature-use-card, .feature-step, .feature-panel, .feature-comparison) {
  border-color: var(--w4r-line) !important;
  border-radius: var(--w4r-radius) !important;
  background: #fff;
  box-shadow: 0 10px 28px rgba(7, 35, 78, .045) !important;
}

body.web4-template-feature :is(.feature-mini-card, .feature-use-card, .feature-step):hover {
  border-color: #9fc0f5 !important;
  transform: translateY(-3px);
  box-shadow: var(--w4r-shadow) !important;
}

body.web4-template-feature .feature-mini-card .icon,
body.web4-template-feature .feature-use-card .icon {
  border-radius: 8px;
  background: #eaf2ff;
  color: var(--w4r-blue);
}

/* New feature template (ma-page): keep its information architecture, unify its finish. */
body.web4-template-feature .ma-page {
  --ma-blue: var(--w4r-blue);
  --ma-navy: var(--w4r-navy);
  --ma-ink: var(--w4r-ink);
  --ma-copy: var(--w4r-copy);
  --ma-line: var(--w4r-line);
}

body.web4-template-feature .ma-hero {
  border-bottom: 1px solid var(--w4r-line);
  background-color: #f7faff;
}

body.web4-template-feature .ma-hero::before {
  opacity: .56;
}

body.web4-template-feature .ma-workspace,
body.web4-template-feature :is(.ma-context-board, .ma-process-step, .ma-cap-item, .ma-platform-card) {
  border-radius: var(--w4r-radius);
  border-color: var(--w4r-line);
}

body.web4-template-feature .ma-workspace {
  box-shadow: 0 24px 58px rgba(7, 35, 78, .11);
}

body.web4-template-feature .ma-outcomes,
body.web4-template-feature .ma-process,
body.web4-template-feature .ma-scenarios {
  border-top: 1px solid var(--w4r-line);
  border-bottom: 1px solid var(--w4r-line);
}

/* Comparison hero: restore the product view and style it as a bright homepage module. */
body.web4-template-compare main > .compare-section:first-of-type {
  display: block !important;
  padding: 64px 0 72px !important;
  background: linear-gradient(180deg, #fff 0%, #f5f9ff 100%) !important;
}

body.web4-template-compare .compare-hero-card {
  padding: clamp(28px, 4vw, 48px);
  border: 1px solid #cadcf5;
  border-radius: var(--w4r-radius);
  background: #fff;
  box-shadow: var(--w4r-shadow);
}

body.web4-template-compare .compare-hero-card::before {
  opacity: .48;
  background-image: linear-gradient(rgba(18, 99, 245, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 99, 245, .05) 1px, transparent 1px);
  background-size: 48px 48px;
}

body.web4-template-compare .compare-hero-copy h2 {
  color: var(--w4r-ink);
  font-size: clamp(34px, 4.1vw, 52px);
  line-height: 1.1;
  letter-spacing: 0;
}

body.web4-template-compare .compare-hero-copy p {
  max-width: 820px;
  margin-right: auto;
  margin-left: auto;
  color: var(--w4r-copy);
  line-height: 1.75;
}

body.web4-template-compare .compare-kicker,
body.web4-template-compare .compare-heading .mini {
  border: 1px solid #cadcff;
  border-radius: 999px;
  background: #edf4ff;
  color: var(--w4r-blue);
}

body.web4-template-compare .compare-duel {
  max-width: 1040px;
  padding: 14px;
  border: 1px solid #cfe0f8;
  border-radius: var(--w4r-radius);
  background: rgba(238, 245, 255, .9);
  backdrop-filter: none;
}

body.web4-template-compare .compare-duel-window,
body.web4-template-compare .compare-product-card {
  border-radius: 6px;
}

body.web4-template-compare .compare-product-card {
  min-height: 210px;
  box-shadow: none;
}

body.web4-template-compare .compare-product-card.web4 {
  border-color: #9fc1f8;
  background: #f5f9ff;
}

body.web4-template-compare .compare-proof-grid {
  gap: 0;
  margin-top: 0;
  overflow: hidden;
  border: 1px solid var(--w4r-line);
  border-radius: var(--w4r-radius);
  background: #fff;
}

body.web4-template-compare .compare-proof {
  min-height: 108px;
  padding: 20px;
  border: 0;
  border-right: 1px solid var(--w4r-line);
  border-radius: 0;
  background: #fff;
}

body.web4-template-compare .compare-proof:last-child {
  border-right: 0;
}

body.web4-template-compare .compare-proof strong {
  color: var(--w4r-ink);
}

body.web4-template-compare .compare-proof span {
  color: var(--w4r-copy);
}

body.web4-template-compare main > .compare-section:nth-of-type(2) {
  padding-top: 72px !important;
}

body.web4-template-compare .compare-table-wrap {
  overflow: hidden;
  border: 1px solid var(--w4r-line) !important;
  border-radius: var(--w4r-radius) !important;
  background: #fff;
  box-shadow: 0 14px 36px rgba(7, 35, 78, .06) !important;
}

body.web4-template-compare .compare-table th {
  background: #eaf2ff;
  color: var(--w4r-ink);
}

body.web4-template-compare .compare-table td.web4,
body.web4-template-compare .compare-table th.web4 {
  background: #f2f7ff;
}

body.web4-template-compare .compare-story-card {
  border: 1px solid var(--w4r-line);
  border-radius: var(--w4r-radius);
  box-shadow: 0 10px 28px rgba(7, 35, 78, .05);
}

body.web4-template-compare .compare-story-card .visual {
  border-radius: 6px;
}

body.web4-template-compare .compare-decision {
  border: 1px solid var(--w4r-line);
  border-radius: var(--w4r-radius);
  background: #fff;
  box-shadow: var(--w4r-shadow);
}

body.web4-template-compare .compare-decision-item {
  border-radius: 6px;
}

/* Locale-safe type scaling for long German, Russian, French and Portuguese headings. */
html:is([lang^="de"], [lang^="ru"], [lang^="fr"], [lang^="pt"]) body.web4-template-feature .feature-detail-section:first-of-type .feature-title,
html:is([lang^="de"], [lang^="ru"], [lang^="fr"], [lang^="pt"]) body.web4-template-compare .compare-hero-copy h2 {
  font-size: clamp(34px, 3.45vw, 46px);
  overflow-wrap: normal;
  word-break: normal;
  hyphens: auto;
}

@media (max-width: 991px) {
  body.web4-template-feature .breadcrumbs,
  body.web4-template-compare .breadcrumbs {
    min-height: 270px !important;
    padding: 122px 0 62px !important;
  }

  body.web4-template-feature .feature-detail-section:first-of-type > .container {
    min-height: 0;
  }

  body.web4-template-compare .compare-proof-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.web4-template-compare .compare-proof:nth-child(2) {
    border-right: 0;
  }

  body.web4-template-compare .compare-proof:nth-child(-n+2) {
    border-bottom: 1px solid var(--w4r-line);
  }
}

@media (max-width: 767px) {
  body.web4-template-feature .breadcrumbs,
  body.web4-template-compare .breadcrumbs {
    min-height: 238px !important;
    padding: 102px 0 48px !important;
  }

  body.web4-template-feature .feature-detail-section:first-of-type,
  body.web4-template-compare main > .compare-section:first-of-type {
    padding: 42px 0 48px !important;
  }

  body.web4-template-feature .feature-detail-section:first-of-type .feature-title,
  body.web4-template-compare .compare-hero-copy h2,
  html:is([lang^="de"], [lang^="ru"], [lang^="fr"], [lang^="pt"]) body.web4-template-feature .feature-detail-section:first-of-type .feature-title,
  html:is([lang^="de"], [lang^="ru"], [lang^="fr"], [lang^="pt"]) body.web4-template-compare .compare-hero-copy h2 {
    font-size: clamp(30px, 9.2vw, 38px);
    line-height: 1.13;
  }

  body.web4-template-feature main :is(.section-title, .ma-section-heading) > h2,
  body.web4-template-compare main .compare-heading > h2 {
    gap: 9px;
    font-size: 28px;
  }

  body.web4-template-feature main :is(.section-title, .ma-section-heading) > h2::before,
  body.web4-template-feature main :is(.section-title, .ma-section-heading) > h2::after,
  body.web4-template-compare main .compare-heading > h2::before,
  body.web4-template-compare main .compare-heading > h2::after {
    width: 18px;
    flex-basis: 18px;
  }

  body.web4-template-compare .compare-hero-card {
    padding: 24px 16px;
  }

  body.web4-template-compare .compare-duel-body {
    grid-template-columns: 1fr;
  }

  body.web4-template-compare .compare-vs {
    width: 42px;
    height: 42px;
  }

  body.web4-template-compare .compare-proof-grid {
    grid-template-columns: 1fr;
  }

  body.web4-template-compare .compare-proof,
  body.web4-template-compare .compare-proof:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid var(--w4r-line);
  }

  body.web4-template-compare .compare-proof:last-child {
    border-bottom: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.web4-template-feature *,
  body.web4-template-feature *::before,
  body.web4-template-feature *::after,
  body.web4-template-compare *,
  body.web4-template-compare *::before,
  body.web4-template-compare *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
