/* ==========================================================================
   PanoramaSat — layout.css
   Estrutura fixa da página: cabeçalho, megamenu, seletor de idioma,
   painel "Acesse sua conta" e rodapé.
   ========================================================================== */

/* ==========================================================================
   1. Cabeçalho
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #fff;
  color: var(--ink);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}

/* Linha inferior ao rolar a página (classe adicionada via JS) */
.site-header.stuck {
  border-bottom-color: var(--line);
}

.bar {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 80px;
  /* sem recuo lateral: logo e botões alinham com a borda dos blocos da página */
}

.logo {
  display: block;
  flex: none;
  line-height: 0;
}

.logo img {
  height: 28px;
  width: auto;
  position: relative;
  top: -6px; /* alinha a linha de base do logotipo com o menu (valor inteiro = imagem nítida) */
}

/* --------------------------------------------------------------------------
   Navegação principal
   -------------------------------------------------------------------------- */
.nav {
  display: flex;
  align-items: center;
  list-style: none;
  margin-right: auto;
}

.nav > li {
  height: 80px;
  display: flex;
  align-items: stretch;
}

.nav > li > a,
.nav > li > button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  white-space: nowrap;
  color: var(--ink);
  text-decoration: none;
  font: 500 15px/1 var(--font);
  background: none;
  border: 0;
  cursor: pointer;
}

.nav > li > a:hover,
.nav > li > button:hover,
.nav > li > button[aria-expanded="true"] {
  color: var(--green-700);
}

/* Ícone de seta para baixo */
.chev {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .2s;
}

[aria-expanded="true"] > .chev {
  transform: rotate(180deg);
}

/* Botão "Menu" (somente mobile) */
.mb {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 14px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   Megamenu
   -------------------------------------------------------------------------- */
.mega {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  display: none;
  background: #F6F8FB;
  color: var(--ink);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid #E1E1E1;
  box-shadow: 0 28px 40px rgba(0, 0, 0, .12);
}

.mega.open {
  display: block;
}

.mega .in {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 80px;
  padding: 56px 0 64px;
}

.mega h3 {
  font-size: 24px;
  font-weight: 400;
  line-height: 1.2;
}

.mega p {
  color: #6B7C94;
  margin-top: 14px;
  max-width: 25em;
  font-size: 14.5px;
  line-height: 1.6;
}

.mega ul {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 56px;
  align-content: start;
}

.mega li a {
  display: block;
  padding: 16px 0;
  border-bottom: 1px solid #D6DEE8;
  text-decoration: none;
  font-size: 15px;
}

.mega li a:hover {
  color: var(--green-700);
}

/* --------------------------------------------------------------------------
   Ações do cabeçalho (contato, idioma, conta)
   -------------------------------------------------------------------------- */
.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

/* Botão redondo de ícone (perfil) */
.ibtn {
  flex: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #EDF0F4;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  transition: background .2s, color .2s;
}

.ibtn:hover,
.ibtn[aria-expanded="true"] {
  background: #DDE3EC;
  color: var(--ink);
}

.ibtn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Seletor de idioma */
.lang {
  position: relative;
}

.lbtn {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 10px;
  border-radius: 10px;
  background: none;
  border: 0;
  color: var(--muted);
  font: 500 14px/1 var(--font);
  cursor: pointer;
}

.lbtn:hover,
.lbtn[aria-expanded="true"] {
  background: var(--soft);
  color: var(--ink);
}

.lbtn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lbtn .chev {
  width: 12px;
  height: 12px;
}

.lm {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 160px;
  list-style: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 16px 40px rgba(11, 31, 58, .16);
  display: none;
  z-index: 70;
}

.lm.open {
  display: block;
}

.lm button {
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  padding: 10px 12px;
  border-radius: 8px;
  font: 500 14.5px var(--font);
  color: var(--ink);
  cursor: pointer;
}

.lm button:hover,
.lm button[aria-current="true"] {
  background: var(--soft);
  color: var(--green-700);
}

/* --------------------------------------------------------------------------
   Painel "Acesse sua conta"
   -------------------------------------------------------------------------- */
.ov {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
}

.ov.show {
  display: block;
}

.panel {
  position: fixed;
  top: 92px;
  right: calc((100vw - min(var(--container) - 2 * var(--pad), 100vw - 40px - 2 * var(--pad))) / 2);
  width: min(380px, 100vw - 32px);
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  z-index: 60;
  box-shadow: 0 20px 50px rgba(11, 31, 58, .18);
  display: none;
}

.panel.show {
  display: block;
}

.panel h2 {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.3;
}

.panel .sb {
  font-size: 14px;
  color: var(--muted);
  margin: 2px 0 18px;
}

/* Cartão de portal */
.pc {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  margin-bottom: 10px;
  transition: border-color .2s, background .2s;
}

.pc:hover {
  border-color: var(--green-500);
  background: var(--soft);
}

.pc .av {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--green-500);
  display: grid;
  place-items: center;
  color: var(--deep);
}

.pc .av svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pc .tx {
  flex: 1;
  min-width: 0;
}

