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

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

/* Search Area */
#search-area {
  background-color: var(--c-light-gray);
  background-image: url("../../core/project/img/pattern-bg.1898b8106af2.png");
  background-repeat: repeat;
  padding: 2rem 0;
}

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

#search-area ul.list-featured {
  margin-top: 2rem;
}

#search-area ul.list-featured li.list-inline-item {
  margin-bottom: 2rem;
}

#search-area ul.list-featured li.list-inline-item:last-child {
  margin-bottom: 0;
}

#search-area ul.list-featured li.list-inline-item a.list-link {
  text-decoration: none;
  font-size: 1rem;
  padding: .5rem .75rem;
  border: 1px solid var(--c-gray);
  border-radius: 30px;
  background-color: #F8F9F9;
}

#search-area a.iptu {
  text-decoration: none;
  font-size: 1rem;
  padding: .5rem .75rem;
  border: 1px solid var(--c-gray);
  border-radius: 30px;
  background-color: #3498db;
  color: #FFF;
  border: none;
}

#search-area a.iptu:hover {
  background-color: var(--c-dark-blue);
  border-color: var(--c-dark-blue);
  color: #FFF;
}

#search-area ul.list-featured li.list-inline-item a.list-link:hover {
  background-color: var(--c-dark-blue);
  border-color: var(--c-dark-blue);
  color: #FFF;
}

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

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

/* 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 .gallery-item {
  position: relative;
  height: 250px;
  overflow: hidden;
}

#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 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 {
    height: 345px;
  }

  #featured-news .gallery-news .gallery-item-3,
  #featured-news .gallery-news .gallery-item-4 {
    height: 312px;
  }
}

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

  #featured-news .gallery-news .gallery-item-2 {
    height: 312px;
  }

  #featured-news .gallery-news .gallery-item-3,
  #featured-news .gallery-news .gallery-item-4 {
    height: 185px;
  }
}

@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 {
    height: 364px;
  }

  #featured-news .gallery-news .gallery-item-3,
  #featured-news .gallery-news .gallery-item-4 {
    height: 214px;
  }
}

/* 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;
  }
}

#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: #f6f6f6;
  padding: 2rem 0;
  margin: 2rem 0 0 0; /* Remove margem inferior */
  border-radius: 8px;
}

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



@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;
}

