/* Header */
#pHeader { position: relative; }

.cover-wrap { padding-top: 24px; }

/* Cover artwork is 1600x320 (5:1), reserved upfront to avoid layout shift */
.cover {
  display: block;
  aspect-ratio: 5 / 1;
  overflow: hidden;
  background: var(--surface);
  border-radius: 7px;
}

.cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Menu */
.menu-wrap {
  margin-top: 16px;
  margin-bottom: 20px;
}

.menu {
  position: relative;
  z-index: 20;
  display: block;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* Hamburger: only on phones, where the list turns into a panel */
.menu__toggle { display: none; }

.menu__bars {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: background 0.2s;
}

.menu__bars::before,
.menu__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.2s;
}

.menu__bars::before { top: -6px; }
.menu__bars::after { top: 6px; }

.menu.is-open .menu__bars { background: transparent; }
.menu.is-open .menu__bars::before { transform: translateY(6px) rotate(45deg); }
.menu.is-open .menu__bars::after { transform: translateY(-6px) rotate(-45deg); }

/* Wider gap with tighter side padding: the backgrounds get room to breathe
   without pushing the labels further apart */
.menu__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.menu__list > li {
  display: block;
  position: relative;
}

.menu__list a {
  display: inline-block;
  padding: 10px 14px;
  font-size: var(--fs-base);
  font-weight: 600;
  white-space: nowrap;
  color: var(--fg);
  border-radius: var(--radius-sm);
  transition: color var(--ease), background var(--ease);
}

.menu__list a:hover {
  color: var(--fg);
  background: var(--muted);
}

.menu__list a.is-active {
  color: var(--fg);
  background: var(--card);
  font-weight: 700;
}

/* Active item keeps its own background when hovered */
.menu__list a.is-active:hover {
  color: var(--fg);
  background: var(--card);
  opacity: 0.88;
}

.menu__more > a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.menu__more > a span {
  font-size: var(--fs-base);
  font-weight: 600;
  transition: transform 0.22s;
}

.menu__more.is-open > a span { transform: rotate(90deg); }

.submenu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 30;
  min-width: 200px;
  max-height: 60vh;
  overflow-y: auto;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity var(--ease), visibility var(--ease), transform var(--ease);
}

.menu__more.is-open .submenu,
.menu__more:has(a:focus-visible) .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.submenu a {
  display: block;
  padding: 9px 14px;
  font-size: var(--fs-sm);
  font-weight: 500;
  white-space: nowrap;
  color: var(--fg);
  border-radius: var(--radius-sm);
  transition: background var(--ease), color var(--ease);
}

.submenu a:hover { background: var(--muted); color: var(--accent); }

/* Main grid */
.main {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 320px;
  gap: 20px;
  padding-bottom: 32px;
}

.rail {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

/* Center column is a 2 track grid: a reduced module takes half the width and
   sits beside the next one, which is what the panel option means. */
.center {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: min-content;
  align-items: start;
  gap: 16px;
  min-width: 0;
}

.center > .modules { grid-column: span 2; }

/* addons.css (global, loaded after this file) sizes .mod-reduced with
   float + width: calc(50% - 6px). Inside the grid that halves it twice,
   so the float sizing is cancelled here and the column does the work. */
.center > .modules.mod-reduced {
  grid-column: span 1;
  float: none;
  width: auto;
  margin-left: 0;
  margin-right: 0;
}

.modules {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.modules.pos-1 { margin: 0; }
.modules:empty { display: none; }

/* Card shell */
.card {
  display: flex;
  flex-direction: column;
  background: transparent;
  border: 0;
}

.card__h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
  padding: 8px;
  color: var(--fg);
  background: var(--surface);
  border-radius: var(--radius);
}

/* Plain text action: keeps the header the same height as the title. Flex so
   the arrow centres on the label instead of sitting on the baseline. */
.card__link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  font-size: var(--fs-sm);
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  color: var(--muted-fg);
  transition: color var(--ease);
}

.card__link:hover { color: var(--accent); }

.card__h > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.card__hh {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: var(--fs-base);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
  color: var(--fg);
}

/* Inline icon instead of the icon font: the tile keeps its size and the svg
   is set in pixels, since there is no glyph to scale with the font */
.card__hh .icon {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  padding: 0;
  color: var(--accent);
  background: var(--card);
  border-radius: var(--radius-sm);
}

.card__hh .icon svg { width: 20px; height: 20px; }

.card__body { padding: 0; color: var(--fg); }
.card__f { margin-top: 12px; }

.card__empty {
  padding: 18px 16px;
  font-size: var(--fs-sm);
  color: var(--muted-fg);
  background: var(--surface);
  border-radius: var(--radius);
}

.section-head { margin: 0; }
.section-head .card__h { padding: 14px 18px; }

/* Footer */
.foot {
  margin-top: 24px;
  background: var(--muted);
  border-top: 1px solid var(--border);
}

/* Sits above the footer, not inside it */
.foot__modules { padding: 8px 32px 24px; }

/* Centered stack: identity, inline links, then socials */
.foot__main {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 44px 32px 32px;
  text-align: center;
}

.foot__id {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.foot__id b {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--fg);
}

.foot__id p {
  max-width: 480px;
  margin: 8px 0 0;
  font-size: var(--fs-sm);
  line-height: 1.6;
  color: var(--muted-fg);
}

.foot__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 4px;
  margin-top: 26px;
}

.foot__links a {
  padding: 6px 14px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--muted-fg);
  border-radius: 999px;
  transition: color var(--ease), background var(--ease);
}