.pc b {
  display: block;
  font-weight: 600;
  font-size: 15.5px;
  line-height: 1.3;
}

.pc .ds {
  display: block;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
  margin-top: 2px;
}

.pc .ar {
  flex: none;
  font-size: 18px;
  color: var(--green-700);
}

.panel .hp {
  margin-top: 14px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--muted);
}

.panel .hp a {
  color: var(--green-700);
  font-weight: 500;
  text-decoration: none;
  margin-left: 4px;
}

.panel .hp a:hover {
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Cabeçalho — mobile
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .mb {
    display: block;
    flex: none;
    padding: 8px 11px;
  }

  .bar {
    gap: 6px;
    min-height: 68px;
  }

  .logo img {
    height: 18px;
    top: -4px;
  }

  .actions {
    margin-left: auto;
    gap: 6px;
  }

  .actions .pill {
    display: none;
  }

  .ibtn,
  .lbtn {
    width: 36px;
    height: 36px;
    padding: 0;
    justify-content: center;
  }

  .lbtn span,
  .lbtn .chev {
    display: none;
  }

  .lm {
    right: -52px;
  }

  /* Menu vira gaveta abaixo do cabeçalho */
  .nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    margin: 0;
    padding: 6px 20px 20px;
    background: #fff;
    border-top: 1px solid var(--line);
    box-shadow: 0 20px 30px rgba(0, 0, 0, .08);
  }

  .nav.open {
    display: flex;
  }

  .nav > li {
    height: auto;
    display: block;
  }

  .nav > li > a,
  .nav > li > button {
    width: 100%;
    justify-content: space-between;
    padding: 14px 4px;
    }

  .mega {
    position: static;
    box-shadow: none;
    border: 0;
    border-radius: 10px;
    margin-bottom: 8px;
  }

  .mega .in {
    width: auto;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 18px 16px 8px;
  }

  .mega h3 {
    font-size: 19px;
  }

  .mega p {
    display: none;
  }

  .mega ul {
    grid-template-columns: 1fr;
  }

  .mega li a {
    padding: 13px 0;
  }

  .panel {
    top: 80px;
    right: 16px;
  }
}

/* Celulares estreitos: logo um pouco menor para o cabeçalho caber na linha do conteúdo */
@media (max-width: 374px) {
  .logo img {
    height: 16px;
    top: -3px;
  }
}

/* ==========================================================================
   2. Rodapé
   ========================================================================== */
.ft {
  margin: 96px auto 28px;
  padding: 64px var(--pad) 32px;
  border-radius: var(--r);
  background: linear-gradient(180deg, #0B1F3A 0%, #06122A 100%);
}

.ft .top {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 72px;
}

.ft .left {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 56px;
}

.ft h2 {
  font-size: clamp(26px, 2.6vw, 34px);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: 0;
  text-wrap: wrap;
  max-width: 17em;
}

.ft .right {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px 40px;
  align-content: start;
}

.ft h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
}

.ft ul {
  list-style: none;
  display: grid;
  gap: 12px;
  font-size: 14.5px;
  color: var(--on-dark);
}

.ft p.t {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--on-dark);
  margin-top: -4px;
}

.ft a {
  text-decoration: none;
}

.ft ul a:hover,
.ft p.t a:hover {
  color: var(--green-500);
}

/* Redes sociais */
.soc {
  display: flex;
  gap: 12px;
}

.soc a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  color: var(--deep);
  display: grid;
  place-items: center;
  transition: background .2s;
}

.soc a:hover {
  background: var(--green-500);
}

.soc svg {
  width: 18px;
  height: 18px;
}

/* Linha final (logo + direitos) */
.base {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: 13px;
  color: #9FB1CB;
}

.base .brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.base .brand i {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, .22);
}

.base img {
  height: 30px;
  width: auto;
}

.base .legal {
  display: flex;
  gap: 8px 24px;
  flex-wrap: wrap;
}

.base .legal a {
  color: #9FB1CB;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.base .legal a:hover {
  color: var(--green-500);
}

@media (max-width: 900px) {
  .ft {
    padding: 40px var(--pad) 28px;
  }

  .ft .top {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .ft .left {
    gap: 32px;
  }

  .ft {
    margin: 68px auto 20px;
  }

  .ft h2 {
    font-size: 24px;
  }

  .ft .right {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px 24px;
  }

  /* Contato e redes sociais ocupam a linha inteira (o e-mail não quebra no meio) */
  .ft .right > div {
    grid-column: 1 / -1;
  }

  .ft h3 {
    margin-bottom: 12px;
  }

  .ft p.t {
    overflow-wrap: anywhere;
  }

  /* Linha final empilhada: logo, direitos e política, um abaixo do outro */
  .base {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    margin-top: 36px;
  }

  .base img {
    height: 24px;
  }

  /* O logo já traz "Soluções e Tecnologia"; no celular a frase ao lado é ocultada */
  .base .brand i,
  .base .brand span {
    display: none;
  }

  .base .legal {
    flex-direction: column;
    gap: 8px;
  }
}
