body {
  font-family: "Comfortaa", sans-serif;
  /* Fondo exacto de la aplicación (img/fondo-verde.jpg), siempre ajustado a la ventana */
  background: #f1f8ea url(img/fondo-verde.jpg) center / 100% 100% no-repeat fixed;
  color: #1b1647;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Logo grande, centrado y con poca opacidad */
.watermark {
  position: fixed;
  inset: 4%;
  background: url(img/logo-dos.png) center / contain no-repeat;
  opacity: 0.16;
  pointer-events: none;
  z-index: 0;
}

.topbar { position: relative; z-index: 2; }
.info {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
  margin: 0;
  padding: 25px 15px;
  background-color: rgba(57, 48, 133, 0.82);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  line-height: 1.5;
}
.info a { color: inherit; text-decoration: none; }
.info a:hover { text-decoration: underline; }

.main-wrapper {
  position: relative;
  z-index: 1;
  flex: 1;
  box-sizing: border-box;
  width: 100%;
  max-width: 904px; /* 5 cuadrados por fila */
  margin: 0 auto;
  padding: 3em 16px 5em;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-content: center;
  align-items: center;
  gap: 4.5em 64px;
}

/* Cuadrados: todos iguales, blanco casi transparente */
.badge {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 10px 24px rgba(57, 48, 133, 0.28), 0 2px 6px rgba(57, 48, 133, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #393085;
  text-decoration: none;
  top: 0;
  transition: top 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.badge:hover,
.badge:focus-visible {
  top: -4px;
  background: rgba(255, 255, 255, 0.45);
  box-shadow: 0 16px 32px rgba(57, 48, 133, 0.36), 0 4px 10px rgba(57, 48, 133, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  outline: none;
}
.badge.soon { cursor: default; }

.badge img {
  max-width: 82px;
  max-height: 60px;
  margin-top: -6px;
  width: auto;
  height: auto;
}
.badge > i.fa:not(.info-app) { font-size: 2.8em; }

.badge .info-app {
  position: absolute;
  right: 9px;
  bottom: 7px;
  font-size: 1.15em;
  color: #393085;
  opacity: 0.6;
}

/* Acceso remoto: arriba a la derecha, bajo la barra */
.remote {
  position: absolute;
  top: calc(100% + 16px);
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #393085;
  color: #fff;
  font-size: 1.6em;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(57, 48, 133, 0.35), 0 2px 6px rgba(57, 48, 133, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.remote:hover,
.remote:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 16px 32px rgba(57, 48, 133, 0.45), 0 4px 10px rgba(57, 48, 133, 0.25);
  outline: none;
}
.remote .label {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  white-space: nowrap;
  padding: 8px 14px;
  border-radius: 6px;
  background: #393085;
  color: #fff;
  font-size: 15px;
  font-family: "Comfortaa", sans-serif;
  text-transform: uppercase;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s;
}
.remote:hover .label,
.remote:focus-visible .label { opacity: 1; visibility: visible; }

/* Cartel: aparece al pasar el ratón */
.badge .label {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translate(-50%, -6px);
  white-space: nowrap;
  padding: 8px 14px;
  border-radius: 6px;
  background: #393085;
  color: #fff;
  font-size: 15px;
  text-transform: uppercase;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}
.badge .label small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  opacity: 0.8;
  text-transform: none;
}
.badge:hover .label,
.badge:focus-visible .label {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

/* En pantallas táctiles no hay "hover": el cartel se muestra siempre */
@media (hover: none) {
  .badge .label { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
  .remote .label { opacity: 1; visibility: visible; }
}

@media (max-width: 600px) {
  .main-wrapper { gap: 4.5em 2.5em; }
  .remote { right: 12px; }
}
