/* Custom CSS with Modern Styling and Animations */

/* Import modern fonts for an attractive look */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* Custom CSS Variables for Consistent Color Scheme */
:root {
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --dark-gradient: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  --light-gradient: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  --electric-blue: #0ea5e9;
  --electric-purple: #8b5cf6;
  --electric-green: #10b981;
  --warm-orange: #f59e0b;
}

/* Dark mode colors */
.dark {
  --tw-bg-opacity: 1;
  background-color: rgb(17 24 39 / var(--tw-bg-opacity));
  color: rgb(243 244 246 / var(--tw-text-opacity));
}

/* Removed global * transitions (caused jank on scroll). Use per-component transitions only. */

/* Respect user preference and provide a quick kill‑switch for animations */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Modern font family */
body {
  font-family: 'Inter', 'Poppins', sans-serif;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  overflow-x: hidden;
}

/* Scroll behavior */
html {
  scroll-behavior: auto; /* normal scrolling, no smooth behavior */
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #764ba2, #667eea);
}

/* Header backdrop blur effect */
.backdrop-blur-md {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* Modern gradients */
.gradient-primary {
  background: var(--primary-gradient);
}

.gradient-secondary {
  background: var(--secondary-gradient);
}

.gradient-accent {
  background: var(--accent-gradient);
}

.gradient-text {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Enhanced button styles */
.btn-primary {
  background: var(--primary-gradient);
  color: white;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

/* Carousel styles */
.carousel {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  z-index: auto; /* avoid covering following sections */
}

.carousel-track {
  display: flex;
  transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  backface-visibility: hidden;
  transform: translate3d(0,0,0);
}

.carousel-slide {
  min-width: 100%;
  flex-shrink: 0;
}

.carousel-slide img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  display: block;
  backface-visibility: hidden;
}

/* Carousel controls - Fixed positioning */
.carousel-prev,
.carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  font-weight: bold;
  color: #334155;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: background-color 0.3s ease, box-shadow 0.3s ease, opacity 0.2s ease;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  outline: none;
}

.carousel-prev:hover,
.carousel-next:hover {
  background: white;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.carousel-prev:active,
.carousel-next:active {
  opacity: 0.8;
  /* Removed transform to prevent position changes */
}

.carousel-prev:focus,
.carousel-next:focus {
  outline: none;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25), 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.carousel-prev {
  left: 16px !important;
}

.carousel-next {
  right: 16px !important;
}

/* Ensure carousel buttons stay in position during all interactions */
.carousel-prev:hover,
.carousel-prev:active,
.carousel-prev:focus {
  left: 16px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
}

.carousel-next:hover,
.carousel-next:active,
.carousel-next:focus {
  right: 16px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
}

/* Dark mode carousel controls */
.dark .carousel-prev,
.dark .carousel-next {
  background: rgba(31, 41, 55, 0.9);
  color: #f3f4f6;
}

.dark .carousel-prev:hover,
.dark .carousel-next:hover {
  background: rgba(31, 41, 55, 1);
}

/* Fade in animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Slide in from left */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Slide in from right */
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Scale in animation */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Animation classes */
.animate-fade-in {
  animation: fadeIn 0.8s ease-out forwards;
}

.animate-slide-in-left {
  animation: slideInLeft 0.8s ease-out forwards;
}

.animate-slide-in-right {
  animation: slideInRight 0.8s ease-out forwards;
}

.animate-scale-in {
  animation: scaleIn 0.8s ease-out forwards;
}

/* Scroll animation states - Optimized for performance */
.scroll-hidden {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
  will-change: opacity, transform;
}

.scroll-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Performance optimizations */
.carousel-track {
  will-change: transform;
}

.service-card, .hover-card {
  will-change: transform;
}

/* Services page performance helpers */
.content-section {
  content-visibility: auto;
  contain-intrinsic-size: 1px 1000px; /* reserve space to prevent reflow */
}

.no-transition *,
.no-transition *::before,
.no-transition *::after {
  transition: none !important;
}

/* Disable scroll-triggered animations inside .no-animate sections */
.no-animate .scroll-animate,
.no-animate .scroll-hidden,
.no-animate .scroll-visible {
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
}

/* Professional lists for services */
.pro-list {
  list-style: none;
  padding-left: 0;
}

.pro-list li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 10px;
}

.pro-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-gradient);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* Pretty contact grid cards */
.reason-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.85), rgba(255,255,255,0.7));
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.06);
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}
.dark .reason-card {
  background: linear-gradient(180deg, rgba(17,24,39,0.7), rgba(17,24,39,0.6));
  border-color: rgba(255,255,255,0.08);
}
.reason-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.12);
}

.reason-icon {
  display: inline-flex;
  width: 24px;
  height: 24px;
  border-radius: 9999px;
  background: var(--accent-gradient);
  box-shadow: 0 6px 16px rgba(79,172,254,0.35);
  align-items: center;
  justify-content: center;
  flex: 0 0 24px;
}
.reason-icon svg {
  width: 14px;
  height: 14px;
  color: white;
}

/* Carousel positioning lock - prevents any position changes */
.carousel {
  position: relative;
}

.carousel .carousel-prev,
.carousel .carousel-next {
  position: absolute !important;
}

.carousel .carousel-prev {
  left: 16px !important;
  right: auto !important;
}

.carousel .carousel-next {
  right: 16px !important;
  left: auto !important;
}

/* Lock position during all states */
.carousel .carousel-prev,
.carousel .carousel-next {
  top: 50% !important;
  transform: translateY(-50%) !important;
  z-index: 10 !important;
}

