/**
 * EDT Ingeniería - UI/UX Enhancements 2026
 * Modern design upgrades: animations, glassmorphism, micro-interactions
 */

/* ====================================================
   SCROLL PROGRESS BAR
   ==================================================== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #FF6B35 0%, #FF9500 50%, #06B6D4 100%);
  width: 0%;
  z-index: 9999;
  transition: width 0.1s ease;
  box-shadow: 0 0 10px rgba(255, 107, 53, 0.5);
}

/* ====================================================
   SMOOTH SCROLLING
   ==================================================== */
html {
  scroll-behavior: smooth;
}

/* ====================================================
   GLOBAL ANIMATIONS
   ==================================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.3);
  }
  50% {
    box-shadow: 0 0 40px rgba(255, 107, 53, 0.6);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

/* ====================================================
   ELEMENTS ANIMATION ON SCROLL
   ==================================================== */
.animate-on-scroll {
  opacity: 0;
  animation: fadeInUp 0.6s ease-out forwards;
}

.animate-on-scroll.animated {
  animation-play-state: running;
}

.stat-item {
  animation: fadeInUp 0.6s ease-out;
}

/* ====================================================
   HERO SECTION ENHANCEMENTS
   ==================================================== */
.hero-premium {
  position: relative;
  overflow: hidden;
}

.hero-premium-title {
  animation: fadeInDown 0.8s ease-out;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: linear-gradient(135deg, #FF6B35 0%, #FF9500 50%, #06B6D4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-premium-subtitle {
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero-premium-ctas {
  animation: fadeInUp 0.8s ease-out 0.6s both;
}

.btn-hero-primary,
.btn-hero-secondary {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.btn-hero-primary::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-hero-primary:hover::before {
  width: 300px;
  height: 300px;
}

.btn-hero-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(255, 107, 53, 0.3);
}

.btn-hero-secondary:hover {
  border-color: #FF6B35;
  color: #FF6B35;
  transform: translateY(-2px);
}

/* ====================================================
   BENTO CARD ENHANCEMENTS - GLASSMORPHISM
   ==================================================== */
.bento-card {
  border-radius: 1rem;
  overflow: hidden;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.5);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(0);
  box-shadow: 0 8px 32px rgba(10, 22, 64, 0.1);
}

.bento-card:hover {
  transform: translateY(-8px);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 20px 50px rgba(10, 22, 64, 0.15);
  border-color: rgba(255, 107, 53, 0.3);
}

.bento-card--featured {
  animation: scaleIn 0.6s ease-out;
}

.bento-card--standard {
  animation: fadeInUp 0.6s ease-out;
}

.bento-image {
  position: relative;
  overflow: hidden;
  height: 250px;
}

.bento-image img {
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bento-card:hover .bento-image img {
  transform: scale(1.08);
}

.bento-category {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 107, 53, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 0.75rem;
  font-weight: 600;
  animation: slideInRight 0.6s ease-out 0.3s both;
}

/* ====================================================
   STAT ITEMS WITH COUNTERS
   ==================================================== */
/* Styles moved to style.css to avoid conflicts */
/* .stat-item and .stat-number styles are now in /css/style.css (top section) */

/* ====================================================
   TESTIMONIAL CARDS - ELEGANT DESIGN
   ==================================================== */
.testimonial-card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 1rem;
  padding: 2rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.testimonial-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #FF6B35 0%, #06B6D4 100%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.testimonial-card:hover::before {
  transform: scaleX(1);
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(10, 22, 64, 0.1);
}

.quote-icon {
  font-size: 2.5rem;
  color: #FF6B35;
  margin-bottom: 1rem;
  opacity: 0.6;
}

.testimonial-content p {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-neutral-700);
  font-style: italic;
  margin-bottom: 1.5rem;
}

.testimonial-author {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.author-info {
  text-align: left;
}

.author-info strong {
  display: block;
  color: var(--color-primary);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.author-info span {
  display: block;
  font-size: 0.875rem;
  color: var(--color-neutral-500);
}

/* ====================================================
   WHATSAPP FLOATING BUTTON ENHANCEMENT
   ==================================================== */
.whatsapp-float {
  animation: float 3s ease-in-out infinite;
  transition: all 0.3s ease;
}

.whatsapp-float:hover {
  animation: glow 1s ease-in-out infinite;
  transform: scale(1.15) translateY(-5px);
}

/* ====================================================
   BUTTON ENHANCEMENTS
   ==================================================== */
button,
.btn {
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

button:focus-visible,
.btn:focus-visible {
  outline: 2px solid #FF6B35;
  outline-offset: 2px;
}

button:active,
.btn:active {
  transform: scale(0.98);
}

/* ====================================================
   FORM ENHANCEMENTS
   ==================================================== */
input,
textarea,
select {
  transition: all 0.3s ease;
  border-radius: 0.5rem;
}

input:focus,
textarea:focus,
select:focus {
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
  border-color: #FF6B35;
}

input::placeholder,
textarea::placeholder {
  color: var(--color-neutral-400);
  transition: color 0.3s ease;
}

input:focus::placeholder,
textarea:focus::placeholder {
  color: var(--color-neutral-500);
}

/* ====================================================
   SECTION ENHANCEMENTS
   ==================================================== */
section {
  animation: fadeInUp 0.8s ease-out;
}

section:nth-child(even) {
  animation-delay: 0.2s;
}

/* ====================================================
   NAVBAR IMPROVEMENTS
   ==================================================== */
.navbar {
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  background: rgba(10, 22, 64, 0.95);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.nav-link {
  position: relative;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #FF6B35 0%, #06B6D4 100%);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* ====================================================
   FOOTER ENHANCEMENTS
   ==================================================== */
.site-footer {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  position: relative;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #FF6B35, transparent);
}

.footer-contact-item {
  transition: all 0.3s ease;
  padding: 1rem;
  border-radius: 0.75rem;
}

.footer-contact-item:hover {
  background: rgba(255, 107, 53, 0.1);
  transform: translateX(5px);
}

.social-links a {
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 107, 53, 0.1);
  color: #FF6B35;
}

.social-links a:hover {
  background: #FF6B35;
  color: white;
  transform: translateY(-3px);
}

/* ====================================================
   ACCESSIBILITY - FOCUS STATES
   ==================================================== */
*:focus-visible {
  outline: 2px solid #FF6B35;
  outline-offset: 2px;
}

a:focus-visible {
  border-radius: 2px;
}

/* ====================================================
   REDUCED MOTION SUPPORT
   ==================================================== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}

/* ====================================================
   RESPONSIVE ANIMATIONS
   ==================================================== */
@media (max-width: 768px) {
  .btn-hero-primary,
  .btn-hero-secondary {
    font-size: 0.875rem;
    padding: 0.75rem 1.5rem;
  }
  
  .stat-number {
    font-size: 2rem;
  }
  
  .hero-premium-title {
    font-size: 2rem;
  }
}
