/*
 * TKA-HOME-POLISH-01 v1.1: calmer card shapes, native "more categories" disclosures, anchor offsets.
 * Opt-in: the rules apply only when the CMS homepage root carries the class tka-home-polish-v1.
 * The CMS transform also rebuilds markup (details, text links), so a rollback restores the stored CMS 6278 content; removing the class alone leaves that markup unstyled.
 * Loaded once, after home-v7.css. Every selector starts with #tka-home-v7.tka-home-polish-v1.
 * No !important, no global selectors, no fonts/images/scripts. Rollback: remove the class from the root.
 * Tool cards are already fully clickable (home-v7.css label::after); this file does not touch that.
 * Anchor offsets are NOT changed: the header hides on scroll down and home-v7.css keeps #tka-tools at 1.5rem on purpose.
 */
#tka-home-v7.tka-home-polish-v1 {
  --tka-hp-radius-category: 16px;
  --tka-hp-radius-card: 20px;
  --tka-hp-space-category: 16px;
  --tka-hp-space-card: 20px;
  --tka-hp-primary: var(--tka-forest, #1c3b2f);
  --tka-hp-line: #e4dfd2;
  --tka-hp-bg: #faf8f3;
}

@media (max-width: 639px) {
  #tka-home-v7.tka-home-polish-v1 {
    --tka-hp-space-category: 12px;
  }
}

/* Mood cards: one calm card plane */
#tka-home-v7.tka-home-polish-v1 #tka-worlds .tka-world-card {
  box-sizing: border-box;
  border: 1px solid var(--tka-hp-line);
  border-radius: var(--tka-hp-radius-card);
  background-color: #fff;
}

#tka-home-v7.tka-home-polish-v1 #tka-worlds .tka-world-card__media {
  border-radius: calc(var(--tka-hp-radius-card) - 1px) calc(var(--tka-hp-radius-card) - 1px) 0 0;
  overflow: hidden;
}

#tka-home-v7.tka-home-polish-v1 #tka-worlds .tka-world-card__copy {
  padding: var(--tka-hp-space-card);
}

/* Category cards: same family, slightly smaller radius. overflow stays hidden (existing) so the photo follows the radius. */
#tka-home-v7.tka-home-polish-v1 #tka-categorieen a[data-tka-track="home_tile"]:not(.tka-more-link) {
  box-sizing: border-box;
  border: 1px solid var(--tka-hp-line);
  border-radius: var(--tka-hp-radius-category);
  background-color: #fff;
  overflow: hidden;
}

#tka-home-v7.tka-home-polish-v1 #tka-categorieen a[data-tka-track="home_tile"]:not(.tka-more-link) > span:last-child {
  padding: var(--tka-hp-space-category);
}

/* Tool cards: keep existing background, overlay link and overflow clipping; add border and radius only */
#tka-home-v7.tka-home-polish-v1 #tka-tools .tka-tool-card {
  box-sizing: border-box;
  border: 1px solid var(--tka-hp-line);
  border-radius: var(--tka-hp-radius-card);
}

#tka-home-v7.tka-home-polish-v1 #tka-tools .tka-tool-card__copy {
  padding: var(--tka-hp-space-card);
}

#tka-home-v7.tka-home-polish-v1 #tka-worlds .tka-world-card:focus-visible,
#tka-home-v7.tka-home-polish-v1 #tka-categorieen a[data-tka-track="home_tile"]:focus-visible,
#tka-home-v7.tka-home-polish-v1 #tka-tools .tka-tool-card__label:focus-visible {
  outline: 2px solid var(--tka-hp-primary);
  outline-offset: 3px;
}

#tka-home-v7.tka-home-polish-v1 #tka-tools .tka-tool-card:focus-within {
  border-color: var(--tka-hp-primary);
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  #tka-home-v7.tka-home-polish-v1 #tka-worlds .tka-world-card,
  #tka-home-v7.tka-home-polish-v1 #tka-categorieen a[data-tka-track="home_tile"]:not(.tka-more-link) {
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
  }

  #tka-home-v7.tka-home-polish-v1 #tka-worlds .tka-world-card:hover,
  #tka-home-v7.tka-home-polish-v1 #tka-categorieen a[data-tka-track="home_tile"]:not(.tka-more-link):hover {
    transform: translateY(-2px);
    border-color: var(--tka-hp-primary);
    box-shadow: 0 8px 20px rgb(28 59 47 / 7%);
  }
}

/* Native disclosure for the extra categories */
#tka-home-v7.tka-home-polish-v1 #tka-categorieen .tka-more {
  margin-block-start: 1rem;
}

#tka-home-v7.tka-home-polish-v1 #tka-categorieen .tka-more > summary {
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  min-block-size: 44px;
  padding: 0 16px;
  border: 1px solid var(--tka-hp-line);
  border-radius: 999px;
  background: #fff;
  color: var(--tka-hp-primary);
  font-size: .9375rem;
  font-weight: 600;
  cursor: pointer;
}

#tka-home-v7.tka-home-polish-v1 #tka-categorieen .tka-more > summary::after {
  content: "";
  inline-size: .5em;
  block-size: .5em;
  margin-inline-start: .625em;
  border-inline-end: 2px solid currentcolor;
  border-block-end: 2px solid currentcolor;
  transform: translateY(-.1em) rotate(45deg);
}

#tka-home-v7.tka-home-polish-v1 #tka-categorieen .tka-more[open] > summary::after {
  transform: translateY(.1em) rotate(-135deg);
}

#tka-home-v7.tka-home-polish-v1 #tka-categorieen .tka-more > summary:focus-visible {
  outline: 2px solid var(--tka-hp-primary);
  outline-offset: 3px;
}

/* Compact text links (Alle merken, Over Teakea, Contact) */
#tka-home-v7.tka-home-polish-v1 #tka-categorieen .tka-more-links {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1.5rem;
  margin-block-start: 1rem;
}

#tka-home-v7.tka-home-polish-v1 #tka-categorieen .tka-more-link {
  display: inline-flex;
  align-items: center;
  min-block-size: 44px;
  color: var(--tka-hp-primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: .2em;
}
