/**
 * @file
 * MDB Bandaid CSS
 * Temporary compatibility styles for legacy CorporatePlus/MTT content.
 * These classes exist in page body fields from the old D8 theme.
 * TODO: Rebuild page content with Bootstrap 5 classes and remove this file.
 */

/* ======================================================
   SPACING UTILITIES (MTT)
   ====================================================== */

.bottom-spacing-small { margin-bottom: 20px; }
.bottom-spacing { margin-bottom: 40px; }
.top-spacing-small { margin-top: 20px; }
.top-spacing { margin-top: 40px; }

/* ======================================================
   FANCY BLOCK 2 (overlapping images layout)
   ====================================================== */

.fancy-block-2-container {
  position: relative;
}

.fancy-image-top-left {
  top: 0;
  left: 0;
  padding-right: 35%;
  padding-bottom: 25%;
  margin-top: 10px;
  display: block;
  width: 100%;
}

.fancy-image-bottom-right {
  bottom: 0;
  right: 0;
  padding-left: 35%;
  padding-top: 30%;
}

.fancy-image--position-absolute {
  position: absolute;
  max-width: 65%;
  padding: 0;
}

.fancy-image--box-shadow {
  box-shadow: 0 0 35px 10px rgba(0, 0, 0, 0.1);
}

/* ======================================================
   LEGACY BUTTON STYLES (MTT)
   ====================================================== */

a.button,
.button > a {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 12px 24px;
  text-decoration: none;
  display: inline-block;
  line-height: 1;
  border-width: 1px;
  border-style: solid;
  border-radius: 4px;
  transition: all 0.2s ease-in-out;
  margin: 10px 0;
  text-align: center;
  background-color: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

a.button:hover,
a.button:focus,
.button > a:hover,
.button > a:focus {
  background-color: var(--color-primary);
  color: #ffffff;
}

/* Hover style 2 - fill animation */
a.button.button--hover-style-2,
.button.button--hover-style-2 > a {
  position: relative;
  z-index: 1;
}

a.button.button--hover-style-2:before,
.button.button--hover-style-2 > a:before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  transform: scaleX(0);
  border-radius: 3px;
  background-color: var(--color-primary);
  transition: transform 0.2s ease-in-out;
}

a.button.button--hover-style-2:hover:before,
a.button.button--hover-style-2:focus:before,
.button.button--hover-style-2 > a:hover:before,
.button.button--hover-style-2 > a:focus:before {
  transform: scaleX(1);
}

a.button.button--hover-style-2:hover,
a.button.button--hover-style-2:focus {
  color: #ffffff;
}

/* ======================================================
   REGION BACKGROUND COLORS (MTT)
   ====================================================== */

