/* Main */
.main {
  margin-top: 0;
}

/* Quick Access */
.btn-quick .btn-text {
  display: none;
}

/* Search Area */
#search-area {
  background-color: #f8f9fe;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%23e9ecfc' fill-opacity='0.4' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E");
  padding: 2rem 0;
  position: relative;
  border-bottom: 1px solid #E6E6E6;
}

#search-area.has-bg-image {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 300px;
  display: flex;
  align-items: center;
}

#search-area .search-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
}

#search-area h1,
#search-area h3 {
  position: relative;
  z-index: 1;
  font-family: 'Titillium Web', sans-serif;
}

#search-area h1,
#search-area h3 {
  margin-bottom: 1rem;
}

#search-area {
  margin-bottom: 0;
}

#global-banners-wrapper {
  background-color: #F8F8F8;
  border-bottom: 1px solid #E6E6E6;
}

/* Featured Buttons Grid (Custom Carousel) */
.featured-buttons-wrapper {
  margin-top: 2rem;
  padding-bottom: 0.1rem;
  padding-left: 40px;
  padding-right: 40px;
}

.carousel-bg-container {
  background-color: rgba(234, 234, 234, 0.5);
  border-radius: 10px;
  padding: 0 10px; /* Apenas padding horizontal aqui, o vertical vai para o grid */
  border: 1px solid #E6E6E6;
}

.featured-buttons-grid {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-top: 10px; /* Garante teto para o pulo do hover */
  padding-bottom: 15px; /* Garante chão para a sombra do hover */
  /* Hide scrollbar */
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.featured-buttons-grid::-webkit-scrollbar {
  display: none;
}

.featured-btn-card {
  flex: 0 0 calc(25% - 0.75rem);
  scroll-snap-align: start;
  display: flex;
  background-color: #fff;
  border: 1px solid #E6E6E6;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  height: 60px;
  max-height: 60px;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #333;
  border: 1px solid transparent; /* Adicionado para evitar pulo no hover */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.auto-width-card {
  flex: 0 0 auto !important; /* Tamanho ditado pelo conteúdo */
}

/* Garante que imagens muito grandes não quebrem o card se ele for auto-width */
.auto-width-card.icon-only-card .icon-img {
  width: auto;
  max-width: none;
}

.featured-btn-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(5, 113, 238, 0.15); /* Sombra mais azulada */
  border-color: #0571EE;
  color: #0571EE;
  background: linear-gradient(to bottom, #ffffff 40%, rgba(5, 113, 238, 0.12) 100%) !important;
  text-decoration: none;
}

.featured-btn-card:hover .title,
.featured-btn-card:hover .icon {
  color: #0571EE !important;
}

.static-first-card {
  position: sticky !important;
  left: 0; /* Voltou para 0 pois o padding foi movido para o container pai */
  z-index: 10;
}

.static-first-card::after {
  content: '';
  position: absolute;
  top: -10px; /* Estendido para cima e para baixo para não expor o gap quando o card subir no hover */
  bottom: -10px;
  right: -1rem;
  width: 1rem;
  background-color: #f1f1f1; /* Acompanha a nova cor de fundo do grid */
  z-index: -1;
}

.featured-btn-card .btn-card-content {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.featured-btn-card .icon {
  font-size: 1.5rem;
  color: #191919;
  margin-right: 0.75rem;
  flex-shrink: 0;
  /* Previne que o ícone seja esmagado */
}

.featured-btn-card .icon-img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  margin-right: 0.75rem;
  flex-shrink: 0;
}

.icon-only-card {
  padding: 0;
  overflow: hidden; /* Para garantir que a imagem não vaze os cantos arredondados do card */
  position: relative; /* Para segurar o conteúdo absoluto */
}

.icon-only-card .btn-card-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-only-card .icon-img {
  width: 100%;
  height: 100%;
  max-height: 100%;
  margin-right: 0;
  object-fit: contain; /* Contain garante que o GIF não seja cortado, apenas preencha o espaço da melhor forma */
}

.icon-only-card .icon {
  margin-right: 0;
  font-size: 3.5rem;
}

/* Se for icon-only E auto-width, precisamos devolver o conteúdo para o fluxo (static)
   para que ele possa ditar a largura do cartão, senão o cartão colapsa para 0px. */
.auto-width-card.icon-only-card .btn-card-content {
  position: static;
  width: auto;
}

.auto-width-card.icon-only-card .icon-img {
  height: 60px; /* Igual à altura do cartão para manter a proporção quadrada */
  width: auto;
  max-width: none;
  object-fit: contain;
}

.auto-width-card.icon-only-card .icon {
  padding: 0 1.5rem; /* Dá um respiro lateral se for um ícone puro */
}

.featured-btn-card .title {
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  text-align: left;
  word-break: break-word;
  /* Permite quebrar palavras muito longas */
  hyphens: auto;
}

/* Custom Navigation Arrows for Carousel */
.featured-buttons-wrapper .custom-carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  opacity: 0.7;
  color: #818181;
  background: transparent;
  border: none;
  z-index: 10;
}

.featured-buttons-wrapper .custom-carousel-nav:hover {
  opacity: 1;
}

.featured-buttons-wrapper .prev-btn {
  left: 0;
}

.featured-buttons-wrapper .next-btn {
  right: 0;
}

/* Telas médias (Tablets e Notebooks pequenos) */
@media (max-width: 992px) {
  .featured-btn-card {
    flex: 0 0 calc(50% - 0.5rem);
  }
}

/* Telas pequenas (Celulares) */
@media (max-width: 576px) {
  .featured-buttons-wrapper {
    padding-left: 35px;
    padding-right: 35px;
  }

  .featured-btn-card {
    flex: 0 0 100%;
  }

  .featured-buttons-wrapper .custom-carousel-nav {
    /* Setas ficam um pouco menores no mobile */
    transform: translateY(-50%) scale(0.8);
  }
}

/* Half Banners */
.half-banners-section-container {
  background-color: #EAEAEA;
  border: 2px solid #E6E6E6;
  border-radius: 10px;
  padding: 10px;
}

/* Banner Full */
#banner-full .carousel-item {
  max-height: 335px;
}

