/* Hidroelectrica Edge - Custom Styles */

:root {
  --primary-gradient: linear-gradient(135deg, #3b82f6, #1d4ed8);
  --secondary-gradient: linear-gradient(135deg, #8b5cf6, #7c3aed);
  --accent-gradient: linear-gradient(135deg, #06b6d4, #0891b2);
}

/* Global Styles */
* {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Loading Animation */
#loading {
  transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

#loading.hidden {
  opacity: 0;
  visibility: hidden;
}

/* Navigation Styles */
.navbar {
  backdrop-filter: blur(10px);
  background: rgba(0, 0, 0, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-link {
  position: relative;
  transition: all 0.3s ease;
}

.nav-link:hover {
  color: hsl(var(--p));
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 50%;
  background: linear-gradient(90deg, hsl(var(--p)), hsl(var(--s)));
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover::after {
  width: 100%;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, rgba(6, 182, 212, 0.2) 0%, transparent 50%);
  z-index: -1;
}

.hero-title {
  background: linear-gradient(135deg, hsl(var(--p)), hsl(var(--s)), hsl(var(--a)));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: titleGlow 2s ease-in-out infinite alternate;
}

@keyframes titleGlow {
  from { filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.5)); }
  to { filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.8)); }
}

.hero-icon i {
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  cursor: pointer;
}

/* Floating Animation */
.floating-icon {
  animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33% { transform: translateY(-15px) rotate(2deg); }
  66% { transform: translateY(-10px) rotate(-2deg); }
}

/* Pulse Animation */
.pulse-animation {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% { 
    opacity: 1; 
    transform: scale(1);
  }
  50% { 
    opacity: 0.7; 
    transform: scale(1.1);
  }
}

/* Card Animations */
.feature-card,
.tech-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.feature-card:hover,
.tech-card:hover {
  transform: translateY(-10px) rotateX(5deg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.feature-card:hover .card-body,
.tech-card:hover .card-body {
  transform: translateZ(20px);
}

/* Stats Animation */
.stats {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat {
  position: relative;
  overflow: hidden;
}

.stat::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transform: rotate(45deg);
  transition: all 0.6s;
  opacity: 0;
}

.stat:hover::before {
  animation: shimmer 1.5s ease-in-out;
}

@keyframes shimmer {
  0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); opacity: 0; }
  50% { opacity: 1; }
  100% { transform: translateX(100%) translateY(100%) rotate(45deg); opacity: 0; }
}

/* About Section Cards */
.about-content .card {
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.about-content .card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
  transition: all 0.6s;
}

.about-content .card:hover::before {
  left: 100%;
}

.about-content .card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

/* Technology Section */
.tech-item {
  opacity: 0;
  transform: translateX(-50px);
  animation: slideInLeft 0.8s ease-out forwards;
}

.tech-item:nth-child(2) { animation-delay: 0.2s; }
.tech-item:nth-child(3) { animation-delay: 0.4s; }
.tech-item:nth-child(4) { animation-delay: 0.6s; }

@keyframes slideInLeft {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Innovation Section */
.innovation-content {
  opacity: 0;
  transform: translateY(50px);
  animation: slideInUp 0.8s ease-out forwards;
}

.innovation-visual {
  opacity: 0;
  transform: scale(0.9);
  animation: scaleIn 0.8s ease-out 0.3s forwards;
}

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

@keyframes scaleIn {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Contact Section */
.contact-form .card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-control input:focus,
.form-control select:focus,
.form-control textarea:focus {
  box-shadow: 0 0 0 2px hsl(var(--p) / 0.3);
  border-color: hsl(var(--p));
}

/* Button Hover Effects */
.btn {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: all 0.6s;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, hsl(var(--p)), hsl(var(--pf)));
  border: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4);
}

/* Scroll Animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0);
}

/* Badge Styles */
.badge {
  background: linear-gradient(135deg, hsl(var(--p)), hsl(var(--s)));
  color: white;
  border: none;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

/* Mockup Enhancements */
.mockup-window {
  position: relative;
  overflow: hidden;
}

.mockup-window::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
  animation: windowShine 3s ease-in-out infinite;
}

@keyframes windowShine {
  0%, 100% { transform: translateX(-100%); }
  50% { transform: translateX(100%); }
}

.mockup-phone {
  transition: all 0.3s ease;
}

.mockup-phone:hover {
  transform: rotateY(10deg) rotateX(10deg);
}

/* Footer */
.footer {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.9));
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer a {
  transition: all 0.3s ease;
}

.footer a:hover {
  transform: translateY(-3px);
  text-shadow: 0 5px 15px rgba(59, 130, 246, 0.5);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .hero-title {
    font-size: 3rem;
  }
  
  .feature-card:hover,
  .tech-card:hover {
    transform: translateY(-5px);
  }
  
  .mockup-phone:hover {
    transform: none;
  }
}

/* Performance Optimizations */
.card,
.btn,
.badge {
  will-change: transform;
}

/* Dark Mode Enhancements */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
  }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus Styles */
.btn:focus-visible,
.nav-link:focus-visible {
  outline: 2px solid hsl(var(--p));
  outline-offset: 2px;
}

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

::-webkit-scrollbar-track {
  background: hsl(var(--b1));
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, hsl(var(--p)), hsl(var(--s)));
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, hsl(var(--pf)), hsl(var(--sf)));
}

/* Print Styles */
@media print {
  .navbar,
  .hero-scroll-indicator,
  #loading {
    display: none !important;
  }
  
  body {
    background: white !important;
    color: black !important;
  }
}
