/* Ajustes pontuais do template WordPress; o CSS Tailwind original permanece intacto. */
@media (hover: hover) {
  .btn-home-team-cta:hover {
    background-color: var(--color-blue-ethos);
    box-shadow: 0 10px 24px -12px rgb(40 55 150 / 62%);
  }

  .btn-learning-elementary-cta:hover {
    background-color: var(--color-blue-secondary);
    border-color: var(--color-blue-secondary);
    box-shadow: 0 10px 24px -12px rgb(53 58 172 / 52%);
    color: var(--color-white);
  }
}

/* O ícone amarelo não deve desaparecer sobre o CTA amarelo. */
.btn-home-team-cta > img {
  filter: brightness(0) invert(1);
}

/* Mantém as três áreas de equipe alinhadas mesmo com descrições de tamanhos diferentes. */
@media (min-width: 768px) {
  .ethos-team-grid .swiper-wrapper {
    align-items: stretch;
  }

  .ethos-team-card {
    height: 676px !important;
    justify-content: flex-start;
  }

  .ethos-team-card__image {
    flex: 0 0 391px;
  }

  .ethos-team-card__content {
    display: flex;
    min-height: 176px;
    flex-direction: column;
  }
}

/* Arquivo de notícias: grade estável, cards equivalentes e respiro antes do rodapé. */
.ethos-news-archive {
  padding-bottom: 56px;
}

.ethos-news-featured > [aria-hidden="true"] {
  background: linear-gradient(180deg, rgb(0 0 0 / 8%) 38%, rgb(9 9 9 / 84%) 100%);
  top: 0;
}

/* Títulos editoriais continuam íntegros no HTML, mas não deformam a grade. */
.ethos-news-featured h2,
.ethos-news-recent-card__content h3,
.ethos-news-grid-card__content h3 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
}

.ethos-news-featured h2,
.ethos-news-grid-card__content h3 {
  -webkit-line-clamp: 3;
}

.ethos-news-recent-card__content h3 {
  -webkit-line-clamp: 3;
}

@media (max-width: 767px) {
  .ethos-news-archive > section {
    padding-top: 90px;
  }
}

@media (min-width: 1024px) {
  .ethos-news-archive > section {
    gap: 84px;
    padding-bottom: 94px;
  }

  .ethos-news-grid .swiper-wrapper {
    align-items: stretch;
    column-gap: 20px;
    row-gap: 28px;
  }

  .ethos-news-grid .swiper-slide {
    height: 468px !important;
  }

  .ethos-news-grid .swiper-slide h3 {
    height: 65px;
    min-height: 65px;
  }

  /* 3 × 168px + 2 gaps de 18px: destaque e coluna lateral têm 540px exatos. */
  .ethos-news-featured {
    height: 540px !important;
  }

  .ethos-news-recent-card {
    height: 168px !important;
    min-height: 168px !important;
    padding-top: 20px;
    padding-bottom: 20px;
    padding-left: 32px;
    padding-right: 32px;
  }

  .ethos-news-recent-card > img {
    width: 170px;
  }

  .ethos-news-recent-card__content {
    width: 236px;
    max-width: 236px;
    gap: 8px;
  }

  .ethos-news-recent-card__content h3 {
    min-height: 60px;
    max-width: none;
    font-size: 18px;
    line-height: 1.12;
  }

  .ethos-news-grid-card {
    justify-content: flex-start;
    padding-top: 300px;
    padding-bottom: 24px;
  }

  .ethos-news-grid-card > img {
    height: 276px;
  }

  .ethos-news-grid-card__content {
    width: 100%;
    gap: 14px;
  }

  .ethos-news-grid-card__content h3 {
    width: 100%;
    max-width: none;
  }

}

.ethos-news-load-more img {
  transform: rotate(90deg);
  transition: filter 200ms ease-out, transform 200ms ease-out;
}

.ethos-news-load-more:hover img {
  transform: rotate(90deg) translateX(3px);
}

.ethos-news-load-more[aria-busy="true"] img {
  transform: rotate(90deg);
}

/* Entre 1024px e 1279px, os módulos desktop ainda não cabem lado a lado sem compressão. */
@media (min-width: 1024px) and (max-width: 1279px) {
  .ethos-news-lead-layout {
    flex-direction: column;
    gap: 24px;
  }

  .ethos-news-lead-layout .ethos-news-featured,
  .ethos-news-lead-layout > .swiper {
    width: 100%;
  }

  .ethos-news-lead-layout .ethos-news-featured {
    height: 500px !important;
  }

}

@media (min-width: 768px) and (max-width: 1279px) {
  .ethos-news-lead-layout .swiper-wrapper {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
  }

  .ethos-news-lead-layout .ethos-news-recent-card {
    height: 288px !important;
    min-height: 288px !important;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 0 24px 22px;
  }

  .ethos-news-lead-layout .ethos-news-recent-card > img {
    position: relative;
    top: auto;
    left: auto;
    width: calc(100% + 48px);
    max-width: none;
    height: 130px;
    margin: 0 -24px 18px;
    border-radius: 25px 25px 0 0;
  }

  .ethos-news-lead-layout .ethos-news-recent-card__content {
    width: 100%;
    max-width: none;
    margin-top: 0;
    gap: 8px;
  }

  .ethos-news-lead-layout .ethos-news-recent-card__content h3 {
    min-height: 60px;
    font-size: 18px;
    line-height: 1.12;
  }
}

@media (min-width: 1280px) {
  .ethos-news-lead-layout .swiper-wrapper {
    display: flex;
    flex-direction: column;
    gap: 18px;
  }
}


/* Mantém o cinza contínuo até o rodapé e torna as ações mais legíveis. */
body.single-post {
  background-color: var(--color-gray-light);
}

.ethos-article-page {
  background-color: var(--color-gray-light);
  padding-bottom: 132px;
}

.ethos-article-action {
  border-color: rgb(53 58 172 / 22%);
  background-color: var(--color-white);
  box-shadow: 0 8px 20px -16px rgb(40 55 150 / 48%);
  color: var(--color-blue-secondary);
}

.ethos-article-action:hover,
.ethos-article-action[aria-pressed="true"] {
  background-color: var(--color-yellow-ethos);
  border-color: var(--color-yellow-ethos);
  color: var(--color-white);
}

.ethos-article-action svg {
  height: 20px;
  width: 20px;
}