#banner-full .carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 10px;
}

/* Card Group Header */
#card-group-header .card h5 a {
  color: var(--c-dark-blue);
}

/* Alert */
#home-alert .alert {
  border: 1px solid var(--c-light-blue);
}

#home-alert .icon {
  font-size: 1.25rem;
  color: var(--c-blue);
  margin-right: 1rem;
}

#home-alert p {
  margin-bottom: 0;
}

/* Featured News */
#featured-news {
  border-bottom: 1px solid #E6E6E6;
}

#featured-news .gallery-item {
  position: relative;
  height: 250px;
  overflow: hidden;
  border-radius: 10px;
}

#featured-news .gallery-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

#featured-news .gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1);
  transition: transform 0.3s ease-in-out;
}

#featured-news .gallery-item .gallery-box {
  position: absolute;
  display: flex;
  width: 100%;
  height: 100%;
  color: #fff;
  background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0) 55%, rgba(0, 0, 0, 0.75) 95%);
  top: 0;
  z-index: 2;
  padding: 0.75rem;
  flex-wrap: wrap;
  pointer-events: none;
}

#featured-news .col-left .gallery-item .gallery-box {
  background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0) 70%, rgba(0, 0, 0, 0.7) 95%);
}

#featured-news .gallery-item .gallery-box .gallery-box-item {
  margin-top: auto;
}

#featured-news .gallery-item .gallery-box .gallery-box-item .badge {
  font-size: 0.75rem;
  margin-bottom: 0.75rem;
}

#featured-news .gallery-item .gallery-box .gallery-box-item h4 {
  margin-bottom: 0;
  color: #fff;
}

#featured-news .gallery-item .gallery-box .gallery-box-item a:hover {
  text-decoration: none;
}

#featured-news .gallery-link:hover .gallery-item img {
  transform: scale(1.05);
}

#featured-news .gallery-link:hover .gallery-item .gallery-box {
  background-image: 
    linear-gradient(to top right, rgba(5, 113, 238, 0.95) 0%, rgba(5, 113, 238, 0) 55%),
    linear-gradient(to top, rgba(0, 22, 58, 0.95) 0%, rgba(0, 22, 58, 0) 60%);
}

