/* GO v51: absolute hard lock for mobile header, home hero and category labels. */

/* Category labels across the site: pure text, no pill, no shadow. */
html body:not(.wp-admin) :is(
  .go-ds-card-cat,
  .go-ds-hero-cat,
  .go-ds-latest-feed .go-ds-card-cat,
  .go-ds-hero-copy .go-ds-hero-cat,
  .go-ds-card-body .go-ds-card-cat
) {
  display: inline !important;
  width: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  filter: none !important;
  text-shadow: none !important;
  outline: 0 !important;
}

html body:not(.wp-admin) :is(.go-ds-card-cat, .go-ds-hero-cat)::before,
html body:not(.wp-admin) :is(.go-ds-card-cat, .go-ds-hero-cat)::after {
  content: none !important;
  display: none !important;
}

/* Light mode Em Alta color lock. */
html:not(.dark) body.home:not(.wp-admin):not(.dark-mode):not(.newsx-dark-mode) :is(
  .go-ds-rightbar .go-ds-section-title,
  .go-ds-rightbar .go-ds-ranking strong,
  .go-ds-rail-box--ranking .go-ds-section-title,
  .go-ds-rail-box--ranking .go-ds-ranking strong
) {
  color: #080a10 !important;
  text-shadow: none !important;
}

html:not(.dark) body.home:not(.wp-admin):not(.dark-mode):not(.newsx-dark-mode) :is(
  .go-ds-rightbar .go-ds-see-more,
  .go-ds-rail-box--ranking .go-ds-see-more
) {
  color: #2800f0 !important;
}

html:not(.dark) body.home:not(.wp-admin):not(.dark-mode):not(.newsx-dark-mode) :is(
  .go-ds-rightbar .go-ds-ranking span,
  .go-ds-rail-box--ranking .go-ds-ranking span
) {
  background: rgba(40, 0, 240, .12) !important;
  color: #2800f0 !important;
  text-shadow: none !important;
}

