.tm-news {
  padding: 1rem 0.75rem 2.4rem;
  background-color: #ececec;

}

.tm-news__container {
  max-width: 1700px;
}

.tm-news__header {
  margin-bottom: 0.9rem;
}

.tm-news__title {
  margin: 0;
  color: #252525;
  font-size: clamp(2rem, 2vw, 2.45rem);
  font-weight: 700;
  line-height: 1.1;
}

.tm-news__headline {
  width: 142px;
  height: 3px;
  margin: 0.35rem auto 0;
  border-radius: 999px;
  background: #312b9f;
  position: relative;
}

.tm-news__headline::before,
.tm-news__headline::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #312b9f;
  transform: translateY(-50%);
}

.tm-news__headline::before {
  left: -1px;
}

.tm-news__headline::after {
  right: -1px;
}

.tm-news__board {
  position: relative;
  background: linear-gradient(180deg, #f4f4f4 0%, #ececec 100%);
  border-radius: 22px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.2);
  padding: 1.1rem 1.3rem 1.35rem;
  overflow: hidden;
}

.tm-news__decor {
  position: absolute;
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
}

.tm-news__decor--left {
  left: 38%;
  bottom: 0.9rem;
  width: 29px;
  height: 61px;
  background-image: url('/static/img/noticias/Recurso 21.png');
}

.tm-news__decor--right {
  right: 1.35rem;
  bottom: 0.8rem;
  width: 49px;
  height: 47px;
  background-image: url('/static/img/noticias/Recurso 22.png');
}

.tm-news__layout {
  display: grid;
  grid-template-columns: minmax(290px, 1.08fr) minmax(420px, 1.55fr);
  gap: 1.5rem;
  align-items: start;
}

.tm-news__stack {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.05rem;
  padding-top: 2.8rem;
}

.tm-news-card {
  position: relative;
}

.tm-news-card--featured {
  padding-right: 0.5rem;
}

.tm-news-card__media {
  position: relative;
  overflow: hidden;
  box-shadow: 0 7px 14px rgba(0, 0, 0, 0.22);
}

.tm-news-card__media--featured {
  border-radius: 10px;
  aspect-ratio: 1.48;
}

.tm-news-card__media--compact {
  width: calc(100% - 1.65rem);
  margin: 0 auto -1.2rem;
  border-radius: 10px;
  aspect-ratio: 1.05;
  z-index: 2;
}

.tm-news-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tm-news-card__socials {
  position: absolute;
  right: 0.7rem;
  bottom: 0.48rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  z-index: 2;
}

