/* Sección Accesos Directos y Aplicaciones (Home) */

.home-accesos {
  position: relative;
  z-index: 20;
  margin-top: -2rem;
}

.home-accesos__panel {
  padding: 24px 20px;
  border: 1px solid #edf0f4;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.1), 0 4px 10px rgba(15, 23, 42, 0.04);
}

.home-accesos__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 6px 24px;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid #edf0f4;
}

.home-accesos__eyebrow {
  margin: 0 0 4px;
  font-family: NotoSans-Bold, sans-serif;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #005e46;
}

.home-accesos__title {
  margin: 0;
  padding: 0;
  font-family: NotoSans-Bold, sans-serif;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: 0;
  color: #1e293b;
}

.home-accesos__grid {
  --gap: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap);
}

/* Cada tarjeta ocupa 1/--cols del ancho y crece para llenar la última fila
   cuando queda incompleta (no quedan huecos sin importar la cantidad). */
.home-accesos__item {
  --cols: 1;
  flex: 1 1 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols));
  min-width: 0;
}

/* Móvil y tablet: tarjeta horizontal (ícono + nombre + flecha) */
.home-accesos__card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  height: 100%;
  padding: 10px 14px;
  border: 1px solid #edf0f4;
  border-radius: 12px;
  background: #f9fafb;
  text-align: left;
  text-decoration: none;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease, background-color 200ms ease;
}

.home-accesos__card::after {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  margin-left: auto;
  border-top: 2px solid #94a3b8;
  border-right: 2px solid #94a3b8;
  transform: rotate(45deg);
}

.home-accesos__card:active {
  background: #fff;
  border-color: rgba(0, 94, 70, 0.25);
}

@media (hover: hover) {
  .home-accesos__card:hover {
    border-color: rgba(0, 94, 70, 0.25);
    background: #fff;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
  }
}

.home-accesos__card:focus-visible {
  border-color: rgba(0, 94, 70, 0.25);
  background: #fff;
  outline: 2px solid #005e46;
  outline-offset: 2px;
}

.home-accesos__icon {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.home-accesos__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.home-accesos__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.home-accesos__name {
  font-family: NotoSans-Bold, sans-serif;
  font-size: 14px;
  line-height: 1.3;
  color: #1f2937;
  overflow-wrap: break-word;
}

.home-accesos__desc {
  margin-top: 2px;
  font-family: NotoSans-Regular, sans-serif;
  font-size: 12px;
  line-height: 1.35;
  color: #94a3b8;
}

/* Móviles: panel y cabecera más compactos */
@media (max-width: 575.98px) {
  .home-accesos__panel {
    padding: 18px 14px;
    border-radius: 14px;
  }

  .home-accesos__header {
    padding-bottom: 14px;
    margin-bottom: 14px;
  }

  .home-accesos__title {
    font-size: 19px;
  }
}

/* Tablet: lista en 2 columnas */
@media (min-width: 576px) {
  .home-accesos__grid {
    --gap: 10px;
  }

  .home-accesos__item {
    --cols: 2;
  }

  .home-accesos__card {
    padding: 12px 16px;
  }

  .home-accesos__icon {
    width: 44px;
    height: 44px;
  }
}

/* Escritorio: tarjeta vertical, todas en una fila */
@media (min-width: 992px) {
  .home-accesos__grid {
    --gap: 12px;
  }

  .home-accesos__item {
    --cols: var(--cols-lg, 7);
  }

  .home-accesos__card {
    flex-direction: column;
    gap: 0;
    padding: 22px 10px 18px;
    text-align: center;
  }

  .home-accesos__card::after {
    display: none;
  }

  .home-accesos__card:hover {
    transform: translateY(-3px);
  }

  .home-accesos__icon {
    width: 64px;
    height: 64px;
    margin-bottom: 14px;
  }

  .home-accesos__text {
    align-items: center;
  }

  .home-accesos__name {
    font-size: 13px;
  }

  .home-accesos__desc {
    margin-top: 4px;
    font-size: 11px;
  }

  /* El panel se monta sobre el borde inferior del banner */
  .home-accesos {
    margin-top: calc(-4rem - 56px);
  }

  .home-accesos__panel {
    padding: 28px 32px 32px;
  }

  #myCarousel .carousel-caption {
    bottom: calc(3rem + 56px);
  }
}
