/* =========================================================================
 * Customer Logos wall — homepage + opted-in AI templates (components/customer-logos-wall.php)
 * Claude Design "Jibble Homepage - Logos Wall Top v4" → Logo Strip / wall4.
 *
 * Design @ 1520px container: 10 columns, 12px gap, tiles 128px tall
 * (≈141×128), 10px padding, #F6F8FB on #ECEDEF, radius 12, logos
 * mix-blend-mode:multiply, each at a hand-tuned width up to 112×64.
 *
 * Responsive model:
 *   - Tiles keep the design's 141:128 shape, so rows shrink with the width
 *     instead of the logos being squeezed inside fixed-height tiles.
 *   - A logo's width is its design width (--w, px) expressed as a share of
 *     the design tile's 121px content box, capped at --w px. Every logo
 *     therefore shrinks by the same factor and the wall stays optically even.
 *   - Columns step down 10 → 8 → 6 → 5 → 4 so tiles never get small enough
 *     for wordmarks to become unreadable. Tiles are flex items, so a partial
 *     last row is centred rather than left-hanging.
 * ========================================================================= */

.jbcl-root {
  --cols: 10;
  --gap: 12px;
  --pad: 10px;
  --radius: 12px;
  --k: 1;             /* logo size multiplier inside the tile */
  background: #fff;
}
/* The section also carries the site's .container class; its side padding is
   fixed at 10px at every width. */
.jbcl-root.container {
  padding: 0 10px;
}

.jbcl-root .jbcl-wrap {
  max-width: 1520px;
  margin: 0 auto;
  padding: 96px 0;
}

/* The optional heading uses the homepage's shared .jbhp-why-top h2 / p
   styles — nothing is defined for it here. */

.jbcl-root .jbcl-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--gap);
  list-style: none;
  margin: 0;
  padding: 0;
}

.jbcl-root .jbcl-tile {
  flex: 0 0 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols));
  min-width: 0;
  aspect-ratio: 141 / 128;
  box-sizing: border-box;
  padding: var(--pad);
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #F6F8FB;
  border: 1px solid #ECEDEF;
  border-radius: var(--radius);
}
.jbcl-root .jbcl-tile::before,
.jbcl-root .jbcl-tile::marker { content: none; }

