/* Estilos personalizados para elementos específicos */

/* Estilo para o elemento com ID 'bairro' */
#bairro {
    color: #61005D; /* Cor roxa do topo */
    font-weight: 600;
}

/* Estilo para badges de bairro */
span.ad-bairro-badge,
.ad-bairro-badge {
    background-color: var(--azul);
    border-radius: 5px;
    padding: 5px 10px;
    color: #61005D; /* Cor roxa do topo */
    font-weight: 600;
}

/* Estilos específicos da navbar */
.navbar {
    min-height: 40px;
    background-color: #61005D !important;
    color: white;
    padding: 0.5px 0;
    display: flex;
    align-items: center;
}

/* Ajuste da logo */
.logo-img {
    height: 55px;
    width: auto;
    margin-top: 2px;
    object-fit: contain;
}

/* Centralização vertical do logo-container */
.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}
.logo-text {
    color: white;
    font-weight: 700;
    font-size: 1rem;
    margin: 0;
    letter-spacing: 0.5px;
    line-height: 1;
    margin-right: 16px !important;
    padding: 8px !important;
}

/* Botões e links da navbar */
.navbar .toggle-theme {
    color: white;
    background: transparent;
    border: none;
    padding: 0.1rem;
    cursor: pointer;
    font-size: 0.7rem;
}

.navbar .area-anunciante {
    color: white;
    text-decoration: none;
    padding: 0.1rem 0.3rem;
    border-radius: 4px;
    transition: background-color 0.2s;
    font-size: 0.7rem;
}

.navbar .area-anunciante:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Classe para edição manual */
.col-md-4.mb-4.mb-md-0 {
    color: #61005D;
}

.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.title {
    color: #61005D;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    font-size: 2rem;
}

.search-container {
    background-color: #fff;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.regions-container {
    margin-bottom: 3rem;
}

.region-card {
    background-color: #fff;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
    border: 1px solid #e0e0e0;
}