/* Featured Entity */
#featured-entity a {
  text-decoration: none;
}

#featured-entity .entity-category {
  font-size: .85rem;
  color: var(--c-dark-gray);
}

#featured-entity a:hover .entity-category {
  color: var(--c-base-gray);
}

#featured-entity .icon-circle .icon {
  font-size: 1.25rem;
}

#featured-entity .icon-circle {
  margin-right: 1rem;
}

#featured-entity a:hover .icon-circle {
  background-color: var(--c-dark-blue);
}

/* Featured Links */
#featured-links .img-container {
  display: flex;
  align-items: center;
  width: 205px;
  height: 65px;
  margin: 0 auto;
}

#featured-links img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Pop-up */
#popup-modal .modal-content {
  background-color: transparent;
  border: none;
}

#popup-modal .modal-header {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 10;
  border: none;
}

#popup-modal .icon {
  font-size: 1.5rem;
  color: var(--c-base-gray);
  transition: color 0.3s ease;
}

#popup-modal .icon:hover {
  color: var(--c-dark-blue);
}

#popup-modal .modal-body {
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
}

#popup-modal .modal-body img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (min-width: 567px) {
  #featured-news .gallery-news .gallery-item {
    height: 345px;
  }
}

@media (min-width: 768px) {
  #featured-news .gallery-news .gallery-item {
    height: 465px;
  }
}

@media (min-width: 992px) {
  #featured-news .gallery-news .gallery-item-1 {
    height: 520px;
  }

  #featured-news .gallery-news .gallery-item-2,
  #featured-news .gallery-news .gallery-item-3 {
    height: 345px;
  }
}

@media (min-width: 1200px) {
  #featured-news .gallery-news .gallery-item-1 {
    height: 501px;
  }

  #featured-news .gallery-news .gallery-item-2,
  #featured-news .gallery-news .gallery-item-3 {
    height: 248px;
  }
}

@media (min-width: 1400px) {
  #search-area ul.list-featured li.list-inline-item {
    margin-bottom: 0;
  }

  #featured-news .gallery-news .gallery-item-1 {
    height: 582px;
  }

  #featured-news .gallery-news .gallery-item-2,
  #featured-news .gallery-news .gallery-item-3 {
    height: 289px;
  }
}

/* Abas de navegação - Visual da referência */
#featured-services .nav-tabs {
  border: none;
  background: white;
  border-radius: 8px;
  padding: 0.5rem;
  margin-bottom: 2rem;
  display: inline-flex;
  width: auto;
  min-width: fit-content;
}

#featured-services .nav-tabs .nav-item {
  margin-right: 0.5rem;
}

#featured-services .nav-tabs .nav-link {
  border: none;
  background: white;
  color: #666;
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  transition: all 0.3s ease;
  position: relative;
  border: 2px solid transparent;
}

#featured-services .nav-tabs .nav-link:hover {
  background: #f8f9fa;
  color: #333;
  border-color: #e9ecef;
}

#featured-services .nav-tabs .nav-link.active {
  background: #0571EE !important;
  color: white !important;
  border-color: #0571EE;
  font-weight: 600;
}

#featured-services .nav-tabs .nav-link.active:hover {
  background: #0456b3 !important;
  border-color: #0456b3;
}

/* Ícones nas abas */
#featured-services .nav-tabs .nav-link .icon {
  margin-right: 0.5rem;
  font-size: 1rem;
}

/* Responsividade das abas */
@media (max-width: 768px) {
  #featured-services .nav-tabs .nav-link {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }

  #featured-services .nav-tabs .nav-link .icon {
    font-size: 0.875rem;
  }
}

@media (max-width: 576px) {
  #featured-services .nav-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 0.25rem;
  }

  #featured-services .nav-tabs .nav-link {
    white-space: nowrap;
    min-width: auto;
    padding: 0.5rem 0.75rem;
  }

  /* Remover margin do ícone em mobile quando o texto não está visível */
  #featured-services .nav-tabs .nav-link .icon {
    margin-right: 0 !important;
  }
}

