/* ============================================================================
   connect_dots.css — Connect the Dots Worksheets page
   Layouts: Desktop (3 cols) · Tablet (3 compact cols) · Mobile (horizontal cards)
   ============================================================================ */

:root {
  --color-blue: #2F5FEE;
  --color-blue-dark: #1E46C4;
  --color-ink: #1B2237;
  --color-ink-soft: #5B6478;
  --color-panel: #EFF4FC;
  --color-border: #E4E9F2;
  --radius-md: 16px;
  --radius-lg: 20px;
}

.cdt-page,
.cdt-page button {
  font-family: var(--smw-font-stack);
  -webkit-font-smoothing: antialiased;
}

.cdt-page {
  max-width: 100%;
  overflow-x: hidden;
}

/* ============================================================
   BREADCRUMB
   ============================================================ */
.cdt-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--color-ink-soft);
}

.cdt-breadcrumb a {
  color: var(--color-blue);
  font-weight: 600;
  text-decoration: none;
}

.cdt-breadcrumb a:hover {
  color: var(--color-blue-dark);
  text-decoration: underline;
}

.cdt-breadcrumb svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.cdt-breadcrumb .current {
  color: var(--color-ink);
  font-weight: 600;
}

/* Inside the shared Kids Zone Topics bar (.kzd-bar, kidszone_topic_dropdown.css).
   That file styles `nav.breadcrumb`, but this page's breadcrumb is `.cdt-breadcrumb`,
   so the same rules are repeated here:
   - margin-bottom 0: the bar already owns the 16px gap below the row. Left in place,
     it made the breadcrumb box taller than its text and the centred row pushed
     the text ~8px above the dropdown.
   - flex 1 1 12rem + min-width 0: a long breadcrumb shrinks/wraps instead of
     forcing the dropdown onto a second row. */
.kzd-bar > .cdt-breadcrumb {
  margin-bottom: 0;
  flex: 1 1 12rem;
  min-width: 0;
}

.kzd-bar > .cdt-breadcrumb .current {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* ============================================================
   HERO
   ============================================================ */
.cdt-hero {
  width: 100%;
  margin: 0 0 1.5rem;
  padding: 1.375rem 1.75rem;
  background: oklch(0.95 0.03 264);
  border: 2px solid oklch(0.75 0.12 264);
  border-radius: 1rem;
  box-shadow: 0 1px 2px oklch(0.2 0.035 274 / .03), 0 6px 18px oklch(0.54 0.22 266 / .05);
  box-sizing: border-box;
}

.cdt-hero-text h1 {
  margin: 0 0 0.5rem;
  text-align: center;
  font-size: 1.875rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #0e2770;
}

.cdt-hero-text p {
  margin: 0 0 1.25rem;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.5;
  color: #0b205f;
}

/* Stat pills */
.cdt-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.cdt-stat-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(20, 30, 60, .04);
}

.cdt-stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: var(--color-blue);
}

.cdt-stat-icon svg {
  width: 18px;
  height: 18px;
}

