/* allcat.css — All Categories + Categories Tree pages
   Loaded via WebAssetManager from categories/default.php.
   Dark: html.t4-dark scope only. All vars from css/template.css (:root).
   TOKEN RULE: --voy-text (NOT --voy-text-body). */

/* ── FULL-BLEED BREAKOUT (same pattern as taxonomy.css) ───────── */
:has(.voy-allcat-page) .t4-section-inner.container,
:has(.voy-allcat-page) .t4-section-inner {
  max-width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
:has(.voy-allcat-page) .t4-row {
  margin-left: 0 !important;
  margin-right: 0 !important;
}
:has(.voy-allcat-page) .t4-col {
  padding-left: 0 !important;
  padding-right: 0 !important;
}
:has(.voy-allcat-page) .t4-main-body {
  padding-top: 0 !important;
}
/* Suppress T4 breadcrumbs section (we render our own) */
:has(.voy-allcat-page) .t4-breadcrumbs {
  display: none !important;
}

/* ── MASTHEAD ─────────────────────────────────────────────────── */
.voy-allcat-masthead {
  background: var(--voy-bg);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 80px 48px 28px;
}
.voy-allcat-masthead-inner {
  max-width: 1140px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Categories Tree masthead — centred. pen YEKSN: pad=[64,48,8,48] inner gap=12 */
.voy-cattree-masthead {
  justify-content: center;
  padding: 64px 48px 8px;
}
.voy-cattree-masthead-inner {
  align-items: center;
  text-align: center;
  max-width: 760px;
  gap: 12px !important;
}

/* Tree breadcrumb: pen YEKSN bPBMG — "Categories" current is weight normal (400), NOT 600 */
.voy-cattree-page .voy-bc-current {
  font-weight: 400 !important;
}

.voy-allcat-title {
  font-family: var(--voy-font-head);
  font-size: 54px;
  font-weight: 700;
  color: var(--voy-heading);
  margin: 0;
  line-height: 1.1;
}
.voy-cattree-title {
  font-family: var(--voy-font-head);
  font-size: 40px;
  font-weight: 700;
  color: var(--voy-heading);
  margin: 0;
  line-height: 1.15;
  text-align: center;
}
.voy-allcat-subtitle {
  font-family: var(--voy-font-body);
  font-size: 18px;
  font-weight: 400;
  color: var(--voy-muted);
  line-height: 1.6;
  margin: 0;
  max-width: 760px;
}
.voy-cattree-subtitle {
  font-family: var(--voy-font-body);
  font-size: 16px;
  font-weight: 400;
  color: var(--voy-muted);
  line-height: 1.6;
  margin: 0;
  text-align: center;
}

/* Eyebrow — All Categories masthead: 13px, ls:1
   Tree masthead eyebrow (.voy-cattree-masthead): 12px, ls:1 (pen YEKSN) */
.voy-eyebrow--mono {
  font-family: var(--voy-font-mono, 'Geist Mono', monospace) !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  color: var(--voy-primary) !important;
  letter-spacing: 1px !important;
  text-transform: uppercase !important;
}
/* Tree masthead overrides — pen YEKSN eyebrow: fontSize:12 */
.voy-cattree-masthead .voy-eyebrow--mono {
  font-size: 12px !important;
}

/* ── BREADCRUMB ───────────────────────────────────────────────── */
.voy-allcat-breadcrumb {
  background: var(--voy-bg);
  padding: 0 48px 8px;
  width: 100%;
}
.voy-allcat-bc-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.voy-bc-link {
  font-family: var(--voy-font-body);
  font-size: 13px;
  font-weight: 400;
  color: var(--voy-muted);
  text-decoration: none;
}
.voy-bc-link:hover { color: var(--voy-text); }
.voy-bc-sep {
  color: var(--voy-muted);
  flex-shrink: 0;
}
.voy-bc-slash {
  font-family: var(--voy-font-body);
  font-size: 13px;
  color: var(--voy-muted);
}
.voy-bc-current {
  font-family: var(--voy-font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--voy-text);
}

/* ── CATEGORY GRID SECTION ────────────────────────────────────── */
.voy-allcat-grid-section {
  background: var(--voy-elevated, #F2EBE1);
  width: 100%;
  padding: 40px 48px 70px;
}
.voy-allcat-grid-inner {
  max-width: 1140px;
  margin: 0 auto;
}
.voy-allcat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* ── CATEGORY CARD ────────────────────────────────────────────── */
.voy-allcat-card {
  background: var(--voy-surface, #FFFFFF);
  border-radius: 22px;
  border: 1px solid var(--voy-border);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.voy-allcat-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  transform: translateY(-2px);
  text-decoration: none;
  color: inherit;
}
.voy-allcat-card-chip {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--voy-elevated, #F2EBE1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--voy-primary);
}
.voy-allcat-card-ic {
  color: var(--voy-primary);
  stroke: var(--voy-primary);
}
.voy-allcat-card-tb {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}
.voy-allcat-card-name {
  font-family: var(--voy-font-head);
  font-size: 19px;
  font-weight: 700;
  color: var(--voy-heading);
  line-height: 1.2;
}
.voy-allcat-card-count {
  font-family: var(--voy-font-mono, 'Geist Mono', monospace);
  font-size: 12px;
  font-weight: 400;
  color: #1F6F6B;
  line-height: 1;
}
.voy-allcat-card-desc {
  font-family: var(--voy-font-body);
  font-size: 14px;
  font-weight: 400;
  color: var(--voy-muted);
  line-height: 1.55;
  margin: 0;
}

/* ── CTA BAND ─────────────────────────────────────────────────── */
.voy-allcat-cta-band {
  background: #1F6F6B;
  width: 100%;
  padding: 72px 48px;
  display: flex;
  justify-content: center;
}
.voy-allcat-cta-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  max-width: 1140px;
  width: 100%;
  text-align: center;
}
.voy-allcat-cta-title {
  font-family: var(--voy-font-head);
  font-size: 38px;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0;
  line-height: 1.15;
}
.voy-allcat-cta-sub {
  font-family: var(--voy-font-body);
  font-size: 17px;
  font-weight: 400;
  color: #FFFFFF;
  line-height: 1.6;
  margin: 0;
  max-width: 620px;
}
.voy-allcat-cta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

/* Buttons (mirror jtXPw/ape1g from .pen)
   — Primary: fill=#C2562F, pad=[14,26], no stroke
   — Secondary: fill=#FFFFFF, stroke=#E5DCD0, text=#2B2420, pad=[13,25] */
.voy-btn {
  font-family: var(--voy-font-body) !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  border-radius: 9999px !important;
  text-decoration: none !important;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  display: inline-block !important;
  line-height: 1 !important;
}
.voy-btn--primary {
  background: var(--voy-primary) !important;
  color: #FFFFFF !important;
  border: none !important;
  padding: 14px 26px !important;
}
.voy-btn--primary:hover {
  background: #A6451F !important;
  color: #FFFFFF !important;
  text-decoration: none !important;
}
/* Secondary button (Button/Secondary from .pen: white bg, dark text, warm border) */
.voy-btn--secondary {
  background: #FFFFFF !important;
  color: #2B2420 !important;
  border: 1px solid #E5DCD0 !important;
  padding: 13px 25px !important;
}
.voy-btn--secondary:hover {
  background: #FAF6F0 !important;
  color: #1A1512 !important;
  border-color: #D4C8B8 !important;
  text-decoration: none !important;
}
/* Secondary button stays white on teal CTA band in both themes (pen ape1g has no dark variant) */

/* ── CATEGORIES TREE BODY ─────────────────────────────────────── */
.voy-cattree-body {
  background: var(--voy-bg);
  padding: 24px 48px 72px;
  display: flex;
  justify-content: center;
}
.voy-cattree-panel {
  background: var(--voy-surface, #FFFFFF);
  border-radius: 22px;
  border: 1px solid var(--voy-border);
  width: 860px;
  max-width: 100%;
  overflow: hidden;
}
.voy-tree-group {}
.voy-tree-group--bordered {
  border-top: 1px solid var(--voy-border);
}
.voy-tree-head {
  background: var(--voy-elevated, #F2EBE1);
  padding: 16px 22px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.voy-tree-chev {
  color: var(--voy-muted);
  flex-shrink: 0;
}
.voy-tree-folder {
  color: var(--voy-primary);
  flex-shrink: 0;
}
.voy-tree-head-name {
  font-family: var(--voy-font-head);
  font-size: 18px;
  font-weight: 700;
  color: var(--voy-heading);
  flex: 1;
  text-decoration: none;
}
.voy-tree-head-name:hover {
  color: var(--voy-primary);
  text-decoration: none;
}
.voy-tree-count-pill {
  background: var(--voy-surface, #FFFFFF);
  border-radius: 9999px;
  padding: 4px 11px;
  font-family: var(--voy-font-mono, 'Geist Mono', monospace);
  font-size: 12px;
  color: var(--voy-muted);
}
.voy-tree-row {
  border-top: 1px solid var(--voy-border);
  padding: 13px 22px 13px 56px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.voy-tree-row-ic {
  color: var(--voy-muted);
  flex-shrink: 0;
}
.voy-tree-row-name {
  font-family: var(--voy-font-body);
  font-size: 15px;
  font-weight: 400;
  color: var(--voy-text);
  flex: 1;
  text-decoration: none;
}
.voy-tree-row-name:hover {
  color: var(--voy-primary);
  text-decoration: none;
}
.voy-tree-row-count {
  font-family: var(--voy-font-mono, 'Geist Mono', monospace);
  font-size: 12px;
  color: var(--voy-muted);
  flex-shrink: 0;
}

/* ── DARK MODE ────────────────────────────────────────────────── */
/* Eyebrow in dark — taxonomy.css hardcodes #C2562F !important; beat it with
   same specificity (0,2,0) scoped to dark via html.t4-dark */
html.t4-dark .voy-eyebrow--mono,
html.t4-dark .voy-eyebrow.voy-eyebrow--mono {
  color: #D86A3F !important;
}
html.t4-dark .voy-allcat-grid-section {
  background: #1C1712 !important;
}
html.t4-dark .voy-allcat-card {
  background: var(--voy-surface) !important;
  border-color: var(--voy-border) !important;
}
html.t4-dark .voy-allcat-card-chip {
  background: #2A2219 !important;
}
html.t4-dark .voy-allcat-card-count {
  color: #46A39D !important;
}
html.t4-dark .voy-allcat-cta-band {
  background: #46A39D !important;
}
html.t4-dark .voy-tree-head {
  background: #1C1712 !important;
}
html.t4-dark .voy-tree-count-pill {
  background: var(--voy-surface) !important;
}

/* ── MOBILE (≤767px) ──────────────────────────────────────────── */
@media (max-width: 767.98px) {
  .voy-allcat-masthead {
    padding: 40px 20px 16px;
  }
  .voy-allcat-masthead-inner {
    gap: 14px;
  }
  .voy-cattree-masthead {
    padding: 40px 20px 12px;
  }
  .voy-allcat-title {
    font-size: 32px;
  }
  .voy-cattree-title {
    font-size: 26px;
  }
  .voy-allcat-subtitle,
  .voy-cattree-subtitle {
    font-size: 15px;
    max-width: 100%;
  }
  .voy-allcat-breadcrumb {
    padding: 0 20px 8px;
  }
  .voy-allcat-grid-section {
    padding: 24px 20px 40px;
  }
  .voy-allcat-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  /* pen g751Cw card padding:22 (desktop=24) */
  .voy-allcat-card {
    padding: 22px !important;
  }
  .voy-allcat-cta-band {
    padding: 48px 20px;
  }
  .voy-allcat-cta-title {
    font-size: 27px;
  }
  .voy-allcat-cta-sub {
    font-size: 15px;
  }
  .voy-allcat-cta-row {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  .voy-btn {
    text-align: center;
    padding: 12px 20px;
  }
  .voy-cattree-body {
    padding: 16px 20px 48px;
  }
  .voy-cattree-panel {
    width: 100%;
  }
  .voy-tree-head {
    padding: 14px 16px;
  }
  .voy-tree-row {
    padding: 12px 16px 12px 44px;
  }
}