.region-title {
    color: #61005D;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.region-description {
    color: #666;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

.btn-ver-anuncios {
    background-color: #B4D335;
    color: #0f0f0f;
    border: none;
    padding: 0.4rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-ver-anuncios::after {
    content: '→';
    margin-left: 0.5rem;
    transition: transform 0.2s;
}

.btn-ver-anuncios:hover {
    background-color: #9fb82e;
    color: #183839;
    transform: translateX(2px);
}

.btn-ver-anuncios:hover::after {
    transform: translateX(3px);
}

.anuncios-list {
    margin-top: 2rem;
}

/* Layout padrão mobile: coluna */
.anuncio-card {
  background-color: #fff;
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

@media (max-width: 576px) {
  .anuncio-card {
    padding: 0 !important;
  }
  
  .anuncio-card > div[name="imagem-anuncio"] {
    width: 100% !important;
    height: 100vw !important;
    max-width: 100% !important;
    max-height: 350px !important;
    min-width: 100% !important;
    min-height: 400px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-bottom: 16px !important;
    padding-right: 0 !important;
  }
  .anuncio-card > div[name="imagem-anuncio"] img,
  .anuncio-card > div[name="imagem-anuncio"] > div {
    width: 100% !important;
    height: 100vw !important;
    max-width: 100% !important;
    max-height: 350px !important;
    min-width: 100% !important;
    min-height: 400px !important;
    object-fit: cover !important;
    object-position: center !important;
    margin: 0 !important;
    display: block !important;
  }
  
  /* Força object-fit especificamente para imagens */
  .anuncio-card > div[name="imagem-anuncio"] img {
    object-fit: cover !important;
    object-position: center !important;
    width: 100% !important;
    height: 100% !important;
  }
  .anuncio-card {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    padding: 0 !important;
  }
  .anuncio-card > div {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    box-sizing: border-box;
  }
  .anuncio-card .flex-grow-1 {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }
  .anuncio-card .position-absolute.end-0.bottom-0.p-2 {
    position: static !important;
    margin-top: 5px;
    width: 100% !important;
    max-width: 100% !important;
    display: block;
    box-sizing: border-box;
  }
  [name="botoes-anuncio"] {
    flex-direction: column !important;
    gap: 8px !important;
    max-width: 100% !important; /* Alterado de 220px para 100% para ficar igual à foto */
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
  }
  [name="botoes-anuncio"] a {
    height: 40px !important;
    font-size: 1rem !important;
    padding: 0 24px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    min-width: 100% !important;
  }
  .anuncio-card > .nota-anuncio-conteiner,
  .nota-anuncio-conteiner {
    padding-left: 0 !important;
  }

}

@media (min-width: 801px) {
  .anuncio-conteudo-flex {
    flex: 1 1 0%;
    min-width: 0;
  }
  .anuncio-card {
    gap: 24px !important;
  }
  .anuncio-card {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
    overflow: hidden;
  }
  .anuncio-card > div[name="imagem-anuncio"] {
    flex-shrink: 0;
    min-width: 120px;
    max-width: 350px;
  }
  .anuncio-card > .flex-grow-1 {
    flex: 1 1 0%;
    min-width: 180px;
    margin-left: 16px !important;
  }
  .anuncio-card > .nota-anuncio-conteiner {
    min-width: 110px;
    max-width: 180px;
    padding-left: 18px;
    align-items: flex-start;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .anuncio-conteudo-flex > .flex-grow-1 {
    max-width: 600px;
  }
  .anuncio-conteudo-flex > .nota-anuncio-conteiner {
    max-width: 200px;
    max-height: 60px;
    overflow: auto;
  }
}

.anuncios-list nav {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
}

.pagination {
    display: flex;
    align-items: center;
    padding-left: 0;
    list-style: none;
    margin: 0;
    gap: 0.5rem;
}

.pagination .page-item {
    margin: 0;
}

.pagination .page-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.75rem;
    line-height: 1.25;
    color: #61005D;
    background-color: #fff;
    border: 1px solid #dee2e6;
    text-decoration: none;
    min-width: 2.5rem;
    height: 2.5rem;
    border-radius: 4px;
}

.pagination .page-item.active .page-link {
    z-index: 3;
    color: #fff !important;
    background-color: #61005D !important;
    border-color: #61005D !important;
}

.pagination .page-item.disabled .page-link {
    color: #6c757d;
    pointer-events: none;
    background-color: #fff;
    border-color: #dee2e6;
}

.pagination .page-link:hover {
    z-index: 2;
    color: #fff;
    text-decoration: none;
    background-color: #61005D;
    border-color: #61005D;
}

.anuncios-list .pagination .page-link svg,
.anuncios-list .pagination .page-link i {
    font-size: 1rem;
    vertical-align: middle;
}

/* Estilos para botões com melhor contraste */
.btn-primary {
    background-color: #61005D !important;
    border-color: #61005D !important;
    color: #ffffff !important;
}

.btn-primary:hover {
    background-color: #4a0047 !important;
    border-color: #4a0047 !important;
}

.btn-outline-primary {
    color: #61005D !important;
    border-color: #61005D !important;
}

.btn-outline-primary:hover {
    background-color: #61005D !important;
    color: #ffffff !important;
}

/* Estilo específico para o botão de busca */
.search-container .btn-primary {
    background-color: #61005D !important;
    border-color: #61005D !important;
    color: #ffffff !important;
    font-weight: 600;
}

.search-container .btn-primary:hover {
    background-color: #4a0047 !important;
    border-color: #4a0047 !important;
}

/* Estilo específico para o botão da área do anunciante na navbar */
.navbar .btn-primary {
    background-color: #fff !important;
    border-color: #61005D !important;
    color: #61005D !important;
    font-weight: 700;
    font-size: 1rem;
    text-shadow: none;
}

.navbar .btn-primary:hover {
    background-color: #f3e6f7 !important;
    border-color: #61005D !important;
    color: #61005D !important;
}

.text-primary {
    color: #61005D !important;
}

.footer-copyright {
    line-height: 2;
    word-break: break-word;
    white-space: normal;
    min-width: 300px;
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
}

.footer {
    background-color: #f0f1f0 !important;
    padding: 2rem 0;
    margin-top: 2rem;
    width: 100vw !important;
    position: relative !important;
    left: 50% !important;
    right: 50% !important;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
}

.footer .container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
}

/* Estilos base dos botões */
[name="botoes-anuncio"] {
  display: flex;
  gap: 8px;
  margin-top: 0.5rem;
}

[name="botoes-anuncio"] a {
  text-align: center;
  font-weight: 600;
  border-radius: 8px;
  padding: 0.75rem 1.2rem;
  font-size: 1.1rem;
  border: none;
  transition: background 0.2s, color 0.2s;
}

[name="botoes-anuncio"] .btn-detalhes,
[name="botoes-anuncio"] a.btn-detalhes {
  background: #781776 !important;
  color: #fff !important;
  border: none !important;
  display: block !important;
}

[name="botoes-anuncio"] .btn-whatsapp,
[name="botoes-anuncio"] a.btn-whatsapp {
  background: #B4D251 !important;
  color: #343235 !important;
  border: none !important;
  display: block !important;
}

/* Media queries */
@media (min-width: 577px) and (max-width: 800px) {
  .anuncio-card > div[name="imagem-anuncio"] {
    width: 80vw !important;
    height: 80vw !important;
    max-width: 450px !important;
    max-height: 450px !important;
    min-width: 300px !important;
    min-height: 300px !important;
  }
  .anuncio-card > div[name="imagem-anuncio"] img,
  .anuncio-card > div[name="imagem-anuncio"] > div {
    width: 80vw !important;
    height: 80vw !important;
    max-width: 450px !important;
    max-height: 450px !important;
    min-width: 300px !important;
    min-height: 300px !important;
    object-fit: cover !important;
    object-position: center !important;
    margin: 0 !important;
  }
  
  /* Força object-fit no tablet */
  .anuncio-card > div[name="imagem-anuncio"] img {
    object-fit: cover !important;
    object-position: center !important;
    width: 100% !important;
    height: 100% !important;
  }
  
  /* Força quebra de linha na tela média */
  .anuncio-conteudo-flex {
    flex-direction: column !important;
    gap: 12px !important;
  }
  
  .anuncio-conteudo-flex > .flex-grow-1 {
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 8px !important;
  }
  
  .anuncio-conteudo-flex > .nota-anuncio-conteiner {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: flex-start !important;
    align-items: center !important;
    gap: 16px !important;
  }
  
  [name="botoes-anuncio"] {
    flex-direction: column !important;
    gap: 8px !important;
    max-width: 100% !important; /* Alterado para 100% */
    width: 100%;
    margin-left: 0;
    margin-right: auto;
  }
  [name="botoes-anuncio"] a {
    width: 100% !important;
    max-width: 100% !important;
  }
}

div[name="botoes-anuncio"] > .btn-detalhes,
div[name="botoes-anuncio"] > .btn-whatsapp {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    padding: 0 24px !important;
    height: 40px !important;
    font-size: 1rem !important;
    font-family: inherit !important;
    line-height: normal !important;
    border: none !important;
    box-shadow: none !important;
    vertical-align: middle !important;
}

.btn-area-anunciante {
  width: 180px !important;
  display: inline-block !important;
  background: #fff !important;
  color: #61005D !important;
  border: 2px solid #61005D !important;
  font-weight: 700 !important;
  font-size: 1rem !important;
  box-shadow: none !important;
  outline: none !important;
  padding: 0.375rem 0.75rem !important;
  border-radius: 0.375rem !important;
  text-align: center !important;
  transition: background 0.2s, color 0.2s;
  margin-left: 25px !important;
}

/* Estilo personalizado para o botão */
.btn {
    padding: 0.25rem 0.5rem !important;
    font-size: 0.875rem !important;
    line-height: 1.5 !important;
    border-radius: 0.25rem !important;
}

.anuncio-conteudo-flex {
  display: flex;
  flex-direction: row;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: space-between;
}

/* Estilos base para desktop */
.anuncio-card > div[name="imagem-anuncio"] {
  width: 280px;
  height: 280px;
  margin-right: 16px;
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
}

.anuncio-card > div[name="imagem-anuncio"] img {
  width: 280px;
  height: 280px;
  object-fit: cover !important;
  object-position: center !important;
  border-radius: 12px !important;
}