/* ==================== VARIABLES ==================== */
:root {
  --bg-color: #071017;
  --card-bg: #0d1b2a;
  --text-color: #ffffff;
  --accent-color: #00d4ff;
  --card-white: #ffffff;
}

body.dark-mode {
  --bg-color: #ffffff;
  --card-bg: #f1f1f1;
  --text-color: #111111;
  --accent-color: #0077cc;
  --card-white: #ffffff;
}

/* ==================== BASE ==================== */
html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
}

/* ==================== BOTÓN MODO OSCURO ==================== */
#toggleTheme {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--accent-color);
  transition: transform 0.3s ease;
}

#toggleTheme:hover {
  transform: scale(1.2);
}

body {
  transition: background-color 0.5s ease, color 0.5s ease;
}

.contenedor-central,
.nav,
.nav-links li a,
.logo,
.contenido h1,
.contenido .btn,
.tarjeta,
.tarjeta h3,
.tarjeta p {
  transition: background-color 0.5s ease, color 0.5s ease, box-shadow 0.5s ease, transform 0.5s ease;
}

/* ==================== CONTENEDOR PRINCIPAL ==================== */
.contenedor-central {
  max-width: 1100px;
  margin: 40px auto;
  background-color: var(--card-bg);
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 0 20px rgba(0,0,0,0.3);
  color: var(--text-color);
}

/* ==================== NAVBAR ==================== */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 60px;
  position: relative;
}

.nav-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo {
  font-size: 22px;
  font-weight: bold;
  color: var(--text-color);
}

.logo-link{
    font-size: 22px;
    font-weight: bold;
    color: var(--text-color);
    text-decoration: none;
    border: none;
    padding: 0;
    background: none;
    display: inline-block;
    transition: color 0.3s ease;
}

.logo-link:hover{
    color: var(--accent-color);
}

.menu-toggle {
  display: none;
  font-size: 28px;
  background: none;
  color: var(--text-color);
  border: none;
  cursor: pointer;
}

.nav-links {
  display: flex;
  gap: 20px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-links li a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: bold;
  transition: color 0.3s;
}

.nav-links li a:hover {
  color: var(--accent-color);
}

/* ==================== RESPONSIVE NAV ==================== */
@media (max-width: 768px) {
  .nav {
    flex-direction: column;
    align-items: center;
  }

  .nav-top {
    width: 100%;
    flex-direction: column;
    align-items: center;
  }

  .menu-toggle {
    display: block;
    margin-top: 10px;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    align-items: center;
    background-color: var(--card-bg);
    width: 100%;
    padding: 20px 0;
    margin-top: 10px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  }

  .nav-links.show {
    display: flex;
  }

  .nav-links li {
    margin: 10px 0;
  }

  .logo {
    margin: 0;
    padding-top: 10px;
    font-size: 24px;
  }
  
}

/* ==================== CONTENIDO PRINCIPAL ==================== */
.contenido {
  text-align: center;
}

.contenido h1 {
  font-size: 36px;
  margin-bottom: 20px;
  color: var(--text-color);
}

.contenido .btn {
  background-color: var(--accent-color);
  color: var(--bg-color);
  padding: 12px 24px;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s;
  text-decoration: none;
}

.contenido .btn:hover {
  background-color: #00b3cc;
}

.contenido .btn:focus {
  outline: 2px solid #00b3cc;
  outline-offset: 2px;
}

/* ==================== TARJETAS ==================== */
.tarjetas {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}

.tarjeta {
  background-color: var(--card-white);
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 220px;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  opacity: 0;
  transform: translateY(0);
  animation: fadeUp 0.9s ease forwards;
}

.tarjeta img {
  transition: filter 0.5s ease;
}

body.dark-mode .tarjeta img {
  filter: brightness(0.85);
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tarjeta img {
  width: 80px;
  height: 80px;
  margin: 0 auto 10px;
}

.tarjeta h3 {
  margin-top: 10px;
  color: #0d1b2a; /*Tengo que ver como corregir este color para el modo oscuro*/
}

.tarjeta p {
  font-size: 14px;
  color:#0d1b2a; /*Al igual que lo anteior, tengo que corregir esto.*/
}

.tarjeta:hover {
  transform: translateY(-12px) scale(1.03);
  box-shadow: 0 15px 25px rgba(0, 212, 255, 0.4);
}

.tarjeta:nth-child(1) { animation-delay: 0.2s; }
.tarjeta:nth-child(2) { animation-delay: 0.6s; }
.tarjeta:nth-child(3) { animation-delay: 1s; }

@media (max-width: 768px) {
  .tarjetas {
    grid-template-columns: 1fr;
  }

  .contenido h1 {
    font-size: 28px;
  }
}

.contador-item {
  background-color: var(--card-bg);
  color: var(--text-color);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  padding: 30px;
  border-radius: 16px;
  transition: background-color 0.4s ease, color 0.4s ease;
}

.contador{
    color: #0d1b2a;
}
/* ==================== WHATSAPP FLOAT ==================== */
.whatsapp-float {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 1000;
  width: 60px;
  height: 60px;
  background-color: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.whatsapp-float img {
  width: 50px !important;
  height: 50px !important;
  object-fit: contain;
}

.whatsapp-float svg {
  fill: white;
}

.menu-wsp .pwsp {
  color: #000000; /* o el color fijo que quieras */
}


/*******Animación Splash ************/
#splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-color);
  color: var(--accent-color);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeOutSplash 1s ease 2s forwards;
}

.splash-logo {
  font-size: 36px;
  font-weight: bold;
  animation: zoomIn 1.2s ease;
}


/* ************Desefoque de imagen para facilitar la carga************** */
.lazy-img {
  filter: blur(20px);
  transition: filter 0.8s ease;
  opacity: 0.6;
}

.lazy-img.loaded {
  filter: blur(0);
  opacity: 1;
}

/* Animación de entrada */
@keyframes zoomIn {
  from {
    transform: scale(0.7);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Animación de salida */
@keyframes fadeOutSplash {
  to {
    opacity: 0;
    visibility: hidden;
  }
}





/* Notificación de modo oscuro con desvanecimiento */
.notificacion-tema {
  position: fixed;
  bottom: 30px;
  left: 30px;
  background-color: var(--accent-color);
  color: var(--bg-color);
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: bold;
  font-size: 14px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
  z-index: 9999;
}

.notificacion-tema.visible {
  opacity: 1;
}


/* estilos finales para cmbio al formualrio  */
/* Overlay de transición de página */
.page-fader{
  position: fixed;
  inset: 0;
  background: var(--bg-color);
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease;
  z-index: 9998;
}
.page-fader.show{ opacity: .85; pointer-events: auto; }

/* Loader circular */
.page-fader .loader{
  position: absolute;
  top: 50%; left: 50%;
  width: 42px; height: 42px;
  border: 3px solid rgba(255,255,255,.35);
  border-top-color: var(--accent-color);
  border-radius: 50%;
  transform: translate(-50%,-50%);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: translate(-50%,-50%) rotate(360deg); } }


