/* === MWS: Modern list layout for com_content category list pages === */
/* 1) Fix the broken rule: Joomla uses cat-list-row0/1 on <tr> */
body.com_content.view-category table.com-content-category__table tr.cat-list-row0,
body.com_content.view-category table.com-content-category__table tr.cat-list-row1 {
  display: table-row !important;
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
}
/* 2) Make the table behave like “spaced rows” */
body.com_content.view-category table.com-content-category__table {
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 0.75rem !important;
  background: transparent !important;
  border: 0 !important;
}
/* Remove Bootstrap table borders so the card border looks clean */
body.com_content.view-category table.com-content-category__table.table-bordered > :not(caption) > * > * {
  border-width: 0 !important;
}
/* 3) Card styling is applied to the actual cell (your rows are single <th.list-title>) */
body.com_content.view-category table.com-content-category__table th.list-title {
  background: #ffffff !important;
  border: 1.5px solid #e5eef4 !important;
  border-radius: 16px !important;
  padding: 1rem 1.25rem !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.06) !important;
  transition: transform .15s, box-shadow .15s, border-color .15s !important;
}
body.com_content.view-category table.com-content-category__table tr:hover th.list-title {
  border-color: #b3cde0 !important;
  box-shadow: 0 10px 28px rgba(0,0,0,.10) !important;
  transform: translateY(-2px) !important;
}
/* Link layout (title left, chevron right) */
body.com_content.view-category table.com-content-category__table th.list-title > a {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 1rem !important;
  font-weight: 800 !important;
  color: #5382ac !important;
  text-decoration: none !important;
  white-space: normal !important;
}
body.com_content.view-category table.com-content-category__table th.list-title > a::after {
  content: "›";
  font-size: 1.25rem;
  line-height: 1;
  opacity: .55;
}
/* 4) Child categories: turn .cat-children into a responsive card grid */
body.com_content.view-category .cat-children {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
  gap: 1rem !important;
  margin-top: 1.5rem !important;
}
/* Each child category block is a card */
body.com_content.view-category .cat-children > .com-content-category__children {
  background: #ffffff !important;
  border: 1.5px solid #e5eef4 !important;
  border-radius: 16px !important;
  padding: 1.25rem !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.06) !important;
  transition: transform .15s, box-shadow .15s, border-color .15s !important;
}
body.com_content.view-category .cat-children > .com-content-category__children:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 10px 28px rgba(0,0,0,.10) !important;
  border-color: #b3cde0 !important;
}
body.com_content.view-category .cat-children .item-title a {
  font-weight: 900 !important;
  color: #5382ac !important;
  text-decoration: none !important;
}
@media (max-width: 768px) {
  body.com_content.view-category table.com-content-category__table {
    border-spacing: 0 0.6rem !important;
  }
}