/* ========================
 * VARIABLES Y ESTILOS BASE
 * ======================== */

:root {
  --color-one: #07162d;
  --color-two: #9e1428;
  --color-three: #ffc857;
  --color-black: #07080a;
  --color-background: #f5f5f5;
  --color-text-light: #f1f5f9;
  --color-text-dark: #1e293b;
  --color-success: #4caf50;
  --color-warning: #ff9800;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ====================================
 * COMPONENTES REUTILIZABLES (BOTONES)
 * ================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.875rem 2rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
}

.btn:hover {
  transform: translateY(-3px);
}

.btn-primary {
  background-color: var(--color-one);
  color: var(--color-white);
}

.btn-primary:hover {
  background-color: var(--color-one);
}

.btn-highlight {
  background-color: var(--color-three);
  color: var(--color-black);
}

.btn-highlight:hover {
  background-color: var(--color-three);
}

.btn-pulse {
  animation: pulse-btn 2s infinite ease-in-out;
}

/* ==============================
 * ELEMENTOS DE LA INTERFAZ (UI)
 * ============================== */

#back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 7rem;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background-color: var(--color-dark-bg);
  color: var(--color-three);
  border-radius: 9999px;
  box-shadow: 0 4px 14px 0 rgba(0, 0, 0, 0.2);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out, box-shadow 0.3s ease;
}

#back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 7px 20px 0 rgba(0, 0, 0, 0.25);
}



/* =============
 * MEDIA QUERIES
* ============= */



@media (min-width: 768px) {
  #back-to-top {
    bottom: 1.5rem;
  }
}

/* ========================
 * ANIMACIONES (Keyframes)
* ======================== */

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    transform: translateX(8%);
    opacity: 0.6;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes pulse-btn {

  0%,
  100% {
    transform: scale(1);
    box-shadow: var(--shadow-base);
  }

  50% {
    transform: scale(1.02);
    box-shadow: var(--shadow-hover);
  }
}

@keyframes wave-hand {

  0%,
  100% {
    transform: rotate(0deg);
  }

  15% {
    transform: rotate(14deg);
  }

  30% {
    transform: rotate(-8deg);
  }

  45% {
    transform: rotate(14deg);
  }

  60% {
    transform: rotate(-4deg);
  }

  75% {
    transform: rotate(10deg);
  }
}

.animate-fade-in {
  animation: fadeIn 0.3s ease-out;
}

.animate-wave-hand {
  animation: wave-hand 2.5s infinite ease-in-out;
  transform-origin: 70% 70%;
}