/*
 * Homepage Kids Tools component.
 *
 * Tool copy, visibility, icons and destinations are managed through the
 * WordPress Customizer. Presentation is intentionally distinct from the
 * printable-card section while using the shared homepage container.
 */

.discovery-section--kids-tools {
  position: relative;
  overflow: hidden;
  padding-block: clamp(66px, 7vw, 94px);
  background:
    linear-gradient(180deg, #fff 0%, #fff8fb 100%);
}

.discovery-section--kids-tools::before {
  content: "";
  position: absolute;
  width: 250px;
  height: 210px;
  left: max(18px, calc((100vw - var(--isp-container)) / 2));
  bottom: 34px;
  opacity: .42;
  background-image:
    linear-gradient(rgba(237, 115, 164, .18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(115, 192, 238, .16) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(45deg, #000 0%, transparent 78%);
  mask-image: linear-gradient(45deg, #000 0%, transparent 78%);
  pointer-events: none;
}

.discovery-section--kids-tools .isp-container {
  position: relative;
  z-index: 1;
}

.discovery-section--kids-tools .home-section-head {
  margin-bottom: 32px;
  align-items: end;
}

.discovery-section--kids-tools .section-kicker {
  color: #b44d79;
}

.discovery-section--kids-tools .home-section-head h2 {
  max-width: 760px;
  font-size: clamp(2.3rem, 4.2vw, 3.45rem);
  letter-spacing: -.05em;
}

.discovery-section--kids-tools .home-section-head p {
  max-width: 620px;
  color: #696567;
  line-height: 1.62;
}

.discovery-section--kids-tools .section-view-all {
  min-height: 44px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(68, 68, 68, .09);
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  color: var(--isp-ink);
  font-size: .87rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(68, 68, 68, .045);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.discovery-section--kids-tools .section-view-all:hover,
.discovery-section--kids-tools .section-view-all:focus-visible {
  border-color: rgba(237, 115, 164, .34);
  box-shadow: 0 12px 28px rgba(68, 68, 68, .075);
  transform: translateY(-1px);
}

.discovery-section--kids-tools .section-view-all svg {
  width: 15px;
  height: 15px;
}

.discovery-section--kids-tools .discovery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.discovery-section--kids-tools .discovery-card {
  --tool-accent: #c85886;
  --tool-surface: #fff1f6;
  position: relative;
  min-height: 170px;
  padding: 22px 22px 22px 20px;
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) 40px;
  gap: 18px;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(68, 68, 68, .075);
  border-radius: 24px;
  background:
    linear-gradient(135deg, var(--tool-surface) 0%, rgba(255, 255, 255, .98) 64%);
  color: var(--isp-ink);
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(68, 68, 68, .045);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.discovery-section--kids-tools .discovery-card:nth-child(2n) {
  --tool-accent: #438fbc;
  --tool-surface: #edf8fe;
}

.discovery-section--kids-tools .discovery-card::after {
  content: "";
  position: absolute;
  width: 118px;
  height: 118px;
  top: -60px;
  right: -42px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--tool-accent) 9%, transparent);
  pointer-events: none;
}

.discovery-section--kids-tools .discovery-card:hover,
.discovery-section--kids-tools .discovery-card:focus-visible {
  border-color: color-mix(in srgb, var(--tool-accent) 34%, transparent);
  box-shadow: 0 17px 40px rgba(68, 68, 68, .08);
  transform: translateY(-3px);
}

.discovery-section--kids-tools .discovery-card__icon {
  width: 68px;
  height: 68px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(68, 68, 68, .055);
  border-radius: 20px;
  background: rgba(255, 255, 255, .91);
  color: var(--tool-accent);
  box-shadow: 0 8px 22px rgba(68, 68, 68, .05);
  transition: transform .18s ease, box-shadow .18s ease;
}

.discovery-section--kids-tools .discovery-card__icon svg {
  width: 30px;
  height: 30px;
  fill: currentColor;
}

.discovery-section--kids-tools .discovery-card:hover .discovery-card__icon,
.discovery-section--kids-tools .discovery-card:focus-visible .discovery-card__icon {
  transform: translateY(-2px) rotate(-2deg);
  box-shadow: 0 11px 26px rgba(68, 68, 68, .07);
}

.discovery-section--kids-tools .discovery-card > div {
  min-width: 0;
}

.discovery-section--kids-tools .discovery-card h3 {
  margin: 0 0 8px;
  color: var(--isp-ink);
  font-size: 1.14rem;
  font-weight: 850;
  line-height: 1.25;
  letter-spacing: -.016em;
}

.discovery-section--kids-tools .discovery-card p {
  max-width: 430px;
  margin: 0;
  color: #6b6769;
  font-size: .9rem;
  line-height: 1.55;
}

.discovery-section--kids-tools .discovery-card__arrow {
  position: static;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
  border: 1px solid rgba(68, 68, 68, .06);
  border-radius: 50%;
  background: rgba(255, 255, 255, .9);
  color: var(--tool-accent);
  opacity: 1;
  box-shadow: 0 6px 16px rgba(68, 68, 68, .035);
  transition: transform .18s ease, background-color .18s ease;
}

.discovery-section--kids-tools .discovery-card__arrow svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.discovery-section--kids-tools .discovery-card:hover .discovery-card__arrow,
.discovery-section--kids-tools .discovery-card:focus-visible .discovery-card__arrow {
  background: #fff;
  transform: translateX(3px);
}

@media (max-width: 900px) {
  .discovery-section--kids-tools .discovery-card {
    min-height: 190px;
    grid-template-columns: 60px minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    align-items: start;
    gap: 14px 16px;
  }

  .discovery-section--kids-tools .discovery-card__icon {
    width: 60px;
    height: 60px;
    border-radius: 18px;
  }

  .discovery-section--kids-tools .discovery-card__arrow {
    position: absolute;
    right: 20px;
    bottom: 20px;
  }

  .discovery-section--kids-tools .discovery-card > div {
    padding-right: 34px;
  }
}

@media (max-width: 700px) {
  .discovery-section--kids-tools {
    padding-block: 50px;
  }

  .discovery-section--kids-tools::before {
    width: 170px;
    height: 145px;
    left: -28px;
    bottom: 12px;
    opacity: .28;
  }

  .discovery-section--kids-tools .home-section-head {
    margin-bottom: 25px;
    align-items: flex-start;
  }

  .discovery-section--kids-tools .home-section-head h2 {
    font-size: clamp(2.05rem, 9vw, 2.8rem);
  }

  .discovery-section--kids-tools .section-view-all {
    margin-top: 4px;
  }

  .discovery-section--kids-tools .discovery-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .discovery-section--kids-tools .discovery-card {
    min-height: 142px;
    padding: 17px 18px;
    grid-template-columns: 54px minmax(0, 1fr) 34px;
    grid-template-rows: auto;
    gap: 14px;
    align-items: center;
    border-radius: 20px;
  }

  .discovery-section--kids-tools .discovery-card__icon {
    width: 54px;
    height: 54px;
    border-radius: 16px;
  }

  .discovery-section--kids-tools .discovery-card__icon svg {
    width: 25px;
    height: 25px;
  }

  .discovery-section--kids-tools .discovery-card > div {
    padding-right: 0;
  }

  .discovery-section--kids-tools .discovery-card h3 {
    margin-bottom: 6px;
    font-size: 1.02rem;
  }

  .discovery-section--kids-tools .discovery-card p {
    font-size: .84rem;
    line-height: 1.48;
  }

  .discovery-section--kids-tools .discovery-card__arrow {
    position: static;
    width: 34px;
    height: 34px;
  }
}

@media (max-width: 420px) {
  .discovery-section--kids-tools .discovery-card {
    min-height: 132px;
    padding: 15px;
    grid-template-columns: 48px minmax(0, 1fr) 30px;
    gap: 12px;
    border-radius: 18px;
  }

  .discovery-section--kids-tools .discovery-card__icon {
    width: 48px;
    height: 48px;
    border-radius: 15px;
  }

  .discovery-section--kids-tools .discovery-card__arrow {
    width: 30px;
    height: 30px;
  }

  .discovery-section--kids-tools .discovery-card h3 {
    font-size: .96rem;
  }

  .discovery-section--kids-tools .discovery-card p {
    font-size: .8rem;
  }
}

@media (hover: none) {
  .discovery-section--kids-tools .discovery-card:hover,
  .discovery-section--kids-tools .section-view-all:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .discovery-section--kids-tools .discovery-card,
  .discovery-section--kids-tools .discovery-card__icon,
  .discovery-section--kids-tools .discovery-card__arrow,
  .discovery-section--kids-tools .section-view-all {
    transition: none;
  }
}

@supports not (color: color-mix(in srgb, #000 10%, transparent)) {
  .discovery-section--kids-tools .discovery-card:hover,
  .discovery-section--kids-tools .discovery-card:focus-visible {
    border-color: rgba(237, 115, 164, .32);
  }
}
