.news-article-main {
  padding: 20px 0 36px;
  max-width: 100%;
  margin: 0 auto;
  background: #ffffff;
}

body.theme-light[data-page="artigo.html"],
body.theme-light[data-page="artigo.html"] main,
body.theme-light[data-page="artigo.html"] .news-article-main,
body.theme-light[data-page="artigo.html"] .news-suggestions,
body.theme-light[data-page="artigo.html"] #site-footer,
body.theme-light[data-page="artigo.html"] .footer {
  background: #ffffff !important;
}

html.theme-light body[data-page="artigo.html"],
html.theme-light body[data-page="artigo.html"] main,
html.theme-light body[data-page="artigo.html"] #site-footer,
html.theme-light body[data-page="artigo.html"] .footer,
html.theme-light body[data-page="artigo.html"] .news-article-main,
html.theme-light body[data-page="artigo.html"] .news-article,
html.theme-light body[data-page="artigo.html"] .news-suggestions {
  background: #ffffff !important;
}

html.theme-light body[data-page="artigo.html"] .footer {
  margin-top: 0 !important;
}

.news-article {
  width: min(1380px, calc(100vw - 80px));
  max-width: none;
  margin: 0 auto 26px;
}

.news-article-hero {
  position: relative;
  min-height: 520px;
  border-radius: 28px 28px 0 0;
  overflow: hidden;
  background: #000000;
}

.news-article-cover {
  width: 100%;
  height: 100%;
  min-height: 520px;
  object-fit: cover;
  display: block;
}

.news-article-hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px 18px 26px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18) 0%, rgba(0, 0, 0, 0.08) 20%, rgba(0, 0, 0, 0.5) 68%, rgba(0, 0, 0, 0.82) 100%);
}

.news-article-topback {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  text-decoration: none;
}

.news-article-hero-copy {
  width: min(960px, 86%);
  max-width: none;
  margin: 0 auto;
  text-align: center;
}

.news-article-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  margin-bottom: 12px;
  text-transform: uppercase;
  font-size: 0.68rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  margin-left: auto;
  margin-right: auto;
}

.news-article-badge.angola,
.news-article-badge.podcast {
  background: rgba(227, 6, 19, 0.24);
}

.news-article-title {
  margin: 0 0 10px;
  color: #ffffff;
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.8rem, 4vw, 3.1rem);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.news-article-meta {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.92rem;
  text-align: center;
}

.news-article-body-shell {
  background: #ffffff;
  padding: 38px clamp(28px, 6vw, 82px) 42px;
  border-radius: 0 0 28px 28px;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.1);
}


.news-article-body-shell > .news-article-summary,
.news-article-body-shell > .news-card-meta,
.news-article-body-shell > .news-linked-episode,
.news-article-body-shell > .article-share,
.news-article-body-shell > .news-article-source,
.news-article-body-shell > .news-article-back {
  max-width: 940px;
  margin-left: auto;
  margin-right: auto;
}

.news-article-text {
  color: #243041;
  line-height: 1.86;
  font-size: 1.08rem;
  width: min(100%, 940px);
  max-width: 940px;
  margin: 0 auto;
  text-align: justify;
  text-align-last: left;
  text-justify: inter-word;
  hyphens: auto;
}

.news-article-text p {
  margin: 0 0 1.15em;
}

.news-article-text ul,
.news-article-text ol {
  margin: 0 0 1.35em 1.35em;
  padding-left: 1.1em;
}

.news-article-text li {
  margin: 0 0 0.55em;
  padding-left: 0.25em;
}

.news-article-text h2 {
  margin: 2.2em 0 0.8em;
  color: #101827;
  font-size: clamp(1.45rem, 2.2vw, 2rem);
  line-height: 1.18;
  letter-spacing: -0.025em;
  text-align: left;
  text-align-last: left;
}

.news-article-text .article-figure {
  margin: 1.8em 0;
  text-align: center;
  text-align-last: center;
}

.news-article-text .article-figure img {
  width: 100%;
  max-height: 640px;
  object-fit: cover;
  border-radius: 18px;
  display: block;
}

.news-article-text .article-figure figcaption {
  margin-top: 10px;
  color: #64748b;
  font-size: 0.86rem;
  line-height: 1.5;
  text-align: center;
  text-align-last: center;
}

body.theme-dark[data-page="artigo.html"] .news-article-text .article-figure figcaption {
  color: #94a3b8;
}

.news-article-text .article-figure.is-small {
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}

.news-article-text .article-figure.is-medium {
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.news-article-text .article-figure.is-large {
  max-width: 100%;
}

.news-article-text .article-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin: 1.8em 0;
}

.news-article-text .article-gallery .article-figure {
  margin: 0;
  max-width: 100%;
}

.news-article-text .article-gallery .article-figure img {
  height: 100%;
  min-height: 220px;
}

