/* Video Background Support */
.mxd-project-item__preview video.video-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1; /* Ensure it stays behind tags if necessary, though tags are usually absolute positioned on top */
}

.mxd-project-item__preview {
  position: relative; /* Ensure container is relative for absolute video */
  overflow: hidden; /* clean edges */
}

/* Custom overrides for Portfolio Gallery text colors */
[color-scheme="dark"] .mxd-project-item__promo .mxd-project-item__name a,
[color-scheme="dark"] .mxd-project-item__promo .mxd-project-item__name a span {
  color: #000000 !important;
}

[color-scheme="light"] .mxd-project-item__promo .mxd-project-item__name a,
[color-scheme="light"] .mxd-project-item__promo .mxd-project-item__name a span {
  color: #ffffff !important;
}

/* Override for Pinned Text Item paragraph in Dark Mode */
[color-scheme="dark"] .mxd-pinned__text-item p {
  color: #ffffff !important;
}

/* Override for Marquee Item background and text colors */
/* Dark Mode: White Background, Black Text */
[color-scheme="dark"] .marquee__item.has-caption.padding-4 {
  background-color: #ffffff !important;
}
[color-scheme="dark"] .marquee__item.has-caption.padding-4 p {
  color: #000000 !important;
}
[color-scheme="dark"] .marquee__item.has-caption.padding-4 .btn.opposite {
  color: #000000 !important;
  border-color: #000000 !important;
}
[color-scheme="dark"]
  .marquee__item.has-caption.padding-4
  .btn.opposite
  .btn-caption,
[color-scheme="dark"] .marquee__item.has-caption.padding-4 .btn.opposite i {
  color: #000000 !important;
}

/* Light Mode: Red Background, White Text */
[color-scheme="light"] .marquee__item.has-caption.padding-4 {
  background-color: #bc1f42 !important;
}
[color-scheme="light"] .marquee__item.has-caption.padding-4 p {
  color: #ffffff !important;
}
[color-scheme="light"] .marquee__item.has-caption.padding-4 .btn.opposite {
  color: #ffffff !important;
  border-color: #ffffff !important;
}
[color-scheme="light"]
  .marquee__item.has-caption.padding-4
  .btn.opposite
  .btn-caption,
[color-scheme="light"] .marquee__item.has-caption.padding-4 .btn.opposite i {
  color: #ffffff !important;
}

/* Custom footer overrides for dark mode */
/* Background white, text black */
[color-scheme="dark"] .footer-blocks__card {
  background-color: #ffffff !important;
  color: #000000 !important;
}

/* Ensure all text elements inside the card are black */
[color-scheme="dark"] .footer-blocks__card p,
[color-scheme="dark"] .footer-blocks__card a,
[color-scheme="dark"] .footer-blocks__card span,
[color-scheme="dark"] .footer-blocks__card h1,
[color-scheme="dark"] .footer-blocks__card h2,
[color-scheme="dark"] .footer-blocks__card h3,
[color-scheme="dark"] .footer-blocks__card h4,
[color-scheme="dark"] .footer-blocks__card h5,
[color-scheme="dark"] .footer-blocks__card h6,
[color-scheme="dark"] .footer-blocks__card input,
[color-scheme="dark"] .footer-blocks__card button {
  color: #000000 !important;
}

/* Ensure SVGs are black */
[color-scheme="dark"] .footer-blocks__card svg {
  fill: #000000 !important;
  color: #000000 !important;
}

/* Specific button overrides if needed */
[color-scheme="dark"] .footer-blocks__card .btn.btn-muted {
  color: #000000 !important;
  border-color: #000000 !important;
}

/* Input placeholder color override */
[color-scheme="dark"] .footer-blocks__card input::placeholder {
  color: #000000 !important;
  opacity: 0.7;
}

/* Footer Nav Counter exception */
[color-scheme="dark"] .footer-nav__counter span {
  color: #000000 !important;
}

/* Align menu promo video to the top */
@media only screen and (min-width: 1200px) {
  .menu-promo__content {
    right: 7rem;
    top: 4rem; /* Matching the left side navigation top padding */
    bottom: auto !important;
  }
}

@media only screen and (min-width: 1600px) {
  .menu-promo__content {
    top: 6rem; /* Matching the left side navigation top padding for larger screens */
  }
}

/* Loader Logo Styling & Animation */
.loader__logo {
  max-width: 45rem;
  height: auto;
  animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

/* Floating WhatsApp Button */
.whatsapp-float {
  position: fixed;
  width: 6rem;
  height: 6rem;
  bottom: 10rem;
  right: 6rem;
  background-color: #25d366;
  color: #fff;
  border-radius: 50%;
  text-align: center;
  font-size: 3.5rem;
  box-shadow: 0 0.4rem 1.2rem rgba(0, 0, 0, 0.15);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  animation: bounce 2s infinite;
}

.whatsapp-float:hover {
  background-color: #128c7e;
  transform: scale(1.1);
  color: #fff;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-1rem);
  }
  60% {
    transform: translateY(-0.5rem);
  }
}

@media only screen and (max-width: 767px) {
  .whatsapp-float {
    width: 5rem;
    height: 5rem;
    bottom: 2rem;
    right: 2rem;
    font-size: 3rem;
  }
}
