/* ====================================
   DLR Consultora - Animations
   ==================================== */

/* ====================================
   Easing Variables
   ==================================== */
:root {
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --anim-duration: 0.7s;
}

/* ====================================
   Fade In Scroll (generic)
   ==================================== */
.fade-in-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity var(--anim-duration) var(--ease-out-expo),
              transform var(--anim-duration) var(--ease-out-expo);
}

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

/* ====================================
   Slide In from Left
   ==================================== */
.slide-in-left {
  opacity: 0;
  transform: translateX(-90px);
  transition: opacity var(--anim-duration) var(--ease-spring),
              transform var(--anim-duration) var(--ease-spring);
}

.slide-in-left.animate-in {
  opacity: 1;
  transform: translateX(0);
}

/* ====================================
   Slide In from Right
   ==================================== */
.slide-in-right {
  opacity: 0;
  transform: translateX(90px);
  transition: opacity var(--anim-duration) var(--ease-spring),
              transform var(--anim-duration) var(--ease-spring);
}

.slide-in-right.animate-in {
  opacity: 1;
  transform: translateX(0);
}

/* ====================================
   Slide Up (gallery items, cards)
   ==================================== */
.slide-up {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 0.65s var(--ease-spring),
              transform 0.65s var(--ease-spring);
}

.slide-up.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* ====================================
   Scale In (stats, icons)
   ==================================== */
.scale-in {
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.55s var(--ease-spring),
              transform 0.55s var(--ease-spring);
}

.scale-in.animate-in {
  opacity: 1;
  transform: scale(1);
}

/* ====================================
   Hover Animations
   ==================================== */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-5px);
}

/* ====================================
   Button Pulse
   ==================================== */
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(147, 122, 81, 0.6); }
  70%  { box-shadow: 0 0 0 12px rgba(147, 122, 81, 0); }
  100% { box-shadow: 0 0 0 0 rgba(147, 122, 81, 0); }
}

.pulse-on-hover:hover {
  animation: pulse 1.5s infinite;
}

/* ====================================
   Scroll Progress Bar
   ==================================== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #937a51 0%, #d1b480 100%);
  transform-origin: left;
  transform: scaleX(0);
  z-index: 9999;
  pointer-events: none;
}

/* ====================================
   Parallax
   ==================================== */
.parallax {
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

/* ====================================
   Image Zoom on Hover
   ==================================== */
.zoom-on-hover {
  overflow: hidden;
}

.zoom-on-hover img {
  transition: transform 0.5s ease;
}

.zoom-on-hover:hover img {
  transform: scale(1.1);
}

/* ====================================
   Underline Animate (nav links)
   ==================================== */
.underline-animate {
  position: relative;
  display: inline-block;
}

.underline-animate::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #937a51 0%, #d1b480 100%);
  transition: width 0.3s ease;
}

.underline-animate:hover::after {
  width: 100%;
}

/* ====================================
   Shake (form errors)
   ==================================== */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.shake {
  animation: shake 0.4s ease;
}

/* ====================================
   Slide Down (mobile menu)
   ==================================== */
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.slide-down {
  animation: slideDown 0.3s var(--ease-out-expo) forwards;
}

/* ====================================
   Spinner
   ==================================== */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner {
  border: 3px solid rgba(147, 122, 81, 0.15);
  border-top-color: #937a51;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 0.9s linear infinite;
  margin: 0 auto;
}

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

  .fade-in-scroll,
  .slide-in-left,
  .slide-in-right,
  .slide-up,
  .scale-in {
    opacity: 1;
    transform: none;
  }
}
