/*
 * Pura Vida Açaí — cabecero de categorías (home).
 *
 * Tira de 4 bloques (Specialty Coffee / Brunch / Açaí / Matcha) que ocupa
 * el lugar del hero antiguo. Cada bloque es un enlace a la carta filtrada.
 *
 * Para cambiar una foto o un texto se edita el HTML de index.html;
 * aquí solo vive la presentación.
 */

.hero-cat-section {
  margin-bottom: 100px;
  padding-left: 30px;
  padding-right: 30px;
}

.hero-cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  max-width: 1478px;
  min-height: 530px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cat-item {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  border-radius: 20px;
  background-color: #050827;
  text-decoration: none;
  min-height: 530px;
}

/* La foto va en su propia capa para poder animarla sin mover el texto. */
.hero-cat-media {
  position: absolute;
  inset: 0;
  background-position: 50% 50%;
  background-size: cover;
  background-repeat: no-repeat;
  transition: transform 700ms ease;
}

/* Velado oscuro: mismo tono que usaba el hero anterior (#24201f) para
   que el texto blanco tenga contraste suficiente sobre cualquier foto. */
.hero-cat-item:after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(to bottom, #24201f26 0%, #24201f8f 55%, #24201fd9 100%);
  transition: opacity 400ms ease;
}

.hero-cat-label {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 0 18px 46px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 3px;
  text-align: center;
  text-transform: uppercase;
}

/* Filete decorativo bajo el texto, en la línea del resto del sitio. */
.hero-cat-label:after {
  content: "";
  display: block;
  width: 34px;
  height: 1px;
  margin: 14px auto 0;
  background-color: #fff;
  opacity: .55;
  transition: width 400ms ease, opacity 400ms ease;
}

.hero-cat-item:hover .hero-cat-media { transform: scale(1.06); }
.hero-cat-item:hover:after         { opacity: .78; }
.hero-cat-item:hover .hero-cat-label:after { width: 64px; opacity: 1; }

/* Foco visible por teclado (los bloques son enlaces). */
.hero-cat-item:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

/* --- Tablet: 2x2 --- */
@media screen and (max-width: 991px) {
  .hero-cat-section { margin-bottom: 70px; padding-left: 20px; padding-right: 20px; }
  .hero-cat-grid    { grid-template-columns: repeat(2, 1fr); min-height: 0; }
  .hero-cat-item    { min-height: 320px; }
  .hero-cat-label   { padding-bottom: 34px; font-size: 14px; }
}

/* --- Móvil: 2 columnas, bloques más bajos --- */
@media screen and (max-width: 479px) {
  .hero-cat-section { margin-bottom: 55px; padding-left: 14px; padding-right: 14px; }
  .hero-cat-grid    { gap: 8px; }
  .hero-cat-item    { min-height: 220px; border-radius: 14px; }
  .hero-cat-label   { padding: 0 8px 22px; font-size: 11px; letter-spacing: 1.6px; }
  .hero-cat-label:after { margin-top: 9px; width: 24px; }
}

/* Respeta a quien pide menos movimiento en el sistema. */
@media (prefers-reduced-motion: reduce) {
  .hero-cat-media,
  .hero-cat-item:after,
  .hero-cat-label:after { transition: none; }
  .hero-cat-item:hover .hero-cat-media { transform: none; }
}
