/* GO v38: smarter bands, header polish and card/meta fixes. */
body:not(.wp-admin) {
  --go-v38-page-light: #f4f3f6;
  --go-v38-surface-light: #ebe9ef;
  --go-v38-surface-light-2: #e3e1e8;
  --go-v38-line-light: rgba(18, 20, 28, 0.08);
  --go-v38-line-light-soft: rgba(18, 20, 28, 0.045);
  --go-v38-page-dark: #171629;
  --go-v38-surface-dark: #202033;
  --go-v38-surface-dark-2: #27283d;
  --go-v38-line-dark: rgba(255, 255, 255, 0.08);
  --go-v38-line-dark-soft: rgba(255, 255, 255, 0.04);
  --go-v38-hero-rail: min(1180px, calc(100vw - 32px));
}

/* --------------------------------------------------------------------------
   Remove the old repeated stripes from previous patches.
   -------------------------------------------------------------------------- */
html body:not(.wp-admin) :is(.go-ds-hero,.go-portal-hero,.go-ca-hero,.go-pf-hero,.go-gh-hero,.go-cc-hero,.go-news-archive-hero,.go-reviews-archive-hero,.go-eh-hero,.go-vh-hero,.go-th-hero,.go-tag-hero)::after,
html body:not(.wp-admin) .go-ds-home :is(.go-ds-content-band, .go-ds-bottom-layout)::before,
html body:not(.wp-admin) .go-news-archive-page--magazine :is(.go-news-archive-video-section, .go-news-archive-recent)::before,
html body:not(.wp-admin) :is(.go-ca-page, .go-cp-page, .go-gh-page, .go-eh-page, .go-th-page, .go-vh-page) :is(.go-ca-block, .go-ca-hero, .go-cp-featured, .go-cp-section, .go-gh-block, .go-gh-hero, .go-gh-section, .go-eh-block, .go-eh-hero, .go-eh-section, .go-th-block, .go-th-hero, .go-th-section, .go-vh-block, .go-vh-hero, .go-vh-section)::before,
html body:not(.wp-admin) :is(.go-ds-home .go-ds-topbar, .go-news-archive-page--magazine .go-news-archive-chip-nav, .go-ca-page .go-ca-nav, .go-cp-page .go-cp-quick-nav)::before {
  content: none !important;
  display: none !important;
}

/* --------------------------------------------------------------------------
   Site background and a more restrained breadcrumb band.
   -------------------------------------------------------------------------- */
body.home,
body.home #page,
body.home .site-content,
body:not(.wp-admin) :is(.go-news-archive-page, .go-ca-page, .go-cp-page, .go-gh-page, .go-eh-page, .go-th-page, .go-vh-page) {
  background-color: var(--go-v38-page-light) !important;
}

html.dark body.home,
html[data-theme="dark"] body.home,
html[class*="dark"] body.home,
body.dark.home,
body.dark-mode.home,
body.is-dark-theme.home,
body.newsx-dark-mode.home,
html.dark body:not(.wp-admin) :is(.go-news-archive-page, .go-ca-page, .go-cp-page, .go-gh-page, .go-eh-page, .go-th-page, .go-vh-page),
body.dark:not(.wp-admin) :is(.go-news-archive-page, .go-ca-page, .go-cp-page, .go-gh-page, .go-eh-page, .go-th-page, .go-vh-page),
body.dark-mode:not(.wp-admin) :is(.go-news-archive-page, .go-ca-page, .go-cp-page, .go-gh-page, .go-eh-page, .go-th-page, .go-vh-page),
body.is-dark-theme:not(.wp-admin) :is(.go-news-archive-page, .go-ca-page, .go-cp-page, .go-gh-page, .go-eh-page, .go-th-page, .go-vh-page),
body.newsx-dark-mode:not(.wp-admin) :is(.go-news-archive-page, .go-ca-page, .go-cp-page, .go-gh-page, .go-eh-page, .go-th-page, .go-vh-page),
[data-theme="dark"] body:not(.wp-admin) :is(.go-news-archive-page, .go-ca-page, .go-cp-page, .go-gh-page, .go-eh-page, .go-th-page, .go-vh-page) {
  background-color: var(--go-v38-page-dark) !important;
}

