/* KKR Construction & Waterproofing Solution - Custom Premium Styles */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

:root {
  --color-charcoal: #111111;
  --color-darkgray: #1F2937;
  --color-brandred: #C8102E;
  --color-darkred: #8F0D22;
  --color-brandbg: #F8F8F6;
  --color-lightgray: #E5E7EB;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--color-charcoal);
}
::-webkit-scrollbar-thumb {
  background: #374151;
  border-radius: 5px;
  border: 2px solid var(--color-charcoal);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-brandred);
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
  font-family: 'Inter', sans-serif;
  background-color: var(--color-brandbg);
  color: var(--color-charcoal);
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Plus Jakarta Sans', sans-serif;
}

/* Glassmorphism Navigation */
.nav-scrolled {
  background-color: rgba(17, 17, 17, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.08);
}

/* Hero Zoom Animation */
@keyframes slowZoom {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
  }
}
.hero-zoom {
  animation: slowZoom 24s ease-in-out infinite;
}

/* Before / After Slider Styles */
.ba-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  user-select: none;
  border-radius: 0.75rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.ba-before, .ba-after {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.ba-before img, .ba-after img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.ba-after {
  width: 50%; /* Adjusted by JS */
  overflow: hidden;
  z-index: 2;
}

.ba-after img {
  width: 100%;
  height: 100%;
  max-width: none;
}

.ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%; /* Adjusted by JS */
  width: 4px;
  background-color: var(--color-brandred);
  cursor: ew-resize;
  z-index: 10;
  transform: translateX(-50%);
  transition: background-color 0.2s;
  box-shadow: 0 0 10px rgba(200, 16, 46, 0.5);
}

.ba-handle:hover, .ba-handle:active {
  background-color: var(--color-darkred);
}

.ba-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  background-color: var(--color-brandred);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3), 0 0 0 4px rgba(200, 16, 46, 0.2);
  pointer-events: none;
  z-index: 11;
  transition: transform 0.2s, background-color 0.2s, box-shadow 0.2s;
}

.ba-handle:hover .ba-button,
.ba-handle:active .ba-button {
  background-color: var(--color-darkred);
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4), 0 0 0 6px rgba(143, 13, 34, 0.3);
}

/* Custom Scroll Reveals using Intersection Observer */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

.reveal.active,
.reveal-left.active,
.reveal-right.active,
.reveal-scale.active {
  opacity: 1;
  transform: none;
}

/* Stagger reveals */
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-stagger.active > * {
  opacity: 1;
  transform: translateY(0);
}

/* Add custom delays using JS or manual utility classes */
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }
.delay-500 { transition-delay: 500ms; }

/* Micro animations */
.hover-lift {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.hover-lift:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Text underline expand hover */
.hover-underline {
  position: relative;
}
.hover-underline::after {
  content: '';
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--color-brandred);
  transform-origin: bottom right;
  transition: transform 0.25s ease-out;
}
.hover-underline:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

/* Support for prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-delay: 0s !important;
    animation-duration: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0s !important;
    scroll-behavior: auto !important;
    transform: none !important;
  }
  .hero-zoom {
    animation: none !important;
  }
}

/* Focus outline for accessibility */
*:focus-visible {
  outline: 3px solid var(--color-brandred);
  outline-offset: 2px;
}

/* Floating elements */
.floating-call-btn {
  box-shadow: 0 4px 14px rgba(200, 16, 46, 0.4);
}
.floating-whatsapp-btn {
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.4);
}
