* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Montserrat", sans-serif !important;
  font-optical-sizing: auto;
  font-weight: 400;
}

.navbar {
  background: #0078b6;
  color: white;
}

.top-bar {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.logo {
  height: 50px;
}

.toggle {
  display: none;
  cursor: pointer;
  width: 30px;
  height: 24px;
  position: relative;
  margin-left: auto;
}

.toggle span {
  display: block;
  height: 4px;
  background: white;
  margin: 5px 0;
  border-radius: 2px;
  transition: 0.3s;
}

.toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.toggle.open span:nth-child(2) {
  opacity: 0;
}

.toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

.menu {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.nav-section {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  padding: 0.5rem 1rem;
}

.nav-section a {
  color: white;
  color: white;
  text-decoration: none;
  font-weight: 400;
}

.color-bar {
  height: 4px;
  display: flex;
}

.color-bar div {
  flex: 1;
  height: 10px;
}

.red {
  background: #c00;
}
.beige {
  background: #d9cdb9;
}
.blue {
  background: #009fe3;
}

.section-top-mobile {
  display: none;
}

.hover-menu {
  transition: background-color 0.3s;
  background-color: transparent;
  font-size: 14px;
}

.hover-menu:hover {
  background-color: #af2727;
  color: white;
}

.contrast-toggle {
  background: white;
  border: 1px solid black;
  color: rgb(0, 0, 0);
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  padding: 0 0.5rem;
  transition: color 0.3s;
  margin-bottom: 16px;
}

/*-------------- Acesso Rápido --------------*/
.acesso-rapido-container {
  position: relative;
  background: #003955;
  overflow: hidden;
  text-align: center;
}

.carrossel-wrapper {
  position: relative;
  max-width: calc(150px * 10 + 5rem);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.6s ease-in-out, max-height 0.6s ease-in-out;
}

.carrossel-wrapper.open {
  opacity: 1;
  max-height: 200px;
}

.acesso-rapido-scroll {
  font-size: 0.875rem;
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 10px;
  scrollbar-width: thin;
  scrollbar-color: #cccccc00 transparent;
}

.acesso-rapido-scroll::-webkit-scrollbar {
  height: 10px;
}

.acesso-rapido-scroll::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 10px;
}

.seta {
  background-color: transparent;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  z-index: 1;
  color: white;
  transition: 0.3s;
}

.seta:hover {
  color: #ffea4a;
  font-size: 2.1rem;
}

.item-acesso-rapido {
  background-color: #f0f8ff;
  padding: 8px 8px;
  border-radius: 5px;
  max-height: 120px;
  max-width: 150px;
  height: 80px;
  width: 130px;
  transition: background-color 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-align: center;
  flex: 0 0 auto;
}

.item-acesso-rapido:hover {
  background-color: #af2727;
}

.item-acesso-rapido a {
  text-decoration: none;
  display: block;
  width: 100%;
  height: 100%;
  text-align: center;
  color: #3f3f3f;
  font-weight: 600;
}

.item-acesso-rapido:hover a {
  color: white;
}

h4 {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 10px;
  margin-left: 19px;
}

.title-text {
  text-align: center;
}

.arrow-container {
  width: 20px;
  height: 20px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-left: 9px;
  margin-top: 3px;
}

.chevron {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.5s ease-in-out;
  transition: transform 0.5s ease-in-out;
}

.chevron::before,
.chevron::after {
  content: "";
  position: absolute;
  width: 15px;
  height: 3px;
  background-color: white;
  border-radius: 2px;
}

.chevron::before {
  left: 0;
  transform: rotate(45deg);
  transform-origin: left;
}

.chevron::after {
  right: 0;
  transform: rotate(-45deg);
  transform-origin: right;
}

.arrow-container.open .chevron {
  transform: rotate(180deg);
}

@media (max-width: 768px) {
  .toggle {
    display: block;
  }

  .menu {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.4s ease;
  }

  .menu.active {
    max-height: 1000px;
  }

  .section-top-desktop {
    display: none;
  }

  .section-top-mobile {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .nav-section {
    flex-direction: column;
    align-items: center;
    padding: 1rem 0;
    gap: 1rem;
    background-color: #0078b6;
  }

  .nav-section a {
    padding: 0.5rem 0;
    color: white !important;
    color: white !important;
  }

  .color-bar {
    height: 4px;
  }

  .top-bar {
    padding: 1rem 2rem !important;
  }

  .item-acesso-rapido {
    line-height: 1.2;
    font-weight: bold;
    line-height: 1.2;
    font-weight: bold;
  }

  /* ---------- Acesso Rápido ------------ */
  .carrossel-wrapper {
    max-width: calc(130px * 4 + 2rem);
  }
}

/* Variáveis de cores para alto contraste */
:root {
  --high-contrast-bg: #333333;
  --high-contrast-text: #ffffff;
  --high-contrast-gray-1: #2e2e2e;
  --high-contrast-gray-2: #3c3c3c;
  --high-contrast-gray-3: #4a4a4a;
  --high-contrast-gray-4: #5e5e5e;
  --high-contrast-gray-5: #6b6b6b;
}

/* Regras de alto contraste */
.high-contrast {
  background: var(--high-contrast-bg) !important;
  color: var(--high-contrast-text) !important;
}

.high-contrast .navbar,
.high-contrast .nav-section.section-top-desktop,
.high-contrast .nav-section.section-top-mobile,
.high-contrast .profile-header-background-color,
.high-contrast .acesso-rapido-container {
  background: var(--high-contrast-gray-2) !important;
}

.high-contrast .nav-section-secondary,
.high-contrast .licitacao,
.high-contrast .navigation-box,
.high-contrast .card-custom {
  background: var(--high-contrast-gray-3) !important;
}

.high-contrast .nav-section {
  background: var(--high-contrast-gray-4) !important;
}

.high-contrast .bg-success,
.high-contrast .badge,
.high-contrast .btn,
.high-contrast .description-card-responsive,
.high-contrast .btn-mais-noticias,
.high-contrast .stories-box {
  background: var(--high-contrast-gray-5) !important;
}
.toggle {
  display: none;
  cursor: pointer;
  width: 30px;
  height: 24px;
  position: relative;
  margin-left: auto;
}

.toggle span {
  display: block;
  height: 4px;
  background: white;
  margin: 5px 0;
  border-radius: 2px;
  transition: 0.3s;
}

.toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.toggle.open span:nth-child(2) {
  opacity: 0;
}

.toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

.menu {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.nav-section {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  padding: 0.5rem 1rem;
}

.nav-section a {
  color: white;
  text-decoration: none;
  font-weight: 400;
}

.color-bar {
  height: 4px;
  display: flex;
}

.color-bar div {
  flex: 1;
  height: 10px;
}

.red {
  background: #c00;
}
.beige {
  background: #d9cdb9;
}
.blue {
  background: #009fe3;
}

.section-top-mobile {
  display: none;
}

.hover-menu {
  transition: background-color 0.3s;
  background-color: transparent;
  font-size: 14px;
}

.hover-menu:hover {
  background-color: #af2727;
  color: white;
}
.contrast-toggle {
  background: white;
  border: 1px solid black;
  color: rgb(0, 0, 0);
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  padding: 0 0.5rem;
  transition: color 0.3s;
  margin-bottom: 16px;
}

body.high-contrast .img-slide {
  -webkit-filter: grayscale(100%);
  filter: grayscale(100%);
}
.high-contrast fieldset {
  background-color: #2e2e2e !important;
}
.high-contrast th {
  background-color: #2e2e2e !important;
  color: white !important;
}
.high-contrast td {
  background-color: #2e2e2e !important;
  color: white !important;
}
.high-contrast button {
  background-color: #747474 !important;
}
.high-contrast .bg-success {
  background-color: #6b6b6b !important;
}
.high-contrast .badge {
  background-color: #6b6b6b !important;
}
body.high-contrast .table-container {
  background-color: #2e2e2e !important;
}
body.high-contrast .lista-menu-secretaria {
  background-color: #3c3c3c !important;
}
.high-contrast .news-box-line-button {
  background-color: #4a4a4a !important;
}
body.high-contrast .container {
  background-color: #4a4a4a !important;
}

body.high-contrast .bg-white {
  -webkit-filter: grayscale(100%);
  filter: grayscale(100%);
  border-left: 4px solid#4a4a4a !important;
}
body.high-contrast .news-box {
  background-color: #4a4a4a !important;
}
body.high-contrast a {
  color: white;
}
body.high-contrast p {
  color: white;
}
body.high-contrast h2 {
  color: white;
}
body.high-contrast .card-responsive {
  background-color: #333333 !important;
}
body.high-contrast .filter-btn {
  background-color: #333333 !important;
}
body.high-contrast .profile-header-pastas-tag {
  background-color: #333333 !important;
  color: white !important;
}
body.high-contrast .profile-header-address-box {
  border-color: white !important;
}

body.high-contrast h1 {
  color: white !important;
}
body.high-contrast span {
  color: white !important;
}
.high-contrast .menu-item:hover {
  background-color: #333333 !important;
}
.high-contrast .btn {
  background-color: #6b6b6b !important;
  color: white !important;
}
body.high-contrast .description-card-responsive {
  background-color: #6b6b6b !important;
}
body.high-contrast .btn-mais-noticias {
  background-color: #6b6b6b !important;
  border-color: #333333 !important;
}
body.high-contrast .news-divider {
  background-color: #333333 !important;
}
body.high-contrast .news-col-title {
  border-bottom: 1px solid #333333;
}
body.high-contrast .news-item-big {
  -webkit-filter: grayscale(100%);
  filter: grayscale(100%);
}
body.high-contrast .news-item-small-photo {
  -webkit-filter: grayscale(100%);
  filter: grayscale(100%);
}
body.high-contrast .carousel-track {
  -webkit-filter: grayscale(100%);
  filter: grayscale(100%);
}
body.high-contrast .arrow {
  -webkit-filter: grayscale(100%);
  filter: grayscale(100%);
}
body.high-contrast .img-fluid {
  -webkit-filter: grayscale(100%);
  filter: grayscale(100%);
}
.high-contrast .carousel-control-next {
  background-color: transparent !important;
}
.high-contrast .carousel-control-prev {
  background-color: transparent !important;
}
.high-contrast label {
  color: white !important;
}
.high-contrast .conteudo {
  background-color: #333333 !important;
}
.high-contrast .card-custom {
  background-color: #4a4a4a !important;
  color: white !important;
}
.high-contrast .licitacao {
  background-color: #4a4a4a !important;
}
.high-contrast .navigation-box {
  background-color: #4a4a4a !important;
}
.high-contrast .nav-section {
  background-color: #5e5e5e !important;
}
.high-contrast h3 {
  color: white !important;
}
.high-contrast select {
  background-color: #4a4a4a !important;
  color: white !important;
}
body.high-contrast .active {
  background-color: #2e2e2e !important;
}
body.high-contrast .modal-body {
  background-color: #333333 !important;
}
body.high-contrast .modal-header {
  background-color: #333333 !important;
}
body .high-contrast .stories-box {
  background-color: #6b6b6b !important;
}
.high-contrast .profile-header-background-color {
  background: #3c3c3c !important;
}

.high-contrast {
  background: #333333 !important;
  color: #fff !important;
}

.high-contrast .navbar {
  background: #3c3c3c !important;
}

.high-contrast .nav-section.section-top-desktop,
.high-contrast .nav-section.section-top-mobile {
  background: #3c3c3c !important;
}

.high-contrast .nav-section a,
.high-contrast .contrast-toggle,
.high-contrast .acesso-rapido-container h4,
.high-contrast .seta,
.high-contrast .nav-section-secondary a,
.high-contrast .item-acesso-rapido a {
  color: var(--high-contrast-text) !important;
}

.high-contrast .hover-menu {
  background: var(--high-contrast-bg) !important;
}

.high-contrast .hover-menu:hover {
  color: #000 !important;
  border-radius: 3px !important;
}

.high-contrast .item-acesso-rapido {
  background: var(--high-contrast-gray-4) !important;
}

.high-contrast .item-acesso-rapido:hover {
  background: var(--high-contrast-bg) !important;
}

.high-contrast .color-bar div {
  background: var(--high-contrast-bg) !important;
}

/* Ensure all text elements in main content are white */
.high-contrast main p,
.high-contrast main h1,
.high-contrast main h2,
.high-contrast main h3,
.high-contrast main h4,
.high-contrast main h5,
.high-contrast main h6,
.high-contrast .main-content p,
.high-contrast .main-content h1,
.high-contrast .main-content h2,
.high-contrast .main-content h3,
.high-contrast .main-content h4,
.high-contrast .main-content h5,
.high-contrast .main-content h6,
.high-contrast .content p,
.high-contrast .content h1,
.high-contrast .content h2,
.high-contrast .content h3,
.high-contrast .content h4,
.high-contrast .content h5,
.high-contrast .content h6 {
  color: #4a4a4a !important;
}

.high-contrast .licitacao {
  background-color: #4a4a4a !important;
}
.high-contrast .navigation-box {
  background-color: #4a4a4a !important;
}
.high-contrast .nav-section {
  background-color: #5e5e5e !important;
}
.high-contrast h3 {
  color: white !important;
}
.high-contrast select {
  background-color: #4a4a4a !important;
  color: white !important;
}
body.high-contrast .active {
  background-color: #2e2e2e !important;
}
body.high-contrast .modal-body {
  background-color: #333333 !important;
}
body.high-contrast .modal-header {
  background-color: #333333 !important;
}
body .high-contrast .stories-box {
  background-color: #6b6b6b !important;
}
.high-contrast .profile-header-background-color {
  background: #3c3c3c !important;
}

.high-contrast {
  background: #333333 !important;
  color: #fff !important;
}

.high-contrast .navbar {
  background: #3c3c3c !important;
}

.high-contrast .nav-section.section-top-desktop,
.high-contrast .nav-section.section-top-mobile {
  background: #3c3c3c !important;
  /* Filtros de imagem para alto contraste */
  body.high-contrast .img-slide,
  body.high-contrast .news-item-big,
  body.high-contrast .news-item-small-photo,
  body.high-contrast .carousel-track,
  body.high-contrast .arrow,
  body.high-contrast .img-fluid,
  body.high-contrast .bg-white {
    -webkit-filter: grayscale(100%);
    filter: grayscale(100%);
  }

  /* Texto em alto contraste */
  .high-contrast .seta {
    color: #fff !important;
  }

  .high-contrast .nav-section-secondary {
    background: #4a4a4a !important;
  }

  .high-contrast .nav-section-secondary a {
    color: #fff !important;
    background: #333333 !important;
    border-radius: 3px;
  }

  .high-contrast .hover-menu {
    background: #333333 !important;
  }

  .high-contrast .hover-menu:hover {
    color: #000 !important;
    border-radius: 3px !important;
  }

  .high-contrast .acesso-rapido-container {
    background: #3c3c3c !important;
  }

  .high-contrast .item-acesso-rapido {
    background: #5e5e5e !important;
  }

  .high-contrast .item-acesso-rapido a {
    color: #fff !important;
  }

  .high-contrast .item-acesso-rapido:hover {
    background: #333333 !important;
  }

  .high-contrast .item-acesso-rapido:hover a {
    color: white !important;
  }

  .high-contrast .color-bar div {
    background: #333333 !important;
  }

  /* Ensure all text elements in main content are white */
  .high-contrast main p,
  .high-contrast main h1,
  .high-contrast main h2,
  .high-contrast main h3,
  .high-contrast main h4,
  .high-contrast main h5,
  .high-contrast main h6,
  .high-contrast .main-content p,
  .high-contrast .main-content h1,
  .high-contrast .main-content h2,
  .high-contrast .main-content h3,
  .high-contrast .main-content h4,
  .high-contrast .main-content h5,
  .high-contrast .main-content h6,
  .high-contrast .content p,
  .high-contrast .content h1,
  .high-contrast .content h2,
  .high-contrast .content h3,
  .high-contrast .content h4,
  .high-contrast .content h5,
  .high-contrast .content h6 {
    color: var(--high-contrast-gray-3) !important;
  }
  color: #4a4a4a !important;
}

/*-------------- Acesso Rápido --------------*/

.acesso-rapido-container {
  position: relative;
  background: #003955;
  overflow: hidden;
  text-align: center;
}

.carrossel-wrapper {
  position: relative;
  max-width: calc(150px * 10 + 5rem);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.6s ease-in-out, max-height 0.6s ease-in-out;
}
.carrossel-wrapper.open {
  opacity: 1;
  max-height: 200px;
}

.acesso-rapido-scroll {
  font-size: 0.875rem;
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 10px;
  scrollbar-width: thin;
  scrollbar-color: #cccccc00 transparent;
}

.acesso-rapido-scroll::-webkit-scrollbar {
  height: 10px;
}
.acesso-rapido-scroll::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 10px;
}

.seta {
  background-color: transparent;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  z-index: 1;
  color: white;
  transition: 0.3s;
}
.seta:hover {
  color: #ffea4a;
  font-size: 2.1rem;
}

.item-acesso-rapido {
  background-color: #f0f8ff;
  padding: 8px 8px;
  border-radius: 5px;
  max-height: 120px;
  max-width: 150px;
  height: 80px;
  width: 130px;
  transition: background-color 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-align: center;
  flex: 0 0 auto;
}

.item-acesso-rapido:hover {
  background-color: #af2727;
}

.item-acesso-rapido a {
  text-decoration: none;
  display: block;
  width: 100%;
  height: 100%;
  text-align: center;
  color: #3f3f3f;
  font-weight: 600;
}
.item-acesso-rapido:hover a {
  color: white;
}

h4 {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 10px;
  margin-left: 19px;
}

.title-text {
  text-align: center;
}

.arrow-container {
  width: 20px;
  height: 20px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-left: 9px;
  margin-top: 3px;
}

.chevron {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.5s ease-in-out; /* Aumentado de 0.5s para 0.8s com ease-in-out */
}

.chevron::before,
.chevron::after {
  content: "";
  position: absolute;
  width: 15px;
  height: 3px;
  background-color: white;
  border-radius: 2px;
}

.chevron::before {
  left: 0;
  transform: rotate(45deg);
  transform-origin: left;
}

.chevron::after {
  right: 0;
  transform: rotate(-45deg);
  transform-origin: right;
}

.arrow-container.open .chevron {
  transform: rotate(180deg);
}

.login-btn {
  background-color: #FFF;
  padding: 4px 16px;
  border-radius: 18px;
  color: #113260 !important;
  font-size: 14px;

  &:hover {
    background-color: #f5f5f5ff;
  }
}

@media (max-width: 768px) {
  .toggle {
    display: block;
  }

  .menu {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.4s ease;
  }

  .menu.active {
    max-height: 1000px;
  }

  .section-top-desktop {
    display: none;
  }

  .section-top-mobile {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .nav-section {
    flex-direction: column;
    align-items: center;
    padding: 1rem 0;
    gap: 1rem;
    background-color: #0078b6;
  }

  .nav-section a {
    padding: 0.5rem 0;
    color: white !important;
  }

  .color-bar {
    height: 4px;
  }
  .top-bar {
    padding: 1rem 2rem !important;
  }
  .item-acesso-rapido {
    line-height: 1.2;
    font-weight: bold;
  }

  /* ---------- Acesso Rápido ------------ */

  .carrossel-wrapper {
    max-width: calc(130px * 4 + 2rem); /* 6 cards + espaço entre eles */
  }
}