.foot__links a:hover { color: var(--fg); background: var(--card); }

/* Store buttons, shown only when the client has the links filled in */
.foot__apps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 26px;
}

.foot__app {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  color: var(--fg);
  background: var(--card);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  transition: color var(--ease), border-color var(--ease);
}

.foot__app:hover { color: var(--accent); border-color: var(--accent); }
.foot__app i { font-size: 20px; }
.foot__app span { text-align: left; }

.foot__app small {
  display: block;
  font-size: var(--fs-xs);
  font-weight: 600;
  line-height: 1.3;
  opacity: 0.65;
}

.foot__app b {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.foot__socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.foot__socials a {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  font-size: var(--fs-base);
  color: var(--fg);
  background: var(--card);
  border-radius: 999px;
  transition: background var(--ease), color var(--ease);
}

.foot__socials a:hover { color: var(--accent-fg); background: var(--accent); }

.foot__base {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px 20px;
  flex-wrap: wrap;
  margin-top: 8px;
  padding: 18px 32px 26px;
  font-size: var(--fs-xs);
  text-align: center;
  color: var(--muted-fg);
  border-top: 1px solid var(--border-2);
}

.foot__base b { font-weight: 700; color: var(--fg); }
.foot__base a { font-weight: 800; color: var(--fg); }
.foot__base a:hover { color: var(--accent); }

/* Provider credit: the inline logo inherits the footer text color.
   Scoped under .foot__base to outrank the generic link rules above. */
/* The svg ends exactly on the wordmark baseline: aligning to the end puts the
   text on the same line, centering left it above the logo */
.foot__base .foot__by,
.foot__base .foot__by:hover,
.foot__base .foot__by:focus {
  display: inline-flex;
  align-items: end;
  gap: 8px;
  color: var(--muted-fg);
  opacity: 0.85;
}

/* line-height 1 shrinks the text box to the glyph: without it the leading
   pushes the text away from the middle of the svg */
.foot__by span { font-weight: 600; line-height: 1; }

.foot__by svg {
  display: block;
  width: auto;
  height: 15px;
  fill: currentColor;
}

/* Cookie notice: a card in the corner instead of a bar across the page */
/* Wide bar centered at the bottom: icon, text and action on a single row */
#cookie-banner-lgpd {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2147483647;
  /* Fixed dark surface on purpose: deriving it from the palette turned the bar
     white on sites whose p2 is the light colour */
  color: #fff;
  background: #22262e;
  border-top: 3px solid var(--accent);
}

#cookie-banner-lgpd .cookie-banner-lgpd-container {
  display: flex;
  align-items: center;
  gap: 22px;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 18px 24px;
}

.cookie__icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  font-size: var(--fs-lg);
  color: var(--accent);
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

#cookie-banner-lgpd .cookie-banner-lgpd_text-box { min-width: 0; flex: 1; }

#cookie-banner-lgpd .cookie-banner-lgpd_text {
  display: block;
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.86);
}

#cookie-banner-lgpd .cookie-banner-lgpd_text a {
  font-weight: 700;
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

#cookie-banner-lgpd .cookie-banner-lgpd_button-box { flex-shrink: 0; }

#cookie-banner-lgpd .btn {
  height: 42px;
  padding: 0 30px;
  font-size: var(--fs-base);
  border-radius: var(--radius-sm);
}

/* Phones read the text first and tap a full width button */
@media (max-width: 700px) {
  #cookie-banner-lgpd .cookie-banner-lgpd-container {
    flex-wrap: wrap;
    gap: 14px;
    padding: 16px;
  }

  .cookie__icon { display: none; }
  #cookie-banner-lgpd .cookie-banner-lgpd_button-box { width: 100%; }
  #cookie-banner-lgpd .btn { width: 100%; }
}

/* Responsive */
@media (max-width: 1300px) {
  .main { grid-template-columns: 260px minmax(0, 1fr) 280px; }
}

@media (max-width: 1100px) {
  .main { grid-template-columns: 1fr 1fr; }
  .center { grid-column: 1 / -1; order: -1; }
  .menu__list a { padding: 9px 14px; font-size: var(--fs-base); }
}

@media (max-width: 760px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .cover-wrap { padding-top: 16px; }
  .center > .modules.mod-reduced { grid-column: span 2; width: auto; }

  /* Phones get a panel: the horizontal scroller hid pages and clipped the
     dropdown, which is why "Mais" seemed dead */
  .menu { padding: 0; }

  .menu__toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 13px 14px;
    font-size: var(--fs-base);
    font-weight: 700;
    color: var(--fg);
    background: none;
    border: 0;
    cursor: pointer;
  }

  /* stretch and full width: each row is one tap target across the panel */
  .menu__list {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 6px;
    border-top: 1px solid var(--border);
  }

  .menu.is-open .menu__list { display: flex; }
  .menu__list > li { width: 100%; }

  .menu__list a {
    display: block;
    width: 100%;
    padding: 12px 14px;
    font-size: var(--fs-base);
    text-align: left;
  }

  .menu__more { display: none !important; }
  .main { grid-template-columns: 1fr; }
  .foot__main { padding: 34px 16px 26px; }
  .foot__base { flex-direction: column; gap: 6px; padding: 16px 16px 24px; }
  #cookie-banner-lgpd { border-radius: var(--radius); }
  #cookie-banner-lgpd .cookie-banner-lgpd-container { flex-wrap: wrap; padding: 14px 16px; }
  #cookie-banner-lgpd .cookie-banner-lgpd_button-box { width: 100%; }
  #cookie-banner-lgpd .btn { width: 100%; }
}
