/* Página gestão */
.gestao-page{
  padding: 10px 60px 90px;
}

.gestao-container{
  max-width: 1200px;
  margin: 0 auto;
}

/* Cabeçalho (título + métricas) */
.gestao-header{
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 30px;
  align-items: start;
}

.gestao-title{
  font-family: "Teko", sans-serif;
  font-size: 86px;
  line-height: .9;
  letter-spacing: 1px;
  color: #ffffff;
  margin: 10px 0 0;
}

/* Métricas */
.metrics{
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 18px;
}

.metric{
  display: flex;
  align-items: baseline;
  gap: 12px;
  color: #4b57e6; 
}

.metric .num{
  font-family: "Teko", sans-serif;
  font-size: 70px;
  line-height: 1;
  color: #4b57e6;
}

.metric .txt{
  font-family: "Rajdhani", sans-serif; 
  font-size: 30px;
  color: #4b57e6;
  opacity: .9;
}

/* organograma */
.org-chart{
  position: relative;
  margin: 40px auto 0;
  width: min(1100px, 100%);
  aspect-ratio: 1200 / 800;
}

/* Linhas no fundo */
.org-lines{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* Pessoa/caixa */
.person{
  position: absolute;
  left: var(--x, 50%);
  top: var(--y, 50%);
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 2;
}

/* --- CORREÇÃO 1: FOTO POR CIMA DO CARD --- */
.avatar{
  width: 78px;
  height: 78px;
  border-radius: 50%;
  object-fit: cover;
  border: 6px solid #fff;
  box-shadow: 0 8px 22px rgba(0,0,0,.10);
  margin-bottom: -24px;
  background: #ddd;
  
  /* Força a foto a ficar numa camada superior */
  position: relative; 
  z-index: 10; 
}

.card{
  width: 220px;
  background: #1f2bbd;
  color: #fff;
  border-radius: 18px;
  padding: 18px 18px 14px;
  box-shadow: 0 12px 26px rgba(31,43,189,.25);
  text-align: center;

  /* Card fica numa camada inferior à foto */
  position: relative;
  z-index: 5;
}

.name{
  font-family: "Teko", sans-serif;
  font-size: 28px;
  letter-spacing: 1px;
  line-height: 1;
  margin: 0;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.role{
  font-family: "Rajdhani", sans-serif;
  font-size: 13px;
  letter-spacing: 1px;
  margin: 6px 0 2px;
  opacity: .95;
  text-transform: uppercase;
}

.phone{
  font-family: "Rajdhani", sans-serif;
  font-size: 14px;
  margin: 0;
  opacity: .95;
}

/* Membros */
.members{
  background: #4f5ae6;
  color: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  font-family: "Rajdhani", sans-serif;
  font-size: 13px;
  line-height: 1.35;
  box-shadow: 0 12px 26px rgba(31,43,189,.18);
  margin-top: 4px;
}

.members.small{ width: 200px; text-align: center; }
.members.tall{ width: 240px; text-align: center; }
.members.wide{ width: 340px; text-align: left; }

/* Defaults por pessoa (posições Desktop) */
.p-presidente{ --x: 50%; --y: 7%; }
.p-vice{      --x: 74%; --y: 23%; }

.p-dir1{      --x: 4%;  --y: 63%; }
.p-dir2{      --x: 27%; --y: 63%; }
.p-dir3{      --x: 50%; --y: 69.5%; }
.p-dir4{      --x: 73%; --y: 56.8%; }
.p-dir5{      --x: 96%; --y: 86.5%; }


/* --- CORREÇÃO 2: ADAPTAÇÃO MOBILE ROBUSTA --- */
@media (max-width: 1100px){
  .gestao-page{ padding: 60px 20px 80px; }

  .gestao-header{
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }

  .gestao-title{
    font-size: 64px;
  }

  .metrics {
    align-items: center;
  }

  .metric .txt{ font-size: 22px; }

  /* Desativa as linhas conectivas no mobile */
  .org-lines {
      display: none;
  }

  /* Transforma o gráfico numa lista vertical */
  .org-chart {
      height: auto;
      aspect-ratio: unset;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 50px; /* Espaço entre as pessoas */
      margin-top: 40px;
  }

  /* Reseta a posição absoluta das pessoas com !important para garantir */
  .person {
      position: relative !important;
      left: auto !important;
      top: auto !important;
      transform: none !important;
      width: 100%;
      max-width: 350px;
      
      /* Anula as variáveis de posição */
      --x: 0;
      --y: 0;
  }
}

/* =========================================
   NAVBAR SIMPLIFICADA (MOBILE GESTÃO)
   ========================================= */

/* Por padrão, o botão de voltar mobile está escondido no PC */
.mobile-only-home-btn {
    display: none;
}

@media (max-width: 768px) {
    /* 1. Esconde TUDO o que existia na navbar (Links e Título Grande) */
    .navbar-links, 
    .navbar-center {
        display: none !important;
    }

    /* 2. Configura a Navbar para mostrar só o botão */
    .navbar {
        justify-content: center; /* Centraliza o botão */
        padding: 15px;
        height: auto;
    }

    /* 3. Estiliza o botão "Retornar para Home" */
    .mobile-only-home-btn {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        background-color: rgba(255, 255, 255, 0.1);
        border: 1px solid #4169e1;
        color: #fff;
        padding: 12px 30px;
        border-radius: 30px; /* Bordas redondas */
        text-decoration: none;
        font-family: "Rajdhani", sans-serif;
        font-weight: 600;
        font-size: 1.1rem;
        transition: 0.3s;
    }

    .mobile-only-home-btn:hover {
        background-color: #4169e1;
    }
}