/* =========================================================
   ARTIGOS.CSS (COMPLETO)
   - MOBILE: slider
   - DESKTOP: galeria/grid
   ========================================================= */

body{
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* ===== Layout geral ===== */
.news {
  padding: 48px 0;
}

.news__head {
  max-width: 1100px;
  margin: 0 auto 18px;
  padding: 0 20px;
  display: flex;
  gap: 14px;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
}

.news__title {
  margin: 0;
  font-size: 20px;
  letter-spacing: 1px;
  font-weight: 400;
}

.news__controls {
  display: flex;
  gap: 10px;
  align-items: center;
}

.news__btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.12);
  background: #fff;
  color: #002c74;
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
  display: grid;
  place-items: center;
  transition: transform .12s ease, box-shadow .12s ease;
}

.news__btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
}

.news__layout--single {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* =========================================================
   MOBILE / TABLET: SLIDER (default)
   ========================================================= */

.news__featured {
  position: relative;
}

.news__viewport {
  overflow: hidden;
  border-radius: 18px;
}

.news__track {
  display: flex;
  will-change: transform;
  transition: transform 420ms ease;
}

/* Cada card vira 1 slide (100% do viewport) */
.newsCard--featured {
  flex: 0 0 100%;
  min-width: 100%;
  position: relative;
  display: block;
  height: clamp(240px, 32vw, 360px);
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  color: #868686;
  cursor: pointer;
}

.newsCard__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.04);
}

.newsCard__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0,0,0,0) 0%,
    rgba(0,0,0,0.35) 30%,
    rgba(0,0,0,0.75) 55%,
    rgba(0,0,0,0.95) 100%
  );
}

.newsCard__tag {
  position: absolute;
  top: 16px;
  left: 16px;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(8px);
  color: #fff;
}

.newsCard__title {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 52px;
  font-size: clamp(18px, 2.2vw, 28px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  text-shadow: 0 12px 30px rgba(0,0,0,.45);
  color: #fff;
}

.newsCard__meta {
  position: absolute;
  left: 16px;
  bottom: 16px;
  font-size: 13px;
  opacity: 0.92;
  color: rgba(255,255,255,.85);
}

/* CTA (hover) */
.newsCard__cta{
  position: absolute;
  right: 16px;
  bottom: 16px;

  padding: 10px 14px;
  border-radius: 999px;

  background: rgba(10, 66, 155, .55);
  border: 1px solid rgba(43, 123, 255, .35);
  color: #fff;

  font-weight: 700;
  font-size: 12px;
  letter-spacing: .10em;
  text-transform: uppercase;

  opacity: 0;
  transform: translateY(10px);
  transition: opacity .22s ease, transform .22s ease, background .22s ease;
  pointer-events: none;
}

.newsCard--featured:hover .newsCard__cta,
.newsCard--featured:focus-visible .newsCard__cta{
  opacity: 1;
  transform: translateY(0);
}

.newsCard--featured:hover .newsCard__cta{
  background: rgba(10, 66, 155, .75);
}

/* ===== Dots ===== */
.news__dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 14px;
}

.newsDot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.2);
  background: rgba(0,0,0,0.12);
  cursor: pointer;
  transition: transform .12s ease, background .12s ease, width .12s ease;
}

.newsDot.is-active {
  background: rgba(23, 72, 175, 0.48);
  width: 26px;
  transform: translateY(-1px);
}

/* =========================================================
   PAINEL DO ARTIGO (funciona em slider e em grid)
   ========================================================= */

.newsArticle{
  max-width: 1100px;
  margin: 16px auto 0;
  padding: 0 20px;

  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(-6px);
  transition: max-height .45s ease, opacity .30s ease, transform .30s ease;
}

.newsArticle.is-open{
  opacity: 1;
  transform: translateY(0);
}

.newsArticle__inner{
  position: relative;
  border-radius: 18px;
  padding: 18px 18px 20px;
  background: rgba(10, 66, 155, .12);
  border: 1px solid rgba(43, 123, 255, .18);
}

.newsArticle__close{
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(43, 123, 255, .22);
  background: rgba(10, 66, 155, .35);
  color: #fff;
  cursor: pointer;
}

.newsArticle__tag{
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: .10em;
  text-transform: uppercase;
  background: rgba(10, 66, 155, .35);
  border: 1px solid rgba(43, 123, 255, .22);
  color: #fff;
}

.newsArticle__title{
  margin: 10px 0 6px;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.newsArticle__meta{
  margin: 0 0 14px;
  color: rgba(255,255,255,.75);
  font-size: 13px;
}

.newsArticle__body{
  color: rgba(255,255,255,.90);
  line-height: 1.65;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

.newsArticle__body p{
  margin: 0 0 14px;
  hyphens: auto;
}

/* Acessibilidade */
.newsCard:focus-visible,
.news__btn:focus-visible,
.newsDot:focus-visible,
.newsArticle__close:focus-visible {
  outline: 3px solid rgba(43, 123, 255, 0.55);
  outline-offset: 3px;
}

/* =========================================================
   DESKTOP: GALERIA (GRID) - DESLIGA SLIDER
   ========================================================= */

@media (min-width: 901px){

  /* some com controles (slider não existe no desktop) */
  .news__controls{
    display: none;
  }

  /* viewport não corta */
  .news__viewport{
    overflow: visible;
    border-radius: 0;
  }

  /* track vira GRID */
  .news__track{
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    transform: none !important;
    transition: none !important;
    will-change: auto;
  }

  /* dots não fazem sentido na galeria */
  .news__dots{
    display: none;
  }

  /* card em grid */
  .newsCard--featured{
    min-width: 0;
    flex: initial;
    height: 260px;
    border-radius: 18px;
    transform: translateZ(0);
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
    box-shadow: 0 18px 40px rgba(0,0,0,.30);
  }

  .newsCard--featured:hover{
    transform: translateY(-4px);
    box-shadow: 0 26px 55px rgba(0,0,0,.38);
  }

  .newsCard__img{
    transform: scale(1.02);
    transition: transform .25s ease;
  }

  .newsCard--featured:hover .newsCard__img{
    transform: scale(1.06);
  }

  /* tipografia mais “galeria” */
  .newsCard__title{
    bottom: 46px;
    font-size: 16px;
    line-height: 1.2;
  }

  .newsCard__meta{
    font-size: 12px;
  }

  /* CTA sempre visível no desktop (fica estilo card de galeria) */
  .newsCard__cta{
    opacity: 1;
    transform: none;
    pointer-events: none;
    padding: 8px 12px;
    font-size: 11px;
  }
}

/* desktop médio: 2 colunas */
@media (min-width: 901px) and (max-width: 1080px){
  .news__track{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* =========================================================
   MOBILE: melhora um pouco o texto pra não estourar
   ========================================================= */
@media (max-width: 520px){
  .news__head{
    align-items: center;
  }

  .news__btn{
    width: 42px;
    height: 42px;
  }

  .newsCard__title{
    font-size: 16px;
    bottom: 48px;
  }

  .newsCard__tag{
    font-size: 11px;
    padding: 7px 9px;
  }
}
