/*
Theme Name: Portal Trilhas SC
Theme URI: https://portaltrilhassc.com.br
Description: Tema de blocos do protótipo navegável do Portal Trilhas SC.
Author: Portal Trilhas SC
Version: 1.5.10
Template: twentytwentyfive
Text Domain: portal-trilhas-sc
*/

@font-face {
  font-family: "Trilhas Organica Refinada";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src:
    url("assets/fonts/TrilhasOrganicaRefinada-Regular.woff?v=1.5.4") format("woff"),
    url("assets/fonts/TrilhasOrganicaRefinada-Regular.ttf?v=1.5.4") format("truetype");
}

:root {
  --portal-areia: #f1e5d0;
  --portal-verde-sc: #5fb157;
  --portal-vermelho-sc: #ed1c24;
  --portal-azul-costeiro: #1c6e8c;
  --portal-verde-escuro: #064735;
  --portal-azul-escuro: #124b60;
  --portal-azul-link: #2f829f;
  --portal-verde-titulo: #0b5d46;
  --portal-papel: #fffdfa;
  --portal-texto: #26322f;
  --portal-borda: #d8c9ad;
  --portal-sombra: 0 12px 30px rgba(6, 71, 53, 0.08);
}

html {
  scroll-behavior: smooth;
}

body {
  background: #faf6ef;
  color: var(--portal-texto);
  font-family: "Trilhas Organica Refinada", "Segoe UI", Arial, sans-serif;
  font-size: 1.5rem;
  font-synthesis: none;
  line-height: 1.62;
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  text-underline-offset: 0.18em;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--portal-vermelho-sc);
  outline-offset: 3px;
}

.portal-site-header {
  box-shadow: 0 6px 22px rgba(6, 71, 53, 0.12);
  position: relative;
  z-index: 20;
}

