:root {
      /* Define tus variables globales de tipografía */
      --ff-sans: 'Montserrat', 'Raleway', 'Open Sans', sans-serif;
      --ff-serif: 'Playfair Display', 'Merriweather', serif;
      --ff-body: 'Roboto', 'Lato', sans-serif;
    }
    body {
      font-family: var(--ff-body);
      margin: 0;
      background: #121212;
      color: #f4f4f4;
    }
    h1 {
      text-align: center;
      margin-bottom: 1rem;
      color: #f4f4f4;
      margin-top: 140px;
      letter-spacing: 0.1em;
  
      /* Opcional: mejorar legibilidad */
      font-weight: 600;
      text-shadow: 2px 2px 7px rgba(255, 3, 3, 0.73);
    }
    .device-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

/* Responsive para diferentes pantallas */
@media (min-width: 768px) {
  .device-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .device-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}
.device-card {
  background: #fff;
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  height: 120px; /* Altura fija para todas */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 20px;
  display: flex;           /* convierte el h2 en flexbox */
  align-items: center;     /* centra vertical */
  justify-content: center; /* (opcional) centra horizontal */
  box-shadow: inset -2px -3px 7px rgba(0, 0, 0, 0.9);
}

.device-card:hover  {
box-shadow: inset -2px -3px 20px rgba(0, 0, 0,);
}
.device-card h2 {
  font-family: sans-serif;
  color: #121212;
  margin: 0 0 0px;
  margin-top: 10px;
  font-size: 20px;
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2; /* Para navegadores webkit */
  line-clamp: 2; /* Propiedad estándar */
  -webkit-box-orient: vertical;
  word-break: break-word;
}
    .device-card button {
      margin: 0.3rem;
      padding: 0.5rem 1rem;
      border: none;
      border-radius: 4px;
      cursor: pointer;
      font-size: 0.9rem;
      border-radius: 20px;
    }
    .on { background: #3498db; color: #fff; }
    .off { background: #dc3545; color: #fff; }
    #log {
      margin-top: 1.5rem;
      white-space: pre-wrap;
      background: #222;
      color: #eee;
      padding: 1rem;
      border-radius: 4px;
      max-height: 200px;
      overflow-y: auto;
    }
    span{
        position: relative;
        left: 0;
        display: block;
        text-align: center;
    }
    #countdown{
        font-size: 1.5rem;
        margin-bottom: 25px;
    }
    #textTiming {
        display: none;
    }
    /* Contenedor en esquina inferior derecha */
    #toast-container {
    position: fixed;
    bottom: 4rem;
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 9999;
    }

    /* Estilo de cada toast */
    .toast {
    background: rgba(255, 255, 255, 0.85);
    color:rgb(165, 5, 5);
    padding: 0.75rem 1rem;
    border-radius: 0.25rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    opacity: 0;
    transform: translateY(100%);
    animation: slide-in 0.3s forwards, fade-out 0.3s forwards;
    }

    /* Spinner base (oculto por defecto) */
    .loader {
      display: none;                /* oculto inicialmente */
      position: fixed;              /* overlay full-screen */
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(29, 29, 29, 0.7);
      z-index: 9999;

      /* Centrar el spinner */
      display: flex;
      align-items: center;
      justify-content: center;
    }

    /* El círculo giratorio */
    .loader::after {
      content: "";
      width: 60px;
      height: 60px;
      border: 8px solid #f3f3f3;
      border-top: 8px solid #3498db;
      border-radius: 50%;
      animation: spin 1s linear infinite;
    }

    .slide-element {
      position: absolute;
      top: 10px;
      left: 0;
      width: 100%;
      max-width: 700px;
      height: 80px;
      border-top-right-radius: 50px;
      border-bottom-right-radius: 50px;
      background-color: #ffffff;
      align-items: center;
      box-shadow: 2px 7px 20px rgba(255, 0, 0, 0.84);
      /* Empieza fuera */
      transform: translateX(-100vw);
    }
    p {
      margin: 5px;
      margin-left: 15px;
      color: #121212;
    }
    #logo{
      position: absolute;
      top: -10px;
      right: 0;
      width: 100px;
      height: 100px;
    }

    .slide-element.visible {
      animation: slideInBounce 1.1s ease-out forwards;
    }

    .icon-llave {
  display: inline-block;               /* Para que respete width/height */
  width: 32px;
  height: 32px;

  /* Imagen como fondo, sin máscara */
  background-image: url('../recursos/llave-de-casa-inteligente.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

/* Contenedor de descarga */
.download-card {
  position: relative;
  width: fit-content;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border-radius: 30px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  padding: 24px;
  text-align: center;
  box-shadow:
        0 4px 15px rgba(255, 3, 3, 0.53),
         inset -7px -10px 20px rgba(0, 0, 0);
}

/* Encabezado “StopTech Mobile” */
.download-card h2 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  color: #333;
  margin-bottom: 16px;
}

/* Botón de descarga */
.download-card .btn-red {
  background: #d32f2f;
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: 2rem;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: background 0.2s ease, transform 0.1s ease;
}

.download-card .btn-red:hover {
  background: #b71c1c;
  transform: translateY(-2px);
}

/* Icono encima de la tarjeta (opcional) */
.download-card .download-icon {
  width: 60px;
  margin-bottom: 12px;
}

/* Loader dentro de la tarjeta */
.download-card .loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Flecha señalando la zona de descargas en la parte inferior */
.browser-arrow {
  position: fixed;
  top: 60px;            /* distancia al borde inferior */
  right: 20px;
  margin-right: 20px;
  font-size: 8rem;
  color: #d32f2f;
  animation: bounce 1s infinite;
  pointer-events: none;    /* no molesta clicks */
  z-index: 9999;           /* por encima de todo */
}

.link-group {
  display: flex;
  justify-content: center;  /* centra horizontalmente todo el grupo */
  align-items: center;      /* centra verticalmente (si hubiera altura fija) */
  gap: 1.5rem;              /* espacio uniforme entre cada enlace */
  flex-wrap: wrap;          /* permite que en móvil los enlaces pasen a la siguiente línea */
  margin: 2rem 0;           /* opcional: separa el grupo del resto de contenido */
}

.link-group a {
  display: inline-block;    /* para que padding funcione bien */
  padding: 0.6rem 1.2rem;
  background: #d32f2f;      /* tu color de fondo */
  color: #fff;
  text-decoration: none;
  border-radius: 0.5rem;
  transition: background 0.2s;
}

.link-group a:hover {
  background: #b71c1c;
}

/* Ajustes responsivos: reduce gap y padding en pantallas muy pequeñas */
@media (max-width: 400px) {
  .link-group {
    gap: 1rem;
  }
  .link-group a {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
}

/* Reusa la animación de rebote */
@keyframes bounce {
  0%, 100% { transform: translate(-50%, 0) scale(1); }
  50%      { transform: translate(-50%, -10px) scale(1.1); }
}

/* Adaptación móvil */
@media (max-width: 600px) {
  .download-card {
    padding: 16px;
  }
  .download-card h2 {
    font-size: 1.25rem;
  }
  .download-card .btn-red {
    width: 100%;
    padding: 10px;
  }
}

/* Grúpo de botones lado a lado */
.btn-group {
  display: flex;
  justify-content: center;  /* centra el grupo */
  gap: 1rem;                /* espacio entre botones */
  flex-wrap: wrap;          /* en móvil pasarán a columna si hace falta */
  margin-top: 16px;
}

/* Ajuste específico de iOS (si quieres distinto padding) */
.btn-ios {
  background-color: #007AFF;
}

/* Responsive: en pantallas pequeñas, apilar */
@media (max-width: 400px) {
  .btn-group {
    flex-direction: column;
    gap: 0.75rem;
  }
}


    @keyframes slideInBounce {
      0%   { transform: translateX(-100vw); }
      60%  { transform: translateX(0px);    } /* se pasa un poquito */
      75%  { transform: translateX(-16px);  } /* rebote inverso */
      90%  { transform: translateX(-6px);   } /* último rebote suave */
      100% { transform: translateX(-10px);  }
    }

    /* Animación */
    @keyframes spin {
      from { transform: rotate(0deg); }
      to   { transform: rotate(360deg); }
    }

    /* Animación de entrada */
    @keyframes slide-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
    }
    /* Animación de salida (se ejecutará retrasada) */
    @keyframes fade-out {
    100% {
        opacity: 0;
        transform: translateY(100%);
    }
    }