/* Custom Font */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Smooth Scrolling with Better Performance */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 2rem;
}

/* Optimized Scroll Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translate3d(0, 60px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translate3d(-60px, 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translate3d(60px, 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale3d(0.9, 0.9, 1);
  }
  to {
    opacity: 1;
    transform: scale3d(1, 1, 1);
  }
}

@keyframes float {
  0%, 100% {
    transform: translate3d(0, 0, 0) rotate(3deg);
  }
  50% {
    transform: translate3d(0, -15px, 0) rotate(3deg);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale3d(1, 1, 1);
  }
  50% {
    opacity: 0.85;
    transform: scale3d(1.03, 1.03, 1);
  }
}

/* Scroll Animation Classes - Hidden by Default */
.scroll-animate {
  opacity: 0;
  transform: translate3d(0, 40px, 0);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: opacity, transform;
}

.scroll-animate.animate-left {
  transform: translate3d(-40px, 0, 0);
}

.scroll-animate.animate-right {
  transform: translate3d(40px, 0, 0);
}

.scroll-animate.animate-scale {
  transform: scale3d(0.95, 0.95, 1);
}

/* When element is visible */
.scroll-animate.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.scroll-animate.animate-scale.is-visible {
  transform: scale3d(1, 1, 1);
}

/* Staggered Animation Delays */
.scroll-animate.delay-1 {
  transition-delay: 0.1s;
}

.scroll-animate.delay-2 {
  transition-delay: 0.2s;
}

.scroll-animate.delay-3 {
  transition-delay: 0.3s;
}

.scroll-animate.delay-4 {
  transition-delay: 0.4s;
}

