
/*
.views-element-container {
  margin-top: 2.25rem;
}

.views-element-container .view-content {
  margin-top: 1.25rem;
}

/* Si la vista inclou una taula, que mai peti en mobile 
.views-element-container .view-content {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
*/
/* Estil genèric per qualsevol taula dins d'una vista */
.views-element-container table {
  margin-top: 3rem;
  width: 100%;
  min-width: 640px;
  border-collapse: separate;
  border-spacing: 0;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

/* Si la taula no té header també continuarà veient-se bé */
.views-element-container table thead {
  background: linear-gradient(180deg, var(--bisbat-color-gray-100) 0%, #f1f5f9 100%);
}

.views-element-container table thead th {
  padding: 1rem 1.1rem;
  font-weight: 700;
  line-height: var(--bisbat-leading-tightest);
  text-align: left;
  border-bottom: 1px solid var(--bisbat-color-border-strong);
  white-space: nowrap;
}

/* Cel·les */
.views-element-container table tbody td {
  padding: 0.95rem 1.1rem;
  line-height: var(--bisbat-leading-tightest);
  vertical-align: middle;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

/* L'última fila sense línia inferior */
.views-element-container table tbody tr:last-child td {
  border-bottom: 0;
}

/* Hover subtil */
.views-element-container table tbody tr {
  transition: background-color 0.2s ease;
}

.views-element-container table tbody tr:hover {
  background: rgba(80, 184, 223, 0.06);
}

/* Enllaços dins la taula */
.views-element-container table a {
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.views-element-container table a:hover,
.views-element-container table a:focus {
  text-decoration: underline;
}

/* Primera i última capçalera amb acabat més net */
.views-element-container table thead th:first-child {
  border-top-left-radius: 18px;
}

.views-element-container table thead th:last-child {
  border-top-right-radius: 18px;
}

/* Files zebrades molt suaus, opcional però elegant */
.views-element-container table tbody tr:nth-child(even) {
  background-color: rgba(248, 250, 252, 0.55);
}

/* Quan no hi ha thead, la taula segueix tenint bon aspecte */
.views-element-container table:not(:has(thead)) tbody tr:first-child td {
  padding-top: 1.15rem;
}

/* Columnes habituals de data una mica més compactes */
.views-element-container table td.views-field-field-datapublicacio,
.views-element-container table th.views-field-field-datapublicacio {
  width: 30%;
  white-space: nowrap;
}

/* Missatges buits o resultats sense contingut */
.views-element-container .view-empty {
  padding: 1.25rem 1.4rem;
  background: var(--bisbat-color-white);
  border: 1px solid var(--bisbat-color-border-strong);
  border-radius: var(--bisbat-radius-3xl);
  color: #486581;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

/* Separació superior respecte el menú/submenú */
.region-content .view,
main .view,
.layout-content .views-element-container {
  margin-top: 2rem;
}

/* Responsive */
@media (max-width: 767px) {
  /*  
  .views-element-container {
    margin-top: 1.5rem;
  }

  .views-element-container .view-content {
    margin-top: 1rem;
  }
*/
  .views-element-container table {
    min-width: 560px;
    border-radius: 16px;
  }

  .views-element-container table thead th,
  .views-element-container table tbody td {
    padding: 0.82rem 0.9rem;
  }
}

/* ================================
   Taules col·lapsables
   ================================ */

.views-element-container .js-accordion-table {
  margin-top: 1.5rem;
}

/* En aquestes taules no cal amplada mínima gran */
.views-element-container .js-accordion-table table {
  min-width: 0;
  margin-top: 0;
}

/* Header clickable */
.views-element-container .js-accordion-table table thead th[role="button"] {
  position: relative;
  cursor: pointer;
  user-select: none;
  padding: 1.15rem 3.5rem 1.15rem 1.25rem;
  background: linear-gradient(180deg, #f8fafc 0%, #eef4f8 100%);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.views-element-container .js-accordion-table table thead th[role="button"]:hover,
.views-element-container .js-accordion-table table thead th[role="button"]:focus {
  background: linear-gradient(180deg, #eef6fb 0%, #e7f1f7 100%);
  outline: none;
}

/* Títol del header */
.views-element-container .js-accordion-table table thead th h2 {
  margin: 0;
  font-size: 1.15rem;
  line-height: var(--bisbat-leading-tight);
  font-weight: 700;
  color: #1f4e5f;
}

/* Chevron */
.views-element-container .js-accordion-table table thead th[role="button"]::after {
  content: "";
  position: absolute;
  right: 1.15rem;
  top: 50%;
  width: 0.8rem;
  height: 0.8rem;
  border-right: 2px solid var(--bisbat-color-primary);
  border-bottom: 2px solid var(--bisbat-color-primary);
  transform: translateY(-65%) rotate(45deg);
  transition: transform 0.22s ease;
}

/* Cos tancat */
.views-element-container .js-accordion-table.is-collapsed table tbody {
  display: none;
}

/* Cos obert */
.views-element-container .js-accordion-table.is-open table tbody {
  display: table-row-group;
}

/* Chevron obert */
.views-element-container .js-accordion-table.is-open table thead th[role="button"]::after {
  transform: translateY(-35%) rotate(-135deg);
}

/* Ajust de separació entre header i files */
.views-element-container .js-accordion-table table tbody td {
  line-height: var(--bisbat-leading-compressed);
}

/* Quan és accordion, files una mica més netes */
.views-element-container .js-accordion-table table tbody tr:hover {
  background: rgba(58, 159, 195, 0.05);
}

/* Enllaços de les files */
.views-element-container .js-accordion-table table tbody td a {
  display: inline-block;
  width: 100%;
}

/* Estat obert amb lleu accent visual */
.views-element-container .js-accordion-table.is-open table {
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

/* Focus accessible */
.views-element-container .js-accordion-table table thead th[role="button"]:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(58, 159, 195, 0.45);
  border-radius: 18px 18px 0 0;
}

/* Mòbil */
@media (max-width: 767px) {

  .views-element-container table {
    min-width: 0;
    border-radius: 16px;
  }

  .views-element-container .js-accordion-table {
    margin-top: 1rem;
  }

  .views-element-container .js-accordion-table table {
    min-width: 0;
    border-radius: 16px;
  }

  .views-element-container .js-accordion-table table thead th[role="button"] {
    padding: 1rem 3rem 1rem 1rem;
  }

  .views-element-container .js-accordion-table table thead th h2 {
    font-size: 1.02rem;
  }

  .views-element-container .js-accordion-table table thead th[role="button"]::after {
    right: 1rem;
    width: 0.72rem;
    height: 0.72rem;
  }

  .views-element-container .js-accordion-table table tbody td {
    padding: 0.82rem 1rem;
  }
}