/* ==========================================================================
   ANIMATION KEYFRAMES
   ========================================================================== */

/* Floating animation */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-15px); }
  100% { transform: translateY(0px); }
}

/* Blob animation */
@keyframes blob {
  0% { transform: translate(0px, 0px) scale(1); }
  33% { transform: translate(30px, -50px) scale(1.1); }
  66% { transform: translate(-20px, 20px) scale(0.9); }
  100% { transform: translate(0px, 0px) scale(1); }
}

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

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

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-30px); }
  to { opacity: 1; transform: translateY(0); }
}

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

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

/* Slide animations */
@keyframes slideInUp {
  from { transform: translateY(100px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes slideInDown {
  from { transform: translateY(-100px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

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

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

/* Pulse animation */
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(153, 27, 27, 0.4); }
  70% { box-shadow: 0 0 0 15px rgba(153, 27, 27, 0); }
  100% { box-shadow: 0 0 0 0 rgba(153, 27, 27, 0); }
}

/* Shake animation */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* ==========================================================================
   ANIMATION UTILITIES
   ========================================================================== */

/* Animation delays */
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }
.delay-600 { animation-delay: 600ms; }
.delay-700 { animation-delay: 700ms; }
.delay-800 { animation-delay: 800ms; }
.delay-900 { animation-delay: 900ms; }
.delay-1000 { animation-delay: 1s; }
.delay-1500 { animation-delay: 1.5s; }
.delay-2000 { animation-delay: 2s; }
.delay-3000 { animation-delay: 3s; }
.delay-4000 { animation-delay: 4s; }

/* Animation durations */
.duration-200 { animation-duration: 200ms; }
.duration-300 { animation-duration: 300ms; }
.duration-500 { animation-duration: 500ms; }
.duration-700 { animation-duration: 700ms; }
.duration-1000 { animation-duration: 1s; }
.duration-1500 { animation-duration: 1.5s; }
.duration-2000 { animation-duration: 2s; }

/* Animation fill modes */
.animate-fill-both { animation-fill-mode: both; }
.animate-fill-forwards { animation-fill-mode: forwards; }
.animate-fill-backwards { animation-fill-mode: backwards; }

/* Animation timing functions */
.animate-ease { animation-timing-function: ease; }
.animate-ease-in { animation-timing-function: ease-in; }
.animate-ease-out { animation-timing-function: ease-out; }
.animate-ease-in-out { animation-timing-function: ease-in-out; }
.animate-linear { animation-timing-function: linear; }

/* Animation classes */
.animate-float {
  animation: float 6s ease-in-out infinite;
}

.animate-pulse {
  animation: pulse 2s infinite;
}

.animate-shake {
  animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

/* Fade animations */
.animate-fade-in {
  animation: fadeIn 0.6s ease-out forwards;
  opacity: 0;
}

.animate-fade-up {
  animation: fadeInUp 0.6s ease-out forwards;
  opacity: 0;
}

.animate-fade-down {
  animation: fadeInDown 0.6s ease-out forwards;
  opacity: 0;
}

.animate-fade-left {
  animation: fadeInLeft 0.6s ease-out forwards;
  opacity: 0;
}

.animate-fade-right {
  animation: fadeInRight 0.6s ease-out forwards;
  opacity: 0;
}

/* Slide animations */
.animate-slide-up {
  animation: slideInUp 0.6s ease-out forwards;
  opacity: 0;
}

.animate-slide-down {
  animation: slideInDown 0.6s ease-out forwards;
  opacity: 0;
}

.animate-slide-left {
  animation: slideInLeft 0.6s ease-out forwards;
  opacity: 0;
}

.animate-slide-right {
  animation: slideInRight 0.6s ease-out forwards;
  opacity: 0;
}

/* Blob animations */
.animate-blob {
  animation: blob 7s infinite;
}

/* Hover animations */
.hover-scale {
  transition: transform 0.3s ease;
}

.hover-scale:hover {
  transform: scale(1.03);
}

.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* ==========================================================================
   CARD & COMPONENT STYLES
   ========================================================================== */

/* Card Styles */
.card {
  background-color: white;
  border-radius: 1rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  transition: all 0.3s ease;
  transform-origin: center bottom;
}

.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-0.5rem);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.card-image {
  width: 100%;
  height: 14rem;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.card:hover .card-image {
  transform: scale(1.05);
}

.card-content {
  padding: 1.5rem;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.card-description {
  color: #4b5563;
  margin-bottom: 1rem;
}

.card-meta {
  display: flex;
  align-items: center;
  font-size: 0.875rem;
  color: #6b7280;
}

.card-meta svg {
  width: 1rem;
  height: 1rem;
  margin-right: 0.5rem;
  color: #b91c1c;
}

/* Section Header Styles */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  background-color: #fee2e2;
  color: #991b1b;
  border-radius: 9999px;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 800;
  color: #111827;
  margin-bottom: 1rem;
}

.section-divider {
  width: 6rem;
  height: 0.375rem;
  margin: 0 auto 1.5rem;
  background: linear-gradient(90deg, #991b1b 0%, #b45309 100%);
  border-radius: 0.25rem;
  transition: all 0.3s ease;
}

.section-header:hover .section-divider {
  transform: scaleX(1.2);
}

/* Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.5rem;
  border-radius: 9999px;
  font-weight: 500;
  transition: all 0.3s ease;
  text-align: center;
  cursor: pointer;
  border: none;
  outline: none;
  position: relative;
  overflow: hidden;
}

.btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.5);
}

.btn-primary {
  background-color: #b91c1c;
  color: white;
}

.btn-primary:hover {
  background-color: #991b1b;
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

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

.btn-outline:hover {
  background-color: #fef2f2;
  transform: translateY(-2px);
}

.btn-lg {
  padding: 0.75rem 2rem;
  font-size: 1.125rem;
}

/* Utility Classes */
.gradient-text {
  background: linear-gradient(135deg, #991b1b 0%, #7f1d1d 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

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

/* Scroll reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* Animation for page transitions */
.page-enter {
  opacity: 0;
  transform: translateY(20px);
}

.page-enter-active {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 300ms, transform 300ms;
}

.page-exit {
  opacity: 1;
  transform: translateY(0);
}

.page-exit-active {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 300ms, transform 300ms;
}

/* Animation for cards */
.card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Animation for buttons */
.btn-animate {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-animate:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 14px rgba(0, 0, 0, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);
}

.btn-animate:active {
  transform: translateY(1px);
}

/* Animation for icons */
.icon-scale {
  transition: transform 0.3s ease;
}

.icon-scale:hover {
  transform: scale(1.2);
}

/* Animation for images */
.img-zoom {
  transition: transform 0.5s ease;
  overflow: hidden;
}

.img-zoom img {
  transition: transform 0.5s ease;
  width: 100%;
  height: auto;
}

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

/* Animation for text */
.text-gradient {
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-image: linear-gradient(45deg, #e53e3e, #dd6b20);
}

/* Animation for section headers */
.section-header {
  position: relative;
  display: inline-block;
  margin-bottom: 2rem;
}

.section-header:after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 50px;
  height: 3px;
  background: #e53e3e;
  transition: width 0.3s ease;
}

.section-header:hover:after {
  width: 100%;
}

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

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

/* Hover effects */
.hover-scale {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-scale:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Button animations */
.btn-pulse {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.btn-pulse:after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%, -50%);
  transform-origin: 50% 50%;
}

.btn-pulse:focus:not(:active)::after {
  animation: ripple 1s ease-out;
}

@keyframes ripple {
  0% {
    transform: scale(0, 0);
    opacity: 0.5;
  }
  100% {
    transform: scale(20, 20);
    opacity: 0;
  }
}

/* Scroll animations */
.animate-on-scroll {
  opacity: 0;
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: none;
}

/* Text animation */
.text-gradient {
  background: linear-gradient(90deg, #991b1b, #dc2626, #991b1b);
  background-size: 200% auto;
  color: #0000;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shine 3s linear infinite;
}

@keyframes shine {
  to {
    background-position: 200% center;
  }
}

/* Card flip */
.card-flip {
  perspective: 1000px;
}

.card-flip-inner {
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.card-flip:hover .card-flip-inner {
  transform: rotateY(180deg);
}

.card-flip-front, .card-flip-back {
  backface-visibility: hidden;
}

.card-flip-back {
  transform: rotateY(180deg);
}

/* Bounce animation */
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.bounce-animation {
  animation: bounce 2s infinite;
}

/* Pulse animation */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.pulse-animation {
  animation: pulse 2s infinite;
}
