/* UOItalia Reborn 0.1.42 — category heading correction on Joomla 6 native markup.
   Styling only: relies on Joomla 6's own category markup and behaviors.
   Scoped to com_content category; no PHP overrides, no Kunena/CB changes. */

/* The existing page parchment stays untouched; this is its inner article index. */
.news-column .com-content-category {
  --uoi-cat-ink: #173b56;
  --uoi-cat-gold: #ac854d;
  --uoi-cat-rule: #dbcbb0;
  --uoi-cat-paper: #fffdf8;
  max-width: 100%;
  margin: 0 auto;
  padding: 6px clamp(0px, 1vw, 12px) 30px;
  color: #322b25;
  font-family: Georgia, 'Times New Roman', serif;
}
/* Bootstrap may not be loaded by this custom Joomla template. Keep Joomla's
   semantic hidden captions/labels accessible instead of showing them as text. */
.news-column .com-content-category .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0,0,0,0);
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
}
/* Joomla 6 native category_default layout: page heading/category heading is a
   direct child of .content-category; no .page-header wrapper is generated.
   Target only the FIRST heading so a second optional Joomla category title
   never receives duplicate ornamentation. */
.news-column .com-content-category > .content-category > :is(h1, h2):first-child {
  margin: 5px 0 26px;
  padding: 0;
  border: 0;
  color: #123952;
  font: normal clamp(30px, 3vw, 42px)/1.16 'Palatino Linotype','Book Antiqua',Palatino,Georgia,serif;
  letter-spacing: -.025em;
  text-align: center;
  text-shadow: 0 1px 0 #fff;
}
.news-column .com-content-category > .content-category > :is(h1, h2):first-child::after {
  content: '✦';
  display: block;
  width: min(280px, 72%);
  height: 22px;
  margin: 11px auto 0;
  border: 0;
  color: #ae844b;
  font: normal 14px/20px Georgia,serif;
  letter-spacing: 0;
  background: linear-gradient(90deg,transparent,#bb9a68 35%,transparent 35%,transparent 65%,#bb9a68 65%,transparent) center/100% 1px no-repeat;
}

/* Actual Joomla form: .com-content__filter and adjacent limit selector. */
.news-column .com-content-category form.com-content-category__articles {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 12px;
  min-width: 0;
}
.news-column .com-content-category .com-content__filter {
  display: flex;
  flex: 1 1 350px;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  min-width: 0;
  margin: 0;
  padding: 11px 13px;
  border: 1px solid #d5c0a0;
  border-radius: 2px;
  background: linear-gradient(180deg,#fbf6eb,#f1e7d6);
  box-shadow: inset 0 1px 0 #ffffffd9,0 1px 3px #4c342010;
}
.news-column .com-content-category .com-content__filter :is(input,select),
.news-column .com-content-category form.com-content-category__articles > .com-content-category__pagination :is(select,input) {
  box-sizing: border-box;
  min-width: 0;
  height: 39px;
  padding: 8px 12px;
  border: 1px solid #c7ac82;
  border-radius: 2px;
  background: #fffdf7;
  color: #2b3c47;
  box-shadow: inset 0 1px 3px #3e2e1012;
  font: 14px/1.35 Georgia,serif;
}
.news-column .com-content-category .com-content__filter :is(input,select) {
  flex: 1 1 135px;
  width: 100%;
}
.news-column .com-content-category .com-content__filter :is(input,select)::placeholder {
  color: #897760;
  opacity: 1;
}
.news-column .com-content-category .com-content__filter .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 39px;
  padding: 8px 13px;
  border: 1px solid #947447;
  border-radius: 2px;
  background: linear-gradient(180deg,#255270,#10344c);
  color: #fff4da;
  box-shadow: inset 0 1px 0 #ffffff30;
  font: 600 13px/1.2 Georgia,serif;
  cursor: pointer;
}
.news-column .com-content-category .com-content__filter .btn-secondary {
  background: linear-gradient(180deg,#fff8e9,#e7d6b7);
  color: #5c4227;
  border-color: #b99c72;
}
.news-column .com-content-category .com-content__filter .btn:hover {
  filter: brightness(1.08);
}
.news-column .com-content-category form.com-content-category__articles > .com-content-category__pagination {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  margin: 0 0 0 auto;
  padding: 8px;
  background: #f6efe3;
  border: 1px solid #dfd1b9;
  border-radius: 2px;
  box-sizing: border-box;
  float: none;
}
.news-column .com-content-category form.com-content-category__articles > .com-content-category__pagination select {
  width: auto;
  min-width: 70px;
  max-width: 105px;
}

/* Genuine Joomla table: first cell is a TH.list-title, not TD. */
.news-column .com-content-category table.com-content-category__table {
  --bs-table-bg: transparent;
  --bs-table-accent-bg: transparent;
  --bs-table-striped-bg: transparent;
  --bs-table-hover-bg: transparent;
  --bs-table-color: #2c343a;
  flex: 0 0 100%;
  width: 100%;
  max-width: 100%;
  margin: 7px 0 9px;
  border: 1px solid #a98858;
  border-collapse: separate;
  border-spacing: 0;
  background: #fffdf8;
  box-shadow: 0 3px 14px #5d46221e, 0 0 0 3px #f7f0e4;
  color: #2c343a;
  font: 14px/1.5 Georgia,serif;
  box-sizing: border-box;
}
.news-column .com-content-category table.com-content-category__table :is(th,td) {
  border: 0;
  border-bottom: 1px solid var(--uoi-cat-rule);
  padding: 14px 17px;
  background-color: transparent;
  box-shadow: none;
  vertical-align: middle;
}
.news-column .com-content-category table.com-content-category__table thead {
  background: linear-gradient(180deg,#214d68 0%,#153b55 57%,#0d2a40 100%);
}
.news-column .com-content-category table.com-content-category__table thead th {
  border-bottom: 3px solid #b58c51;
  color: #f2e2c4;
  font: 700 12px/1.3 Georgia,serif;
  text-transform: uppercase;
  letter-spacing: .09em;
  padding: 16px 17px 14px;
  text-align: left;
  text-shadow: 0 1px 1px #071827aa;
}
.news-column .com-content-category table.com-content-category__table thead :is(a,button) {
  color: inherit;
  text-decoration: none;
}
.news-column .com-content-category table.com-content-category__table thead :is(a,button):hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.news-column .com-content-category table.com-content-category__table thead th#categorylist_header_hits,
.news-column .com-content-category table.com-content-category__table :is(td.list-hits,td.list-votes,td.list-ratings) {
  text-align: right;
}
.news-column .com-content-category table.com-content-category__table tbody tr {
  background: #fffdf8;
  transition: background-color .15s ease;
}
.news-column .com-content-category table.com-content-category__table tbody tr:nth-child(even) {
  background: #f7f1e7;
}
.news-column .com-content-category table.com-content-category__table tbody tr:hover {
  background: #f5e8d0;
}
.news-column .com-content-category table.com-content-category__table tbody tr:last-child > * {
  border-bottom: 0;
}
.news-column .com-content-category table.com-content-category__table tbody th.list-title {
  position: relative;
  width: 47%;
  padding-left: 44px;
  border-left: 3px solid transparent;
  color: #183c54;
  font: 600 clamp(15px,1.2vw,18px)/1.4 'Palatino Linotype',Palatino,Georgia,serif;
  text-align: left;
  letter-spacing: -.008em;
}
.news-column .com-content-category table.com-content-category__table tbody th.list-title::before {
  content: '✧';
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: #ac854d;
  font: 20px/1 Georgia,serif;
}
.news-column .com-content-category table.com-content-category__table tbody tr:hover th.list-title {
  border-left-color: #b48b50;
}
.news-column .com-content-category table.com-content-category__table tbody th.list-title a {
  color: #153e5a;
  text-decoration: none;
  text-underline-offset: 4px;
  overflow-wrap: anywhere;
}
.news-column .com-content-category table.com-content-category__table tbody th.list-title a:hover,
.news-column .com-content-category table.com-content-category__table tbody th.list-title a:focus-visible {
  color: #85512b;
  text-decoration: underline;
}
.news-column .com-content-category table.com-content-category__table tbody td.list-author {
  color: #776e62;
  font: italic 13px/1.4 Georgia,serif;
}
.news-column .com-content-category table.com-content-category__table tbody td.list-hits {
  font-size: 13px;
  white-space: nowrap;
}
.news-column .com-content-category table.com-content-category__table tbody .badge.bg-info {
  --bs-info-rgb: 246, 234, 211;
  --bs-bg-opacity: 1;
  display: inline-block;
  min-width: 48px;
  padding: 5px 11px;
  border: 1px solid #dfcaa9;
  border-radius: 16px;
  background-color: #f6ead3;
  color: #765836;
  font: 600 12px/1.25 Georgia,serif;
  text-align: center;
  box-shadow: inset 0 1px 0 #fff8e9;
}
.news-column .com-content-category :is(a,button,input,select):focus-visible {
  outline: 2px solid #a67a3b;
  outline-offset: 3px;
}
/* Joomla provides sorting, limit selection and pagination itself. */
.news-column .com-content-category .com-content-category__navigation {
  flex: 0 0 100%;
  margin-top: 7px;
  padding-top: 10px;
  border-top: 1px solid #dbc8a6;
}
.news-column .com-content-category .com-content-category__navigation .pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 5px;
  padding: 0;
  margin: 8px 0;
  list-style: none;
}
.news-column .com-content-category .com-content-category__navigation .page-link {
  display: inline-block;
  min-width: 34px;
  padding: 7px 10px;
  border: 1px solid #c5ab83;
  border-radius: 2px;
  background: #fcf5e9;
  color: #183c54;
  text-align: center;
  text-decoration: none;
}
.news-column .com-content-category .com-content-category__navigation .active .page-link {
  background: #183c54;
  color: #fff5e1;
  border-color: #a87d41;
}
.news-column .com-content-category .com-content-category__counter {
  font: italic 12px Georgia,serif;
  color: #7a664b;
}

/* Tablet and phone: native rows become compact parchment entries.
   All optional Joomla columns remain available; no structural override. */
@media (max-width: 900px) {
  .news-column .com-content-category table.com-content-category__table {
    display: block;
    border: 0;
    box-shadow: none;
    background: transparent;
    margin-top: 4px;
  }
  .news-column .com-content-category table.com-content-category__table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .news-column .com-content-category table.com-content-category__table tbody {
    display: grid;
    gap: 10px;
  }
  .news-column .com-content-category table.com-content-category__table tbody tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px 12px;
    min-width: 0;
    padding: 13px 14px 12px;
    border: 1px solid #d3bf9d;
    border-left: 3px solid #ad864f;
    background: linear-gradient(120deg,#fffdf7,#f8f0e2);
    box-shadow: 0 3px 9px #5e431f16;
  }
  .news-column .com-content-category table.com-content-category__table tbody tr:nth-child(even) {
    background: linear-gradient(120deg,#faf6ed,#f0e6d6);
  }
  .news-column .com-content-category table.com-content-category__table tbody tr:hover {
    background: #f4e6ca;
  }
  .news-column .com-content-category table.com-content-category__table tbody :is(th,td) {
    display: block;
    width: auto;
    min-width: 0;
    border: 0;
    padding: 0;
    background: none;
    box-shadow: none;
  }
  .news-column .com-content-category table.com-content-category__table tbody th.list-title {
    flex: 0 0 100%;
    box-sizing: border-box;
    width: 100%;
    margin-bottom: 4px;
    padding: 0 0 9px 22px;
    border: 0;
    border-bottom: 1px solid #ddccb0;
    font-size: 18px;
  }
  .news-column .com-content-category table.com-content-category__table tbody th.list-title::before {
    left: 0;
    top: 0;
    transform: none;
    font-size: 18px;
  }
  .news-column .com-content-category table.com-content-category__table tbody td.list-author {
    flex: 1 1 110px;
    overflow-wrap: anywhere;
    font-size: 12px;
  }
  .news-column .com-content-category table.com-content-category__table tbody td.list-hits {
    flex: 0 0 auto;
    margin-left: auto;
  }
}
@media (max-width: 580px) {
  .news-column .com-content-category {
    padding: 0 0 18px;
  }
  .news-column .com-content-category > .content-category > :is(h1, h2):first-child {
    margin-bottom: 14px;
    font-size: clamp(25px,7vw,33px);
  }
  .news-column .com-content-category .com-content__filter {
    flex: 1 1 100%;
    padding: 9px;
    gap: 7px;
  }
  .news-column .com-content-category .com-content__filter :is(input,select) {
    flex: 1 1 100%;
  }
  .news-column .com-content-category .com-content__filter .btn {
    flex: 1 1 calc(50% - 7px);
  }
  .news-column .com-content-category form.com-content-category__articles > .com-content-category__pagination {
    margin-left: 0;
  }
  .news-column .com-content-category table.com-content-category__table tbody tr {
    padding: 12px 10px;
  }
  .news-column .com-content-category table.com-content-category__table tbody th.list-title {
    font-size: 17px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .news-column .com-content-category table.com-content-category__table tbody tr { transition: none; }
}