/* Remover margin e padding do ícone quando o texto não está visível (até 767px) */
@media (max-width: 767px) {
  #featured-services .nav-tabs .nav-link .icon {
    margin-right: 0 !important;
    padding-right: 0 !important;
  }
}

/* Aplicar o mesmo padrão de responsividade do menu superior */
/* Por padrão, esconder o texto das abas (igual ao nav-top-menu) */
#featured-services .nav-tabs .nav-link .text {
  display: none;
}

/* Small screens (≥576px) - adicionar espaçamento entre ícone e texto */
@media (min-width: 576px) {
  #featured-services .nav-tabs .nav-link .icon {
    padding-right: .5rem;
  }
}

/* Medium screens (≥768px) - mostrar o texto das abas */
@media (min-width: 768px) {
  #featured-services .nav-tabs .nav-link .text {
    display: inline-block;
  }
}

#featured-services .category-section h6 {
  color: var(--c-dark-gray);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--c-light-gray);
  padding-bottom: 0.5rem;
}

#featured-services a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

#featured-services a:hover {
  text-decoration: none;
  color: inherit;
}

#featured-services .icon-circle {
  margin-right: 1rem;
  background-color: var(--c-blue);
}

#featured-services a:hover .icon-circle {
  background-color: var(--c-dark-blue);
}

#featured-services .entity-category {
  font-size: .85rem;
  color: var(--c-dark-gray);
}

#featured-services a:hover .entity-category {
  color: var(--c-base-gray);
}

#featured-services .icon-circle .icon {
  font-size: 1.25rem;
}

/* Layout responsivo simplificado - sempre 5 colunas */
#featured-services .row {
  --bs-gutter-x: 0.75rem;
  --bs-gutter-y: 0.75rem;
}

/* Cards de serviço com layout responsivo inteligente */
.service-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: white;
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  transition: all 0.3s ease;
  height: 100%;
  border: 1px solid #e9ecef;
  /* Cards quadrados com altura fixa para desktop */
  aspect-ratio: 1;
  min-height: 200px;
  max-height: 200px;
  width: 200px;
  max-width: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.service-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 20px rgba(0, 0, 0, 0.1);
  border-color: #007bff;
}

.service-icon {
  margin-bottom: 0.75rem;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 48px;
}

.service-icon img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(48%) sepia(79%) saturate(2476%) hue-rotate(199deg) brightness(98%) contrast(96%);
  /* Blue color filter */
}

.service-icon .icon-default {
  font-size: 48px;
  color: #3498db;
  /* Blue color */
}

.service-name {
  font-weight: 500;
  color: #333;
  line-height: 1.2;
  font-size: 0.85rem;
  /* Evitar quebra de palavras no meio */
  word-wrap: break-word;
  word-break: keep-all;
  hyphens: none;
  /* Garantir que o texto não quebre no meio das palavras */
  white-space: normal;
  overflow-wrap: break-word;
  /* Altura mínima para o nome */
  min-height: 2.2em;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
}

/* Responsividade para diferentes tamanhos de tela */
@media (max-width: 576px) {

  /* MOBILE: Layout horizontal como na imagem de referência - 1 COLUNA */
  .service-card {
    aspect-ratio: auto;
    min-height: auto;
    max-height: none;
    width: 100%;
    max-width: none;
    padding: 1rem;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    text-align: left;
    border-radius: 8px;
    margin-bottom: 0.75rem;
  }

  .service-icon {
    margin-bottom: 0;
    margin-right: 1rem;
    min-height: 40px;
    flex-shrink: 0;
  }

  .service-icon img,
  .service-icon .icon-default {
    width: 40px;
    height: 40px;
    font-size: 40px;
    color: #3498db;
  }

  .service-name {
    font-size: 1rem;
    min-height: auto;
    text-align: left;
    justify-content: flex-start;
    color: #333;
    /* Texto escuro como na imagem */
    font-weight: 500;
    line-height: 1.3;
  }

  /* Mobile: 1 coluna - Sobrescrevendo Bootstrap */
  #featured-services .row-cols-1 {
    --bs-rows-cols: 1 !important;
  }

  #featured-services .row-cols-md-2 {
    --bs-rows-cols: 1 !important;
  }

  #featured-services .row-cols-xl-3 {
    --bs-rows-cols: 1 !important;
  }

  /* CSS direto para garantir 1 coluna */
  #featured-services .col {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }

  /* Melhor espaçamento para mobile */
  #featured-services .row {
    --bs-gutter-x: 0;
    --bs-gutter-y: 0;
  }
}

