/*-- acompanhamento de gestao --*/

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

.container-gestao {
  background: #d6e1e9;
  position: relative;
  padding-bottom: 120px;
}

.container-gestao:before {
  content: "";
  position: absolute;
  height: 881px;
  width: 100%;
  background: url(../imagens/acompanhamento/bg_top.jpg);
  z-index: 0;
}

.container-gestao:after {
  content: "";
  position: absolute;
  height: 888px;
  width: 100%;
  background: url(../imagens/acompanhamento/bg_bottom.jpg);
  bottom: 0;
}

.container-gestao > .largura-maxima {
  background: #fff;
  position: relative;
  margin-top: -87px !important;
  z-index: 1;
  box-shadow: 0 30px 23px -1px rgba(0, 0, 0, 0.2);
  padding: 0 30px 50px;
}

.cabecalho-gestao {
  position: relative;
  background: url(../imagens/acompanhamento/header.svg) no-repeat center;
  background-size: cover;
  z-index: 1;
  height: 311px;
}

.nav-gestao ul {
  display: flex;
  justify-content: space-between;
  padding: 25px 30px 0;
  border-bottom: 1px solid #ccc;
  margin-bottom: 45px;
  margin-top: 0;
}

.nav-gestao ul li {
  position: relative;
  padding: 15px 10px;
}

.nav-gestao ul li a {
  color: #000;
  transition: all 250ms;
}

.nav-gestao ul li.active {
  font-weight: 600;
}

.nav-gestao ul li:before {
  content: "";
  position: absolute;
  height: 3px;
  width: 100%;
  background: #f59e0b;
  bottom: 0;
  left: 0;
  opacity: 0;
  transform: scaleX(0);
  transition: all 250ms;
}

.nav-gestao ul li.active:before,
.nav-gestao ul li:hover:before {
  content: "";
  position: absolute;
  height: 3px;
  width: 100%;
  background: #f59e0b;
  bottom: 0;
  left: 0;
  opacity: 1;
  transform: scaleX(1);
}

.nav-gestao ul li:hover a {
  color: #e35c04;
}

.nav-gestao ul li:hover a {
  color: #e35c04;
}

.section-gestao header {
  box-shadow: none;
  height: auto;
  position: static;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  margin-bottom: 36px;
  height: 130px;
}

.section-gestao header h3 {
  color: #f59e0b;
  font-weight: 700;
  border-bottom: 1px solid #ccc;
  width: 100%;
  max-width: 925px;
  padding: 0 0 9px;
  margin: 0;
}

.section-gestao header img {
  width: 180px;
}

.gestao-noticias {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
}

.cabecalho-gestao-logo img {
  width: 370px;
  margin-top: 80px;
}

p.gestao-noticia-data {
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 0;
}

.gestao-noticia-texto h4 {
  font-size: 18px;
  font-weight: 600;
  margin: 10px 0;
  color: #254e98;
}

.gestao-noticia-img {
  /* width: 100%; */
  height: 203px;
  background-size: cover;
  background-position: center;
  margin-bottom: 15px;
}

.gestao-noticia {
  width: calc((100% - 60px) / 3);
}

.gestao-noticia.full-width {
  width: 100%;
}

.section-gestao {
  margin-bottom: 40px;
  scroll-margin-top: 150px; /* Accounts for fixed header + sticky nav + breathing room */
}

.gestao-texto {
  max-width: calc(100% - 212px);
  margin-top: -60px;
}

.section-gestao#gestao header img {
  width: auto;
  height: 150px;
  margin-right: 15px;
}

.section-gestao#grafica header img {
  width: auto;
  height: 100px;
  margin-right: 15px;
}

.gestao-form {
  display: flex;
}

.gestao-botao-download {
  background: #f59e0b;
  color: #fff;
  padding: 0 40px;
  border-radius: 0 10px 10px 0;
  font-weight: 600;
  transition: all 250ms;
}