/* Stat icon colors (worksheets / age / categories) */
.cdt-stat-icon--green  { color: #16A34A; }
.cdt-stat-icon--blue   { color: #0040FF; }
.cdt-stat-icon--violet { color: #7437FC; }

.cdt-stat-title {
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
  color: var(--color-ink);
}

/* ============================================================
   TABS
   ============================================================ */
.cdt-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
}

.cdt-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  color: var(--color-ink);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.cdt-tab svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.cdt-tab:hover {
  border-color: var(--color-blue);
  color: var(--color-blue);
}

.cdt-tab.is-active,
.cdt-tab.is-active:hover {
  background: var(--color-blue);
  border-color: var(--color-blue);
  color: #fff;
}

/* ============================================================
   COLLECTION CARDS
   ============================================================ */
.cdt-section-title {
  margin: 24px 0 16px;
  font-size: 20px;
  font-weight: 700;
  color: #0e2770;
}

.cdt-collection-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.cdt-collection-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 6px rgba(20, 30, 60, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cdt-collection-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(20, 30, 60, 0.08);
}

/* Card colors match each hero image */
.cdt-collection-card[data-collection="lowercase"]    { background: #f1fbf6; border-color: #dcf1e6; }
.cdt-collection-card[data-collection="uppercase"]    { background: #f5f2fe; border-color: #e7e0fc; }
.cdt-collection-card[data-collection="number-basic"] { background: #eef5fe; border-color: #dce9fc; }

/* Image: fixed ratio + max height so it never grows too large */
.cdt-collection-art {
  aspect-ratio: 16 / 10;
  max-height: 240px;
  overflow: hidden;
}

.cdt-collection-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.cdt-collection-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  padding: 16px;
}

.cdt-collection-title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--color-ink);
}

.cdt-collection-desc {
  flex: 1;
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--color-ink-soft);
}

.cdt-collection-link {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.cdt-collection-link svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.cdt-collection-link:hover svg {
  transform: translateX(3px);
}

.cdt-collection-link--green {
  background: #e4f7ee;
  color: #16a34a;
  border: 1px solid #c6f0d8;
}

.cdt-collection-link--green:hover {
  background: #d1f4e2;
}

/* ============================================================
   FEATURE STRIP
   ============================================================ */
.cdt-features {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 38px 0 10px;
}

.cdt-feature {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 18px 16px;
  background: var(--color-panel);
  border-radius: var(--radius-md);
}

.cdt-feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 44px;
  height: 44px;
  background: #fff;
  border-radius: 12px;
  color: var(--color-blue);
}

.cdt-feature-icon svg {
  width: 22px;
  height: 22px;
}

.cdt-feature-text h3 {
  margin: 0 0 3px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--color-ink);
}

.cdt-feature-text p {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--color-ink-soft);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Laptop / small desktop */
@media (max-width: 1100px) {
  .cdt-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Tablet: keep 3 compact columns so images stay small */
@media (max-width: 900px) {
  .cdt-collection-grid { gap: 12px; }
  .cdt-collection-art { max-height: 170px; }
  .cdt-collection-body { padding: 12px; }
  .cdt-collection-title { font-size: 15px; }
  .cdt-collection-desc { font-size: 12.5px; margin-bottom: 10px; }
  .cdt-collection-link { padding: 7px 12px; font-size: 12.5px; gap: 6px; }
}

/* Large phone / small tablet: hero + tabs tidy-up */
@media (max-width: 768px) {
  .cdt-hero { margin-bottom: 1rem; padding: 1rem; }
  .cdt-hero-text h1 { font-size: 1.5rem; text-align: left; }
  .cdt-hero-text p { font-size: 0.875rem; }
  .cdt-stats { gap: 8px; }
  .cdt-stat-card { padding: 6px 12px; }
  .cdt-stat-title { font-size: 12.5px; }

  /* Tabs: 2 rows x 2 columns
     Row 1: All Collections | Lowercase Letters
     Row 2: Uppercase Letters | Numbers - Basic */
  .cdt-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
  }
  .cdt-tab {
    justify-content: center;
    padding: 9px 10px;
    font-size: 13px;
    text-align: center;
    white-space: normal;
  }
}

/* Phones: the Kids Zone bar stacks into a column (kidszone_topic_dropdown.css, <=679px).
   In a column the flex-basis above would become a height, so reset it. */
@media (max-width: 679px) {
  .kzd-bar > .cdt-breadcrumb {
    flex: 0 0 auto;
    max-width: 100%;
  }
}

/* Phone: one card per row, stacked vertically, same structure as desktop
   (image on top, then title, description, button). */
@media (max-width: 640px) {
  .cdt-collection-grid { grid-template-columns: 1fr; gap: 16px; }

  /* Fixed image box: the whole picture is always visible (no cropping).
     Change 200px to make the images taller or shorter. */
  .cdt-collection-art {
    aspect-ratio: auto;
    height: 200px;
    max-height: none;
  }
  .cdt-collection-art img { object-fit: contain; }

  .cdt-collection-body { padding: 16px; }

  .cdt-features { grid-template-columns: 1fr; gap: 12px; }
  .cdt-section-title { font-size: 18px; margin: 20px 0 12px; }
}