/* Hide the H1 title on the index page */
.md-content__inner h1:first-of-type {
  display: none;
}

.md-page-index .slideshow-container,
.md-page-index .intro-section {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  position: relative;
  left: 0;
}

.md-main .md-main__inner {
  max-width: 80%;
}

div.md-content .md-content__inner {
  margin: 0 !important;
}

.md-page-index .md-main__inner .md-grid {
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  display: block !important;
}

/* Allow full-width sections on homepage */
.md-page-index .md-content > article {
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* move the image up and closer to menu at the header */
.md-content__inner {
  padding-top: 0 !important;
  width: 100% !important;
}

/* Remove content padding/margin */
.md-page-index .md-content,
.md-page-index .md-content__inner {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

.article.md-content__inner.md_typeset {
  padding: 0 !important;
}

.md-page-index .slideshow-container .fullscreen-slideshow {
  position: relative;
  width: 100vw;
  height: 100%;
}

.slideshow-container {
  position: relative;
  width: 100% !important;
  max-width: 100%;
  height: 300px;
  overflow: hidden;
  margin-bottom: 20px;
  border-radius: 24px !important;
}

.fullscreen-slideshow .slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  background: linear-gradient(135deg, #ffffff, #d9e2ff, #fefeff);
}

.fullscreen-slideshow .slide.active {
  opacity: 1;
  z-index: 1;
}

/* Images maintain aspect ratio */
.fullscreen-slideshow .slide img {
  width: 100%;
  height: 100%;
  display: block;
  margin: 0 !important;
  padding: 0 !important;
  object-fit: cover;
}

.fullscreen-slideshow .slide-text {
  position: absolute;
  bottom: 30%;
  left: 5%;
  transform: translateX(-3%);
  text-align: center;

  font-size: 2.5em;
  font-weight: 600;
  display: inline-block;
  background-image: linear-gradient(135deg, #fbfbfb, #efdf06, #eef5f7);
  background-size: 200% auto;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0.5px 0.5px 0 rgba(0, 68, 255, 0.8);

  animation: flashlight-move 10s linear infinite;
}

@keyframes flashlight-move {
  0% {
    background-position: 200% center;
  }

  100% {
    background-position: -200% center;
  }
}

/* =====================================
   Side image (right-aligned with fade)
   ===================================== */
.fullscreen-slideshow .slide .side-image {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: auto;
  object-fit: contain;
  -webkit-mask-image: linear-gradient(
    to left,
    rgba(0, 0, 0, 1),
    rgba(0, 0, 0, 0)
  );
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  -webkit-mask-position: right;

  mask-image: linear-gradient(to left, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0));
  mask-repeat: no-repeat;
  mask-size: 100% 100%;
  mask-position: right;
}

/* Hide first <img> by default so gradient shows */
.fullscreen-slideshow .slide > img:first-of-type {
  display: none;
}

/* Show full image background if slide has 'has-bg' */
.fullscreen-slideshow .slide.has-bg > img:first-of-type {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.intro-section {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 10px 20px;
  color: white;
  min-height: 280px;
  height: auto;
}

.intro-section h2 {
  font-size: 1.7em !important;
  font-weight: 600;
  margin-bottom: 10px;
}

.intro-section p {
  font-size: 1.5em !important;
  max-width: 900px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Tablet */
@media (max-width: 992px) {
  .intro-section h2 {
    font-size: 1.3em;
  }

  .intro-section p {
    font-size: 1.2em;
  }
}

/* Mobile */
@media (max-width: 600px) {
  .intro-section {
    padding: 20px 10px;
  }

  .intro-section h2 {
    font-size: 1.1em;
  }

  .intro-section p {
    font-size: 1em;
  }
}

:root {
  --md-text-font: "ToyotaTypeW02";
  --md-code-font: "ToyotaTypeW02";
}

.slideshow-container {
  height: 460px !important;
  border-radius: 24px !important;
}

.fullscreen-slideshow .fixed-slide-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  border-radius: 24px;
}

.fullscreen-slideshow .slide-text-container {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.fullscreen-slideshow .slide-text-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 40px 40px 20px 0;
  box-sizing: border-box;
}

.fullscreen-slideshow .slide-text-slide.active {
  opacity: 1;
  z-index: 2;
}

.fullscreen-slideshow .slide-text-slide .slide-text {
  position: relative;
  text-align: right !important;
  font-size: clamp(1.5em, 4vw, 2.5em);
  font-weight: 600;
  display: inline-block;
  width: auto;
  max-width: 100%;
  margin-left: auto;
  margin-right: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
  line-height: 1.6;
}

.fullscreen-slideshow .slide-text-slide .slide-text-line {
  display: block;
  position: relative;
  padding: 2px 12px;
  margin-bottom: 4px;
  margin-right: 40px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  width: fit-content;
  margin-left: auto;
  line-height: 1.3;
  color: #333f69 !important;
  background-image: none !important;
  background-clip: unset !important;
  -webkit-background-clip: unset !important;
  -webkit-text-fill-color: #333f69 !important;
  text-shadow: none !important;
  animation: none !important;
}

.fullscreen-slideshow .slide-text-slide .slide-text-line::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ffffff;
  border-radius: 8px;
  z-index: -1;
}

.fullscreen-slideshow .slide-text-slide .slide-text-line:last-child {
  margin-bottom: 0;
}

@media (max-width: 992px) {
  .fullscreen-slideshow .slide-text-slide {
    padding: 30px 30px 20px 0;
  }
  .fullscreen-slideshow .slide-text-slide .slide-text-line {
    margin-right: 30px;
  }
}

@media (max-width: 768px) {
  .fullscreen-slideshow .slide-text-slide {
    padding: 24px 24px 20px 0;
  }
  .fullscreen-slideshow .slide-text-slide .slide-text-line {
    margin-right: 24px;
  }
}

@media (max-width: 600px) {
  .fullscreen-slideshow .slide-text-slide {
    padding: 20px 20px 20px 0;
  }
  .fullscreen-slideshow .slide-text-slide .slide-text-line {
    margin-right: 20px;
  }
}

@media (max-width: 480px) {
  .fullscreen-slideshow .slide-text-slide {
    padding: 16px 16px 20px 0;
  }
  .fullscreen-slideshow .slide-text-slide .slide-text-line {
    margin-right: 16px;
  }
}
