/* ============================================================
   Through Brazilian Eyes — Category Grid
   Child theme file: tbe-category-grid.css
   ============================================================ */

/* ---------- Layout: masonry-style columns, natural image heights ---------- */
.tbe-cat-grid {
  column-count: 3;
  column-gap: 22px;
  margin: 0 auto;
}

@media (max-width: 900px) {
  .tbe-cat-grid {
    column-count: 2;
    column-gap: 16px;
  }
}

.tbe-cat-item {
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  display: inline-block; /* keeps items from splitting across columns */
  width: 100%;
  margin: 0 0 22px;
}

/* ---------- Image ---------- */
.tbe-cat-item a {
  text-decoration: none;
  display: block;
}

.tbe-cat-thumb {
  display: block;
  width: 100%;
  height: auto; /* natural aspect ratio — nothing is cropped */
  border-radius: 3px;
  transition: opacity 0.3s ease;
}

.tbe-cat-item a:hover .tbe-cat-thumb {
  opacity: 0.82;
}

/* Visible keyboard focus, in case the theme hides it */
.tbe-cat-item a:focus-visible {
  outline: 3px solid #c0392b;
  outline-offset: 3px;
}

/* ---------- Caption + red count badge ---------- */
.tbe-cat-caption {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  text-align: center;
}

.tbe-cat-name {
  font-weight: 600;
  line-height: 1.3;
}

.tbe-cat-count {
  display: inline-block;
  background: #c0392b;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  padding: 4px 7px;
  border-radius: 3px;
  white-space: nowrap;
}

.tbe-cat-status {
  text-align: center;
  padding: 24px 0;
  opacity: 0.7;
}

@media (prefers-reduced-motion: reduce) {
  .tbe-cat-thumb {
    transition: none;
  }
}
