@import "tailwindcss";

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans",
    "Droid Sans", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

.animate-fadeInUp {
  animation: fadeInUp 0.6s ease-out;
}

/* Mejoras para el backdrop blur en navegadores más antiguos */


/* Estilos para el scroll suave */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}


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

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

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  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(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

.animate-fadeIn {
  animation: fadeIn 0.6s ease-out forwards;
}

.animate-slideInLeft {
  animation: slideInLeft 0.6s ease-out forwards;
}

.animate-slideInRight {
  animation: slideInRight 0.6s ease-out forwards;
}

.animate-scaleIn {
  animation: scaleIn 0.6s ease-out forwards;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

/* Custom scrollbar */
/* Clase para scroll personalizado */
.scroll-x::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

.scroll-x::-webkit-scrollbar-thumb {
  background: #4470b3;
  border-radius: 9999px;
}

/* Custom scrollbar */
/* Clase para scroll personalizado */
.scroll-x::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

.scroll-x::-webkit-scrollbar-thumb {
  background: #4470b3;
  border-radius: 9999px;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

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

::-webkit-scrollbar-thumb {
  background: #4470b3;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #69a742;
}

/* Line clamp utilities */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Backdrop blur fallback */
/* Custom gradient backgrounds */
.bg-gradient-municipal {
  background: linear-gradient(135deg, #4470b3 0%, #69a742 100%);
}

/* Hover effects */
.hover-lift {
  transition: all 0.3s ease;
}

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

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

.animate-spin {
  animation: spin 1s linear infinite;
}

/* Pulse animation */
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

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

/* Focus styles */
.focus-ring {
  @apply focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500;
}

/* Responsive text */
@media (max-width: 640px) {
  .text-responsive {
    font-size: clamp(1.5rem, 4vw, 2rem);
  }
}

/* Custom button styles */
.btn-primary {
  @apply bg-gradient-to-r from-blue-600 to-green-600 hover:from-green-600 hover:to-blue-600 text-white font-medium py-3 px-6 rounded-lg transition-all duration-300 hover:scale-105 hover:shadow-lg;
}

.btn-secondary {
  @apply bg-white text-blue-600 border-2 border-blue-600 hover:bg-blue-600 hover:text-white font-medium py-3 px-6 rounded-lg transition-all duration-300 hover:scale-105;
}

.video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* Relación 16:9 */
  height: 0;
  overflow: hidden;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Animaciones de fragmentos de Iconos */
/* Animación del scale + luz */
@keyframes pop-light {
  0% {
    filter: brightness(1);
  }
  40% {
    filter: brightness(1.2);
  }
  100% {
    filter: brightness(1);
  }
}

.transition-left-to-center {
  animation: slide-in-elliptic-top-fwd 1s cubic-bezier(0.68, -0.6, 0.32, 1.6) both, pop-light 0.7s ease-out 1s;
}

/**
 * Animación más curva y suave
 */
@keyframes slide-in-elliptic-top-fwd {
  0% {
    transform: translate(-300px, -50px) rotateX(-30deg) scale(0.6);
    transform-origin: 50% 100%;
    opacity: 0;
  }
  80% {
    transform: translate(90px, 10px) rotateX(5deg) scale(1.05); /* se pasa bastante */
    opacity: 1;
  }
  100% {
    transform: translate(0, 0) rotateX(0) scale(1);
    transform-origin: 50% 400px;
    opacity: 1;
  }
}

.transition-right-to-left {
  animation: slide-transition-right-to-left 1s cubic-bezier(0.68, -0.6, 0.32, 1.6) both, pop-light 0.7s ease-out 1s;
}

/**
 * Animación más curva y suave
 */
@keyframes slide-transition-right-to-left {
  0% {
    transform: translate(300px, 50px) rotateX(-30deg) scale(0.6);
    transform-origin: 50% 100%;
    opacity: 0;
  }
  80% {
    transform: translate(-90px, -10px) rotateX(5deg) scale(1.05); /* se pasa bastante */
    opacity: 1;
  }
  100% {
    transform: translate(0, 0) rotateX(0) scale(1);
    transform-origin: 50% -400px;
    opacity: 1;
  }
}

/* .transition-bottom-to-center {
	animation: slide-transition-bottom-to-center 0.7s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
  transition-delay: 500ms;
} */

.transition-bottom-to-center {
  animation-name: slide-transition-bottom-to-center;
  animation-duration: 0.7s;
  animation-timing-function: cubic-bezier(0.250, 0.460, 0.450, 0.940);
  animation-delay: 400ms;           /* <- aquí el delay correcto */
  animation-fill-mode: both;        /* opcional: mantiene estados antes/después */
}

@keyframes slide-transition-bottom-to-center {
  0% {
    transform: translateY(600px) rotateX(30deg) scale(0);
    transform-origin: 50% 100%;
    opacity: 0;
  }
  100% {
    transform: translateY(0) rotateX(0) scale(1);
    transform-origin: 50% -1400px;
    opacity: 1;
  }
}

/* Efecto adicional para más realismo */
/* Efecto de reflejo tipo moneda - diagonal y rápido */
.coin-reflection {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    transparent 20%,
    rgba(255, 255, 255, 0.1) 35%,
    rgba(255, 255, 255, 0.9) 50%,
    rgba(255, 255, 255, 0.1) 65%,
    transparent 80%
  );
  animation: coinReflectionDiagonal 0.6s ease-out forwards;
  pointer-events: none;
}

@keyframes coinReflectionDiagonal {
  0% {
    transform: translate(-150%, -150%) rotate(45deg) scale(0.8);
    opacity: 0;
  }

  15% {
    opacity: 0.3;
    transform: translate(-120%, -120%) rotate(45deg) scale(0.9);
  }

  50% {
    opacity: 1;
    transform: translate(-20%, -20%) rotate(45deg) scale(1);
  }

  85% {
    opacity: 0.4;
    transform: translate(120%, 120%) rotate(45deg) scale(1.1);
  }

  100% {
    transform: translate(150%, 150%) rotate(45deg) scale(1.2);
    opacity: 0;
  }
}

.cut-rectangulo-medio {
  clip-path: polygon(0 0, 100% 0, 0% 100%);
}