.go-shell-breadcrumb-band {
  position: relative;
  background: transparent !important;
  border-bottom: 1px solid var(--go-v38-line-light-soft) !important;
}

.go-shell-breadcrumb-band::before {
  content: "";
  position: absolute;
  inset: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  background: linear-gradient(180deg, var(--go-v38-surface-light) 0%, var(--go-v38-page-light) 100%);
  z-index: -1;
  pointer-events: none;
}

html.dark .go-shell-breadcrumb-band,
body.dark .go-shell-breadcrumb-band,
body.dark-mode .go-shell-breadcrumb-band,
body.is-dark-theme .go-shell-breadcrumb-band,
body.newsx-dark-mode .go-shell-breadcrumb-band,
[data-theme="dark"] .go-shell-breadcrumb-band {
  border-bottom-color: var(--go-v38-line-dark-soft) !important;
}

html.dark .go-shell-breadcrumb-band::before,
body.dark .go-shell-breadcrumb-band::before,
body.dark-mode .go-shell-breadcrumb-band::before,
body.is-dark-theme .go-shell-breadcrumb-band::before,
body.newsx-dark-mode .go-shell-breadcrumb-band::before,
[data-theme="dark"] .go-shell-breadcrumb-band::before {
  background: linear-gradient(180deg, var(--go-v38-surface-dark) 0%, var(--go-v38-page-dark) 100%);
}

/* --------------------------------------------------------------------------
   Smarter band usage: only where it adds rhythm.
   - page mastheads
   - latest strip on home
   - latest publications area on home
   -------------------------------------------------------------------------- */
.go-ds-latest-strip,
.go-ds-bottom-layout,
.go-news-archive-page--magazine .go-news-archive-intro,
.go-ca-page .go-ca-hero,
.go-cp-page .go-cp-featured,
.go-gh-page .go-gh-hero,
.go-eh-page .go-eh-hero,
.go-th-page .go-th-hero,
.go-vh-page .go-vh-hero {
  position: relative;
  isolation: isolate;
}

.go-ds-latest-strip::before,
.go-ds-bottom-layout::before,
.go-news-archive-page--magazine .go-news-archive-intro::before,
.go-ca-page .go-ca-hero::before,
.go-cp-page .go-cp-featured::before,
.go-gh-page .go-gh-hero::before,
.go-eh-page .go-eh-hero::before,
.go-th-page .go-th-hero::before,
.go-vh-page .go-vh-hero::before {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  top: calc(clamp(12px, 1.5vw, 22px) * -1);
  bottom: calc(clamp(12px, 1.5vw, 22px) * -1);
  background: linear-gradient(180deg, transparent 0%, rgba(235, 233, 239, 0.92) 12%, rgba(235, 233, 239, 0.92) 88%, transparent 100%);
  border-top: 1px solid var(--go-v38-line-light-soft);
  border-bottom: 1px solid var(--go-v38-line-light-soft);
  z-index: -1;
  pointer-events: none;
}

.go-ds-bottom-layout::before {
  background: linear-gradient(180deg, transparent 0%, rgba(227, 225, 232, 0.92) 14%, rgba(227, 225, 232, 0.92) 86%, transparent 100%);
  border-top-color: var(--go-v38-line-light);
  border-bottom-color: var(--go-v38-line-light);
}

.go-news-archive-page--magazine .go-news-archive-intro::before,
.go-ca-page .go-ca-hero::before,
.go-cp-page .go-cp-featured::before,
.go-gh-page .go-gh-hero::before,
.go-eh-page .go-eh-hero::before,
.go-th-page .go-th-hero::before,
.go-vh-page .go-vh-hero::before {
  top: calc(clamp(18px, 2.2vw, 30px) * -1);
  bottom: calc(clamp(18px, 2.2vw, 30px) * -1);
}