.portal-header-brand-band {
  background: linear-gradient(135deg, #fffdfa 0%, #f1e5d0 100%);
  isolation: isolate;
  overflow: hidden;
  padding-bottom: 4rem !important;
  padding-top: 0.5rem !important;
  position: relative;
}

.portal-header-brand-band::after {
  background-image: url("assets/faixa-ondulada.svg?v=1.5.4");
  background-position: center bottom;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  bottom: -1px;
  content: "";
  height: clamp(64px, 6vw, 88px);
  left: 0;
  pointer-events: none;
  position: absolute;
  right: 0;
  z-index: 1;
}

.portal-header-brand-inner {
  margin-inline: auto !important;
  max-width: 980px !important;
  min-height: 150px;
  position: relative;
  width: calc(100% - clamp(1.5rem, 6vw, 5rem));
  z-index: 2;
}

.portal-coastal-decoration {
  display: none !important;
}

.portal-header-nav-band {
  background: var(--portal-verde-escuro);
  border-bottom: 3px solid var(--portal-vermelho-sc);
  margin-top: -1px;
  position: relative;
  z-index: 1;
}

.portal-header-nav-inner {
  min-height: 54px;
}

.portal-header-nav-band .wp-block-navigation {
  width: 100%;
}

.portal-header-nav-band .wp-block-navigation__container {
  gap: clamp(0.45rem, 2vw, 1.2rem);
}

.portal-site-header .wp-block-site-title a {
  color: var(--portal-verde-escuro);
  font-family: "Trilhas Organica Refinada", "Segoe UI", sans-serif;
  font-weight: 400;
  text-decoration: none;
}

.portal-brand-lockup {
  align-items: center;
  color: var(--portal-verde-escuro);
  display: flex;
  flex: 1 1 auto;
  gap: clamp(0.7rem, 2vw, 1.4rem);
  line-height: 1;
  max-width: 100%;
  text-decoration: none;
  width: 100%;
}

.portal-brand-logo {
  display: block;
  flex: 0 1 180px;
  height: auto;
  max-height: 150px;
  object-fit: contain;
  overflow: visible;
  width: clamp(90px, 18%, 180px);
}

.portal-brand-name {
  align-items: baseline;
  color: var(--portal-verde-escuro);
  display: flex;
  flex: 1 1 auto;
  font-family: "Trilhas Organica Refinada", "Segoe UI", sans-serif;
  font-size: clamp(4.25rem, 12vw, 8.75rem);
  font-weight: 400;
  gap: clamp(0.5rem, 2.5vw, 1.8rem);
  justify-content: space-between;
  letter-spacing: 0.04em;
  line-height: 0.82;
  min-width: 0;
  text-transform: uppercase;
  white-space: nowrap;
}

.portal-brand-state {
  color: var(--portal-vermelho-sc);
}

.portal-header-nav-band .wp-block-navigation-item__content {
  border-bottom: 3px solid transparent;
  color: #fff !important;
  font-family: "Trilhas Organica Refinada", "Segoe UI", sans-serif;
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 0.025em;
  padding: 0.85rem 0.55rem;
  text-decoration: none;
}

.portal-header-nav-band .wp-block-navigation-item__content:hover,
.portal-header-nav-band .current-menu-item > .wp-block-navigation-item__content {
  border-bottom-color: var(--portal-vermelho-sc);
  color: #fff !important;
}

.portal-header-nav-band .wp-block-navigation__responsive-container-open {
  color: #fff;
}

.portal-site-main {
  background-color: transparent;
  isolation: isolate;
  min-height: 65vh;
  position: relative;
  z-index: 0;
}

.portal-site-main::before {
  background-color: #f7efe3;
  background-image:
    linear-gradient(rgba(250, 246, 239, 0.58), rgba(250, 246, 239, 0.58)),
    url("assets/fundo-topografico.png?v=1.5.4");
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  content: "";
  inset: 0;
  pointer-events: none;
  position: fixed;
  z-index: -1;
}

.portal-content-shell {
  background: var(--portal-papel);
  border: 1px solid var(--portal-borda);
  border-radius: 18px;
  box-shadow: var(--portal-sombra);
  margin-inline: auto !important;
  max-width: 980px;
  overflow: hidden;
  width: calc(100% - clamp(1.5rem, 6vw, 5rem));
}

.portal-page-title {
  border-left: 7px solid var(--portal-vermelho-sc);
  color: var(--portal-verde-titulo) !important;
  font-family: "Trilhas Organica Refinada", "Segoe UI", sans-serif;
  line-height: 1.08;
  margin-bottom: 0;
  padding-left: clamp(0.8rem, 2vw, 1.35rem);
}

.portal-content-shell .entry-content {
  margin-top: 1.4rem;
}

.entry-content p {
  font-size: 1.5rem;
}

.entry-content h2,
.entry-content h3 {
  color: var(--portal-verde-titulo) !important;
  font-family: "Trilhas Organica Refinada", "Segoe UI", sans-serif;
  letter-spacing: 0.015em;
  line-height: 1.2;
}

.entry-content h2 {
  font-size: clamp(2.25rem, 4vw, 3.1rem);
  margin-top: clamp(2.2rem, 5vw, 4rem);
}

.entry-content h3 {
  font-size: clamp(1.75rem, 2.7vw, 2.15rem);
}

.portal-kicker {
  color: var(--portal-azul-costeiro);
  font-family: "Trilhas Organica Refinada", "Segoe UI", sans-serif;
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: 0.09em;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}

.portal-summary {
  color: var(--portal-azul-escuro);
  font-size: clamp(1.65rem, 2.7vw, 2rem);
  font-weight: 400;
  line-height: 1.5;
  max-width: 52rem;
}

.portal-card {
  background: #ffffff;
  border: 1px solid var(--portal-borda);
  border-radius: 12px;
  border-top: 7px solid var(--portal-verde-sc);
  box-shadow: 0 8px 24px rgba(18, 75, 96, 0.07);
  margin-block: 1rem;
  padding: clamp(1rem, 2.5vw, 1.6rem);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.portal-card:nth-of-type(even) {
  border-top-color: var(--portal-azul-costeiro);
}

.portal-card:hover {
  box-shadow: 0 14px 30px rgba(18, 75, 96, 0.12);
  transform: translateY(-2px);
}

.portal-card h3 {
  margin-top: 0;
}

.portal-trail-card,
.portal-theme-card {
  overflow: hidden;
}

.portal-card-media {
  margin-bottom: 0 !important;
  margin-top: 1.25rem !important;
  min-height: 240px !important;
}

.portal-subtopic-grid {
  align-items: stretch;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  margin-block: 1.25rem 2rem;
}

.portal-subtopic-card {
  display: flex;
  flex-direction: column;
  margin: 0;
  overflow: hidden;
  padding: 0 0 1.35rem;
}

.portal-subtopic-card h3,
.portal-subtopic-card > p {
  margin-left: 1.25rem;
  margin-right: 1.25rem;
}

.portal-subtopic-card .portal-subtopic-media {
  aspect-ratio: 3 / 2;
  border-left: 0 !important;
  border-radius: 0 !important;
  border-right: 0 !important;
  border-top: 0 !important;
  margin: 0 0 1.25rem !important;
  min-height: 190px !important;
  padding: 1rem !important;
  width: 100%;
}

.entry-content > .portal-subtopic-media {
  margin-block: 1.25rem 2rem;
  min-height: 270px;
}

.portal-topic-media,
.portal-trail-main-media,
.portal-map-media,
.portal-hero-media {
  margin-block: clamp(1.25rem, 4vw, 2.25rem);
}

.portal-guide-row {
  align-items: center;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--portal-borda);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(18, 75, 96, 0.07);
  display: grid;
  gap: clamp(1.25rem, 4vw, 2.5rem);
  grid-template-columns: minmax(0, 1.08fr) minmax(15rem, 0.92fr);
  margin-block: clamp(1.5rem, 4vw, 2.5rem);
  overflow: hidden;
  padding: clamp(1rem, 3vw, 1.7rem);
}

.portal-guide-row--reverse .portal-guide-copy {
  order: 2;
}

.portal-guide-row--reverse .portal-guide-media {
  order: 1;
}

.portal-guide-copy h2 {
  margin-top: 0;
}

.portal-guide-media {
  margin: 0 !important;
  min-height: 245px !important;
}

.portal-trail-marker-list {
  font-size: 1.5rem;
  list-style: none;
  padding-left: 0;
}

.portal-trail-marker-list li {
  padding-left: 1.8rem;
  position: relative;
}

.portal-trail-marker-list li::before {
  background: linear-gradient(135deg, var(--portal-vermelho-sc) 0 42%, var(--portal-verde-sc) 42% 72%, var(--portal-azul-link) 72% 100%);
  border-radius: 3px;
  content: "";
  height: 0.82rem;
  left: 0.12rem;
  position: absolute;
  top: 0.48rem;
  transform: rotate(45deg);
  width: 0.82rem;
}

.portal-territory-intro p {
  hyphens: auto;
  text-align: justify;
}

.portal-app-callout {
  background: linear-gradient(135deg, var(--portal-azul-escuro), var(--portal-verde-escuro));
  border-radius: 16px;
  color: #ffffff;
  margin-block: clamp(1.5rem, 4vw, 2.5rem);
  padding: clamp(1.25rem, 4vw, 2rem);
}

.portal-app-callout h2,
.portal-app-callout p {
  color: #ffffff !important;
  margin-top: 0;
}

.portal-app-callout .wp-block-button__link {
  background: #ffffff;
  border-color: #ffffff;
  color: var(--portal-azul-escuro);
}

.portal-download-grid {
  align-items: stretch;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.portal-download-card {
  background: #ffffff;
  border: 1px solid var(--portal-borda);
  border-radius: 14px;
  box-shadow: var(--portal-sombra);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: clamp(1rem, 3vw, 1.5rem);
}

.portal-download-cover {
  aspect-ratio: 16 / 10;
  background: var(--portal-areia);
  border-radius: 10px;
  margin: 0 0 1rem;
  overflow: hidden;
}

.portal-download-cover img {
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.portal-resource-details {
  color: var(--portal-azul-costeiro);
  font-size: 1.25rem;
  font-weight: 400;
}

.portal-asset-placeholder {
  align-items: center;
  background: var(--portal-areia) !important;
  border: 2px dashed #8e714b !important;
  border-radius: 14px;
  color: #614d35;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-block: 1.25rem;
  min-height: 210px;
  padding: clamp(1.5rem, 4vw, 3rem) !important;
  text-align: center;
}

.portal-asset-placeholder p:first-child {
  font-weight: 400;
  text-transform: uppercase;
}

.portal-asset-placeholder p:last-child {
  font-size: 1.25rem;
  margin-bottom: 0;
}

.portal-trail-fields {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  list-style: none;
  padding-left: 0;
}

.portal-trail-fields li {
  background: #ffffff;
  border: 1px solid var(--portal-borda);
  border-top: 5px solid var(--portal-azul-costeiro);
  border-radius: 10px;
  margin: 0;
  min-height: 5.2rem;
  padding: 1rem;
}

.portal-trail-fields strong {
  color: var(--portal-verde-escuro);
  display: block;
  margin-bottom: 0.35rem;
}

.wp-block-button__link {
  background: var(--portal-azul-link);
  border: 2px solid var(--portal-azul-link);
  border-radius: 7px;
  color: #ffffff;
  font-family: "Trilhas Organica Refinada", "Segoe UI", sans-serif;
  font-size: 1.45rem;
  font-weight: 400;
  letter-spacing: 0.025em;
  padding: 0.78rem 1.2rem;
}

.wp-block-button__link:hover {
  background: var(--portal-verde-escuro);
  border-color: var(--portal-verde-escuro);
  color: #ffffff;
}

.entry-content ul:not(.portal-trail-fields) li,
.entry-content ol li {
  margin-bottom: 0.55rem;
}

.portal-site-footer {
  border-top: 5px solid var(--portal-verde-sc);
}

.portal-site-footer .portal-brand-lockup {
  background: #ffffff;
  border-radius: 10px;
  display: inline-flex;
  flex: 0 0 auto;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  width: auto;
}

.portal-site-footer .portal-brand-logo {
  flex: 0 0 auto;
  height: 72px;
  max-width: min(24vw, 94px);
  width: auto;
}

.portal-site-footer .portal-brand-name {
  display: inline-flex;
  flex: 0 0 auto;
  font-size: clamp(2.25rem, 4vw, 3.25rem);
  gap: 0.32em;
  justify-content: flex-start;
}

.portal-site-footer .has-small-font-size {
  font-size: 1.25rem !important;
}

.portal-site-footer a {
  color: #ffffff;
}

@media (max-width: 782px) {
  .portal-site-main::before {
    background-image:
      linear-gradient(rgba(250, 246, 239, 0.72), rgba(250, 246, 239, 0.72)),
      url("assets/fundo-topografico-vertical.png?v=1.5.4");
  }

  .portal-header-brand-band {
    padding-bottom: 2.25rem !important;
  }

  .portal-content-shell {
    border-left: 0;
    border-radius: 0;
    border-right: 0;
    width: calc(100% - 1rem);
  }

  .portal-trail-fields {
    grid-template-columns: 1fr;
  }

  .portal-download-grid {
    grid-template-columns: 1fr;
  }

  .portal-header-brand-inner {
    min-height: 104px;
    width: calc(100% - 1rem);
  }

  .portal-header-brand-band::after {
    height: clamp(48px, 13vw, 62px);
  }

  .portal-header-nav-inner {
    min-height: 50px;
  }

  .portal-brand-logo {
    flex-basis: 112px;
    height: auto;
    max-height: 92px;
    max-width: 112px;
    width: clamp(68px, 20vw, 112px);
  }

  .portal-brand-name {
    font-size: clamp(2.5rem, 12vw, 5.8rem);
    gap: clamp(0.35rem, 2vw, 1rem);
    letter-spacing: 0.025em;
  }

  .portal-site-footer .portal-brand-logo {
    height: 58px;
    max-width: 76px;
  }

  .portal-site-footer .portal-brand-name {
    font-size: clamp(1.8rem, 8vw, 2.5rem);
  }

  .portal-guide-row {
    grid-template-columns: 1fr;
  }

  .portal-guide-row--reverse .portal-guide-copy,
  .portal-guide-row--reverse .portal-guide-media {
    order: initial;
  }

  .portal-header-nav-band .wp-block-navigation__responsive-container.is-menu-open {
    background: #fffdfa;
    color: var(--portal-verde-escuro);
    padding: 1.5rem;
  }

  .portal-header-nav-band .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
    color: var(--portal-verde-escuro) !important;
  }
}

/* Ajustes pontuais aprovados — v1.4.7 */
.portal-guide-row {
  align-items: stretch;
  grid-template-columns: minmax(0, 1fr);
}

.portal-guide-row--reverse .portal-guide-copy,
.portal-guide-row--reverse .portal-guide-media {
  order: initial;
}

.portal-guide-media {
  aspect-ratio: 3 / 2;
  min-height: 0 !important;
  overflow: hidden;
  width: 100%;
}

.portal-guide-media img,
.portal-guide-media figure,
.portal-guide-media .wp-block-image {
  height: 100%;
  margin: 0 !important;
  width: 100%;
}

.portal-guide-media img {
  display: block;
  object-fit: cover;
}

.portal-institution-section {
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
}

.portal-institution-grid {
  align-items: center;
  display: grid;
  gap: clamp(1rem, 3vw, 1.8rem);
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  margin-block: 1.5rem 2.5rem;
}

.portal-institution-logo {
  align-items: center;
  background: #fff;
  border: 1px solid var(--portal-borda);
  border-radius: 14px;
  display: flex;
  justify-content: center;
  min-height: 150px;
  padding: 1rem;
}

.portal-institution-logo img {
  display: block;
  height: auto;
  max-height: 118px;
  max-width: 100%;
  object-fit: contain;
  width: auto;
}

.portal-team-grid {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  margin-block: 1.25rem 2.5rem;
}

.portal-team-card {
  background: #fff;
  border: 1px solid var(--portal-borda);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(18, 75, 96, 0.07);
  padding: clamp(1rem, 3vw, 1.5rem);
}

.portal-team-card h3 {
  margin-top: 0;
}

.portal-team-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.portal-team-list li {
  border-top: 1px solid rgba(216, 201, 173, 0.65);
  padding-block: 0.75rem;
}

.portal-team-list li:first-child {
  border-top: 0;
  padding-top: 0;
}

.portal-team-list strong,
.portal-team-list span {
  display: block;
}

.portal-team-list span {
  font-size: 1.25rem;
  line-height: 1.4;
}

.portal-footer-partners {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1rem;
}

.portal-footer-partner {
  align-items: center;
  background: #fff;
  border-radius: 8px;
  display: flex;
  height: 76px;
  justify-content: center;
  padding: 0.5rem 0.7rem;
  width: 150px;
}

.portal-footer-partner img {
  display: block;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  width: auto;
}

@media (max-width: 600px) {
  .portal-institution-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portal-team-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .portal-footer-partner {
    height: 64px;
    width: 126px;
  }
}

/* Logos institucionais vinculadas — v1.4.8 */
.portal-institution-grid {
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
}

.portal-institution-logo {
  color: inherit;
  min-height: 190px;
  padding: 1.25rem;
  text-decoration: none;
}

.portal-institution-logo img {
  max-height: 155px;
}

.portal-institution-logo:hover {
  border-color: var(--portal-verde-sc);
  box-shadow: 0 10px 24px rgba(6, 71, 53, 0.13);
}

.portal-footer-identity-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 1.15rem;
}

.portal-footer-identity-row .portal-brand-lockup {
  margin: 0;
}

.portal-footer-identity-row .portal-footer-partners {
  flex-wrap: wrap;
  margin-top: 0;
}

.portal-footer-partner {
  height: 100px;
  text-decoration: none;
  width: 200px;
}

.portal-footer-partner:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
  transform: translateY(-2px);
}