@media (min-width: 577px) and (max-width: 767px) {

  /* SMALL: Cards verticais médios */
  .service-card {
    aspect-ratio: 1;
    min-height: 120px;
    max-height: 120px;
    width: 120px;
    max-width: 120px;
    padding: 0.75rem;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
  }

  .service-icon {
    margin-bottom: 0.5rem;
    margin-right: 0;
    min-height: 36px;
  }

  .service-icon img,
  .service-icon .icon-default {
    width: 36px;
    height: 36px;
    font-size: 36px;
    color: #3498db;
  }

  .service-name {
    font-size: 0.8rem;
    min-height: 2.1em;
    text-align: center;
    justify-content: center;
    color: #333;
    line-height: 1.3;
  }

  /* Small: 3 colunas - Sobrescrevendo Bootstrap */
  #featured-services .row-cols-1 {
    --bs-rows-cols: 3 !important;
  }

  #featured-services .row-cols-md-2 {
    --bs-rows-cols: 3 !important;
  }

  #featured-services .row-cols-xl-3 {
    --bs-rows-cols: 3 !important;
  }

  /* CSS direto para garantir 3 colunas */
  #featured-services .col {
    flex: 0 0 33.333333% !important;
    max-width: 33.333333% !important;
  }
}

@media (min-width: 768px) and (max-width: 1199px) {

  /* MEDIUM: Cards verticais grandes */
  .service-card {
    aspect-ratio: 1;
    min-height: 160px;
    max-height: 160px;
    width: 160px;
    max-width: 160px;
    padding: 1rem;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
  }

  .service-icon {
    margin-bottom: 0.7rem;
    margin-right: 0;
    min-height: 44px;
  }

  .service-icon img,
  .service-icon .icon-default {
    width: 44px;
    height: 44px;
    font-size: 44px;
    color: #3498db;
  }

  .service-name {
    font-size: 0.825rem;
    min-height: 2.15em;
    text-align: center;
    justify-content: center;
    color: #333;
    line-height: 1.2;
  }

  /* Medium: 4 colunas - Sobrescrevendo Bootstrap */
  #featured-services .row-cols-1 {
    --bs-rows-cols: 4 !important;
  }

  #featured-services .row-cols-md-2 {
    --bs-rows-cols: 4 !important;
  }

  #featured-services .row-cols-xl-3 {
    --bs-rows-cols: 4 !important;
  }

  /* CSS direto para garantir 4 colunas */
  #featured-services .col {
    flex: 0 0 25% !important;
    max-width: 25% !important;
  }
}

@media (min-width: 1200px) and (max-width: 1399px) {

  /* LARGE: Cards verticais grandes */
  .service-card {
    aspect-ratio: 1;
    min-height: 180px;
    max-height: 180px;
    width: 180px;
    max-width: 180px;
    padding: 1.125rem;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
  }

  .service-icon {
    margin-bottom: 0.75rem;
    margin-right: 0;
    min-height: 46px;
  }

  .service-icon img,
  .service-icon .icon-default {
    width: 46px;
    height: 46px;
    font-size: 46px;
    color: #3498db;
  }

  .service-name {
    font-size: 0.875rem;
    min-height: 2.25em;
    text-align: center;
    justify-content: center;
    color: #333;
    line-height: 1.2;
  }

  /* Large: 5 colunas - Sobrescrevendo Bootstrap */
  #featured-services .row-cols-1 {
    --bs-rows-cols: 5 !important;
  }

  #featured-services .row-cols-md-2 {
    --bs-rows-cols: 5 !important;
  }

  #featured-services .row-cols-xl-3 {
    --bs-rows-cols: 5 !important;
  }

  /* CSS direto para garantir 5 colunas */
  #featured-services .col {
    flex: 0 0 20% !important;
    max-width: 20% !important;
  }
}