@media (max-width: 560px) {
  .news-article-text .article-gallery {
    grid-template-columns: 1fr;
  }
}


.article-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 32px 0 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

body.theme-dark[data-page="artigo.html"] .article-share {
  border-top-color: rgba(255, 255, 255, 0.1);
}

.article-share-label {
  font-weight: 800;
  font-size: 0.78rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.article-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 999px;
  background: #f1f5f9;
  color: #0f172a;
  text-decoration: none;
  font-size: 0.98rem;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.article-share-btn:hover {
  transform: translateY(-2px);
}

.article-share-btn.is-facebook:hover {
  background: #1877f2;
  color: #ffffff;
}

.article-share-btn.is-twitter:hover {
  background: #000000;
  color: #ffffff;
}

.article-share-btn.is-whatsapp:hover {
  background: #25d366;
  color: #ffffff;
}

.article-share-btn.is-linkedin:hover {
  background: #0a66c2;
  color: #ffffff;
}

body.theme-dark[data-page="artigo.html"] .article-share-label {
  color: #94a3b8;
}

body.theme-dark[data-page="artigo.html"] .article-share-btn {
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
}

@media (max-width: 480px) {
  .article-share {
    margin-bottom: 18px;
  }
}

.news-article-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 18px 0 0;
  text-decoration: none;
  color: #ffffff;
  background: #E30613;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 700;
}

.news-article-source {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 20px 12px 0 0;
  text-decoration: none;
  color: #0f172a;
  background: #f1f5f9;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 700;
  border: 1px solid rgba(15, 23, 42, 0.12);
}

.news-article-loading {
  color: var(--muted);
  text-align: center;
  padding: 28px;
}

.news-suggestions {
  width: min(1380px, calc(100vw - 80px));
  max-width: none;
  margin: 0 auto;
  background: #ffffff;
  padding-top: 8px;
}

.news-suggestions-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
}

.news-suggestions-head h2 {
  color: #f1f5f9;
  font-size: clamp(1.2rem, 2vw, 1.6rem);
}

.news-suggestions-head p {
  color: #94a3b8;
  font-size: 0.94rem;
}

.news-suggestions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.suggestion-card {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
}

.suggestion-cover {
  width: 100%;
  height: 148px;
  object-fit: cover;
  display: block;
}

.suggestion-body {
  padding: 12px 14px 14px;
}

.suggestion-title {
  color: #0f172a;
  font-size: 0.95rem;
  line-height: 1.34;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.suggestion-meta {
  color: #64748b;
  font-size: 0.78rem;
}

.news-suggestions-head h2 {
  color: #0f172a;
}

.news-suggestions-head p {
  color: #475569;
}

body.theme-dark[data-page="artigo.html"],
body.theme-dark[data-page="artigo.html"] main,
body.theme-dark[data-page="artigo.html"] .news-article-main,
body.theme-dark[data-page="artigo.html"] .news-suggestions,
body.theme-dark[data-page="artigo.html"] #site-footer,
body.theme-dark[data-page="artigo.html"] .footer {
  background: #000000 !important;
}

body.theme-dark[data-page="artigo.html"] .news-article-body-shell,
body.theme-dark[data-page="artigo.html"] .news-suggestions,
body.theme-dark[data-page="artigo.html"] .suggestion-card {
  background: #050505;
}

body.theme-dark[data-page="artigo.html"] .news-article-body-shell {
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.42);
}

body.theme-dark[data-page="artigo.html"] .news-article-text,
body.theme-dark[data-page="artigo.html"] .suggestion-title,
body.theme-dark[data-page="artigo.html"] .news-suggestions-head h2 {
  color: #f8fafc;
}

body.theme-dark[data-page="artigo.html"] .news-article-text h2 {
  color: #ffffff;
}


body.theme-dark[data-page="artigo.html"] .suggestion-meta,
body.theme-dark[data-page="artigo.html"] .news-suggestions-head p,
body.theme-dark[data-page="artigo.html"] .news-article-loading {
  color: #94a3b8;
}

body.theme-dark[data-page="artigo.html"] .suggestion-card {
  border-color: rgba(255, 255, 255, 0.08);
}

