/*
 * Copyright (C) 2026 ANSYS, Inc. and/or its affiliates.
 * SPDX-License-Identifier: Apache-2.0
 *
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/* Remove the box-shadow line below the navbar on the landing page */
body.page-index .bd-header {
  box-shadow: none !important;
}

/* Allow the banner to break out of its constrained article container */
body.page-index .bd-content,
body.page-index .bd-article-container,
body.page-index .bd-article {
  overflow-x: visible !important;
}

/* Keep the standard breadcrumb trail visible while preserving the landing-page banner layout */
body.page-index #searchbox {
  display: none !important;
}

body.page-index .bd-main {
  padding-top: 0 !important;
  margin-top: 0 !important;
  line-height: 0 !important;
  font-size: 0 !important;
}

body.page-index .bd-content,
body.page-index .bd-article-container,
body.page-index .bd-article {
  padding-top: 0 !important;
  margin-top: 0 !important;
  line-height: 1.5;
  font-size: 1rem;
}

/* Remove residual grid/flex gaps between hidden header area and article content */
body.page-index .bd-content,
body.page-index .bd-article-container {
  gap: 0 !important;
  row-gap: 0 !important;
}

/* Full-bleed breakout: expand the <a> wrapper to full viewport width */
body.page-index a.landing-page-banner {
  display: block;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(-50vw + 50%);
  padding: 0;
  margin-top: 0 !important;
  line-height: 0 !important;
  font-size: 0 !important;
}

/* Remove any margin/padding above the banner's container so it sits flush under the header/tabs */
body.page-index .bd-content > .landing-page-banner,
body.page-index .bd-article > .landing-page-banner {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

body.page-index .bd-article > a.landing-page-banner:first-child,
body.page-index .bd-article > img.landing-page-banner:first-child {
  margin-top: 0 !important;
}

/* Ensure the landing-banner-wrapper itself has no top gap */
body.page-index .landing-banner-wrapper {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

body.page-index .bd-article > .landing-banner-wrapper:first-child,
body.page-index .bd-article-container > .landing-banner-wrapper:first-child {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Also target the Sphinx-generated div wrapper around the container directive */
body.page-index .bd-article > div:first-child,
body.page-index .bd-article-container > div:first-child {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Remove any top padding/margin from the article itself */
body.page-index .bd-article {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* Hide the anchor target span that Sphinx inserts before the banner, which causes a gap */
body.page-index .bd-article > span.target:first-child {
  display: block !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 0 !important;
  font-size: 0 !important;
}

/* Stretch the image inside the full-bleed wrapper */
body.page-index a.landing-page-banner img,
body.page-index img.landing-page-banner {
  width: 100% !important;
  max-width: 100% !important;
  height: auto;
  display: block;
  /* Fade bottom edge to transparency */
  -webkit-mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 1) 60%,
    rgba(0, 0, 0, 0.98) 63%,
    rgba(0, 0, 0, 0.94) 66%,
    rgba(0, 0, 0, 0.88) 69%,
    rgba(0, 0, 0, 0.8) 72%,
    rgba(0, 0, 0, 0.68) 75%,
    rgba(0, 0, 0, 0.55) 78%,
    rgba(0, 0, 0, 0.42) 81%,
    rgba(0, 0, 0, 0.3) 84%,
    rgba(0, 0, 0, 0.18) 87%,
    rgba(0, 0, 0, 0.08) 90%,
    rgba(0, 0, 0, 0.03) 93%,
    rgba(0, 0, 0, 0) 96%,
    rgba(0, 0, 0, 0) 100%
  );
  -webkit-mask-composite: add;
  mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 1) 60%,
    rgba(0, 0, 0, 0.98) 63%,
    rgba(0, 0, 0, 0.94) 66%,
    rgba(0, 0, 0, 0.88) 69%,
    rgba(0, 0, 0, 0.8) 72%,
    rgba(0, 0, 0, 0.68) 75%,
    rgba(0, 0, 0, 0.55) 78%,
    rgba(0, 0, 0, 0.42) 81%,
    rgba(0, 0, 0, 0.3) 84%,
    rgba(0, 0, 0, 0.18) 87%,
    rgba(0, 0, 0, 0.08) 90%,
    rgba(0, 0, 0, 0.03) 93%,
    rgba(0, 0, 0, 0) 96%,
    rgba(0, 0, 0, 0) 100%
  );
  mask-composite: add;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  border-radius: 0;
  box-shadow: none;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 0 !important;
  font-size: inherit !important;
}

/* =========================================== BANNER OVERLAY TEXT =========================================== */

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@500&display=swap');

body.page-index .landing-banner-wrapper {
  position: relative;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(-50vw + 50%);
  overflow: hidden;
}

body.page-index .landing-banner-overlay {
  position: absolute;
  /* Block centered at 58% — sits close to planet edge, text center-aligned */
  top: 26%;
  left: 56%;
  transform: translate(-50%, -30%);
  text-align: center;
  color: #ffffff;
  width: 72vw;
  max-width: 72vw;
  text-shadow: none;
  font-family: 'Roboto', sans-serif;
  font-weight: 500;
  z-index: 10;
}

body.page-index .landing-banner-overlay * {
  font-family: 'Roboto', sans-serif;
  font-weight: 500;
}

body.page-index .landing-banner-title {
  margin: 0.4rem 0 1.5rem 0;
  transform: translateY(-0.85rem);
  color: #ffffff;
  text-shadow: 0 3px 6px rgb(219, 218, 220);
  font-size: clamp(1.75rem, 3.25vw, 3.25rem) !important;
  line-height: 1.2;
}

body.page-index .landing-banner-title p,
body.page-index .landing-banner-title * {
  font-size: clamp(1.75rem, 3.25vw, 3.25rem) !important;
  line-height: 1.2 !important;
}

body.page-index .landing-banner-overlay p {
  margin: 0;
  font-size: clamp(1.9rem, 2vw, 2rem);
  line-height: 1.35;
}

body.page-index .landing-banner-overlay .line-block {
  margin: 0;
  font-size: clamp(1.9rem, 2vw, 2rem);
  line-height: 1.35;
}

body.page-index .landing-banner-overlay .line-block .line {
  display: block;
}

@media (max-width: 768px) {
  body.page-index .landing-banner-overlay {
    left: 66%;
    width: 60vw;
    max-width: 60vw;
  }
}

/* =========================================== FOOTER BANNER FULL-WIDTH =========================================== */

/* Allow the footer to break out of its constrained article container */
body.page-index .custom-footer {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(-50vw + 50%);
  padding: 2rem 1.5rem !important;
  margin-top: 2rem !important;
  margin-bottom: 0 !important;
  position: relative;
  z-index: 1;
}