.jbcl-root .jbcl-tile img {
  display: block;
  flex: none;
  width: min(calc(var(--w) * 1px), calc(var(--w) * var(--k) / 121 * 100%));
  max-width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

@media (max-width: 1199px) {
  .jbcl-root { --cols: 8; }
  .jbcl-root .jbcl-wrap { padding: 80px 0; }
}
@media (max-width: 991px) {
  .jbcl-root { --cols: 6; --k: 1.05; }
  .jbcl-root .jbcl-wrap { padding: 64px 0; }
}
@media (max-width: 767px) {
  .jbcl-root { --cols: 5; --gap: 10px; --pad: 8px; --radius: 10px; --k: 1.1; }
  .jbcl-root .jbcl-wrap { padding: 48px 0; }
  /* Mobile shows the first 20 logos only: 4 full rows at 5 columns, 5 at 4.
     Hidden tiles' images are lazy, so they are never downloaded. */
  .jbcl-root .jbcl-tile:nth-child(n+21) { display: none; }
}
@media (max-width: 559px) {
  .jbcl-root { --cols: 4; --gap: 8px; --pad: 6px; --radius: 8px; --k: 1.18; }
  .jbcl-root .jbcl-wrap { padding: 40px 0; }
}


/* =========================================================================
 * AI-template pages (group_jbcl_page switched on) — .jbcl-root--page.
 * Same wall, rendered inside page roots whose scoped sheets restyle bare
 * section / ul / li / img / h2 / p — several with !important:
 *   .tsa-root li {display:list-item; padding:0}, .tsa-root h2 {font-size:inherit}
 *   .llt-root section {padding:40px 0}, .pto-root section {padding-bottom:32px}
 *   .frs-root h2 / .tsc-root section h2 (mobile font-size)
 *   .llt/.pto/.ptt-root .container {max-width:1146px; padding:0 24px|20px},
 *   .ctt-root .container {max-width:var(--maxw)} — the section is
 *   .jbcl-root.container here too, so these would otherwise narrow the wall
 * So the properties the wall depends on are !important here; the doubled
 * class (0,2,0+) outranks every one of those (0,1,1–0,1,2) selectors.
 * ========================================================================= */
.jbcl-root.jbcl-root--page {
  display: block !important;
  box-sizing: border-box !important;
  width: 100% !important;
  margin: auto !important;
  padding: 0 10px !important;
  border: 0 !important;
  font-family: inherit;
  text-align: initial;
}
.jbcl-root.jbcl-root--page .jbcl-wrap { box-sizing: border-box; width: 100%; }
.jbcl-root.container.jbcl-root--page .jbcl-wrap {
    padding-top: 0;
}
.page-template-template-face-recognition-attendance-system .jbcl-root.jbcl-root--page .jbcl-wrap {
    padding-bottom: 0px !important;
}
/* Competitor Alternative (templates/template-alternative.php): 20px bottom padding. */
.page-template-templatestemplate-alternative-php .jbcl-root.container.jbcl-root--page .jbcl-wrap {
    padding-bottom: 20px !important;
}
/* Calculator pages (Work Time, Timesheet, Overtime): 30px top padding on
   desktop only (≥992px). */
@media (min-width: 992px) {
  .page-template-template-work-time-calculator .jbcl-root.container.jbcl-root--page .jbcl-wrap,
  .page-template-template-timesheet-calculator .jbcl-root.container.jbcl-root--page .jbcl-wrap,
  .page-template-template-overtime-calculator .jbcl-root.container.jbcl-root--page .jbcl-wrap {
    padding-top: 30px !important;
  }
}
/* Time and Attendance Software: 30px top padding on desktop only (≥992px,
   the wall's own tablet step), and only on the translations — <html lang>
   is en-US on English and de-DE / ar / pt-BR … on the others. */
@media (min-width: 992px) {
  html:not([lang|="en"]) .page-template-template-time-and-attendance-software .jbcl-root.container.jbcl-root--page .jbcl-wrap { padding-top: 30px !important; }
}
/* …except Turkish (tr-TR), Indonesian (id-ID) and Simplified Chinese
   (/zh-hans/, <html lang="zh-CN">): no top padding at any width. Same
   specificity as the rule above, so it must stay AFTER it. */
html[lang|="tr"] .page-template-template-time-and-attendance-software .jbcl-root.container.jbcl-root--page .jbcl-wrap,
html[lang|="id"] .page-template-template-time-and-attendance-software .jbcl-root.container.jbcl-root--page .jbcl-wrap,
html[lang|="zh"] .page-template-template-time-and-attendance-software .jbcl-root.container.jbcl-root--page .jbcl-wrap { padding-top: 0 !important; }
/* Project Time Tracker + PTO Tracking Software + Student & Teacher Attendance
   + AI Product (the 12 AI pages) + Product Feature (the 4 pages) + Product Explainer
   (the 6 pages) + Product Use Case (the 13 pages)
   + Product Tabs (the 4 pages; its next band is the grey tabs section, so like Product Explainer it keeps its bottom padding): keep a top padding, on the wall's own scale (96 → 80 → 64 → 48 → 40px,
   the same steps as its bottom padding). */
.page-template-template-project-time-tracker .jbcl-root.container.jbcl-root--page .jbcl-wrap,
.page-template-template-pto-tracking-software .jbcl-root.container.jbcl-root--page .jbcl-wrap,
  .page-template-template-student-attendance .jbcl-root.container.jbcl-root--page .jbcl-wrap,
  .page-template-template-product-feature .jbcl-root.container.jbcl-root--page .jbcl-wrap,
  .page-template-template-product-explainer .jbcl-root.container.jbcl-root--page .jbcl-wrap,
  .page-template-template-product-use-case .jbcl-root.container.jbcl-root--page .jbcl-wrap,
  .page-template-template-product-tabs .jbcl-root.container.jbcl-root--page .jbcl-wrap,
  .page-template-template-ai-product .jbcl-root.container.jbcl-root--page .jbcl-wrap { padding-top: 96px !important; }
@media (max-width: 1199px) {
  .page-template-template-project-time-tracker .jbcl-root.container.jbcl-root--page .jbcl-wrap,
  .page-template-template-pto-tracking-software .jbcl-root.container.jbcl-root--page .jbcl-wrap,
  .page-template-template-student-attendance .jbcl-root.container.jbcl-root--page .jbcl-wrap,
  .page-template-template-product-feature .jbcl-root.container.jbcl-root--page .jbcl-wrap,
  .page-template-template-product-explainer .jbcl-root.container.jbcl-root--page .jbcl-wrap,
  .page-template-template-product-use-case .jbcl-root.container.jbcl-root--page .jbcl-wrap,
  .page-template-template-product-tabs .jbcl-root.container.jbcl-root--page .jbcl-wrap,
  .page-template-template-ai-product .jbcl-root.container.jbcl-root--page .jbcl-wrap { padding-top: 80px !important; }
}
@media (max-width: 991px) {
  .page-template-template-project-time-tracker .jbcl-root.container.jbcl-root--page .jbcl-wrap,
  .page-template-template-pto-tracking-software .jbcl-root.container.jbcl-root--page .jbcl-wrap,
  .page-template-template-student-attendance .jbcl-root.container.jbcl-root--page .jbcl-wrap,
  .page-template-template-product-feature .jbcl-root.container.jbcl-root--page .jbcl-wrap,
  .page-template-template-product-explainer .jbcl-root.container.jbcl-root--page .jbcl-wrap,
  .page-template-template-product-use-case .jbcl-root.container.jbcl-root--page .jbcl-wrap,
  .page-template-template-product-tabs .jbcl-root.container.jbcl-root--page .jbcl-wrap,
  .page-template-template-ai-product .jbcl-root.container.jbcl-root--page .jbcl-wrap { padding-top: 64px !important; }
}
@media (max-width: 767px) {
  .page-template-template-project-time-tracker .jbcl-root.container.jbcl-root--page .jbcl-wrap,
  .page-template-template-pto-tracking-software .jbcl-root.container.jbcl-root--page .jbcl-wrap,
  .page-template-template-student-attendance .jbcl-root.container.jbcl-root--page .jbcl-wrap,
  .page-template-template-product-feature .jbcl-root.container.jbcl-root--page .jbcl-wrap,
  .page-template-template-product-explainer .jbcl-root.container.jbcl-root--page .jbcl-wrap,
  .page-template-template-product-use-case .jbcl-root.container.jbcl-root--page .jbcl-wrap,
  .page-template-template-product-tabs .jbcl-root.container.jbcl-root--page .jbcl-wrap,
  .page-template-template-ai-product .jbcl-root.container.jbcl-root--page .jbcl-wrap { padding-top: 48px !important; }
}
@media (max-width: 559px) {
  .page-template-template-project-time-tracker .jbcl-root.container.jbcl-root--page .jbcl-wrap,
  .page-template-template-pto-tracking-software .jbcl-root.container.jbcl-root--page .jbcl-wrap,
  .page-template-template-student-attendance .jbcl-root.container.jbcl-root--page .jbcl-wrap,
  .page-template-template-product-feature .jbcl-root.container.jbcl-root--page .jbcl-wrap,
  .page-template-template-product-explainer .jbcl-root.container.jbcl-root--page .jbcl-wrap,
  .page-template-template-product-use-case .jbcl-root.container.jbcl-root--page .jbcl-wrap,
  .page-template-template-product-tabs .jbcl-root.container.jbcl-root--page .jbcl-wrap,
  .page-template-template-ai-product .jbcl-root.container.jbcl-root--page .jbcl-wrap { padding-top: 40px !important; }
}
/* AI Product (the 12 AI pages) + Product Feature (the 4 pfp pages) + Product Use Case (the 13 puc
   pages, next section = the white feature rows): no bottom padding at any width.
   Product Explainer is deliberately NOT here: its next section is the tinted "What is" band,
   so the wall keeps its own bottom padding (96 → 40px) instead of touching that band. */
.page-template-template-product-feature .jbcl-root.container.jbcl-root--page .jbcl-wrap,
.page-template-template-product-use-case .jbcl-root.container.jbcl-root--page .jbcl-wrap,
.page-template-template-ai-product .jbcl-root.container.jbcl-root--page .jbcl-wrap {
    padding-bottom: 0 !important;
}
.jbcl-root.jbcl-root--page .jbcl-grid {
  display: flex !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
.jbcl-root.jbcl-root--page .jbcl-tile {
  display: flex !important;
  margin: 0 !important;
  padding: var(--pad) !important;
}
.jbcl-root.jbcl-root--page .jbcl-tile img {
  margin: 0;
  filter: none;
  opacity: 1;
  border-radius: 0;
  box-shadow: none;
}

/* Heading — the homepage's .jbhp-why-top values (that CSS lives only on the
   homepage), restated here. */
.jbcl-root.jbcl-root--page .jbcl-head { text-align: center !important; margin: 0 0 44px !important; }
.jbcl-root.jbcl-root--page .jbcl-head h2 {
  margin: 0 0 10px !important;
  font-size: 36px !important;
  line-height: 1.2 !important;
  font-weight: 900 !important;
  color: #111827;
  letter-spacing: -0.4px;
  text-transform: none;
  text-align: center !important;
}
.jbcl-root.jbcl-root--page .jbcl-head p {
  margin: 0 !important;
  padding: 0 !important;
  font-size: 20px !important;
  line-height: 1.4 !important;
  font-weight: 400 !important;
  color: #6B7280;
  text-align: center !important;
}
@media (max-width: 767px) {
  /* Re-assert the mobile 20-logo cap: the tile's display above is !important. */
  .jbcl-root.jbcl-root--page .jbcl-tile:nth-child(n+21) { display: none !important; }
  .jbcl-root.jbcl-root--page .jbcl-head { margin-bottom: 28px !important; }
  .jbcl-root.jbcl-root--page .jbcl-head h2 { font-size: 24px !important; }
  .jbcl-root.jbcl-root--page .jbcl-head p { font-size: 16px !important; }
}