/* Mobile header and homepage hero. This block is intentionally very specific. */
@media screen and (max-width: 768px) {
  html,
  body {
    overflow-x: hidden !important;
  }

  html body:not(.wp-admin) header#site-header.go-v24-header {
    height: 52px !important;
    min-height: 52px !important;
    max-height: 52px !important;
    overflow: visible !important;
  }

  html body:not(.wp-admin) header#site-header.go-v24-header .go-v24-header-inner {
    width: calc(100vw - 18px) !important;
    max-width: calc(100vw - 18px) !important;
    height: 52px !important;
    min-height: 52px !important;
    max-height: 52px !important;
    margin-inline: auto !important;
    display: grid !important;
    grid-template-columns: auto 1fr auto !important;
    align-items: center !important;
    gap: 8px !important;
    overflow: visible !important;
  }

  html body:not(.wp-admin) header#site-header.go-v24-header .go-v24-main-nav {
    display: none !important;
  }

  html body:not(.wp-admin) header#site-header.go-v24-header .go-v24-header-left {
    display: inline-flex !important;
    align-items: center !important;
    height: 52px !important;
    min-width: 0 !important;
    gap: 8px !important;
  }

  html body:not(.wp-admin) header#site-header.go-v24-header .go-v24-header-actions {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    height: 52px !important;
    min-width: 0 !important;
    gap: 8px !important;
  }

  /* Remove the desktop search form on mobile. This kills the duplicated magnifier and native X. */
  html body:not(.wp-admin) header#site-header.go-v24-header form.go-v24-header-search,
  html body:not(.wp-admin) header#site-header.go-v24-header .go-v24-header-search,
  html body:not(.wp-admin) header#site-header.go-v24-header .go-v24-header-search input,
  html body:not(.wp-admin) header#site-header.go-v24-header .go-v24-header-search button {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    pointer-events: none !important;
    overflow: hidden !important;
  }

  /* Keep only one search trigger. */
  html body:not(.wp-admin) header#site-header.go-v24-header .go-v24-search-icon-button {
    display: inline-grid !important;
    visibility: visible !important;
    opacity: 1 !important;
    place-items: center !important;
    flex: 0 0 32px !important;
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: inherit !important;
    box-shadow: none !important;
  }

  html body:not(.wp-admin) header#site-header.go-v24-header .go-v24-search-icon-button svg {
    width: 19px !important;
    height: 19px !important;
    display: block !important;
  }

  /* No X/Twitter or follow label on mobile. */
  html body:not(.wp-admin) header#site-header.go-v24-header :is(
    .go-v38-follow-link,
    .go-v31-social-link,
    .go-v31-social-link--x
  ) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    pointer-events: none !important;
    overflow: hidden !important;
  }

  html body:not(.wp-admin) header#site-header.go-v24-header :is(
    .go-v31-theme-toggle.newsx-dark-mode-switcher,
    .go-v27-theme-toggle.newsx-dark-mode-switcher
  ) {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    flex: 0 0 50px !important;
    width: 50px !important;
    min-width: 50px !important;
    max-width: 50px !important;
    height: 28px !important;
    min-height: 28px !important;
    max-height: 28px !important;
  }

  /* Functional Últimas bar mobile cleanup. */
  html body:not(.wp-admin) .go-v43-trending-inner {
    width: calc(100vw - 18px) !important;
    max-width: calc(100vw - 18px) !important;
    min-height: 32px !important;
    margin-inline: auto !important;
    gap: 10px !important;
    overflow: hidden !important;
  }

  html body:not(.wp-admin) .go-v43-trending-links {
    min-width: 0 !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
    white-space: nowrap !important;
  }

  html body:not(.wp-admin) .go-v43-trending-links::-webkit-scrollbar {
    display: none !important;
  }

  html body:not(.wp-admin) .go-v43-trending-links a {
    flex: 0 0 auto !important;
    max-width: 138px !important;
  }

  /* Home hero: flex column only, no inherited desktop grid. */
  html body.home:not(.wp-admin) .go-ds-home {
    padding-top: 0 !important;
    overflow-x: hidden !important;
  }

  html body.home:not(.wp-admin) .go-ds-wrap {
    width: calc(100vw - 18px) !important;
    max-width: calc(100vw - 18px) !important;
    margin-inline: auto !important;
  }

  html body.home:not(.wp-admin) .go-ds-hero {
    margin-top: 18px !important;
    margin-bottom: 24px !important;
    overflow: visible !important;
  }

  html body.home:not(.wp-admin) .go-ds-hero-grid {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    grid-template-rows: none !important;
    grid-auto-flow: row !important;
    grid-auto-rows: auto !important;
    align-items: stretch !important;
    gap: 20px !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
  }

  html body.home:not(.wp-admin) :is(
    .go-ds-hero-card,
    .go-ds-hero-card--main,
    .go-ds-hero-card--small,
    .go-ds-hero-card--1,
    .go-ds-hero-card--2,
    .go-ds-hero-card--3,
    .go-ds-hero-card--4,
    .go-ds-hero-card--5
  ) {
    position: relative !important;
    display: block !important;
    flex: 0 0 auto !important;
    grid-column: auto !important;
    grid-row: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 16 / 10 !important;
    margin: 0 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    transform: none !important;
  }

  html body.home:not(.wp-admin) .go-ds-hero-card--main {
    aspect-ratio: 4 / 5 !important;
    min-height: 330px !important;
    max-height: 430px !important;
  }

  html body.home:not(.wp-admin) :is(
    .go-ds-hero-card img,
    .go-ds-hero-card picture,
    .go-ds-hero-card .go-ds-card-img,
    .go-ds-hero-card .go-ds-card-media,
    .go-ds-hero-card .go-ds-card-media img
  ) {
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    object-fit: cover !important;
    object-position: center center !important;
  }

  html body.home:not(.wp-admin) .go-ds-hero-copy {
    top: auto !important;
    left: 16px !important;
    right: 16px !important;
    bottom: 16px !important;
    max-width: calc(100% - 32px) !important;
    transform: none !important;
    gap: 6px !important;
  }

  html body.home:not(.wp-admin) .go-ds-hero-card--main .go-ds-hero-copy strong {
    font-size: clamp(24px, 7.2vw, 31px) !important;
    line-height: 1.02 !important;
    letter-spacing: -.045em !important;
    -webkit-line-clamp: 4 !important;
    text-wrap: balance !important;
  }

  html body.home:not(.wp-admin) .go-ds-hero-card--main .go-ds-hero-copy em {
    display: -webkit-box !important;
    font-size: 14px !important;
    line-height: 1.32 !important;
    -webkit-line-clamp: 4 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }

  html body.home:not(.wp-admin) .go-ds-hero-card:not(.go-ds-hero-card--main) .go-ds-hero-copy strong {
    font-size: clamp(19px, 5.7vw, 24px) !important;
    line-height: 1.04 !important;
    letter-spacing: -.035em !important;
    -webkit-line-clamp: 3 !important;
  }

  html body.home:not(.wp-admin) .go-ds-hero-card:not(.go-ds-hero-card--main) .go-ds-hero-copy em {
    display: none !important;
  }
}

@media screen and (max-width: 390px) {
  html body.home:not(.wp-admin) .go-ds-hero-card--main {
    min-height: 315px !important;
  }

  html body.home:not(.wp-admin) .go-ds-hero-copy {
    left: 14px !important;
    right: 14px !important;
    bottom: 14px !important;
    max-width: calc(100% - 28px) !important;
  }

  html body.home:not(.wp-admin) .go-ds-hero-card--main .go-ds-hero-copy strong {
    font-size: clamp(23px, 7vw, 29px) !important;
  }
}