/* Initial Page Load Animations */
.animate-fade-in {
  animation: fadeInUp 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.animate-slide-in-left {
  animation: fadeInLeft 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.animate-slide-in-right {
  animation: fadeInRight 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.animate-float {
  animation: float 4s ease-in-out infinite;
  will-change: transform;
}

.animate-pulse {
  animation: pulse 3s ease-in-out infinite;
  will-change: transform, opacity;
}

/* Tech Grid Background - Optimized */
.tech-grid {
  background-image: 
    linear-gradient(rgba(255, 215, 0, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 215, 0, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(255, 215, 0, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 215, 0, 0.04) 1px, transparent 1px);
  background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;
  background-position: 0 0, 0 0, 0 0, 0 0;
  position: absolute;
  width: 100%;
  height: 100%;
  animation: gridMove 30s linear infinite;
  will-change: transform;
}

@keyframes gridMove {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(100px, 100px, 0);
  }
}

/* Gradient Overlay - Optimized */
.gradient-overlay {
  position: absolute;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 50%, rgba(255, 215, 0, 0.1) 0%, transparent 60%);
  animation: gradientPulse 10s ease-in-out infinite;
  will-change: opacity;
}

@keyframes gradientPulse {
  0%, 100% {
    opacity: 0.3;
  }
  50% {
    opacity: 0.5;
  }
}

/* Custom Scrollbar - Black and Yellow Theme */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: #000000;
  border-left: 1px solid #FFD700;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #FFD700 0%, #FDB913 100%);
  border-radius: 8px;
  border: 2px solid #000000;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #FDB913 0%, #FFD700 100%);
}

/* Optimized Transitions */
button, a {
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Border Utilities */
.border-3 {
  border-width: 3px;
}

/* Text Selection */
::selection {
  background: #FFD700;
  color: #000000;
}

::-moz-selection {
  background: #FFD700;
  color: #000000;
}

/* Focus States for Accessibility */
a:focus, button:focus {
  outline: 3px solid #FFD700;
  outline-offset: 3px;
}

/* Card Hover Effects - Optimized */
.transform {
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

.transform:hover {
  transform: translate3d(0, -5px, 0);
}

/* Shadow Utilities */
.shadow-passion-yellow\/50 {
  box-shadow: 0 25px 50px -12px rgba(255, 215, 0, 0.5);
}

.shadow-passion-yellow\/30 {
  box-shadow: 0 25px 50px -12px rgba(255, 215, 0, 0.3);
}

.shadow-passion-yellow\/20 {
  box-shadow: 0 25px 50px -12px rgba(255, 215, 0, 0.2);
}

/* Professional Typography */
h1, h2, h3, h4, h5, h6 {
  letter-spacing: -0.02em;
}

/* Responsive Design Helpers */
@media (max-width: 768px) {
  .hero-title {
    font-size: 3rem !important;
  }
  
  .section-title {
    font-size: 2.5rem !important;
  }

  /* Adjust grid spacing on mobile */
  .tech-grid {
    background-size: 50px 50px, 50px 50px, 10px 10px, 10px 10px;
    animation-duration: 40s;
  }
  
  /* Faster scroll animations on mobile */
  .scroll-animate {
    transition-duration: 0.6s;
  }
}

@media (max-width: 640px) {
  .hero-title {
    font-size: 2.5rem !important;
  }
  
  .section-title {
    font-size: 2rem !important;
  }
}

/* Image Optimization */
img {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  opacity: 0;
  transition: opacity 0.4s ease-in;
}

img.loaded {
  opacity: 1;
}

/* Professional Card Styles */
.card-professional {
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

.card-professional:hover {
  transform: translate3d(0, -8px, 0);
}

/* Gradient Text Effect */
.gradient-text {
  background: linear-gradient(135deg, #FFD700 0%, #FDB913 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Professional Button Ripple Effect */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  transform: scale(0);
  animation: ripple-animation 0.6s ease-out;
  pointer-events: none;
}

@keyframes ripple-animation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

button, a {
  position: relative;
  overflow: hidden;
}

/* Professional Glow Effects */
.glow-yellow {
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
  transition: box-shadow 0.3s ease;
}

.glow-yellow:hover {
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.8);
}

/* Print Styles */
@media print {
  .no-print {
    display: none !important;
  }
  
  body {
    background: white !important;
    color: black !important;
  }
}

/* Accessibility - High Contrast Mode */
@media (prefers-contrast: high) {
  * {
    border-color: currentColor !important;
  }
}

/* Reduced Motion - Respect User Preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .scroll-animate {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Performance Optimization */
* {
  -webkit-tap-highlight-color: transparent;
}

/* FAQ Custom Styles */
.faq-content {
  transition: max-height 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Professional Focus Ring */
*:focus-visible {
  outline: 3px solid #FFD700;
  outline-offset: 3px;
  border-radius: 4px;
}

/* Professional Hover Lift */
.hover-lift {
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

.hover-lift:hover {
  transform: translate3d(0, -4px, 0);
  box-shadow: 0 12px 24px rgba(255, 215, 0, 0.2);
}

/* Professional Scale Effect */
.hover-scale {
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

.hover-scale:hover {
  transform: scale3d(1.05, 1.05, 1);
}

/* Intersection Observer Loading State */
.lazy-load {
  opacity: 0;
  transition: opacity 0.6s ease-in;
}

.lazy-load.loaded {
  opacity: 1;
}

/* Performance: Use GPU Acceleration */
.gpu-accelerated {
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  perspective: 1000px;
}

/* WhatsApp-Style Testimonial Bubbles */
.whatsapp-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

.whatsapp-bubble-green {
  background: #dcf8c6;
  border-radius: 18px 18px 4px 18px;
  padding: 14px 18px;
  margin: 12px 0;
  margin-left: auto;
  max-width: 85%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  position: relative;
  color: #303030;
  font-size: 15px;
  line-height: 1.5;
  animation: slideInRight 0.5s ease-out both;
}

.whatsapp-bubble-grey {
  background: #f1f1f1;
  border-radius: 18px 18px 18px 4px;
  padding: 14px 18px;
  margin: 12px 0;
  max-width: 85%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  position: relative;
  color: #303030;
  font-size: 15px;
  line-height: 1.5;
  animation: slideInLeft 0.5s ease-out both;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translate3d(40px, 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translate3d(-40px, 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.whatsapp-bubble-green strong,
.whatsapp-bubble-grey strong {
  color: #000000;
  font-weight: 700;
  display: block;
  margin-bottom: 4px;
}

.whatsapp-bubble-green .time,
.whatsapp-bubble-grey .time {
  font-size: 11px;
  color: #666666;
  margin-top: 6px;
  text-align: right;
  opacity: 0.7;
}

/* Stagger animation delays for testimonials */
.whatsapp-bubble-green:nth-child(1),
.whatsapp-bubble-grey:nth-child(1) { animation-delay: 0s; }
.whatsapp-bubble-green:nth-child(2),
.whatsapp-bubble-grey:nth-child(2) { animation-delay: 0.1s; }
.whatsapp-bubble-green:nth-child(3),
.whatsapp-bubble-grey:nth-child(3) { animation-delay: 0.2s; }
.whatsapp-bubble-green:nth-child(4),
.whatsapp-bubble-grey:nth-child(4) { animation-delay: 0.3s; }
.whatsapp-bubble-green:nth-child(5),
.whatsapp-bubble-grey:nth-child(5) { animation-delay: 0.4s; }
.whatsapp-bubble-green:nth-child(6),
.whatsapp-bubble-grey:nth-child(6) { animation-delay: 0.5s; }

/* WhatsApp container scrolling */
.whatsapp-scrollable {
  max-height: 600px;
  overflow-y: auto;
  scroll-behavior: smooth;
  padding-right: 10px;
}

.whatsapp-scrollable::-webkit-scrollbar {
  width: 8px;
}

.whatsapp-scrollable::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.whatsapp-scrollable::-webkit-scrollbar-thumb {
  background: rgba(255, 215, 0, 0.5);
  border-radius: 10px;
}

.whatsapp-scrollable::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 215, 0, 0.7);
}

/* Mobile responsiveness for WhatsApp bubbles */
@media (max-width: 768px) {
  .whatsapp-bubble-green,
  .whatsapp-bubble-grey {
    max-width: 90%;
    font-size: 14px;
    padding: 12px 16px;
  }
  
  .whatsapp-scrollable {
    max-height: 500px;
  }
}
