/* Homepage hero / service cards / video — page-specific styles.
   Loaded after global.css and components.css; place new overrides here.
   This page uses <body data-page="index"> so selectors can be scoped.
   Example: body[data-page="index"] .my-class { margin-top: 20px; }
*/
/* Example: spacing between service-card images and their headings. */
/* .text-block-2 { padding-top: 35px; } */
/* Hero video: adjust sizing here if needed. */
/* video { object-fit: cover; } */

/* --------------------------------------------------------------
   Homepage project tiles: stable hover hit areas and layer order.
   Webflow's original styles scaled the clickable parent, so moving
   over its boundary repeatedly triggered mouseenter / mouseleave.
   The background video's negative z-index could also put it behind
   a parent hover background. Keep the clickable boxes stationary;
   animate only the content within them.
   -------------------------------------------------------------- */
body[data-page="index"] .section-5.video-section,
body[data-page="index"] .section-5.video-section:hover,
body[data-page="index"] .section-17 > a.hover-effect,
body[data-page="index"] .section-17 > a.hover-effect:hover {
  transform: none;
  transition: none;
}

body[data-page="index"] .section-5.video-section {
  isolation: isolate;
}

body[data-page="index"] .section-5.video-section .link-block-3 {
  display: block;
  width: 100%;
  position: relative;
  z-index: 0;
  border-radius: 20px;
  overflow: hidden;
}

body[data-page="index"] .section-5.video-section .container-18,
body[data-page="index"] .section-5.video-section .container-18:hover {
  background: transparent;
}

body[data-page="index"] .section-5.video-section .background-video {
  isolation: isolate;
  background: transparent;
  transition: none;
}

body[data-page="index"] .section-5.video-section .background-video > video {
  z-index: 0;
  inset: 0;
  margin: 0;
  object-fit: cover;
  transform: scale(1);
  transition: transform 550ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

body[data-page="index"] .section-5.video-section .link-block-3:hover video {
  transform: scale(1.035);
}

body[data-page="index"] .section-5.video-section .text-block-22 {
  z-index: 2;
  pointer-events: none;
}

/* Two project CTA image cards — never shrink their hitboxes. */
body[data-page="index"] .section-17 > a.hover-effect {
  display: block;
  isolation: isolate;
  overflow: hidden;
  border-radius: 20px;
}

body[data-page="index"] .section-17 .link-block-4,
body[data-page="index"] .section-17 .link-block-4:hover {
  z-index: 0;
  background: transparent;
}

body[data-page="index"] .section-17 .slider-2 {
  overflow: hidden;
  transform: scale(1);
  transition: transform 550ms cubic-bezier(0.22, 1, 0.36, 1);
}

body[data-page="index"] .section-17 > a.hover-effect:hover .slider-2 {
  transform: scale(1.02);
}

body[data-page="index"] .section-17 .text-block-24.textpro {
  z-index: 2;
  pointer-events: none;
  border-radius: 20px;
  background-color: transparent;
  transition: background-color 300ms ease;
}

body[data-page="index"] .section-17 > a.hover-effect:hover .text-block-24.textpro {
  background-color: #00000030;
}

/* Neutralize the original text-hover overlay to avoid sudden flashes. */
body[data-page="index"] .section-17 .text-block-24.textpro:hover {
  background-color: transparent;
}

@media (prefers-reduced-motion: reduce) {
  body[data-page="index"] .section-5.video-section .background-video > video,
  body[data-page="index"] .section-17 .slider-2 {
    transition: none;
    transform: none !important;
  }
}


/* --------------------------------------------------------------
   Unified dark hover overlays + consistent 20px rounded corners
   for Check Our Projects, Know More, and Contact Us.
   Stable clickable boundaries prevent the previous hover flicker.
   -------------------------------------------------------------- */
body[data-page="index"] .section-5.video-section .link-block-3,
body[data-page="index"] .section-5.video-section .container-18,
body[data-page="index"] .section-5.video-section .background-video,
body[data-page="index"] .section-17 > a.hover-effect,
body[data-page="index"] .section-17 .link-block-4,
body[data-page="index"] .section-17 .container-20,
body[data-page="index"] .section-17 .slider-2,
body[data-page="index"] .section-17 .mask-2 {
  border-radius: 20px;
}

/* Dark overlay: fade over the moving video, not behind it. */
body[data-page="index"] .section-5.video-section .link-block-3::after,
body[data-page="index"] .section-17 > a.hover-effect::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(0, 0, 0, 0.46);
  opacity: 0;
  transition: opacity 400ms ease;
  pointer-events: none;
  z-index: 2;
}
body[data-page="index"] .section-5.video-section .link-block-3:hover::after,
body[data-page="index"] .section-17 > a.hover-effect:hover::after {
  opacity: 1;
}

/* Ensure media never spills past the 20px edge on zoom. */
body[data-page="index"] .section-17 > a.hover-effect,
body[data-page="index"] .section-5.video-section .link-block-3 {
  position: relative;
  overflow: hidden;
}
body[data-page="index"] .section-17 .slider-2,
body[data-page="index"] .section-17 .mask-2 {
  overflow: hidden;
}

/* Keep headings above the overlay and retain text-only pointer behavior. */
body[data-page="index"] .section-17 .text-block-24.textpro {
  z-index: 3;
  background: transparent !important;
  border-radius: 20px;
}
body[data-page="index"] .section-5.video-section .text-block-22 {
  z-index: 3;
}

@media (prefers-reduced-motion: reduce) {
  body[data-page="index"] .section-5.video-section .link-block-3::after,
  body[data-page="index"] .section-17 > a.hover-effect::after {
    transition: none;
  }
}

/* Homepage-only spacing before project video */
body[data-page="index"] .container-34 { padding-top: 40px !important; }
