/**
 * Estilos personalizados
 * Reclamaciones Zero - Generador de Denuncias
 */

/* ============================
   ANIMACIONES AVANZADAS
   ============================ */

@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 float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

@keyframes gradientFlow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

/* Clases de animación */
.animate-fadeIn {
  animation: fadeIn 0.3s ease-out;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ============================
   HERO SECTION
   ============================ */

.hero-section {
  position: relative;
  min-height: 500px;
}

/* Asegurar que la onda quede bien posicionada */
.hero-section > div:last-child svg {
  display: block;
  width: 100%;
}

/* ============================
   MOCKUP DE TELÉFONO (HERO)
   ============================ */

.phone-mockup {
  transform: perspective(1000px) rotateY(-8deg) rotateX(2deg);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 25px 50px rgba(0, 0, 0, 0.3));
}

.phone-mockup:hover {
  transform: perspective(1000px) rotateY(0deg) rotateX(0deg) scale(1.02);
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.35));
}

.phone-frame {
  position: relative;
}

.phone-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.4) 0%,
    transparent 50%
  );
  border-radius: 2.5rem;
  pointer-events: none;
}

.animate-spin {
  animation: spin 1s linear infinite;
}

.animate-shake {
  animation: shake 0.5s ease-in-out;
}

/* Drag and Drop Zone */
.drop-zone-active {
  border-color: #16a34a !important;
  background-color: #f0fdf4 !important;
  transform: scale(1.02);
}

.drop-zone-error {
  border-color: #ef4444 !important;
  background-color: #fef2f2 !important;
}

/* Preview de archivos */
.file-preview-item {
  position: relative;
  border-radius: 0.75rem;
  overflow: hidden;
  transition: all 0.2s ease;
}

.file-preview-item:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.file-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.file-preview-item .delete-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 1.75rem;
  height: 1.75rem;
  background: rgba(239, 68, 68, 0.9);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.file-preview-item:hover .delete-btn {
  opacity: 1;
}

.file-preview-item .delete-btn:hover {
  background: #dc2626;
}

.file-preview-item .file-name {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  color: white;
  padding: 1.5rem 0.5rem 0.5rem;
  font-size: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Loading overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid #e5e7eb;
  border-top-color: #16a34a;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loading-text {
  margin-top: 1.5rem;
  font-size: 1.125rem;
  color: #374151;
  text-align: center;
}

.loading-subtext {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #6b7280;
}

/* Form validation */
input:invalid:not(:placeholder-shown),
textarea:invalid:not(:placeholder-shown),
select:invalid:not(:placeholder-shown) {
  border-color: #ef4444;
}

input:valid:not(:placeholder-shown),
textarea:valid:not(:placeholder-shown),
select:valid:not([value=""]) {
  border-color: #16a34a;
}

/* Checkbox custom */
input[type="checkbox"] {
  cursor: pointer;
}

input[type="checkbox"]:checked {
  background-color: #16a34a;
  border-color: #16a34a;
}

/* Toast notifications */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  padding: 1rem 1.5rem;
  border-radius: 0.75rem;
  color: white;
  font-weight: 500;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
  animation: fadeIn 0.3s ease-out;
  z-index: 9999;
}

