/* more-news: 3 colunas — com subgrid as linhas batem entre si; sem "..." no título */

/* ---------- Mobile ---------- */
@media screen and (max-width: 767px) {
  .news-block-content {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .news-block-column {
    display: flex;
    flex-direction: column;
    width: 100%;
  }

  .news-block-column + .news-block-column {
    margin-top: 36px;
  }

  .news-block-column .block-item--featured-top {
    display: block;
  }

  .news-block-column .block-item--featured-top > a {
    display: block;
    padding-bottom: 16px;
    border-bottom: 1px solid #ececec;
    font-size: 20px;
    line-height: 24px;
  }

  .news-block-column .block-item.--news-bottom {
    padding-top: 16px;
  }

  .news-block-column .block-item.--news-bottom,
  .news-block-column .block-item-news-list {
    display: block !important;
  }

  .news-block-content .block-item.--news-bottom .block-item-news-list li {
    padding-top: 0;
    margin-top: 0;
    list-style: none;
    margin-bottom: 0;
  }

  .news-block-content .block-item.--news-bottom .block-item-news-list li:not(:last-child) {
    padding-bottom: 16px;
    border-bottom: 1px solid #ececec;
  }

  .news-block-content .block-item.--news-bottom .block-item-news-list li + li {
    padding-top: 16px;
  }

  .news-block-content .block-item.--news-bottom .block-item-news-list li a {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
    text-align: left;
    font-size: 13px;
    line-height: 17px;
    min-height: 0;
    height: auto;
  }

  .news-block-content .block-item.--news-bottom .block-item-news-thumb {
    width: 100px;
    min-width: 100px;
  }

  .news-block-content .block-item.--news-bottom .block-item-news-thumb img {
    height: 68px;
  }

  .news-block-content .block-item.--news-bottom .block-item-news-body {
    min-height: 0;
    justify-content: flex-start;
  }

  .news-block-content .block-item.--news-bottom .block-item-news-titulo {
    font-size: 13px;
    line-height: 17px;
    color: #333 !important;
  }

  .news-block-content .block-item.--news-bottom .block-item-news-chapeu {
    font-size: 11px;
    line-height: 13px;
  }
}

/* ---------- Desktop: base (flex — funciona sem subgrid) ---------- */
@media screen and (min-width: 768px) {
  .news-block-content {
    justify-content: initial;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 30px;
  }

  .news-block-content > .news-block-column {
    flex: 1 1 0 !important;
    min-width: 0;
    max-width: none !important;
    display: flex;
    flex-direction: column;
  }

  /* Destaque ocupa o espaço vertical até a lista (igual à coluna mais alta) */
  .news-block-column > .block-item--featured-top {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
  }

  .news-block-column > .block-item--featured-top > a {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  .news-block-column > .block-item--featured-top > a > div:last-child {
    flex: 1 1 auto;
  }

  .news-block-column .block-item.--news-bottom {
    flex-shrink: 0;
    margin-top: 27px;
  }

  .news-block-column .block-item.--news-bottom,
  .news-block-column .block-item-news-list {
    display: block !important;
  }

  .news-block-column .block-item-news-list li {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .news-block-content .block-item.--news-bottom .block-item-news-list li:not(:last-child) {
    padding-bottom: 20px;
    border-bottom: 1px solid #d9d9d9;
  }

  .news-block-content .block-item.--news-bottom .block-item-news-list li + li {
    padding-top: 20px;
  }

  .news-block-content .block-item.--news-bottom .block-item-news-list li a {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 12px;
    text-align: left;
    font-size: 14px;
    line-height: 18px;
    min-height: 0;
  }

  .news-block-content .block-item.--news-bottom .block-item-news-thumb {
    width: 118px;
    min-width: 118px;
    flex-shrink: 0;
    align-self: flex-start;
  }

  .news-block-content .block-item.--news-bottom .block-item-news-thumb img {
    width: 100%;
    height: 76px;
    border-radius: 5px;
    object-fit: cover;
    display: block;
  }

  .news-block-content .block-item.--news-bottom .block-item-news-body {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 4px;
    flex: 1;
    min-width: 0;
    min-height: 0;
  }

  .news-block-content .block-item.--news-bottom .block-item-news-chapeu {
    color: #024671;
    font-size: 12px;
    line-height: 14px;
    font-weight: 700;
  }

  .news-block-content .block-item.--news-bottom .block-item-news-titulo {
    color: #333;
    font-size: 14px;
    font-weight: 700;
    line-height: 18px;
    display: block;
    word-break: break-word;
  }
}

/* ---------- Desktop: subgrid — linhas das 3 colunas alinhadas ---------- */
@supports (grid-template-rows: subgrid) {
  @media screen and (min-width: 768px) {
    .news-block-content {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      grid-template-rows: repeat(6, auto);
      column-gap: 30px;
      row-gap: 0;
      align-items: stretch;
    }

    .news-block-content > .news-block-column {
      flex: none !important;
      display: grid;
      grid-template-rows: subgrid;
      grid-row: 1 / span 6;
    }

    .news-block-column.police-block {
      grid-column: 1;
    }

    .news-block-column.society-block {
      grid-column: 2;
    }

    .news-block-column.entertainment-block {
      grid-column: 3;
    }

    .news-block-column .block-item.--news-bottom,
    .news-block-column .block-item-news-list {
      display: contents !important;
    }

    .news-block-column .block-item.--news-bottom {
      margin-top: 0 !important;
    }

    /*
     * Espaço entre o divisor do destaque e a 1ª matéria: no DOM os <li> continuam
     * filhos do <ul> (display:contents não muda o DOM), então NÃO use .news-block-column > li.
     */
    .news-block-content .block-item.--news-bottom .block-item-news-list li:first-child {
      padding-top: 27px;
    }

    .news-block-column .block-item-news-list li {
      min-height: 0;
    }

    .news-block-content .block-item.--news-bottom .block-item-news-list li a {
      height: 100%;
    }
  }
}

/* Cores por editoria */
.news-block-content .society-block .block-item-news-chapeu {
  color: #6f0dbb;
}

.news-block-content .police-block .block-item-news-chapeu {
  color: #df0304;
}

.news-block-content .entertainment-block .block-item-news-chapeu {
  color: #ff3a00;
}

.news-block-content .block-item.--news-bottom .block-item-news-list li a:hover .block-item-news-titulo,
.news-block-content .block-item.--news-bottom .block-item-news-list li a:hover .block-item-news-chapeu {
  color: #02629e;
}