/* Contact page background styling */
.contact-background-image {
  opacity: 0.05;
  filter: blur(0.5px);
  transition: opacity 0.3s ease;
}

.dark .contact-background-image {
  opacity: 0.08;
}

/* WhatsApp Floating Button Styling */
.whatsapp-float {
  position: fixed !important;
  bottom: 24px !important;
  right: 24px !important;
  z-index: 999 !important;
  width: 60px !important;
  height: 60px !important;
  border-radius: 50% !important;
  background: #25D366 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4) !important;
  transition: all 0.3s ease !important;
  text-decoration: none !important;
  animation: whatsapp-pulse 2s infinite !important;
}

.whatsapp-float:hover {
  background: #128C7E !important;
  transform: scale(1.1) !important;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6) !important;
  animation: none !important;
}

.whatsapp-float svg {
  width: 32px !important;
  height: 32px !important;
  color: white !important;
  fill: currentColor !important;
}

/* WhatsApp pulse animation */
@keyframes whatsapp-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* Mobile responsive WhatsApp button */
@media (max-width: 768px) {
  .whatsapp-float {
    bottom: 20px !important;
    right: 20px !important;
    width: 56px !important;
    height: 56px !important;
  }
  
  .whatsapp-float svg {
    width: 28px !important;
    height: 28px !important;
  }
}

/* Hover effects for cards */
.hover-card {
  transition: all 0.3s ease;
  border-radius: 12px;
  padding: 24px;
  background: white;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.hover-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.dark .hover-card {
  background: rgba(31, 41, 55, 0.8);
  backdrop-filter: blur(16px);
}

.dark .hover-card:hover {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Clean hero background */
/* .hero-background {
  background-image: url('assets/images/background.jpeg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
} */

.dark .hero-background {
  background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
}

/* Modern section backgrounds */
.section-pattern {
  background-image: 
    radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.1) 0%, transparent 50%);
}

/* Electric effect for headings */
.electric-heading {
  position: relative;
  background: linear-gradient(135deg, var(--electric-blue), var(--electric-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
}

.electric-heading::after { display: none; }

/* Professional service cards */
.service-card {
  background: rgba(255, 255, 255, 0.96);
  /* removed backdrop-filter for performance */
  border: 1px solid rgba(229, 231, 235, 0.7);
  border-radius: 16px;
  padding: 32px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 32px 64px rgba(0, 0, 0, 0.15);
  background: rgba(255, 255, 255, 0.95);
}

.dark .service-card {
  background: rgba(31, 41, 55, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.dark .service-card:hover {
  background: rgba(31, 41, 55, 0.95);
  box-shadow: 0 32px 64px rgba(0, 0, 0, 0.4);
}

/* Logo and brand styling */
.brand-logo {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  letter-spacing: -0.025em;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-tagline {
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  color: var(--electric-purple);
  font-style: italic;
}

/* Contact form styling */
.contact-form {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1);
}

.dark .contact-form {
  background: rgba(31, 41, 55, 0.9);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

/* Responsive design helpers */
@media (max-width: 768px) {
  .carousel-slide img {
    height: 250px;
  }
  .carousel { margin-bottom: 120px; }
  /* remove forced stacking to keep natural flow */
  #hero { position: static; z-index: auto; }
  
  .carousel-prev,
  .carousel-next {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
  
  .service-card {
    padding: 20px;
  }
  
  .contact-form {
    padding: 24px;
  }
}

@media (min-width: 769px) {
  .carousel { margin-bottom: 32px; }
}

/* Loading animation for smooth transitions */
.loading {
  opacity: 1;
  animation: none;
}

/* Professional shadows */
.shadow-professional {
  box-shadow: 
    0 1px 3px rgba(0, 0, 0, 0.12),
    0 1px 2px rgba(0, 0, 0, 0.24);
}

.shadow-professional:hover {
  box-shadow: 
    0 14px 28px rgba(0, 0, 0, 0.25),
    0 10px 10px rgba(0, 0, 0, 0.22);
}

/* Modern list styling */
.modern-list {
  list-style: none;
  padding-left: 0;
}

.modern-list li {
  position: relative;
  padding-left: 32px;
  margin-bottom: 12px;
  line-height: 1.6;
}

.modern-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 12px;
  height: 12px;
  background: var(--accent-gradient);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(79, 172, 254, 0.3);
}

/* Interactive elements */
.interactive:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
}

/* Typography enhancements */
.text-gradient {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Modern navigation */
nav a {
  position: relative;
  font-weight: 500;
  transition: all 0.3s ease;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-gradient);
  border-radius: 1px;
  transition: width 0.3s ease;
}

nav a:hover::after {
  width: 100%;
}

/* Professional image styling */
.professional-image {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  transition: all 0.4s ease;
}

.professional-image:hover {
  transform: scale(1.02);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
}

.professional-image img {
  transition: transform 0.3s ease;
}

.professional-image:hover img {
  transform: scale(1.05);
}

/* Client logos */
.client-logo {
  max-height: 80px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: none;
  opacity: 1;
  transition: transform .2s ease;
}
.client-logo:hover {
  transform: translateY(-2px) scale(1.02);
}
@media (max-width: 768px) {
  .client-logo { max-height: 56px; }
}
@media (min-width: 1024px) {
  .client-logo { max-height: 96px; }
}

/* Prevent zoom effects inside carousels */
.swiper .service-card:hover {
  transform: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}
.swiper .professional-image:hover,
.swiper .professional-image:hover img {
  transform: none;
}
.swiper-slide img:hover {
  transform: none;
}

/* Avoid cropped ("zoomed") images inside Swiper carousels */
.swiper .swiper-slide img {
  object-fit: contain;
}