/* INAMOB Custom Styles - Optimized for Performance and SEO */

/* CSS Variables for INAMOB Brand Colors */
:root {
  --inamob-purple: #9333ea;
  --inamob-purple-dark: #7c3aed;
  --inamob-purple-light: #a855f7;
  --inamob-accent: #06b6d4;
  --inamob-green: #10b981;
  --inamob-gradient: linear-gradient(135deg, var(--inamob-purple) 0%, var(--inamob-purple-dark) 100%);
}

/* Performance Optimizations */
* {
  box-sizing: border-box;
}

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Font optimization */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Loading animation */
.loading {
  opacity: 0;
  animation: fadeIn 0.8s ease-in-out forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Gradient backgrounds */
.gradient-bg {
  background: var(--inamob-gradient);
  position: relative;
}

.gradient-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(147, 51, 234, 0.1) 0%, rgba(124, 58, 237, 0.1) 100%);
  pointer-events: none;
}

/* WhatsApp floating button animations */
.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  animation: bounce 2s infinite;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
  backdrop-filter: blur(10px);
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

.whatsapp-float:hover {
  animation: none;
  transform: scale(1.1);
}

/* Hero section optimizations */
.hero-text {
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
  animation: slideInUp 1s ease-out;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Card hover effects */
.card-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, box-shadow;
}

.card-hover:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 50px rgba(0,0,0,0.15);
}

/* Button animations */
.btn-pulse {
  animation: pulse-glow 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse-glow {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 20px rgba(147, 51, 234, 0.4);
  }
  50% {
    opacity: 0.8;
    box-shadow: 0 0 30px rgba(147, 51, 234, 0.6);
  }
}

/* SEO-friendly progressive enhancement */
.no-js .animation {
  animation: none;
}

/* Performance: Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Mobile optimization */
@media (max-width: 768px) {
  .whatsapp-float {
    bottom: 15px;
    right: 15px;
    padding: 12px;
  }
  
  .hero-text {
    font-size: 2.5rem;
    line-height: 1.2;
  }
  
  .card-hover {
    transition: none;
  }
  
  .card-hover:hover {
    transform: none;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .gradient-bg {
    background: #1a1a1a;
    color: #ffffff;
  }
}

/* Focus indicators for accessibility */
button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 3px solid var(--inamob-purple);
  outline-offset: 2px;
}

/* Loading states */
.form-loading {
  opacity: 0.7;
  pointer-events: none;
}

.spinner {
  border: 2px solid #f3f3f3;
  border-top: 2px solid var(--inamob-purple);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
  display: inline-block;
  margin-right: 8px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Success/Error states */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin: 16px 0;
  font-weight: 500;
}

.alert-success {
  background-color: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.alert-error {
  background-color: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

/* Image optimization */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Lazy loading optimization */
img[loading="lazy"] {
  transition: opacity 0.3s;
}

/* Print styles */
@media print {
  .whatsapp-float,
  .no-print {
    display: none !important;
  }
  
  .gradient-bg {
    background: #ffffff !important;
    color: #000000 !important;
  }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
  :root {
    --text-primary: #ffffff;
    --text-secondary: #e5e7eb;
    --bg-primary: #1f2937;
    --bg-secondary: #374151;
  }
}

/* Critical CSS inlined in head, non-critical CSS here */
.fade-in-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

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

/* CLS prevention */
.aspect-ratio-16-9 {
  aspect-ratio: 16 / 9;
}

.aspect-ratio-1-1 {
  aspect-ratio: 1 / 1;
}