/* Wrapper og grid */
.gr-kat-wrap { margin: 0; }
.gr-kat-title { font-size: 40px; font-weight: 700; margin-bottom: 24px; text-align: left; }

.gr-kat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 24px;
  align-items: start;
}

.gr-kat-item { text-align: center; }

/* Link uden farveskift */
.gr-kat-link {
  display: inline-block;
  text-decoration: none;
  color: inherit;
}
.gr-kat-link:hover,
.gr-kat-link:focus-visible {
  color: inherit;
  text-decoration: none;
}

/* Cirklen */
.gr-kat-figure {
  margin: 0 auto 16px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  overflow: hidden;
  background: #e9f4f7;
  display: grid;
  place-items: center;
}

/* Billedet zoomer let ved hover */
.gr-kat-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transition: transform .25s ease;
}
.gr-kat-link:hover .gr-kat-img,
.gr-kat-link:focus-visible .gr-kat-img {
  transform: scale(1.05);
}

/* Tekst under billedet, desktop default */
.gr-kat-name {
  margin-top: 12px;
  font-size: 18px;
  line-height: 1.4;
  font-weight: 400;
  text-align: center;
  color: #1a1a1a;
}
.gr-kat-link:hover .gr-kat-name,
.gr-kat-link:focus-visible .gr-kat-name {
  color: #1a1a1a;
}

/* Tablet: mindre billeder og 16px tekst så alt passer uden scroll */
@media (min-width: 769px) and (max-width: 1024px) {
  .gr-kat-grid {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 20px;
    padding-left: 24px; /* Tilføjet */
  }
  .gr-kat-figure { width: 140px; height: 140px; }
  .gr-kat-name { font-size: 16px; }
  .gr-kat-title { font-size: 30px; padding-left: 24px; } /* Tilføjet */
}

/* Mobil vandret scroll med snap og første kort helt til venstre */
@media (max-width: 768px) {
  .gr-kat-grid {
    display: flex;
    overflow-x: auto;
    gap: 16px;
    padding-left: 12px;
    padding-right: 16px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    mask-image: linear-gradient(to right, black 0, black calc(100% - 0px), transparent 100%);
  }
  .gr-kat-grid::-webkit-scrollbar { height: 0; }

  .gr-kat-item {
    flex: 0 0 140px;
    text-align: center;
  }

  .gr-kat-name { font-size: 16px; }
  .gr-kat-figure { width: 120px; height: 120px; }

  .gr-kat-title {
    padding-left: 24px;
    font-size: 30px;
  }
}