@media (max-width: 782px) {
  .portal-institution-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portal-institution-logo {
    min-height: 150px;
    padding: 0.8rem;
  }

  .portal-institution-logo img {
    max-height: 122px;
  }

  .portal-footer-identity-row {
    align-items: flex-start;
  }

  .portal-footer-partner {
    height: 82px;
    width: 160px;
  }
}

@media (max-width: 420px) {
  .portal-footer-identity-row .portal-footer-partners {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .portal-footer-partner {
    height: 78px;
    width: 100%;
  }
}

/* Correção de navegação e rodapé — v1.5.0 */
.portal-header-nav-band .wp-block-navigation__container {
  flex-wrap: nowrap !important;
  gap: clamp(0.15rem, 0.75vw, 0.65rem);
}

.portal-header-nav-band .wp-block-navigation-item__content {
  font-size: clamp(1rem, 1.55vw, 1.2rem);
  padding-inline: clamp(0.15rem, 0.45vw, 0.35rem);
  white-space: nowrap;
}

.portal-footer-layout {
  width: 100%;
}

.portal-footer-identity-row {
  align-items: stretch;
  display: flex;
  flex-wrap: nowrap;
  gap: clamp(0.85rem, 2vw, 1.4rem);
  justify-content: flex-start;
  width: 100%;
}

.portal-footer-logo-card {
  align-items: center;
  background: #fff;
  border-radius: 9px;
  box-sizing: border-box;
  display: flex;
  height: 118px;
  justify-content: center;
  min-width: 220px;
  padding: 0.75rem 1rem;
  text-decoration: none;
}

.portal-footer-brand {
  flex: 1.25 1 280px;
  max-width: 360px;
}

.portal-footer-brand .portal-brand-logo {
  flex: 0 0 80px;
  max-height: 88px;
  width: 80px;
}

.portal-footer-brand .portal-brand-name {
  flex: 0 1 auto;
  font-size: clamp(1.7rem, 3.1vw, 2.5rem);
  gap: 0.55rem;
  justify-content: flex-start;
}

.portal-footer-partner {
  flex: 1 1 220px;
  height: 118px;
  min-width: 220px;
  max-width: 310px;
  width: auto;
}

.portal-footer-logo-card img,
.portal-footer-partner img {
  display: block;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  width: 100%;
}

.portal-footer-meta {
  margin-top: 1rem;
}

@media (max-width: 1000px) and (min-width: 783px) {
  .portal-header-nav-band .wp-block-navigation__container {
    gap: 0.15rem;
  }

  .portal-header-nav-band .wp-block-navigation-item__content {
    font-size: 0.95rem;
    padding-inline: 0.18rem;
  }

  .portal-footer-brand {
    min-width: 240px;
  }

  .portal-footer-partner {
    min-width: 180px;
  }
}

@media (max-width: 782px) {
  .portal-header-nav-band .wp-block-navigation__container {
    flex-wrap: wrap !important;
  }

  .portal-header-nav-band .wp-block-navigation-item__content {
    font-size: 1.2rem;
    white-space: normal;
  }

  .portal-footer-identity-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .portal-footer-logo-card,
  .portal-footer-partner,
  .portal-footer-brand {
    height: 108px;
    max-width: none;
    min-width: 0;
    width: 100%;
  }
}

/* Ajuste fino do menu — v1.5.1 */
@media (max-width: 1000px) and (min-width: 783px) {
  .portal-header-nav-band .wp-block-navigation__container {
    gap: 0.08rem;
  }

  .portal-header-nav-band .wp-block-navigation-item__content {
    font-size: 1.05rem;
    padding-inline: 0.1rem;
  }
}

/* Menu e logos ampliados — v1.5.2 */
@media (min-width: 783px) {
  .portal-header-nav-band .wp-block-navigation__container {
    gap: 0.04rem;
  }

  .portal-header-nav-band .wp-block-navigation-item__content {
    font-size: 1.1rem;
    padding-inline: 0.04rem;
  }
}

.portal-footer-logo-card {
  height: 132px;
  padding: 0.45rem 0.65rem;
}

.portal-footer-brand .portal-brand-logo {
  flex-basis: 92px;
  max-height: 104px;
  width: 92px;
}

.portal-footer-brand .portal-brand-name {
  font-size: clamp(1.85rem, 3.3vw, 2.7rem);
}

.portal-footer-partner {
  height: 132px;
}

@media (max-width: 782px) {
  .portal-footer-logo-card,
  .portal-footer-partner,
  .portal-footer-brand {
    height: 118px;
  }
}

/* Menu superior ampliado e distribuído — v1.5.3 */
@media (min-width: 783px) {
  .portal-header-nav-band .portal-header-nav-inner,
  .portal-header-nav-band .wp-block-navigation,
  .portal-header-nav-band .wp-block-navigation__container {
    width: 100% !important;
  }

  .portal-header-nav-band .wp-block-navigation__container {
    flex-wrap: nowrap !important;
    gap: 0.2rem !important;
    justify-content: space-between !important;
  }

  .portal-header-nav-band .wp-block-navigation-item__content {
    font-size: 1.2rem !important;
    letter-spacing: 0.01em;
    padding-inline: 0 !important;
    white-space: nowrap;
  }
}

@media (max-width: 899px) and (min-width: 783px) {
  .portal-header-nav-band .wp-block-navigation__container {
    gap: 0.05rem !important;
  }

  .portal-header-nav-band .wp-block-navigation-item__content {
    font-size: 1.05rem !important;
  }
}

/* Faixa de acesso ao aplicativo — v1.5.4 */
.portal-app-access-bar {
  align-items: center;
  background: #b8dc8f;
  box-sizing: border-box;
  color: var(--portal-verde-escuro);
  display: flex;
  font-family: "Trilhas Organica Refinada", "Segoe UI", sans-serif;
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 400;
  justify-content: center;
  letter-spacing: 0.025em;
  line-height: 1.05;
  min-height: clamp(82px, 7.5vw, 112px);
  padding: 0.65rem clamp(1rem, 4vw, 3rem);
  text-align: center;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease;
  width: 100%;
}

.portal-app-access-bar:hover {
  background: #a8cf79;
  color: #043b2d;
}

.portal-app-access-bar:focus-visible {
  outline-offset: -5px;
}

@media (max-width: 782px) {
  .portal-app-access-bar {
    font-size: clamp(1.65rem, 8vw, 2.35rem);
    min-height: 72px;
    padding-block: 0.7rem;
  }
}

/* Acessos em destaque da página inicial — v1.5.5 */
.portal-home-access-grid {
  display: grid;
  gap: clamp(1rem, 2.5vw, 1.5rem);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-block: clamp(1.5rem, 4vw, 2.5rem);
}

.portal-home-access-card {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--portal-borda);
  border-radius: 12px;
  border-top: 7px solid var(--portal-verde-sc);
  box-shadow: 0 8px 24px rgba(18, 75, 96, 0.07);
  box-sizing: border-box;
  color: var(--portal-verde-escuro);
  display: flex;
  font-family: "Trilhas Organica Refinada", "Segoe UI", sans-serif;
  font-size: clamp(1.55rem, 2.5vw, 2.15rem);
  justify-content: center;
  line-height: 1.15;
  min-height: 145px;
  padding: clamp(1.25rem, 3vw, 2rem);
  text-align: center;
  text-decoration: none;
  transition: box-shadow 160ms ease, transform 160ms ease;
}

