@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300..700&display=swap");

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ===========================
   PALETA DE COLORES PRINCIPAL
   =========================== */
:root {
  --color-primary: #e61919;
  --color-primary-dark: #c62828;
  --color-secondary: #fdecea;
  --color-gray-dark: #212121;
  --color-gray-medium: #757575;
  --color-gray-light: #e0e0e0;
  --color-gray-light: #dddddd;
  --color-white: #ffffff;
  --color-medium-dark: #3939393d;
  --color-medium-light: #f5f5f5;
  --background: #ffffff;
  --foreground: #212121;
  --primary: #e61919;
  --primary-foreground: #ffffff;
  --secondary: #fdecea;
  --secondary-foreground: #212121;
  --accent: #f1f5f9;
  --accent-foreground: #212121;
  --muted: #f1f5f9;
  --muted-foreground: #64748b;
  --border: #e2e8f0;
  --input: #e2e8f0;
  --ring: #e61919;
  --destructive: #e61919;
  --destructive-foreground: #ffffff;
  --popover: #ffffff;
  --popover-foreground: #212121;
}

/* ===========================
   ESTILOS GENERALES
   =========================== */
body {
  font-family: "Space Grotesk", sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

h1,
h2,
h3 {
  font-weight: 700;
  color: var(--foreground);
  font-family: "Space Grotesk", sans-serif;
}

p {
  color: var(--muted-foreground);
}

/* ===========================
   TEXTOS
   =========================== */

.text-primary {
  color: var(--primary);
}

/* ===========================
   ENCABEZADO PRINCIPAL
   =========================== */
.hero {
  text-align: center;
  padding: 4rem 2rem;
}

.hero span {
  color: var(--color-primary);
}

.hero p {
  max-width: 700px;
  margin: 1rem auto 3rem auto !important;
  font-weight: 400;
  color: var(--color-gray-medium);
  line-height: 1.4;
}

.bg-white {
  background-color: var(--background);
}

.bg-gradient-primary {
  background: linear-gradient(
    322deg,
    var(--color-secondary) 10%,
    var(--color-white) 52%,
    var(--color-secondary) 100%
  ) !important;
}

.bg-primary-10 {
  background-color: #f8e1e1;
}

.bg-secondary-10 {
  background-color: #fdf3f3;
}

.border-secondary-10 {
  border: 1px solid #fadddd;
}

.bg-gray-light {
  background-color: #f3f4f6;
}

.border-gray-light {
  border: #e5e7eb 1px solid;
}

.border-primary {
  border: 1px solid var(--primary);
}

.bg-foreground {
  background-color: var(--foreground);
}

.bg-primary {
  background-color: var(--primary);
}

.bg-gray-superlight {
  background-color: #f9f9f9;
}

.bg-accent {
  background-color: var(--accent);
}

.bg-secondary {
  background-color: var(--secondary);
}

.bg-muted {
  background-color: var(--muted);
}

.bg-transparent {
  background-color: transparent;
}

.bg-border {
  background-color: var(--border);
}

.bg-input {
  background-color: var(--input);
}

.bg-ring {
  background-color: var(--ring);
}

.bg-destructive {
  background-color: var(--destructive);
}

.bg-popover {
  background-color: var(--popover);
}

.text-foreground {
  color: var(--foreground);
}

.text-muted-foreground {
  color: var(--muted-foreground);
}

.text-accent-foreground {
  color: var(--accent-foreground);
}

.text-secondary-foreground {
  color: var(--secondary-foreground);
}

.text-primary-foreground {
  color: var(--primary-foreground);
}

.text-destructive {
  color: var(--destructive);
}

.text-destructive-foreground {
  color: var(--destructive-foreground);
}

.text-popover-foreground {
  color: var(--popover-foreground);
}

.border-border {
  border-color: var(--border);
}

.border-input {
  border-color: var(--input);
}

.ring-ring {
  --tw-ring-color: var(--ring);
}

.ring-offset-background {
  --tw-ring-offset-color: var(--background);
}

.hover\:bg-accent:hover {
  background-color: var(--accent);
}

.hover\:bg-primary\/90:hover {
  background-color: color-mix(in srgb, var(--primary) 90%, transparent);
}

.hover\:bg-primary\/10:hover {
  background-color: color-mix(in srgb, var(--primary) 10%, transparent);
}

.hover\:bg-secondary:hover,
.hover\:bg-secondary\/40:hover {
  background-color: var(--secondary);
}

.hover\:bg-muted:hover,
.hover\:bg-muted\/30:hover,
.hover\:bg-muted\/50:hover {
  background-color: var(--muted);
}

.hover\:bg-destructive:hover {
  background-color: var(--destructive);
}

.hover\:text-foreground:hover {
  color: var(--foreground);
}

.hover\:text-accent-foreground:hover {
  color: var(--accent-foreground);
}

.hover\:text-destructive:hover {
  color: var(--destructive);
}

.hover\:border-primary:hover {
  border-color: var(--primary);
}

.focus\:bg-accent:focus {
  background-color: var(--accent);
}

.focus\:ring-ring:focus {
  --tw-ring-color: var(--ring);
}

.focus-visible\:ring-ring:focus-visible {
  --tw-ring-color: var(--ring);
}

.focus-visible\:outline-none:focus-visible {
  outline: 2px solid transparent;
  outline-offset: 2px;
}

.focus-visible\:ring-1:focus-visible {
  --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0
    var(--tw-ring-offset-width) var(--tw-ring-offset-color);
  --tw-ring-shadow: var(--tw-ring-inset) 0 0 0
    calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);
  box-shadow:
    var(--tw-ring-offset-shadow), var(--tw-ring-shadow),
    var(--tw-shadow, 0 0 #0000);
}

[data-state="checked"].bg-primary {
  background-color: var(--primary);
}

[data-state="checked"].text-primary-foreground {
  color: var(--primary-foreground);
}

.transition-colors {
  transition-property:
    color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.placeholder\:text-muted-foreground::placeholder {
  color: var(--muted-foreground);
}

.data-\[placeholder\]\:text-muted-foreground[data-placeholder] {
  color: var(--muted-foreground);
}

.divide-border > :not([hidden]) ~ :not([hidden]) {
  border-color: var(--border);
}

.shadow {
  box-shadow:
    0 1px 3px 0 rgb(0 0 0 / 0.1),
    0 1px 2px -1px rgb(0 0 0 / 0.1);
}

.shadow-sm {
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}
/* ===========================
   BOTONES PERSONALIZADOS
   =========================== */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

.btn-secondary {
  background-color: transparent;
  color: var(--muted-foreground);
  border: 2px solid var(--border);
}

.btn-light-dark {
  background-color: transparent;
  color: var(--foreground);
  border: 1px solid var(--border);
}

/* ===========================
   TARJETAS DE INFORMACIÓN
   =========================== */
.cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  padding: 3rem 2rem;
}

.card {
  width: 300px;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.card-red {
  background-color: var(--color-secondary);
  border-left: 5px solid var(--color-primary);
}

.card-gray {
  background-color: var(--color-gray-light);
  border-left: 5px solid var(--color-gray-medium);
}

.card h3 {
  margin-top: 0;
  color: var(--color-gray-dark);
}

.card p {
  font-size: 0.95rem;
}

/* ===========================
   ANIMACIONES
   =========================== */

@keyframes fadeIn {
  from {
    top: 3rem;
    opacity: 0;
  }
  to {
    top: 0rem;
    opacity: 1;
  }
}

.position-relative {
  position: relative;
}

.fade-in {
  animation: fadeIn 0.5s ease-in-out;
}

/* ===========================
   RESPONSIVE DESIGN & ANIMACIONES DE MODALES Y TOASTS
   =========================== */
@keyframes modalPop {
  0% {
    opacity: 0;
    transform: scale(0.92) translateY(10px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes toastSlideIn {
  0% {
    opacity: 0;
    transform: translateX(100%) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes toastSlideOut {
  0% {
    opacity: 1;
    transform: translateX(0);
  }
  100% {
    opacity: 0;
    transform: translateX(100%);
  }
}

@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(230, 25, 25, 0.4);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(230, 25, 25, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(230, 25, 25, 0);
  }
}

.animate-modal-pop {
  animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-toast-in {
  animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-toast-out {
  animation: toastSlideOut 0.25s ease-in forwards;
}

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

.hover-lift:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px -6px rgba(0, 0, 0, 0.08), 0 4px 8px -4px rgba(0, 0, 0, 0.04);
}

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

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }

  .cards {
    flex-direction: column;
    align-items: center;
  }

  .card {
    width: 90%;
  }
}

/* Estilos de impresión de Tarjeta Física QR */
@media print {
  body * {
    visibility: hidden !important;
  }
  #printableCard, #printableCard * {
    visibility: visible !important;
  }
  #printableCard {
    position: fixed !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 340px !important;
    border-radius: 24px !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: none !important;
    padding: 24px !important;
    background: #ffffff !important;
  }
}