.gestao-botao-download:hover {
  background: #da8900;
  color: #fff;
  padding: 0 40px;
  border-radius: 0 10px 10px 0;
  font-weight: 600;
}

.gestao-btn-ver-mais {
  display: inline-block;
  padding: 10px 30px;
  border: 2px solid #f59e0b;
  color: #f59e0b;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: all 250ms;
  font-size: 14px;
}

.gestao-btn-ver-mais:hover {
  background: #f59e0b;
  color: #fff;
}

.gestao-ver-mais-container {
  display: flex;
  justify-content: center;
  margin-top: 30px;
}

select.gestao-select {
  height: 50px;
  border-radius: 5px 0 0 5px;
  border-right: none;
  appearance: none;
  padding-left: 40px;
  position: relative;
}

.gestao-form {
  position: relative;
}

.gestao-form:after {
  content: "";
  height: 0;
  width: 0;
  position: absolute;
  border: 8px solid #f59e0b;
  border-bottom: 6px solid transparent;
  border-top: 6px solid transparent;
  border-left: 6px solid transparent;
  left: 15px;
  top: 22px;
  transform: rotate(-90deg);
}

.gestao-link-acesso {
  background: #f59e0b;
  color: #fff;
  padding: 15px 60px;
  border-radius: 50px;
  font-weight: 600;
  transition: all 250ms;
  margin-top: 10px;
  display: inline-block;
}

.gestao-link-acesso:hover {
  background: #da8900;
  color: #fff;
  /* padding: 0 40px; */
  /* border-radius: 0 10px 10px 0; */
  font-weight: 600;
}

/* Sticky Menu */
.nav-gestao {
  position: -webkit-sticky; /* Safari */
  position: sticky;
  top: 0;
  z-index: 999;
  background: #fff;
  width: 100%;
  /* margin: 0 -30px; */
  padding: 0;
  box-shadow: 0 10px 12px -13px rgba(0, 0, 0, 0.3);
}

/* Scrollbar hiding for horizontal scroll */
.nav-gestao ul::-webkit-scrollbar {
  width: 0px;
  background: transparent; /* Chrome/Safari/Webkit */
}

/* Responsive adjustments */
@media (max-width: 991px) {
  .container-gestao {
    padding-bottom: 60px;
  }

  .container-gestao > .largura-maxima {
    padding: 0 15px 20px;
  }

  .cabecalho-gestao {
    height: 200px;
    background-position: center bottom;
  }

  .cabecalho-gestao-logo img {
    width: 250px;
    margin-top: 40px;
  }

  .nav-gestao {
    margin: 0;
    padding: 0;
  }

  .nav-gestao ul {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    padding: 15px 0 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #ccc;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE 10+ */
    gap: 5px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-gestao ul li {
    padding: 10px 12px;
    flex: 0 0 auto;
    font-size: 14px;
  }

  .nav-gestao ul li a {
    white-space: nowrap;
  }

  .section-gestao header {
    flex-direction: column-reverse;
    align-items: center;
    height: auto;
    gap: 15px;
    margin-bottom: 25px;
  }

  .section-gestao header h3 {
    max-width: 100%;
    border-bottom: 1px solid #ccc;
    text-align: center;
  }

  .section-gestao header img {
    width: 100px; /* Reduced icon size for mobile */
  }

  .section-gestao#gestao header img,
  .section-gestao#grafica header img {
    height: 80px;
    width: auto;
    margin: 0 auto;
  }

  .gestao-noticias {
    flex-direction: column;
    gap: 20px;
  }

  .gestao-noticia {
    width: 100%;
  }

  .gestao-texto {
    max-width: 100%;
    margin-top: 0;
  }

  /* Adjust form layout if needed, though flex might handle it okay. 
       Let's ensure it doesn't break */
  .gestao-form {
    flex-wrap: wrap;
  }

  select.gestao-select {
    flex-grow: 1;
    width: auto;
  }

  .section-gestao {
    scroll-margin-top: 120px; /* Adjusted for mobile header height */
    margin-bottom: 110px;
  }
}