.toast-success {
  background: linear-gradient(135deg, #16a34a, #15803d);
}

.toast-error {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.toast-warning {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .toast {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
  }
}

/* Print styles */
@media print {
  body {
    font-size: 11pt;
    line-height: 1.5;
    color: black;
    background: white;
  }

  nav,
  footer,
  .no-print,
  button,
  .toast {
    display: none !important;
  }

  a {
    text-decoration: none;
    color: black;
  }

  .shadow-lg,
  .shadow-md,
  .shadow-sm {
    box-shadow: none !important;
  }

  .rounded-2xl,
  .rounded-xl {
    border-radius: 0 !important;
  }
}

/* Focus states for accessibility */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid #16a34a;
  outline-offset: 2px;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a1a1a1;
}

/* ============================
   ESTILOS MODERNOS ADICIONALES
   ============================ */

/* Clases de animación nuevas */
.animate-fadeInUp {
  animation: fadeInUp 0.6s ease-out forwards;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-shimmer {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.animate-bounceIn {
  animation: bounceIn 0.6s ease-out;
}

.animate-gradient {
  background-size: 200% 200%;
  animation: gradientFlow 3s ease infinite;
}

/* Inputs mejorados */
input,
textarea,
select {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

input:focus,
textarea:focus,
select:focus {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px -5px rgba(22, 163, 74, 0.25);
}

/* Glassmorphism */
.glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

/* Gradientes de texto */
.text-gradient {
  background: linear-gradient(135deg, #16a34a 0%, #14b8a6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Efecto hover suave para cards */
.card-hover {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

/* Botón con efecto de onda */
.btn-ripple {
  position: relative;
  overflow: hidden;
}

.btn-ripple::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition:
    width 0.6s ease,
    height 0.6s ease;
}

.btn-ripple:active::after {
  width: 300px;
  height: 300px;
}

/* Efecto de brillo en hover */
.shine-effect {
  position: relative;
  overflow: hidden;
}

.shine-effect::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.shine-effect:hover::before {
  left: 100%;
}

/* Labels animados */
.input-group {
  position: relative;
}

.input-group label {
  transition: all 0.3s ease;
}

.input-group:focus-within label {
  color: #16a34a;
}

/* Checkbox mejorado */
input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid #d1d5db;
  border-radius: 0.375rem;
  transition: all 0.2s ease;
  position: relative;
  cursor: pointer;
}

input[type="checkbox"]:checked {
  background: linear-gradient(135deg, #16a34a, #15803d);
  border-color: #16a34a;
}

input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 6px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

input[type="checkbox"]:hover {
  border-color: #16a34a;
}

input[type="checkbox"]:focus {
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.2);
}

/* Select mejorado */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.25rem;
  padding-right: 3rem;
}

/* Textarea con contador */
textarea {
  min-height: 150px;
}

/* Loading dots animation */
.loading-dots {
  display: inline-flex;
  gap: 4px;
}

.loading-dots span {
  width: 8px;
  height: 8px;
  background: #16a34a;
  border-radius: 50%;
  animation: bounce 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) {
  animation-delay: -0.32s;
}
.loading-dots span:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes bounce {
  0%,
  80%,
  100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}

/* Pulse ring effect */
.pulse-ring {
  position: relative;
}

.pulse-ring::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  background: rgba(22, 163, 74, 0.2);
  animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse-ring {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0;
    transform: scale(1.1);
  }
}

/* Sombras suaves personalizadas */
.shadow-soft {
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.05),
    0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.shadow-soft-lg {
  box-shadow:
    0 10px 15px -3px rgba(0, 0, 0, 0.05),
    0 20px 25px -5px rgba(0, 0, 0, 0.05);
}

/* Transiciones para secciones del formulario */
.form-section {
  opacity: 0;
  animation: fadeInUp 0.5s ease forwards;
}

.form-section:nth-child(1) {
  animation-delay: 0.1s;
}
.form-section:nth-child(2) {
  animation-delay: 0.2s;
}
.form-section:nth-child(3) {
  animation-delay: 0.3s;
}
.form-section:nth-child(4) {
  animation-delay: 0.4s;
}
.form-section:nth-child(5) {
  animation-delay: 0.5s;
}

/* Badge animado */
.badge-pulse {
  position: relative;
}

.badge-pulse::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 8px;
  height: 8px;
  background: #16a34a;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

/* Efecto de entrada escalonada */
.stagger-in > * {
  opacity: 0;
  animation: fadeInUp 0.5s ease forwards;
}

.stagger-in > *:nth-child(1) {
  animation-delay: 0.1s;
}
.stagger-in > *:nth-child(2) {
  animation-delay: 0.15s;
}
.stagger-in > *:nth-child(3) {
  animation-delay: 0.2s;
}
.stagger-in > *:nth-child(4) {
  animation-delay: 0.25s;
}
.stagger-in > *:nth-child(5) {
  animation-delay: 0.3s;
}
