/* HdKD Events — Category entry tiles ([hdkd_categories]).
   Color-field design: full brand-color tiles with gradient depth, a large
   faded event-count watermark, a count pill, bold name and "Entdecken →".
   All tiles equal size. Gradient + text color are set inline per tile (with
   !important) to beat Uncode's link-color/background overrides; the count
   watermark and arrow inherit currentColor so light tiles (yellow) stay legible. */
.hdkd-cats {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.hdkd-cats__title.hdkd-cats__title {
  font-family: inherit;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -.025em;
  line-height: 1.1;
  margin: 0 0 18px;
  color: inherit;
}

.hdkd-cats__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

.hdkd-cats__tile {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  padding: 24px;
  min-height: 212px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  text-decoration: none;
  color: #fff;               /* overridden inline per tile */
}
/* No tile lift/shadow on hover — only the "Entdecken →" arrow moves (below). */

.hdkd-cats__num {
  position: absolute;
  bottom: -30px;
  right: -8px;
  font-family: inherit;
  font-weight: 800;
  font-size: 150px;
  line-height: 1;
  letter-spacing: -.05em;
  opacity: .11;
  pointer-events: none;
}

.hdkd-cats__tag {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255,255,255,.22);
  margin-bottom: auto;
}
.hdkd-cats__tile.is-light .hdkd-cats__tag { background: rgba(0,0,0,.14); }

.hdkd-cats__name {
  position: relative;
  font-family: inherit;
  font-size: 23px;
  font-weight: 500;              /* headlines are 500, never bold */
  letter-spacing: -.02em;
  line-height: 1.1;
  margin-top: 14px;
  max-width: 94%;
  color: inherit !important;     /* inherits the tile's inline fg */
  text-transform: none !important;
}

.hdkd-cats__go {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 600;
  opacity: .92;
  color: inherit !important;
  transition: gap .2s;
}
.hdkd-cats__tile:hover .hdkd-cats__go { gap: 12px; }
.hdkd-cats__go svg { width: 16px; height: 16px; }

@media (max-width: 600px) {
  /* Homepage DEFAULT variant → horizontal swipe rail. A 2-up grid crushes the
     long category names + collides the watermark, and a full stack scrolls
     forever — a snap rail keeps each tile at its designed proportions and shows
     a peek of the next as a "swipe for more" affordance. Scoped with :not(compact)
     so the category-page quick-nav keeps its grid (its own rules below). */
  .hdkd-cats:not(.hdkd-cats--compact) .hdkd-cats__grid {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .hdkd-cats:not(.hdkd-cats--compact) .hdkd-cats__grid::-webkit-scrollbar { display: none; }
  .hdkd-cats:not(.hdkd-cats--compact) .hdkd-cats__tile {
    flex: 0 0 80%;               /* peek of the next tile = swipe affordance */
    scroll-snap-align: start;
    min-height: 190px; padding: 20px; border-radius: 18px;
  }
  .hdkd-cats:not(.hdkd-cats--compact) .hdkd-cats__num { font-size: 124px; }
  .hdkd-cats:not(.hdkd-cats--compact) .hdkd-cats__name { font-size: 21px; }
}

/* ---- compact category nav (on the category page) ---- */
.hdkd-catnav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.hdkd-catnav__item {
  font-family: inherit; font-size: 13px; font-weight: 500; line-height: 1;
  text-decoration: none; color: #4a453f; background: #fff;
  border: 1.5px solid rgba(42, 37, 32, 0.14); border-radius: 9999px; padding: 9px 16px;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}
.hdkd-catnav__item:hover { border-color: var(--c, #1C8D82); color: var(--c, #1C8D82); }
.hdkd-catnav__item.is-active { background: var(--c, #2A2520); border-color: var(--c, #2A2520); color: #fff !important; }

/* small eyebrow label (category page "Weitere Themenwelten") */
.hdkd-cats__eyebrow {
  display: block;
  font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: #8a857c; margin: 0 0 14px;
}
/* ---- compact variant: category-page quick-nav ([hdkd_categories compact="yes"]) ----
   Same design language, just smaller — 3:2 tiles + reduced watermark number so the
   row reads as fast cross-navigation. Scoped to .hdkd-cats--compact ONLY, so the
   homepage default [hdkd_categories] is never affected. */
.hdkd-cats--compact .hdkd-cats__grid { grid-template-columns: repeat(auto-fill, minmax(188px, 1fr)); gap: 12px; }
.hdkd-cats--compact .hdkd-cats__tile { aspect-ratio: 3 / 2; min-height: 0; padding: 15px 17px; border-radius: 14px; }
/* watermark number sits TOP-right in compact (balances the bottom-left name+CTA) */
.hdkd-cats--compact .hdkd-cats__num { font-size: 86px; top: -14px; bottom: auto; right: -4px; }
/* drop the "X Veranstaltungen" chip in compact — the watermark number already reads
   as the count, and the chip crowds the tight cards (long names). */
.hdkd-cats--compact .hdkd-cats__tag { display: none; }
.hdkd-cats--compact .hdkd-cats__name { font-size: 17px; margin-top: 0; }
.hdkd-cats--compact .hdkd-cats__go { font-size: 12px; margin-top: 7px; }
@media (max-width: 600px) {
  /* Consistency with the homepage: compact category cards also become a swipe
     rail on mobile (was a static grid) — smaller tiles → show ~2 + a peek. */
  .hdkd-cats--compact .hdkd-cats__grid {
    display: flex; grid-template-columns: none;
    overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; padding-bottom: 2px;
  }
  .hdkd-cats--compact .hdkd-cats__grid::-webkit-scrollbar { display: none; }
  .hdkd-cats--compact .hdkd-cats__tile { flex: 0 0 46%; scroll-snap-align: start; padding: 13px 14px; }
  .hdkd-cats--compact .hdkd-cats__num { font-size: 70px; }
}