.region--white-background { background-color: #ffffff; }
.region--gray-background { background-color: #f5f5f5; }
.region--dark-background { background-color: #2d2d2d; }
.region--black-background { background-color: #1d1d1d; }
.region--light-typography { color: #ffffff; }
.region--dark-typography { color: #363636; }

.region--light-typography a { color: #ffffff; }
.region--light-typography h1,
.region--light-typography h2,
.region--light-typography h3,
.region--light-typography h4,
.region--light-typography h5,
.region--light-typography h6 { color: #ffffff; }

/* ======================================================
   MAIN CONTENT SECTION PADDING (MTT)
   ====================================================== */

.main-content__section,
.sidebar__section {
  padding: 60px 0;
}

/* ======================================================
   FADE ANIMATION (MTT animate effects)
   These were JS-driven in D8 - just make them visible.
   ====================================================== */

.fade {
  opacity: 1 !important;
}

.mt-no-opacity {
  opacity: 1;
}

/* ======================================================
   CALL TO ACTION (MTT)
   ====================================================== */

.call-to-action {
  text-align: center;
  padding: 40px 0;
}

.call-to-action h2 {
  font-size: 24px;
  margin: 0 0 25px;
  font-weight: 400;
}

/* ======================================================
   BOOTSTRAP 3 GRID COMPAT
   MTT content uses col-md-push/pull which don't exist in BS5
   ====================================================== */

@media (min-width: 768px) {
  .col-md-push-6 { order: 2; }
  .col-md-pull-6 { order: 1; }
}

/* ======================================================
   BACKGROUND IMAGE BLOCK (MTT)
   ====================================================== */

.field--mt-background-image-block .block {
  padding-bottom: 25px;
  position: relative;
}

.background-image-block__section {
  position: relative;
  padding: 90px 0;
  overflow: hidden;
}

.background-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-repeat: no-repeat;
  background-position: 50% 50%;
  background-size: cover;
}

.background-image--attachment-fixed {
  background-attachment: fixed;
}

.background-image--attachment-scroll {
  background-attachment: scroll;
}

.background-image-overlay {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
}

/* ======================================================
   BACKGROUND VIDEO BLOCK (MTT)
   ====================================================== */

.background-video-block__section {
  position: relative;
  padding: 90px 0;
  overflow: hidden;
}

.background-video {
  position: absolute;
  top: 0;
  left: 0;
  min-width: 100%;
  min-height: 100%;
  height: auto;
  width: auto;
  background-size: cover;
  object-fit: cover;
}

.background-video-fallback {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-repeat: no-repeat;
  background-position: 50% 50%;
  background-size: cover;
}

.background-video-overlay {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
}

/* MTT overlay color classes */
.region--light-typography {
  color: #ffffff;
}

.region--dark-typography {
  color: #363636;
}

/* ======================================================
   GLOBAL IMAGE SCALING
   All images scale to fit parent container width.
   Matches MTT/CorporatePlus default behavior.
   ====================================================== */

img {
  max-width: 100%;
  height: auto;
}

/* ======================================================
   HIGHLIGHTED REGION PADDING
   ====================================================== */

.highlighted__section,
.region-highlighted {
  padding: var(--highlighted-padding);
}

/* ======================================================
   MAIN CONTENT PADDING
   ====================================================== */

main.main-content {
  padding: var(--section-padding);
}

/* ======================================================
   TESTIMONIALS CAROUSEL (MTT view-testimonials-list-2)
   Restores D8 CorporatePlus testimonial carousel styling.
   ====================================================== */

/* Layout - image left, body right */
.view-testimonials-list-2 .media {
  display: flex;
  align-items: center;
  gap: 0;
}

.view-testimonials-list-2 .media-left {
  flex: 0 0 220px;
  padding-right: 60px;
}

.view-testimonials-list-2 .media-left img {
  border-radius: 100%;
  width: 100%;
  height: auto;
  display: block;
}

.view-testimonials-list-2 .media-body {
  flex: 1;
}

/* Quote text */
.view-testimonials-list-2 .views-field-body p {
  font-size: 1.25rem;
  line-height: 1.5;
  padding: 60px 0 40px;
  position: relative;
  color: var(--color-text);
}

/* Opening quote mark */
.view-testimonials-list-2 .views-field-body p:after {
  position: absolute;
  font-family: Georgia, Times New Roman, Serif;
  content: "\201C";
  font-size: 120px;
  left: 0;
  top: 10px;
  font-style: normal;
  line-height: 1;
  color: var(--color-accent);
  opacity: 0.4;
}

/* Name */
.view-testimonials-list-2 .views-field-title a {
  font-size: 1.2rem;
  font-weight: 600;
  font-family: var(--font-heading);
  color: var(--color-text);
  text-decoration: none;
}

.view-testimonials-list-2 .views-field-title a:hover {
  color: var(--color-accent);
}

/* Subtitle */
.view-testimonials-list-2 .views-field-field-subtitle {
  font-size: 0.95rem;
  color: var(--color-secondary);
  margin-top: 0.25rem;
}

/* Swiper nav button positioning */
.view-mt-carousel .swiper-button-prev,
.view-mt-carousel .swiper-button-next {
  top: 40%;
}

/* Mobile */
@media (max-width: 767px) {
  .view-testimonials-list-2 .media {
    flex-direction: column;
    text-align: center;
  }

  .view-testimonials-list-2 .media-left {
    flex: 0 0 140px;
    width: 140px;
    padding-right: 0;
    margin: 0 auto 1rem;
  }

  .view-testimonials-list-2 .views-field-body p {
    padding: 50px 0 20px;
    font-size: 1rem;
  }

  .view-testimonials-list-2 .views-field-body p:after {
    left: 50%;
    transform: translateX(-50%);
    top: 0;
  }
}

/* ======================================================
   BRANDS / PARTNERS CAROUSEL (MTT mt-brands-carousel)
   ====================================================== */

.wmd-carousel--brands .swiper-slide {
  text-align: center;
}

.wmd-carousel--brands .swiper-slide img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

.wmd-carousel--brands .views-field-name {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.wmd-carousel--brands .views-field-name a {
  color: var(--color-text);
  text-decoration: none;
}

.wmd-carousel--brands .views-field-name a:hover {
  color: var(--color-link-hover);
}

/* Hide the messy overlay markup from MTT */
.wmd-carousel--brands .overlay-container {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
}

.wmd-carousel--brands .overlay {
  display: none;
}