body.theme-dark[data-page="artigo.html"] .news-article-source {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

@media (max-width: 900px) {
  .news-article-hero,
  .news-article-cover {
    min-height: 430px;
  }

  .news-suggestions-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 700px) {
  .news-article-main {
    padding: 14px 0 22px;
  }

  .news-article-hero,
  .news-article-cover {
    min-height: 340px;
  }

  .news-article-hero-copy {
    width: min(92%, 760px);
  }

  .news-article-title {
    font-size: 1.55rem;
  }

  .news-article-body-shell {
    padding: 22px 20px 24px;
  }

  .news-article-text {
    font-size: 0.98rem;
    line-height: 1.74;
    text-align: left;
  }

  /* Legendas de imagem continuam centradas mesmo com o texto corrido
     alinhado à esquerda no telemóvel. text-align-last tem de ser reposto
     à parte — herda "left" do texto justificado e ganha a
     text-align:center numa legenda de uma linha só. */
  .news-article-text .article-figure,
  .news-article-text .article-figure figcaption {
    text-align: center;
    text-align-last: center;
  }

  .news-suggestions-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .news-article-main {
    padding: 10px 0 18px;
  }

  .news-article,
  .news-suggestions {
    width: calc(100vw - 16px);
  }

  .news-article-hero {
    min-height: 292px;
    border-radius: 24px 24px 0 0;
  }

  .news-article-cover {
    min-height: 292px;
  }

  .news-article-hero-overlay {
    padding: 12px 12px 16px;
  }

  .news-article-topback {
    width: 34px;
    height: 34px;
  }

  .news-article-badge {
    min-height: 26px;
    padding: 0 9px;
    font-size: 0.62rem;
    margin-bottom: 10px;
  }

  .news-article-title {
    font-size: 1.12rem;
    line-height: 1.08;
    max-width: 100%;
  }

  .news-article-meta {
    font-size: 0.78rem;
  }

  .news-article-body-shell {
    padding: 16px 12px 18px;
    border-radius: 0 0 24px 24px;
  }

  .news-article-text {
    font-size: 0.92rem;
    line-height: 1.68;
  }

  .news-article-back {
    width: 100%;
    justify-content: center;
  }
}


/* Smaller article detail cover */
body[data-page="artigo.html"] .news-article {
  width: min(1400px, calc(100vw - 48px));
}

body[data-page="artigo.html"] .news-article-hero,
body[data-page="artigo.html"] .news-article-cover {
  min-height: 360px;
}

body[data-page="artigo.html"] .news-article-title {
  font-size: clamp(1.9rem, 3.6vw, 3.45rem);
}

@media (max-width: 760px) {
  body[data-page="artigo.html"] .news-article-hero,
  body[data-page="artigo.html"] .news-article-cover {
    min-height: 280px;
  }
}

/* Linked episode CTA */
.news-linked-episode {
  width: fit-content;
  margin: 8px 0 20px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #e30613 0%, #8a0008 100%);
  color: #ffffff;
  text-decoration: none;
  font-weight: 900;
  box-shadow: 0 16px 32px rgba(227, 6, 19, 0.2);
}

.news-linked-episode:hover {
  transform: translateY(-1px);
}


/* Full-width article cover */
body[data-page="artigo.html"] .news-article-main {
  padding-top: 0;
}

body[data-page="artigo.html"] .news-article {
  width: 100%;
  margin: 0 auto 26px;
}

body[data-page="artigo.html"] .news-article-hero {
  border-radius: 0;
}

body[data-page="artigo.html"] .news-article-body-shell {
  border-radius: 0 0 28px 28px;
}

body[data-page="artigo.html"] .news-suggestions {
  width: min(1400px, calc(100vw - 48px));
}

/* Align article shell with suggestions */
body[data-page="artigo.html"] .news-article {
  width: min(1400px, calc(100vw - 48px));
}

body[data-page="artigo.html"] .news-article-hero {
  border-radius: 28px 28px 0 0;
}

/* Compact article cover */
body[data-page="artigo.html"] .news-article-hero,
body[data-page="artigo.html"] .news-article-cover {
  min-height: 280px;
  max-height: 360px;
}

body[data-page="artigo.html"] .news-article-cover {
  height: clamp(280px, 28vw, 360px);
}

body[data-page="artigo.html"] .news-article-body-shell {
  padding-top: 26px;
}

/* Balanced article cover */
body[data-page="artigo.html"] .news-article-hero,
body[data-page="artigo.html"] .news-article-cover {
  min-height: 340px;
  max-height: 440px;
}

body[data-page="artigo.html"] .news-article-cover {
  height: clamp(340px, 34vw, 440px);
}

/* Larger article cover */
body[data-page="artigo.html"] .news-article-hero,
body[data-page="artigo.html"] .news-article-cover {
  min-height: 400px;
  max-height: 500px;
}

body[data-page="artigo.html"] .news-article-cover {
  height: clamp(400px, 38vw, 500px);
}

/* Prominent article cover */
body[data-page="artigo.html"] .news-article-hero,
body[data-page="artigo.html"] .news-article-cover {
  min-height: 460px;
  max-height: 560px;
}

body[data-page="artigo.html"] .news-article-cover {
  height: clamp(460px, 42vw, 560px);
}

/* Extra large article cover */
body[data-page="artigo.html"] .news-article-hero,
body[data-page="artigo.html"] .news-article-cover {
  min-height: 560px;
  max-height: 680px;
}

body[data-page="artigo.html"] .news-article-cover {
  height: clamp(560px, 50vw, 680px);
}

/* Refined article text layout */
body[data-page="artigo.html"] .news-article-body-shell {
  padding-left: clamp(36px, 8vw, 130px);
  padding-right: clamp(36px, 8vw, 130px);
}

body[data-page="artigo.html"] .news-article-text,
body[data-page="artigo.html"] .news-article-body-shell > .news-article-summary,
body[data-page="artigo.html"] .news-article-body-shell > .news-card-meta,
body[data-page="artigo.html"] .news-article-body-shell > .news-linked-episode,
body[data-page="artigo.html"] .news-article-body-shell > .article-share,
body[data-page="artigo.html"] .news-article-body-shell > .news-article-source,
body[data-page="artigo.html"] .news-article-body-shell > .news-article-back {
  max-width: 860px;
}

body[data-page="artigo.html"] .news-article-text {
  font-size: 1.06rem;
  line-height: 1.9;
  letter-spacing: 0.005em;
  text-align: left;
}

body[data-page="artigo.html"] .news-article-text p {
  margin-bottom: 1.35em;
}

/* Wider readable article text */
body[data-page="artigo.html"] .news-article-body-shell {
  padding-left: clamp(42px, 6vw, 96px);
  padding-right: clamp(42px, 6vw, 96px);
}

body[data-page="artigo.html"] .news-article-text,
body[data-page="artigo.html"] .news-article-body-shell > .news-article-summary,
body[data-page="artigo.html"] .news-article-body-shell > .news-card-meta,
body[data-page="artigo.html"] .news-article-body-shell > .news-linked-episode,
body[data-page="artigo.html"] .news-article-body-shell > .article-share,
body[data-page="artigo.html"] .news-article-body-shell > .news-article-source,
body[data-page="artigo.html"] .news-article-body-shell > .news-article-back {
  width: min(100%, 1080px);
  max-width: 1080px;
}

/* text-align-last é herdado — qualquer elemento de uma linha só lá
   dentro (h2, figcaption) tem de repor text-align-last explicitamente
   além de text-align, senão este "left" ganha à centragem deles. */
body[data-page="artigo.html"] .news-article-text {
  color: #111827;
  font-size: clamp(1.08rem, 1.05vw, 1.18rem);
  line-height: 1.78;
  text-align: justify;
  text-align-last: left;
}

body[data-page="artigo.html"] .news-article-text p {
  margin: 0 0 1.45em;
}

/* Center linked episode button */
body[data-page="artigo.html"] .news-linked-episode {
  display: flex;
  justify-content: center;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

/* Center article back button */
body[data-page="artigo.html"] .news-article-back {
  display: flex;
  width: fit-content;
  justify-content: center;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

/* Default article logo covers adapt to the active theme */
.news-article-cover[data-default-article-cover="true"],
.suggestion-cover[data-default-article-cover="true"] {
  object-fit: contain;
  object-position: center;
  background: #050505;
}

.news-article-cover[data-default-article-cover="true"] {
  padding: clamp(54px, 9vw, 120px);
}

.suggestion-cover[data-default-article-cover="true"] {
  padding: 22px 34px;
}

body.theme-light[data-page="artigo.html"] .news-article-cover[data-default-article-cover="true"],
body.theme-light[data-page="artigo.html"] .suggestion-cover[data-default-article-cover="true"],
html.theme-light body[data-page="artigo.html"] .news-article-cover[data-default-article-cover="true"],
html.theme-light body[data-page="artigo.html"] .suggestion-cover[data-default-article-cover="true"] {
  background: linear-gradient(145deg, #ffffff 0%, #f3f6fb 100%);
}

body.theme-dark[data-page="artigo.html"] .news-article-cover[data-default-article-cover="true"],
body.theme-dark[data-page="artigo.html"] .suggestion-cover[data-default-article-cover="true"],
html.theme-dark body[data-page="artigo.html"] .news-article-cover[data-default-article-cover="true"],
html.theme-dark body[data-page="artigo.html"] .suggestion-cover[data-default-article-cover="true"] {
  background: radial-gradient(circle at center, #1a1a1a 0%, #050505 72%);
}

/* Telemóvel: texto do artigo alinhado à esquerda (o justificado numa coluna
   estreita abria espaços enormes entre palavras) e margens laterais
   menores, para a coluna de leitura aproveitar o ecrã. */
@media (max-width: 640px) {
  body[data-page="artigo.html"] .news-article-body-shell {
    padding-left: 20px;
    padding-right: 20px;
  }

  body[data-page="artigo.html"] .news-article-text {
    text-align: left;
    font-size: 1.04rem;
    line-height: 1.72;
    -webkit-hyphens: auto;
    hyphens: auto;
  }
}
