/* Portal-Karten (html/mod__grid_layout/job.php). Akzentfarbe je Karte über --portal-accent (inline gesetzt).
   p und span unter .hwx-portals, damit die globale Regel „main :is(p,span)“ aus app.css nicht greift */

.hwx-portals {
  --portals-ink: #0C3247;
  --portals-soft: #586873;
  --portals-radius: .875rem;
  --portals-shadow: 0 .45rem 1.2rem rgba(12, 50, 71, .08);
  --portals-shadow-hover: 0 1rem 2.75rem rgba(12, 50, 71, .15);
  --portals-font-display: var(--hwx-text_font-family, WorkSans-Regular), system-ui, sans-serif;

  /* Breite gibt der Modul-Container vor, nur auf kleinen Bildschirmen (Container ohne Rand) eigener Abstand */
  box-sizing: border-box;
  padding: 0;
}

@media (max-width: 767.98px) {
  .hwx-portals {
    padding: 0 1rem;
  }
}

.hwx-portals .hwx-portals__title {
  margin: 0 0 1.25rem;
  font-family: var(--portals-font-display);
  font-size: 1.375rem;
  color: var(--portals-ink);
}

.hwx-portals .hwx-portals__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hwx-portals .hwx-portal {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.75rem 1.5rem 1.5rem;
  overflow: hidden;
  border-radius: var(--portals-radius);
  background: #fff;
  box-shadow: var(--portals-shadow);
  transition: box-shadow .25s ease, transform .25s ease;
}

/* Akzentlinie oben */
.hwx-portals .hwx-portal::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--portal-accent);
}

.hwx-portals .hwx-portal:hover {
  box-shadow: var(--portals-shadow-hover);
  transform: translateY(-3px);
}

.hwx-portals .hwx-portal__logo {
  display: grid;
  flex: none;
  place-items: center;
  width: 4rem;
  height: 4rem;
  border-radius: 1rem;
  background: color-mix(in srgb, var(--portal-accent) 12%, #fff);
}

.hwx-portals .hwx-portal__logo img {
  width: 2.5rem;
  height: 2.5rem;
  object-fit: contain;
}

.hwx-portals .hwx-portal__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: .5rem;
}

.hwx-portals .hwx-portal__title {
  margin: 0;
  font-family: var(--portals-font-display);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--portals-ink);
}

.hwx-portals .hwx-portal__link {
  color: inherit;
  text-decoration: none;
}

/* Ganze Karte klickbar */
.hwx-portals .hwx-portal__link::after {
  content: "";
  position: absolute;
  inset: 0;
}

.hwx-portals .hwx-portal__link:focus-visible {
  outline: none;
}

.hwx-portals .hwx-portal:has(.hwx-portal__link:focus-visible) {
  outline: 3px solid var(--portal-accent);
  outline-offset: 3px;
}

.hwx-portals .hwx-portal__text,
.hwx-portals .hwx-portal__text p {
  margin: 0;
  background: none;
  font-size: .9375rem;
  line-height: 1.55;
  color: var(--portals-soft);
}

.hwx-portals .hwx-portal__more {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-top: auto;
  padding-top: .75rem;
  background: none;
  color: var(--portal-accent);
  font-weight: 700;
  font-size: .9375rem;
}

.hwx-portals .hwx-portal__more i {
  transition: transform .25s ease;
}

.hwx-portals .hwx-portal:hover .hwx-portal__more i {
  transform: translateX(4px);
}

/* Handy: kompakt, Logo links */
@media (max-width: 575.98px) {
  .hwx-portals .hwx-portals__grid {
    gap: .75rem;
  }

  .hwx-portals .hwx-portal {
    flex-direction: row;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem 1.125rem 1.125rem;
  }

  .hwx-portals .hwx-portal__logo {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: .875rem;
  }

  .hwx-portals .hwx-portal__logo img {
    width: 2rem;
    height: 2rem;
  }

  .hwx-portals .hwx-portal__title {
    font-size: 1.0625rem;
  }

  .hwx-portals .hwx-portal__more {
    padding-top: .25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hwx-portals .hwx-portal,
  .hwx-portals .hwx-portal__more i {
    transition: none;
  }

  .hwx-portals .hwx-portal:hover,
  .hwx-portals .hwx-portal:hover .hwx-portal__more i {
    transform: none;
  }
}