@media (min-width: 1400px) {

  /* XXLARGE: Cards verticais grandes - Desktop premium */
  .service-card {
    aspect-ratio: 1;
    min-height: 200px;
    max-height: 200px;
    width: 200px;
    max-width: 200px;
    padding: 1.25rem;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
  }

  .service-icon {
    margin-bottom: 0.75rem;
    margin-right: 0;
    min-height: 48px;
  }

  .service-icon img,
  .service-icon .icon-default {
    width: 48px;
    height: 48px;
    font-size: 48px;
    color: #3498db;
  }

  .service-name {
    font-size: 0.9rem;
    min-height: 2.3em;
    text-align: center;
    justify-content: center;
    color: #333;
    line-height: 1.2;
  }

  /* XXLarge: 6 colunas - Sobrescrevendo Bootstrap */
  #featured-services .row-cols-1 {
    --bs-rows-cols: 6 !important;
  }

  #featured-services .row-cols-md-2 {
    --bs-rows-cols: 6 !important;
  }

  #featured-services .row-cols-xl-3 {
    --bs-rows-cols: 6 !important;
  }

  /* CSS direto para garantir 6 colunas */
  #featured-services .col {
    flex: 0 0 16.666667% !important;
    max-width: 16.666667% !important;
  }
}

/* Link "Ver todos os Destaques" */
#featured-services .view-all a {
  color: #0571EE !important;
  text-decoration: none;
  transition: color 0.3s ease;
}

#featured-services .view-all a:hover {
  color: #0456b3 !important;
  text-decoration: none;
}

#featured-services .view-all a:focus {
  color: #0456b3 !important;
  outline: 2px solid #0571EE;
  outline-offset: 2px;
}

/* Ícone do link "Ver todos os Destaques" */
#featured-services .view-all a .fa-plus {
  color: #0571EE !important;
}

/* Seção de Serviços em Destaque */
#featured-services {
  background-color: #F8F8F8;
  padding: 2rem 0;
  margin: 2rem 0 0 0;
  /* Remove margem inferior */
}

/* Container interno para melhor espaçamento */
#featured-services .container {
  background-color: #F8F8F8;
  padding: 1rem;
}

@media (min-width: 1400px) {

  /* XXLARGE: Cards verticais grandes - Desktop premium */
  .service-card {
    aspect-ratio: 1;
    min-height: 200px;
    max-height: 200px;
    width: 200px;
    max-width: 200px;
    padding: 1.25rem;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
  }

  .service-icon {
    margin-bottom: 0.75rem;
    margin-right: 0;
    min-height: 48px;
  }

  .service-icon img,
  .service-icon .icon-default {
    width: 48px;
    height: 48px;
    font-size: 48px;
    color: #3498db;
  }

  .service-name {
    font-size: 0.9rem;
    min-height: 2.3em;
    text-align: center;
    justify-content: center;
    color: #333;
    line-height: 1.2;
  }

  /* XXLarge: 6 colunas para máximo aproveitamento */
  #featured-services .row-cols-xl-3 {
    --bs-rows-cols: 6;
  }

  /* CSS direto para garantir 6 colunas */
  #featured-services .col {
    flex: 0 0 16.666667% !important;
    max-width: 16.666667% !important;
  }

  /* Espaçamento premium para telas XXL */
  #featured-services .row {
    --bs-gutter-x: 1.75rem;
    --bs-gutter-y: 1.75rem;
  }
}

/* Carrossel de Portais e Serviços - CSS movido para carousel-services.css */

/* Elementos especiais do carrossel movidos para carousel-services.css */

/* Links do carrossel movidos para carousel-services.css */

/* Ícones, textos e scrollbar do carrossel movidos para carousel-services.css */

/* Controles de navegação do carrossel movidos para carousel-services.css */

/* Responsividade do carrossel movida para carousel-services.css */

/* Estilos para notícias sem foto */
.gallery-item.no-photo {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}

.gallery-item.no-photo .gallery-box {
  text-align: center;
  padding: 20px;
}

.gallery-item.no-photo .gallery-box-item h4 {
  color: #495057;
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.4;
}

