/**
 * @file
 * Redesigned white paper layout (node--whitepaper--full--v2.html.twig).
 *
 * Self-contained on purpose. The design these rules come from was authored on
 * a wso2_layout_v2 node, where the page shell already loads wso2_layout_v2.css
 * and friends. White papers render through page.html.twig instead, so pulling
 * that library in here would drag the v2 header/footer styling onto a page
 * that isn't built for it. The handful of rules the layout actually needs are
 * reproduced below instead, every one of them scoped to body.whitepaper-v2
 * (set by wso2theme_preprocess_html()) so nothing can leak onto another page —
 * including the original white paper layout, which shares this body class's
 * absence and keeps whitepaper.css to itself.
 */

/* The original layout paints a blue background across every white paper page
   via .page-node-type-whitepaper in whitepaper.css. This layout brings its own
   hero background, so switch that one off. */
body.whitepaper-v2.page-node-type-whitepaper {
  background-image: none;
}

/* ---------------------------------------------------------------------------
 * Hero
 * ------------------------------------------------------------------------ */

body.whitepaper-v2 .cWhitepaperV2Hero {
  position: relative;
  z-index: 0;
  height: auto;
  padding: 3rem 0 4rem;
  background-image: url(https://wso2.cachefly.net/wso2/sites/all/image_resources/light-gradient-bg-1.webp);
  background-repeat: no-repeat;
  background-position: center top -2rem;
  background-size: 100%;
}

/* Faint graph-paper overlay over the hero background. */
body.whitepaper-v2 .cWhitepaperV2Hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    linear-gradient(#17223a0a 1px, transparent 2px),
    linear-gradient(to right, #17223a0a 1px, transparent 2px);
  background-size: 60px 60px;
}

/* Lifts the content above the overlay above. */
body.whitepaper-v2 .hero_row {
  position: relative;
  z-index: 2;
}

body.whitepaper-v2 .Product_Label {
  display: inline-block;
  padding-bottom: 15px;
  color: #000 !important;
  font-size: 1.2rem !important;
  font-weight: 500 !important;
  letter-spacing: 3px !important;
  word-spacing: 5px;
  text-transform: uppercase;
}

body.whitepaper-v2 .cWhitepaperV2Title {
  margin: 0 0 24px;
  font-size: 3.75rem !important;
  line-height: 4.2rem !important;
  font-weight: 600 !important;
}

body.whitepaper-v2 .cWhitepaperV2Hero p {
  color: #262626 !important;
}

/* ---------------------------------------------------------------------------
 * Key topics covered
 * ------------------------------------------------------------------------ */

body.whitepaper-v2 ul.cReportList {
  padding-left: 0;
  list-style: none;
}

body.whitepaper-v2 .cReportList li {
  position: relative;
  margin-bottom: 18px;
  padding-left: 34px;
}

body.whitepaper-v2 .cReportList li::before {
  content: "\2192";
  position: absolute;
  top: 0;
  left: 0;
  color: #ff6700;
  font-weight: 800;
}

/* ---------------------------------------------------------------------------
 * Side card: call to action, cover image, author
 * ------------------------------------------------------------------------ */

body.whitepaper-v2 .cPinkFooterBox {
  position: relative;
  display: flex;
  flex-direction: column;
  margin-bottom: 5px;
  padding: 40px 30px !important;
  border: 1px solid #e2e5ec;
  border-radius: 14px;
  background: #fff !important;
  box-shadow: 0 18px 40px -16px rgba(7, 20, 46, 0.18);
}

body.whitepaper-v2 .cWhitepaperV2Cover {
  width: 100%;
  height: auto;
}

body.whitepaper-v2 .border-light {
  border-color: #ccc !important;
}

body.whitepaper-v2 .cWhitepaperV2Author img.cimg-size {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
}

body.whitepaper-v2 p.ctext {
  font-size: 0.9rem !important;
  line-height: 1.2rem !important;
}

body.whitepaper-v2 .cRemovePadding {
  padding-left: 0;
}

/* ---------------------------------------------------------------------------
 * Calls to action
 *
 * wso2_layout_v2.css styles these as `a.cFilledCTA`/`span.cFilledCTA` only,
 * and that file isn't loaded here anyway. A gated white paper's call to action
 * is a <button> (it opens the download dialog rather than navigating), so the
 * rules are repeated for all three element types. Scoped to the body class so
 * the gate dialog — which renders outside .cWhitepaperV2 — is covered too.
 * ------------------------------------------------------------------------ */

body.whitepaper-v2 a.cFilledCTA,
body.whitepaper-v2 button.cFilledCTA {
  display: inline-block;
  width: auto;
  padding: 12px 24px !important;
  border: 0;
  border-radius: 320px !important;
  background-color: #ff6700 !important;
  color: #000 !important;
  font-weight: 500;
  text-decoration: none !important;
  cursor: pointer;
}

body.whitepaper-v2 a.cFilledCTA:hover,
body.whitepaper-v2 button.cFilledCTA:hover {
  color: #fff !important;
  text-decoration: none !important;
  transition: all 0.3s ease;
}

body.whitepaper-v2 a.cFilledCTA span,
body.whitepaper-v2 button.cFilledCTA span {
  margin-left: 7px;
  font-weight: 800 !important;
}

body.whitepaper-v2 a.cFilledCTA .cSVGarrow,
body.whitepaper-v2 button.cFilledCTA .cSVGarrow {
  width: 17px;
  height: 14px;
  fill: #000 !important;
}

body.whitepaper-v2 a.cFilledCTA:hover .cSVGarrow,
body.whitepaper-v2 button.cFilledCTA:hover .cSVGarrow {
  fill: #fff !important;
  transform: translateX(5px);
  transition: all 0.3s ease;
}

/* ---------------------------------------------------------------------------
 * Responsive
 * ------------------------------------------------------------------------ */

@media (max-width: 991px) {
  body.whitepaper-v2 .cWhitepaperV2Title {
    font-size: 2.5rem !important;
    line-height: 3rem !important;
  }

  body.whitepaper-v2 .cPinkFooterBox {
    margin-top: 2rem;
  }
}

@media (max-width: 767px) {
  body.whitepaper-v2 .cWhitepaperV2Hero {
    padding: 2rem 0 3rem;
    background-size: cover;
  }

  body.whitepaper-v2 .cWhitepaperV2Title {
    font-size: 2rem !important;
    line-height: 2.5rem !important;
  }

  body.whitepaper-v2 .cWhitepaperV2Author .mob-pad {
    margin-bottom: 1rem;
  }
}