.portal-home-access-card:nth-child(2) {
  border-top-color: var(--portal-azul-costeiro);
}

.portal-home-access-card:hover {
  box-shadow: 0 14px 30px rgba(18, 75, 96, 0.12);
  color: var(--portal-verde-escuro);
  transform: translateY(-2px);
}

.portal-home-access-card:focus-visible {
  outline-offset: 4px;
}

@media (max-width: 640px) {
  .portal-home-access-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .portal-home-access-card {
    min-height: 112px;
  }
}

/* Box do aplicativo e aproximação do conteúdo — v1.5.7 */
.portal-site-main {
  padding-top: clamp(1rem, 3vw, 2.5rem) !important;
}

.portal-trail-primary-app,
.portal-trail-primary-app .wp-block-button {
  width: 100%;
}

.portal-trail-primary-app .wp-block-button__link {
  box-sizing: border-box;
  display: block;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  padding: clamp(1rem, 2.5vw, 1.5rem);
  text-align: center;
  width: 100%;
}

.portal-trail-secondary-actions {
  align-items: stretch;
  display: grid;
  gap: clamp(0.8rem, 2vw, 1.25rem);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.portal-trail-secondary-actions .wp-block-button,
.portal-trail-secondary-actions .wp-block-button__link {
  box-sizing: border-box;
  height: 100%;
  width: 100%;
}

.portal-trail-secondary-actions .wp-block-button__link {
  align-items: center;
  display: flex;
  justify-content: center;
  text-align: center;
}

@media (max-width: 640px) {
  .portal-trail-secondary-actions {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Grade e espaços de imagem de Explore a região — v1.5.9 */
.portal-region-nav-grid {
  display: grid;
  gap: clamp(0.9rem, 2.5vw, 1.35rem);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-block: 1.5rem 2rem;
}

.portal-region-nav-card {
  background: #ffffff;
  border: 1px solid var(--portal-borda);
  border-radius: 12px;
  border-top: 7px solid var(--portal-verde-sc);
  box-shadow: 0 8px 24px rgba(18, 75, 96, 0.07);
  color: var(--portal-azul-escuro);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  text-decoration: none;
  transition: box-shadow 160ms ease, transform 160ms ease;
}

.portal-region-nav-card:hover {
  box-shadow: 0 14px 30px rgba(18, 75, 96, 0.12);
  color: var(--portal-verde-escuro);
  transform: translateY(-2px);
}

.portal-region-nav-placeholder,
.portal-region-item-placeholder {
  align-items: center;
  background: linear-gradient(135deg, #f1f3ed, #e5eadf);
  color: #718078;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.portal-region-nav-placeholder {
  aspect-ratio: 16 / 8;
  border-bottom: 1px solid rgba(216, 201, 173, 0.7);
  font-size: 1.05rem;
  width: 100%;
}

.portal-region-nav-placeholder::before,
.portal-region-item-placeholder::before {
  content: "▧";
  display: block;
  font-family: Arial, sans-serif;
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 0.35rem;
  opacity: 0.55;
}

.portal-region-nav-title {
  align-items: center;
  display: flex;
  flex: 1 1 auto;
  font-size: clamp(1.3rem, 2vw, 1.7rem);
  line-height: 1.2;
  min-height: 4.5rem;
  padding: 0.8rem 1rem 1rem;
}

.portal-region-item-placeholder {
  aspect-ratio: 16 / 5;
  border: 1px solid #dce2d7;
  border-radius: 10px;
  font-size: 1.05rem;
  margin-block: 1rem 2.25rem;
  min-height: 115px;
  width: 100%;
}

@media (max-width: 820px) {
  .portal-region-nav-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .portal-region-nav-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Ajustes pontuais de Região e Território — v1.5.10 */
.portal-centered-subtopic-grid .portal-subtopic-card {
  text-align: center;
}

.portal-centered-subtopic-grid .portal-subtopic-card h3,
.portal-centered-subtopic-grid .portal-subtopic-card p {
  box-sizing: border-box;
  margin-left: auto;
  margin-right: auto;
  padding-inline: clamp(0.75rem, 2vw, 1.5rem);
}

.portal-neutral-image-placeholder {
  align-items: center;
  background: linear-gradient(135deg, #f1f3ed, #e5eadf);
  border: 1px solid #dce2d7;
  border-radius: 10px;
  color: #718078;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  width: 100%;
}

.portal-neutral-image-placeholder::before {
  content: "▧";
  display: block;
  font-family: Arial, sans-serif;
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 0.35rem;
  opacity: 0.55;
}

.portal-card-media-placeholder {
  aspect-ratio: 3 / 2;
  margin-top: 1.25rem;
  min-height: 240px;
}

.portal-topic-media-placeholder,
.portal-subtopic-media-placeholder {
  aspect-ratio: 16 / 9;
  margin-block: 1rem 2.25rem;
  min-height: 180px;
}

@media (max-width: 520px) {
  .portal-card-media-placeholder,
  .portal-topic-media-placeholder,
  .portal-subtopic-media-placeholder {
    min-height: 140px;
  }
}
