/* ======================================================== */
/*  ICON FOR EMPTY LINKS IN THE LAST COLUMN                 */
/* ======================================================== */
/* Adds the View_Details.png image to empty <a> elements */
table[data-drupal-selector="edit-table-tools"] td:last-child a::after {
    content: "";
    display: inline-block;
    width: 16px;                 /* icon width */
    height: 16px;                /* icon height */
    margin-left: 5px;
    vertical-align: middle;
    background-image: url('../images/View_Details.png');
    background-size: contain;
    background-repeat: no-repeat;
}



/* ======================================================== */
/*  RESPONSIVE TABLE WITHOUT BREAKING COLUMN ALIGNMENT      */
/* ======================================================== */
/* Keep table layout intact, but allow horizontal scrolling */
table[data-drupal-selector="edit-table-tools"] {
    width: 100%;
    display: inline-table !important;     /* key: keeps table column alignment */
    overflow-x: auto;                     /* enables horizontal scrolling */
    -webkit-overflow-scrolling: touch;    /* smooth scroll on iOS */
}



/* ======================================================== */
/*  FIX WIDTH ISSUES ON SMALL SCREENS                       */
/* ======================================================== */
@media (max-width: 768px) {

    /* Remove fixed widths that break responsiveness on mobile */
    table[data-drupal-selector="edit-table-tools"] tbody tr td:nth-child(2),
    table[data-drupal-selector="edit-table-tools"] tbody tr td:last-child {
        width: auto !important;
    }

    /* Better padding on mobile devices */
    table[data-drupal-selector="edit-table-tools"] td {
        padding: 0.75em;
    }
}



/* ======================================================== */
/*  ORIGINAL CSS (UNCHANGED)                                */
/* ======================================================== */

/* News table layout */
.row_news {
  display: table-row;
  margin-bottom: 1em;
}

.cell_news {
  display: table-cell;
  border-bottom: solid 0.5px #dcdcdc;
  border-right: solid 0.5px #dcdcdc;
}

.image_news {
  height: 15em;
  width: 30%;
  vertical-align: middle;
}

.image_news img {
  max-width: 100%;
  text-align: center;
  width: 99.2%;
  margin-left: 1.5px !important;
}

.title_new {
  margin-top: 1em;
  margin-left: 1em;
  margin-bottom: 1em;
  font-weight: bold;
  color: #a67c00;
}

.date_publication_new {
  color: #a67c00;
  margin-left: 1em;
}

.paragraph_new {
  width: 95%;
  padding: 2px 5px;
  margin-left: 1em;
  margin-bottom: 1em;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
  color: #a67c00;
}

.link_news {
  color: #a67c00 !important;
  margin-left: 1.5em;
  margin-bottom: 1em;
}

.news_not_found_text {
  font-size: 1.5em;
  padding: 0.5em 0.5em;
  margin: auto;
  text-align: center;
}

@media (max-width: 768px) {
  .cell-filter-news {
    display: contents !important;
  }
  .cell_news {
    display: contents;
  }
}


/* Tools fieldset styling */
.fieldset-group-tools {
  background: #FFF;
  position: relative;
}

.fieldset-group-tools legend {
  color: #a67c00;
  font-weight: bold;
  position: absolute;
  margin-top: 1em;
}

.fieldset-group-tools div[class="fieldset-wrapper"] {
  margin-top: 5em;
  margin-bottom: 2em;
  margin-left: 1em;
}

.fieldset-group-tools div[class="fieldset-wrapper"] .field {
  display: flex !important;
  margin-bottom: 1em;
}

.fieldset-group-tools div[class="fieldset-wrapper"] .field--name-field-tool-image {
  display: block !important;
}

.fieldset-group-tools div[class="fieldset-wrapper"] .field .field__label {
  font-weight: bold !important;
  margin-right: 1em !important;
}

.fieldset-group-tools div[class="fieldset-wrapper"] .field .field__label:after {
  content: ": " !important;
}

#edit-filter-tools {
  background: #FFF;
  position: relative;
}

#edit-filter-tools legend {
  color: #a67c00;
  font-weight: bold;
  position: absolute;
  margin-top: 1em;
  margin-left: 1em;
}

#edit-filter-tools div[class="fieldset-wrapper"] {
  margin-top: 5em;
  margin-bottom: 2em;
  margin-left: 1em;
}

/* Table cell alignment */
table[data-drupal-selector="edit-table-tools"] tbody tr td {
  vertical-align: middle !important;
}

/* Fixed widths on desktop (kept as original) */
table[data-drupal-selector="edit-table-tools"] tbody tr td:last-child {
  width: 7% !important;
}

table[data-drupal-selector="edit-table-tools"] tbody tr td:nth-child(2) {
  width: 30% !important;
}


/* General NAGU table */
#general_nagu_table td,
#general_nagu_table th {
  font-size: 1.1em;
  text-align: center;
  vertical-align: middle;
}

.statistics-counter {
  display: none !important;
}