html.dark .go-ds-latest-strip::before,
body.dark .go-ds-latest-strip::before,
body.dark-mode .go-ds-latest-strip::before,
body.is-dark-theme .go-ds-latest-strip::before,
body.newsx-dark-mode .go-ds-latest-strip::before,
[data-theme="dark"] .go-ds-latest-strip::before,
html.dark .go-ds-bottom-layout::before,
body.dark .go-ds-bottom-layout::before,
body.dark-mode .go-ds-bottom-layout::before,
body.is-dark-theme .go-ds-bottom-layout::before,
body.newsx-dark-mode .go-ds-bottom-layout::before,
[data-theme="dark"] .go-ds-bottom-layout::before,
html.dark .go-news-archive-page--magazine .go-news-archive-intro::before,
body.dark .go-news-archive-page--magazine .go-news-archive-intro::before,
body.dark-mode .go-news-archive-page--magazine .go-news-archive-intro::before,
body.is-dark-theme .go-news-archive-page--magazine .go-news-archive-intro::before,
body.newsx-dark-mode .go-news-archive-page--magazine .go-news-archive-intro::before,
[data-theme="dark"] .go-news-archive-page--magazine .go-news-archive-intro::before,
html.dark :is(.go-ca-page .go-ca-hero, .go-cp-page .go-cp-featured, .go-gh-page .go-gh-hero, .go-eh-page .go-eh-hero, .go-th-page .go-th-hero, .go-vh-page .go-vh-hero)::before,
body.dark :is(.go-ca-page .go-ca-hero, .go-cp-page .go-cp-featured, .go-gh-page .go-gh-hero, .go-eh-page .go-eh-hero, .go-th-page .go-th-hero, .go-vh-page .go-vh-hero)::before,
body.dark-mode :is(.go-ca-page .go-ca-hero, .go-cp-page .go-cp-featured, .go-gh-page .go-gh-hero, .go-eh-page .go-eh-hero, .go-th-page .go-th-hero, .go-vh-page .go-vh-hero)::before,
body.is-dark-theme :is(.go-ca-page .go-ca-hero, .go-cp-page .go-cp-featured, .go-gh-page .go-gh-hero, .go-eh-page .go-eh-hero, .go-th-page .go-th-hero, .go-vh-page .go-vh-hero)::before,
body.newsx-dark-mode :is(.go-ca-page .go-ca-hero, .go-cp-page .go-cp-featured, .go-gh-page .go-gh-hero, .go-eh-page .go-eh-hero, .go-th-page .go-th-hero, .go-vh-page .go-vh-hero)::before,
[data-theme="dark"] :is(.go-ca-page .go-ca-hero, .go-cp-page .go-cp-featured, .go-gh-page .go-gh-hero, .go-eh-page .go-eh-hero, .go-th-page .go-th-hero, .go-vh-page .go-vh-hero)::before {
  background: linear-gradient(180deg, transparent 0%, rgba(32, 32, 51, 0.94) 12%, rgba(32, 32, 51, 0.94) 88%, transparent 100%);
  border-top-color: var(--go-v38-line-dark-soft);
  border-bottom-color: var(--go-v38-line-dark-soft);
}

html.dark .go-ds-bottom-layout::before,
body.dark .go-ds-bottom-layout::before,
body.dark-mode .go-ds-bottom-layout::before,
body.is-dark-theme .go-ds-bottom-layout::before,
body.newsx-dark-mode .go-ds-bottom-layout::before,
[data-theme="dark"] .go-ds-bottom-layout::before {
  background: linear-gradient(180deg, transparent 0%, rgba(39, 40, 61, 0.94) 14%, rgba(39, 40, 61, 0.94) 86%, transparent 100%);
  border-top-color: var(--go-v38-line-dark);
  border-bottom-color: var(--go-v38-line-dark);
}

/* Tighten the page intro rail so title/chips feel attached to the featured block. */
.go-news-archive-page--magazine .go-news-archive-intro,
.go-ca-page .go-ca-hero,
.go-cp-page .go-cp-featured,
.go-gh-page .go-gh-hero,
.go-eh-page .go-eh-hero,
.go-th-page .go-th-hero,
.go-vh-page .go-vh-hero {
  margin-bottom: clamp(26px, 3vw, 38px) !important;
}

.go-news-archive-page--magazine .go-news-archive-chip-nav,
.go-ca-page .go-ca-nav,
.go-cp-page .go-cp-quick-nav {
  margin-top: 14px !important;
}

/* --------------------------------------------------------------------------
   Header: move logo to the right, add Siga o GO, and swap toggle/X positions.
   -------------------------------------------------------------------------- */
html body:not(.wp-admin) .go-v24-header-left {
  gap: 0 !important;
}

html body:not(.wp-admin) .go-v24-header-actions {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px !important;
}