/* ===== CONTROLE DE ESPAÇAMENTO COM FOOTER ===== */
/* Remove margem inferior da main na home para eliminar espaço branco */
body:has(#featured-services) .main,
body:has(#carousel-portals) .main {
  margin-bottom: 0 !important;
}

/* Solução alternativa para navegadores que não suportam :has() */
.home-page .main {
  margin-bottom: 0 !important;
}

/* Remove margem inferior da última seção */
#carousel-portals.section {
  margin-bottom: 0 !important;
}

/* Garante que não há espaçamento extra antes do footer */
#carousel-portals+footer,
#carousel-portals~footer {
  margin-top: 0 !important;
}

/* Dark Mode */
body.dark-mode #search-area {
  background-color: #03070E !important;
  background-image: none;
  border-bottom-color: #172334 !important;
}

body.dark-mode #search-area .form-control {
  background-color: transparent !important;
  color: #ECEEF0 !important;
  border-color: transparent !important;
}

body.dark-mode .search-wrapper-custom {
  background-color: #172334 !important;
  border-color: #2A3650 !important;
}

body.dark-mode #search-area .form-control::placeholder {
  color: #A0AABF !important;
}

body.dark-mode #search-area p,
body.dark-mode #search-area .hint-text {
  color: #A0AABF !important;
}

body.dark-mode #search-area p a,
body.dark-mode #search-area .hint-text a,
body.dark-mode #search-area p strong,
body.dark-mode #search-area .hint-text strong {
  color: #ECEEF0 !important;
}

body.dark-mode #global-banners-wrapper {
  background-color: #03070E !important;
  border-bottom-color: #172334 !important;
}

body.dark-mode .carousel-bg-container {
  background-color: rgba(11, 20, 36, 0.5) !important;
  border-color: #2A3650 !important;
}

body.dark-mode .half-banners-section-container {
  background-color: #172334 !important;
  border-color: #2A3650 !important;
}

body.dark-mode #featured-news {
  background-color: #060B17 !important;
  border-bottom-color: #172334 !important;
}

body.dark-mode #featured-services {
  background-color: #03070E !important;
}

body.dark-mode #featured-services .container {
  background-color: #03070E !important;
}

body.dark-mode #carousel-portals {
  background-color: #03070E !important;
}

body.dark-mode #servicesTabs {
  background-color: #172334 !important;
}

body.dark-mode .featured-btn-card {
  background-color: #2A3650;
  border-color: #2A3650;
}

body.dark-mode .featured-btn-card:hover {
  background: linear-gradient(to bottom, #2A3650 40%, #0571EE 200%) !important;
  border-color: #0571EE !important;
  box-shadow: 0 6px 12px rgba(132, 187, 252, 0.15) !important;
}

body.dark-mode .featured-btn-card:hover .icon {
  color: #0571EE;
}

body.dark-mode .featured-btn-card:hover .title {
  color: #ECEEF0;
}

body.dark-mode .btn-card-content {
  border-color: #2A3650;
}

body.dark-mode .btn-card-content .icon {
  color: #84BBFC;
}

body.dark-mode .btn-card-content .title {
  color: #ECEEF0 !important;
}

body.dark-mode .service-card {
  background-color: #2A3650 !important;
  border-color: #2A3650 !important;
  color: #ECEEF0 !important;
}

body.dark-mode .service-card:hover {
  background: linear-gradient(to bottom, #2A3650 40%, #1e293b 100%) !important;
  border-color: #84BBFC !important;
  box-shadow: 0 15px 20px rgba(132, 187, 252, 0.15) !important;
}

body.dark-mode .service-card .service-icon .icon-default {
  color: #84BBFC !important;
}

body.dark-mode .service-card .service-name {
  color: #ECEEF0 !important;
}

body.dark-mode #featured-services .nav-tabs .nav-link {
  background-color: transparent !important;
  color: #ECEEF0 !important;
  border-color: transparent !important;
}

body.dark-mode #featured-services .nav-tabs .nav-link:hover {
  background-color: #2A3650 !important;
}

body.dark-mode #featured-services .nav-tabs .nav-link.active {
  background-color: #0571EE !important;
  color: #FFFFFF !important;
  border-color: #0571EE !important;
}

.news-section-title {
  color: #0571EE;
}

body.dark-mode .news-section-title {
  color: #0571EE !important;
}