/* 🌊 Fondo y base */
body {
  margin: 0;
  font-family: "Segoe UI", sans-serif;
  background: url("/img/web.png") center/cover no-repeat fixed;
  color: #fff;
}

/* 🔝 HEADER */
header {
  display: flex;
  align-items: center;
  padding: 20px;
  background-color: rgba(0, 0, 0, 0.6);
}

header img {
  height: 100px;
  margin-right: 20px;
}

header h1 {
  font-size: 2rem;
  font-weight: bold;
}

/* 🧩 Grilla tipo cruz (4 cuadrantes) */
.grid-pantalla {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  height: calc(100vh - 140px); /* alto total menos header aprox */
}

/* Cada cuadrante */
.bloque-cuadrante {
  padding: 15px 10px 25px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

/* Líneas de la cruz */
.zona-superior {
  border-bottom: 2px solid rgba(255, 255, 255, 0.35);
}

.zona-izquierda {
  border-right: 2px solid rgba(255, 255, 255, 0.35);
}

/* 🏷 Títulos de bloque */
.bloque-titulo {
  text-align: center;
  margin-top: 5px;
  margin-bottom: 10px;
  font-size: 1.1rem;
  font-weight: bold;
  padding: 5px 12px;
  border-radius: 999px;
  display: inline-block;
  text-shadow: 1px 1px 4px #000;
}

/* Colores de los títulos */
.titulo-rojo  { background-color: rgba(207, 54, 54, 0.9); }
.titulo-azul  { background-color: rgba(54, 96, 207, 0.9); }
.titulo-verde { background-color: rgba(24, 140, 88, 0.9); }
.titulo-gris  { background-color: rgba(120, 120, 120, 0.9); }

/* 📦 Contenedor de tarjetas dentro de cada cuadrante */
/* 👉 Ajustado para permitir hasta 8 (4x2) por sección */
.contenedor {
  padding: 10px 5px 5px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

/* 💳 Tarjetas MÁS PEQUEÑAS */
.card {
  background-color: rgba(255, 255, 255, 0.95);
  border-radius: 10px;
  width: 120px;      /* antes 200px */
  height: 150px;     /* antes 230px */
  text-align: center;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none; 
  color: #000;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.35);
}

.card img {
  width: 100%;
  height: 90px;      /* antes 160px */
  object-fit: cover;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

.card span {
  display: block;
  padding: 6px;
  color: #333;
  font-weight: 600;
  font-size: 0.8rem;  /* letra un poco más pequeña */
}

/* 📱 Responsivo: en pantallas pequeñas se apilan las secciones */
@media (max-width: 900px) {
  .grid-pantalla {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    height: auto;
  }

  .zona-superior,
  .zona-inferior,
  .zona-izquierda,
  .zona-derecha {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  }
}

@media (max-width: 600px) {
  header {
    flex-direction: column;
    text-align: center;
  }

  header img {
    margin-bottom: 10px;
  }

  .card {
    width: 42%;      /* para que quepan 2 por fila en móvil */
    height: 160px;
  }

  .card img {
    height: 95px;
  }
}