html body:not(.wp-admin) .go-v38-follow-link {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 30px !important;
  padding: 0 4px !important;
  color: inherit !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  letter-spacing: .08em !important;
  line-height: 1 !important;
  text-decoration: none !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

html body:not(.wp-admin) .go-v38-follow-link:hover {
  color: var(--go-v34-green) !important;
}

html body:not(.wp-admin):not(.dark-mode):not(.newsx-dark-mode) .go-v38-follow-link:hover {
  color: var(--go-v34-blue) !important;
}

html body:not(.wp-admin) .go-v38-header-brand-right {
  margin-left: 2px !important;
  flex: 0 0 auto !important;
}

html body:not(.wp-admin) .go-v38-header-brand-right .go-v27-header-logo {
  width: 22px !important;
  max-width: 22px !important;
  height: 22px !important;
}

html body:not(.wp-admin) .go-v31-social-link--x,
html body:not(.wp-admin) .go-v31-theme-toggle.newsx-dark-mode-switcher {
  order: 0;
}

@media (max-width: 1320px) {
  html body:not(.wp-admin) .go-v38-follow-link {
    display: none !important;
  }
}

@media (max-width: 900px) {
  html body:not(.wp-admin) .go-v38-header-brand-right {
    display: inline-grid !important;
  }
}

@media (max-width: 620px) {
  html body:not(.wp-admin) .go-v38-header-brand-right {
    display: none !important;
  }
}

/* --------------------------------------------------------------------------
   Cards/meta: fix clipped 'há x dias' and remove category pill styling.
   -------------------------------------------------------------------------- */
body:not(.wp-admin) :is(.go-ds-card-meta, .go-ds-latest-strip-grid span, .go-home-meta, .go-home-story-meta, .go-news-archive-meta, .go-news-category-card-topline, .go-ca-hero-feature-time, .go-ca-card-meta, .go-pf-card-meta, .go-article__side-story-meta) {
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  text-overflow: clip !important;
  overflow: visible !important;
  line-height: 1.32 !important;
}

body:not(.wp-admin) .go-ds-card-body {
  min-width: 0 !important;
}

body:not(.wp-admin) .go-ds-card-meta {
  display: block !important;
  max-width: 100% !important;
}

body:not(.wp-admin) :is(.go-ds-card-cat, .go-ds-hero-cat) {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  text-shadow: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
}

/* --------------------------------------------------------------------------
   Single: keep eyebrow, title and subtitle aligned to the featured image rail.
   -------------------------------------------------------------------------- */
html body.single:not(.single-review):not(.wp-admin) .go-article__hero-inner,
html body.single:not(.single-review):not(.wp-admin) .go-article__cover,
html body.single:not(.single-review):not(.wp-admin) .go-article__post-cover-meta {
  width: min(100%, var(--go-v38-hero-rail)) !important;
  max-width: var(--go-v38-hero-rail) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

html body.single:not(.single-review):not(.wp-admin) .go-article__eyebrow,
html body.single:not(.single-review):not(.wp-admin) .go-article__title,
html body.single:not(.single-review):not(.wp-admin) .go-article__deck,
html body.single:not(.single-review):not(.wp-admin) .go-article__meta-row {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  text-align: left !important;
}

html body.single:not(.single-review):not(.wp-admin) .go-article__eyebrow {
  margin-bottom: clamp(12px, 1.4vw, 18px) !important;
}

html body.single:not(.single-review):not(.wp-admin) .go-article__title {
  margin-bottom: clamp(14px, 1.8vw, 20px) !important;
}

html body.single:not(.single-review):not(.wp-admin) .go-article__deck {
  margin-bottom: clamp(22px, 2.2vw, 28px) !important;
}

html body.single:not(.single-review):not(.wp-admin) .go-article__cover {
  margin-top: 0 !important;
}

@media (max-width: 780px) {
  .go-ds-latest-strip::before,
  .go-ds-bottom-layout::before,
  .go-news-archive-page--magazine .go-news-archive-intro::before,
  .go-ca-page .go-ca-hero::before,
  .go-cp-page .go-cp-featured::before,
  .go-gh-page .go-gh-hero::before,
  .go-eh-page .go-eh-hero::before,
  .go-th-page .go-th-hero::before,
  .go-vh-page .go-vh-hero::before {
    top: -10px;
    bottom: -10px;
  }
}