.tm-news-card__featured-meta {
  position: absolute;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: stretch;
  background: linear-gradient(180deg, #1d8ddc 0%, #0f6eb0 100%);
  border-top-left-radius: 10px;
  z-index: 2;
}

.tm-news-card__socials--featured {
  position: static;
  padding: 0.4rem 0.6rem 0.34rem;
  gap: 0.46rem;
}

.tm-news-card__social-link {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tm-news-card__social-link--featured {
  width: 36px;
  height: 36px;
}

.tm-news-card__social-link img {
  width: 100%;
  height: 100%;
  display: block;
}

.tm-news-card__date {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 56px;
  background: linear-gradient(180deg, #1d8ddc 0%, #0f6eb0 100%);
  color: #fff;
  text-align: center;
  padding: 0.32rem 0.25rem 0.38rem;
  border-top-left-radius: 10px;
  z-index: 2;
}

.tm-news-card__date--featured {
  position: static;
  width: auto;
  min-width: 72px;
  padding: 0.28rem 0.9rem 0.34rem;
  border-top-left-radius: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1;
}

.tm-news-card__date--compact {
  width: 52px;
  padding-top: 0.25rem;
  padding-bottom: 0.28rem;
}

.tm-news-card__day {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
}

.tm-news-card__month {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1;
  text-transform: capitalize;
}

.tm-news-card__body {
  padding-top: 0.95rem;
}

.tm-news-card__body--compact {
  position: relative;
  background: linear-gradient(180deg, #ffffff 0%, #f0f0f0 100%);
  border-radius: 10px;
  box-shadow: 0 9px 16px rgba(0, 0, 0, 0.16);
  padding: 1.95rem 0.95rem 1rem;
  min-height: 222px;
}

.tm-news-card__title {
  margin: 0 0 0.55rem;
  color: #2d2d2d;
  font-size: clamp(1.15rem, 1.7vw, 2rem);
  font-weight: 700;
  line-height: 1.02;
}

.tm-news-card__title--compact {
  font-size: 1.03rem;
  text-align: center;
  min-height: 3.1em;
}

.tm-news-card__preview {
  margin: 0 0 0.4rem;
  color: #595959;
  font-size: 0.92rem;
  line-height: 1.14;
  text-align: justify;
}

.tm-news-card__preview--compact {
  font-size: 0.69rem;
  line-height: 1.18;
  text-align: center;
  min-height: 2.8em;
}

.tm-news-card__description {
  margin: 0;
  color: #767676;
  font-size: 0.86rem;
  line-height: 1.14;
  text-align: justify;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tm-news-card__description--compact {
  font-size: 0.65rem;
  line-height: 1.16;
  text-align: center;
  -webkit-line-clamp: 3;
  min-height: 3.5em;
}

.tm-news-card__reactions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.65rem;
}

.tm-news-reaction {
  border: 0;
  background: transparent;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  color: #7c7c7c;
  cursor: pointer;
}

.tm-news-reaction--static {
  cursor: default;
}

.tm-news-reaction__icon {
  width: 16px;
  height: 16px;
  display: block;
}

.tm-news-reaction__count {
  min-width: 1.4ch;
  font-size: 0.8rem;
  line-height: 1;
}

.tm-news-card__cta {
  margin-top: 0.85rem;
  display: inline-flex;
  width: 114px;
  filter: drop-shadow(0 8px 7px rgba(0, 0, 0, 0.28));
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.tm-news-card__cta--compact {
  display: flex;
  justify-content: center;
  margin: 0.7rem auto 0;
  width: 104px;
}

.tm-news-card__cta img {
  width: 100%;
  height: auto;
  display: block;
}

.tm-news__empty {
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  font-size: 1rem;
}

@media (max-width: 1199px) {
  .tm-news__layout {
    grid-template-columns: minmax(270px, 1fr) minmax(380px, 1.35fr);
  }

  .tm-news__stack {
    gap: 0.85rem;
  }

  .tm-news-card__title {
    font-size: clamp(1.05rem, 1.55vw, 1.6rem);
  }

  .tm-news-card__body--compact {
    min-height: 214px;
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  .tm-news-card__social-link--featured {
    width: 32px;
    height: 32px;
  }

  .tm-news-card__date--featured {
    min-width: 66px;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
}

@media (max-width: 991px) {
  .tm-news__layout {
    grid-template-columns: 1fr;
  }

  .tm-news__stack {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding-top: 0;
  }

  .tm-news-card--featured {
    padding-right: 0;
  }
}

@media (max-width: 767px) {
  .tm-news {
    padding: 0.8rem 0.55rem 2rem;
  }

  .tm-news__board {
    padding: 1rem 0.85rem 1.1rem;
    border-radius: 18px;
  }

  .tm-news__stack {
    grid-template-columns: 1fr;
  }

  .tm-news-card__socials--featured {
    padding-left: 0.48rem;
    padding-right: 0.48rem;
    gap: 0.34rem;
  }

  .tm-news-card__social-link--featured {
    width: 28px;
    height: 28px;
  }

  .tm-news-card__date--featured {
    min-width: 58px;
    padding-left: 0.58rem;
    padding-right: 0.58rem;
  }

  .tm-news-card__media--compact {
    width: 100%;
    margin-bottom: -0.9rem;
  }

  .tm-news-card__body--compact {
    min-height: 0;
    padding-top: 1.55rem;
  }

  .tm-news-card__title--compact {
    min-height: 0;
  }

  .tm-news-card__preview--compact,
  .tm-news-card__description--compact {
    min-height: 0;
  }

  .tm-news__decor--left {
    left: auto;
    right: 5rem;
  }
}

.tm-news-modal .modal-dialog {
  max-width: 1000px;
}

.tm-news-modal {
  z-index: 3000;
}

body.tm-news-modal-open .modal-backdrop.show {
  z-index: 2990;
  background-color: rgba(16, 19, 32, 0.62);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}

.tm-news-modal .modal-content {
  border: 0;
  background: transparent;
}

.tm-news-modal__content {
  position: relative;
}

.tm-news-modal__panel {
  background: #efefef;
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 26px 52px rgba(0, 0, 0, 0.42);
  padding: clamp(1.5rem, 2.3vw, 2.8rem);
  min-height: min(90vh, 1180px);
}

.tm-news-modal__layout {
  display: grid;
  grid-template-columns: minmax(350px, 0.86fr) minmax(520px, 1.14fr);
  gap: clamp(1.4rem, 2.2vw, 2.4rem);
}

.tm-news-modal__close {
  position: absolute;
  top: -20px;
  right: -3px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: rgba(24, 24, 24, 0.92);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
  z-index: 5;
}

.tm-news-modal__close::before,
.tm-news-modal__close::after {
  content: "";
  position: absolute;
  top: 11px;
  left: 5px;
  width: 14px;
  height: 2px;
  background: #fff;
}

.tm-news-modal__close::before {
  transform: rotate(45deg);
}

.tm-news-modal__close::after {
  transform: rotate(-45deg);
}

.tm-news-modal__corner {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 96px;
  height: 96px;
  border-radius: 0 0 0 96px;
  border-left: 16px solid #0e9ddd;
  border-bottom: 16px solid #0e9ddd;
  z-index: 3;
}

.tm-news-modal__corner::after {
  content: "";
  position: absolute;
  right: 13px;
  top: 27px;
  width: 30px;
  height: 58px;
  background-image: radial-gradient(#0e9ddd 1.5px, transparent 1.5px);
  background-size: 10px 10px;
}

.tm-news-modal__media {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.23);
  aspect-ratio: 1.45;
}

.tm-news-modal__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.tm-news-modal__featured-meta {
  position: absolute;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: stretch;
  background: linear-gradient(180deg, #1d8ddc 0%, #0f6eb0 100%);
  border-top-left-radius: 10px;
  z-index: 2;
}

.tm-news-modal__socials {
  display: flex;
  align-items: center;
  gap: 0.44rem;
  padding: 0.35rem 0.6rem 0.32rem;
}

.tm-news-modal__social-link {
  width: 34px;
  height: 34px;
  display: inline-flex;
}

.tm-news-modal__social-link img {
  width: 100%;
  height: 100%;
  display: block;
}

.tm-news-modal__date {
  min-width: 76px;
  padding: 0.2rem 0.9rem 0.32rem;
  color: #fff;
  line-height: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.tm-news-modal__day {
  font-size: 1.25rem;
  font-weight: 700;
}

.tm-news-modal__month {
  font-size: 1.05rem;
  font-weight: 600;
}

.tm-news-modal__reactions {
  margin-top: 0.65rem;
  display: flex;
  gap: 0.62rem;
  align-items: center;
}

.tm-news-modal__reaction-btn {
  border: 0;
  background: transparent;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  color: #6e6e6e;
}

.tm-news-modal__reaction-btn--static {
  cursor: default;
}

.tm-news-modal__reaction-icon {
  width: 20px;
  height: 20px;
}

.tm-news-modal__reaction-count {
  font-size: 0.86rem;
  min-width: 1.2ch;
}

.tm-news-modal__comment-box {
  margin-top: 0.95rem;
}

.tm-news-modal__comment-title {
  margin: 0 0 0.5rem;
  color: #4a4a4a;
  font-size: 1.75rem;
  font-weight: 700;
}

.tm-news-modal__comment-form {
  display: grid;
  gap: 0.36rem;
  max-width: 360px;
}

.tm-news-modal__comment-form input,
.tm-news-modal__comment-form textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #c5c5c5;
  padding: 0.38rem 0.58rem;
  background: #f6f6f6;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.12);
  font-size: 0.82rem;
}

.tm-news-modal__hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.tm-news-modal__comment-form textarea {
  resize: vertical;
  min-height: 102px;
}

.tm-news-modal__comment-form button {
  width: 92px;
  border: 0;
  border-radius: 999px;
  color: #2f33b6;
  font-size: 0.75rem;
  font-weight: 700;
  background: linear-gradient(180deg, #dddddd 0%, #b8b8b8 100%);
  box-shadow: 0 4px 9px rgba(0, 0, 0, 0.32);
  padding: 0.36rem 0.5rem;
}

.tm-news-modal__comment-status {
  min-height: 18px;
  margin: 0.28rem 0 0;
  font-size: 0.72rem;
}

.tm-news-modal__comment-status.is-ok {
  color: #2f8c3d;
}

.tm-news-modal__comment-status.is-error {
  color: #b63b3b;
}

.tm-news-modal__comments-list {
  margin-top: 0.9rem;
  border-top: 2px solid rgba(94, 94, 94, 0.22);
  padding-top: 0.75rem;
  max-height: 245px;
  overflow-y: auto;
}

.tm-news-modal__comment-item {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 0.62rem;
  margin-bottom: 0.65rem;
}

.tm-news-modal__comment-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #d7d7d7;
}

.tm-news-modal__comment-name {
  margin: 0;
  font-size: 0.96rem;
  color: #4b4b4b;
  font-weight: 600;
}

.tm-news-modal__comment-copy {
  margin: 0.2rem 0 0;
  color: #666;
  font-size: 0.78rem;
  line-height: 1.3;
}

.tm-news-modal__comment-date {
  display: inline-block;
  margin-top: 0.2rem;
  font-size: 0.7rem;
  color: #8b8b8b;
}

.tm-news-modal__right {
  padding-top: 0.15rem;
}

.tm-news-modal__title {
  margin: 0 0 0.92rem;
  color: #2d2d2d;
  font-size: 1.7rem;
  line-height: 1.1;
  font-weight: 700;
}

.tm-news-modal__copy {
  margin: 0;
  white-space: pre-line;
  color: #575757;
  font-size: clamp(0.9rem, 0.92vw, 1.1rem);
  line-height: 1.2;
  text-align: justify;
}

@media (max-width: 991px) {
  .tm-news-modal__panel {
    min-height: auto;
    padding: 1rem 0.9rem;
  }

  .tm-news-modal__layout {
    grid-template-columns: 1fr;
  }

  .tm-news-modal__comment-form {
    max-width: 100%;
  }
}

@media (max-width: 767px) {
  .tm-news-modal__layout {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
  }

  .tm-news-modal__left,
  .tm-news-modal__right {
    display: contents;
  }

  .tm-news-modal__media {
    order: 1;
  }

  .tm-news-modal__reactions {
    order: 2;
  }

  .tm-news-modal__title {
    order: 3;
  }

  .tm-news-modal__copy {
    order: 4;
  }

  .tm-news-modal__comment-box {
    order: 5;
  }

  .tm-news-modal__comments-list {
    order: 6;
    max-height: 220px;
  }
}
