/* ============================================
   Rusconi Abogados - Enhanced Global Styles
   Design System 2025 - With Animations & Depth
   ============================================ */

/* ============================================
   ANIMATIONS & KEYFRAMES
   ============================================ */

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

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

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

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

@keyframes pulse-ring {
  0% {
    transform: scale(1);
    opacity: 0.5;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

/* ============================================
   SCROLL REVEAL ANIMATIONS
   ============================================ */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-left.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-right.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-scale.active {
  opacity: 1;
  transform: scale(1);
}

/* Staggered delays */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }
.delay-6 { transition-delay: 0.6s; }

/* ============================================
   HERO SECTION ENHANCEMENTS
   ============================================ */

.hero-gradient {
  background: linear-gradient(
    135deg,
    rgba(30, 62, 43, 0.97) 0%,
    rgba(30, 62, 43, 0.92) 40%,
    rgba(20, 42, 30, 0.95) 100%
  );
}

.hero-pattern {
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.04) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,0.04) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(255,255,255,0.02) 0%, transparent 70%);
}

.hero-text-shadow {
  text-shadow: 0 4px 60px rgba(0,0,0,0.4);
}

/* ============================================
   BUTTON ENHANCEMENTS
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: 'Manrope', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: 0.25rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.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: left 0.5s ease;
}

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

.btn-primary {
  background-color: #1e3e2b;
  color: white;
  box-shadow: 0 4px 14px rgba(30, 62, 43, 0.3);
}

.btn-primary:hover {
  background-color: #152b1e;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(30, 62, 43, 0.4);
}

.btn-white {
  background-color: white;
  color: #1e3e2b;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

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

.btn-outline {
  background-color: transparent;
  border: 2px solid currentColor;
}

.btn-outline:hover {
  background-color: rgba(255,255,255,0.1);
  transform: translateY(-3px);
}

/* ============================================
   CARD ENHANCEMENTS WITH DEPTH
   ============================================ */

.card {
  background-color: white;
  border-radius: 0.75rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

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

/* Service Cards with accent bar */
.service-card {
  background: white;
  border-radius: 0.75rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.04);
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 0;
  background: linear-gradient(180deg, #1e3e2b 0%, #2d5a3f 100%);
  transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover::before {
  height: 100%;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 25px 50px rgba(30, 62, 43, 0.15);
}

/* ============================================
   ICON BOXES WITH ANIMATION
   ============================================ */

.icon-box {
  width: 4rem;
  height: 4rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(30, 62, 43, 0.08);
  color: #1e3e2b;
}

.group:hover .icon-box {
  background: #1e3e2b;
  color: white;
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 10px 30px rgba(30, 62, 43, 0.3);
}

/* ============================================
   TESTIMONIAL CARDS
   ============================================ */

.testimonial-card {
  background: white;
  border-radius: 1rem;
  padding: 2.5rem;
  position: relative;
  transition: all 0.4s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.04);
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: 1.5rem;
  left: 2rem;
  font-size: 6rem;
  font-family: 'Noto Serif', serif;
  color: #1e3e2b;
  opacity: 0.08;
  line-height: 1;
}

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

/* ============================================
   STATISTICS WITH ANIMATION
   ============================================ */

.stat-item {
  text-align: center;
  padding: 2rem;
}

.stat-number {
  font-family: 'Noto Serif', serif;
  font-size: 4rem;
  font-weight: 500;
  line-height: 1;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #1e3e2b 0%, #2d5a3f 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-item.light .stat-number {
  background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-family: 'Manrope', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.7;
}

/* Counter animation */
.counter[data-target] {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
}

.counter[data-target].counted {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   FORM STYLES ENHANCED
   ============================================ */

.form-input,
.form-textarea,
.form-select {
  border: 2px solid #e5e5e5;
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
  width: 100%;
  font-family: 'Manrope', sans-serif;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: white;
}

.form-input:hover,
.form-textarea:hover,
.form-select:hover {
  border-color: #c0c0c0;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: #1e3e2b;
  box-shadow: 0 0 0 4px rgba(30, 62, 43, 0.1);
  outline: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: #9ca3af;
}

/* ============================================
   SECTION DIVIDERS
   ============================================ */

.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(30, 62, 43, 0.2), transparent);
  margin: 0 auto;
  max-width: 200px;
}

/* ============================================
   GRADIENT TEXT
   ============================================ */

.gradient-text {
  background: linear-gradient(135deg, #1e3e2b 0%, #2d5a3f 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   SMOOTH SCROLL
   ============================================ */

html {
  scroll-behavior: smooth;
}

/* ============================================
   FOCUS STATES - ACCESSIBILITY
   ============================================ */

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid #1e3e2b;
  outline-offset: 2px;
}

/* ============================================
   WHATSAPP FLOATING BUTTON - ENHANCED
   ============================================ */

.whatsapp-btn {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 40;
}

.whatsapp-btn:hover {
  transform: scale(1.1) translateY(-4px);
  box-shadow: 0 10px 40px rgba(37, 211, 102, 0.5);
}

.whatsapp-btn::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  animation: pulse-ring 2s ease-out infinite;
  z-index: -1;
}

/* ============================================
   IMAGE OVERLAYS
   ============================================ */

.image-overlay-gradient {
  position: relative;
}

.image-overlay-gradient::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, transparent 40%, rgba(30, 62, 43, 0.9) 100%);
  pointer-events: none;
}

/* ============================================
   LOADING SKELETON
   ============================================ */

.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 0.5rem;
}

/* ============================================
   BADGE STYLES
   ============================================ */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.875rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 9999px;
  background: rgba(30, 62, 43, 0.1);
  color: #1e3e2b;
}

/* ============================================
   ERROR STATES
   ============================================ */

.error-message {
  display: block;
  margin-top: 0.5rem;
  color: #ef4444;
  font-size: 0.875rem;
}

input.error,
textarea.error {
  border-color: #ef4444 !important;
}

input.error:focus,
textarea.error:focus {
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15);
}

/* ============================================
   SCROLLBAR STYLING
   ============================================ */

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

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

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #1e3e2b 0%, #2d5a3f 100%);
  border-radius: 5px;
  border: 2px solid #f5f5f5;
}

::-webkit-scrollbar-thumb:hover {
  background: #152b1e;
}

/* ============================================
   SELECTION COLOR
   ============================================ */

::selection {
  background-color: rgba(30, 62, 43, 0.2);
  color: #1a1a1a;
}

/* ============================================
   SCREEN READER ONLY
   ============================================ */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================
   ACCESSIBILITY - REDUCED MOTION
   ============================================ */

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

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
  header,
  footer,
  .no-print,
  .whatsapp-btn {
    display: none !important;
  }

  body {
    font-size: 12pt;
    color: black;
    background: white;
  }

  .reveal,
  .reveal-left,
  .reveal-right,
  .reveal-scale {
    opacity: 1 !important;
    transform: none !important;
  }
}
