/* Regras gerais para imagens e vídeos */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

video {
    max-width: 100%;
    height: auto;
    display: block;
}

html, body {
    height: auto;
    overflow: visible;
    position: static !important;
}

header, .main-header {
    position: static !important;
}

/* --- Header --- */
.main-header {
    position: static;
    background-color: var(--background-color);
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
}

.main-nav {
    display: flex;
}

.nav-toggle {
    display: none;
}

/* Cards simplificados */
.card-anuncio .card-foto img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    display: block;
}

.card-conteudo {
    padding: 8px;
}

.card-conteudo h3 {
    margin: 4px 0;
    font-size: 1rem;
}

.card-conteudo p {
    margin: 2px 0;
    font-size: 0.85rem;
}

.card-conteudo .local {
    color: var(--secondary-color);
    font-weight: 500;
}

.card-conteudo .tag {
    color: var(--primary-color);
    font-weight: 600;
}

.card-anuncio .card-foto {
    width: 100% !important;
    aspect-ratio: 4 / 5; /* Mantém proporção 4:5 */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #222 !important;
    border-radius: 12px 12px 0 0 !important;
    overflow: hidden !important;
    min-height: 245px; /* Altura mínima baseada em 490px width / 4*5 = 612px height, mas ajustada */
}
/* Quando o card é o único na seção, permitir altura automática para mostrar imagem inteira */
.card-anuncio:only-child .card-foto {
    aspect-ratio: none !important;
    min-height: auto !important;
    height: auto !important;
    overflow: visible !important;
}
.card-anuncio:only-child .card-foto img {
    height: auto !important;
    max-height: none !important;
}
.card-anuncio .card-foto img {
    object-fit: contain !important;
    object-position: center !important;
    width: 100% !important;
    height: 100% !important;
    background: #222 !important;
    border-radius: 12px 12px 0 0 !important;
    display: block;
}
/* Botões modernos */
.btn, .btn-salvar, .btn-cancelar, .btn-publicar, .btn-auth, .btn-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #fff;
    border: none;
    border-radius: 24px;
    padding: 10px 28px;
    font-size: 1.08em;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(30,136,229,0.10);
    transition: background 0.2s, box-shadow 0.2s, transform 0.18s;
    margin-bottom: 12px;
    cursor: pointer;
    outline: none;
    text-decoration: none;
}
.btn:hover, .btn-salvar:hover, .btn-cancelar:hover, .btn-publicar:hover, .btn-auth:hover, .btn-whatsapp:hover {
    background: linear-gradient(90deg, var(--primary-variant-color) 0%, var(--primary-color) 100%);
    box-shadow: 0 4px 16px rgba(30,136,229,0.18);
    color: #fff;
    transform: translateY(-1px) scale(1.03);
}
.btn-cancelar {
    background: #23232b;
    color: #fff;
    border: 1.5px solid var(--primary-color);
    margin-left: 10px;
}
.btn-cancelar:hover {
    background: #18181d;
    color: var(--primary-color);
    border-color: var(--secondary-color);
}
.btn-whatsapp {
    background: linear-gradient(90deg, #25d366 0%, #128c7e 100%);
    color: #fff;
    border-radius: 32px !important;
    padding-left: 32px;
    padding-right: 32px;
    font-size: 1.12em;
    box-shadow: 0 2px 12px #25d36622;
}
.btn-whatsapp:hover {
    background: linear-gradient(90deg, #128c7e 0%, #25d366 100%);
}

/* Alertas de sucesso e erro */
.alert {
    padding: 16px 22px;
    border-radius: 12px;
    font-size: 1.08em;
    font-weight: 500;
    margin-bottom: 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-left: 6px solid;
    animation: fadeInAlert 0.5s;
}
.alert-success {
    background: linear-gradient(90deg, #e0ffe8 0%, #b2ffd6 100%);
    color: #1b5e20;
    border-color: #43a047;
}
.alert-danger, .alert-error {
    background: linear-gradient(90deg, #ffe0e0 0%, #ffb2b2 100%);
    color: #b71c1c;
    border-color: #e53935;
}
@keyframes fadeInAlert {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: none; }
}
.card-anuncio {
    display: flex !important;
    flex-direction: column !important;
    background: rgba(34, 34, 40, 0.85); /* mais translúcido e suave */
    border-radius: 18px;
    box-shadow: 0 2px 16px rgba(30,136,229,0.10);
    margin: 18px 0;
    transition: box-shadow 0.22s, transform 0.18s;
    border: 1px solid #444;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
    width: 100%;
    min-width: 0; /* Permite shrink */
}
.card-anuncio:hover {
    box-shadow: 0 8px 28px rgba(30,136,229,0.18), 0 1.5px 8px rgba(0,0,0,0.10);
    transform: translateY(-2px) scale(1.012);
    border-color: var(--primary-color);
}
.card-foto {
    width: 100%;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #222;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
}
.card-foto img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    background: #222;
    border-radius: 12px 12px 0 0;
    display: block;
}
.card-conteudo {
    padding: 18px 16px 14px 16px;
    background: transparent;
}
.card-conteudo > div, .card-conteudo > p, .card-conteudo > h3 {
    margin-bottom: 7px;
}
.card-conteudo > h3 {
    font-size: 1.18em;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 2px;
}
.card-conteudo strong {
    color: var(--secondary-color);
    font-weight: 600;
}
.card-nacionalidade {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.04em;
    margin-bottom: 7px;
}
.card-nacionalidade img {
    width: 24px;
    height: 18px;
    border-radius: 3px;
    object-fit: cover;
    background: #eee;
    border: 1px solid #bbb;
}
.card-foto, .card-conteudo {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}
/* Cores brancas para textos e ícones dos cards de anúncio na home */
.card-anuncio .fas, .card-anuncio .far, .card-anuncio .fa, .card-anuncio i {
    color: #fff !important;
    fill: #fff !important;
}
.card-anuncio select, .card-anuncio option {
    color: #fff !important;
    background: #222 !important;
}
/* Botão de voltar personalizado */
#btn-voltar {
    background: linear-gradient(90deg, #1e88e5 0%, #42a5f5 100%);
    color: #fff;
    border: none;
    border-radius: 24px;
    padding: 10px 28px;
    font-size: 1.08em;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(30,136,229,0.10);
    transition: background 0.2s, box-shadow 0.2s;
    margin-bottom: 22px;
    cursor: pointer;
    outline: none;
}
#btn-voltar:hover, #btn-voltar:focus {
    background: linear-gradient(90deg, #1565c0 0%, #1e88e5 100%);
    box-shadow: 0 4px 16px rgba(30,136,229,0.18);
    color: #fff;
}
/* Destaque para nome fictício nos cards de anúncios */
.nome-fantasia-card {
    color: #1e88e5;
    font-weight: bold;
    font-size: 1.15em;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 3px rgba(30,136,229,0.08);
    margin-bottom: 4px;
    display: block;
}
.search-form select[multiple] {
    height: 44px;
    min-width: 110px;
    overflow: hidden;
    background: var(--surface-light-color);
    color: var(--on-surface-color);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    font-size: 1rem;
    padding: 0.7rem 0.8rem;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    margin-right: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.search-form select[multiple]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(158, 71, 255, 0.3);
}
:root {
    --primary-color: #9e47ff;
    --primary-variant-color: #7b1fa2;
    --secondary-color: #00e0c6;
    --background-color: #121212;
    --surface-color: #1e1e1e;
    --surface-light-color: #23232b;
    --on-primary-color: #ffffff;
    --on-secondary-color: #000000;
    --on-background-color: #e0e0e0;
    --on-surface-color: #ffffff;
    --border-color: #333333;
    --star-color: #ffc107;
    --border-radius: 10px;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 8px 20px rgba(0, 0, 0, 0.45);
    --transition-speed: 0.22s cubic-bezier(.4,0,.2,1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--on-background-color);
    line-height: 1.6;
    font-size: 16px;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    scroll-behavior: smooth;
}

.container {
    width: 95%;
    max-width: 1280px;
    margin: 0 auto;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color var(--transition-speed);
    outline: none;
}

a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* --- Header --- */
.main-header {
    background-color: var(--surface-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    display: block;
}

.header-logo img {
  height: auto;
  width: auto;
  max-width: 400px;
  object-fit: contain;
}

@media (max-width: 768px) {
  .header-logo img {
    width: 204px !important;
    height: 136px !important;
    max-width: none !important;
    object-fit: contain;
  }
}

.main-nav ul {
    display: flex;
    list-style: none;
    align-items: center;
}

.main-nav ul li {
    margin-left: 24px;
}

.main-nav ul li a {
    color: var(--on-surface-color);
    padding: 0.6rem 1.2rem;
    border-radius: var(--border-radius);
    transition: background-color var(--transition-speed), color var(--transition-speed);
    font-weight: 500;
}

.main-nav ul li a:hover {
    background-color: var(--primary-color);
    color: var(--on-primary-color);
}

/* Cadastro button highlight */
.main-nav ul li:last-child a {
    background-color: var(--primary-color);
    color: var(--on-primary-color);
}

.main-nav ul li:last-child a:hover {
    background-color: var(--primary-variant-color);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.hamburger {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--on-surface-color);
    position: relative;
    transition: transform 0.3s ease-in-out;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 3px;
    background-color: var(--on-surface-color);
    left: 0;
    transition: transform 0.3s ease-in-out, top 0.3s, bottom 0.3s;
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    bottom: -8px;
}

/* --- Search Area --- */
.search-area {
    background: var(--surface-color);
    padding: 1.5rem 0 1rem 0;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: center;
    background: var(--surface-light-color);
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 1px 4px rgba(0,0,0,0.10);
    margin-bottom: 0.5rem;
}

.search-form input[type="text"] {
    height: 44px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    background: var(--surface-color);
    color: var(--on-surface-color);
    padding: 0 1rem;
    font-size: 1rem;
    margin-right: 8px;
    min-width: 180px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-form input[type="text"]:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(158, 71, 255, 0.18);
}

.search-form button[type="submit"] {
    height: 44px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: var(--border-radius);
    padding: 0 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 8px rgba(158,71,255,0.08);
}

.search-form button[type="submit"]:hover {
    background: var(--primary-variant-color);
    box-shadow: 0 4px 16px rgba(158,71,255,0.13);
}

.search-section {
    padding: 3rem 0;
    background-color: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
}

.search-form {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.search-form input,
.search-form select {
    padding: 0.9rem 1rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    background-color: var(--background-color);
    color: var(--on-surface-color);
    font-size: 1rem;
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}

.search-form input:focus,
.search-form select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(158, 71, 255, 0.3);
}

.search-form input {
    flex-grow: 1;
}

.search-form button {
    padding: 0.9rem 2rem;
    background-color: var(--primary-color);
    color: var(--on-primary-color);
    border: none;
    cursor: pointer;
    transition: background-color var(--transition-speed), transform var(--transition-speed);
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--border-radius);
}

.search-form button:hover {
    background-color: var(--primary-variant-color);
    transform: scale(1.05);
}

/* --- Estrutura da Seção de Anúncios --- */
.announcements-section {
    padding: 2.5rem 0 2rem 0;
    background: var(--background-color);
}

.ad-category-group {
    margin-bottom: 2.5rem;
}

.section-title {
    font-size: 2.1rem;
    font-weight: 800;
    margin-bottom: 1.2rem;
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.3rem;
    display: inline-block;
    letter-spacing: -1px;
}


/* --- Grid de Anúncios --- */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    align-items: stretch;
    margin-bottom: 1.5rem;
    box-sizing: border-box;
    width: 100%;
}

/* --- Novo Layout de Card --- */
.card-anuncio {
    display: flex !important;
    flex-direction: column !important;
    background: var(--surface-light-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    height: 100%;
    position: relative;
    border: 1.5px solid var(--border-color);
    transition: transform 0.22s cubic-bezier(.4,0,.2,1), box-shadow 0.22s cubic-bezier(.4,0,.2,1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    box-sizing: border-box;
}

.card-anuncio:hover {
    transform: translateY(-7px) scale(1.025);
    box-shadow: var(--shadow-hover);
}

.card-anuncio .card-foto,
.card-anuncio .card-conteudo {
    width: 100%;
    border: none;
}

.card-foto {
    width: 100%;
    height: 200px;
    background-color: #23232b;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-foto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #181818;
    border-radius: 0;
}

.card-conteudo {
    padding: 14px 13px 12px 13px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    flex-grow: 1;
    min-height: 120px;
}

.card-nome {
    font-weight: 700;
    font-size: 17px;
    color: var(--on-surface-color);
    margin-bottom: 2px;
    letter-spacing: -0.5px;
}

.card-local,
    .card-categoria {
    font-size: 13px;
    color: #bdbdbd;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

.card-descricao {
    font-size: 13px;
    line-height: 1.5;
    display: -webkit-box;
    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--on-background-color);
    margin: 4px 0 0 0;
}
    /* --- Correção para card único --- */
    .announcements-section .container {
        display: flex;
        justify-content: center;
    }
    .grid-container {
        max-width: 1100px;
        margin-left: auto;
        margin-right: auto;
    }
    .grid-container:has(.card-anuncio:only-child) {
        justify-items: center;
    }
    .card-anuncio:only-child {
        max-width: 350px;
        width: 100%;
    }
.card-botoes .btn-msg,
    .card-botoes .btn-wpp {
    flex: 1;
    text-align: center;
    padding: 0.6rem 1rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background-color var(--transition-speed);
    border: none;
    cursor: pointer;
    background: var(--secondary-color);
    color: #222;
    box-shadow: 0 1px 4px rgba(0,224,198,0.10);
}

.card-botoes .btn-msg {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 1px 4px rgba(158,71,255,0.10);
}

.card-botoes .btn-msg:hover {
    background: var(--primary-variant-color);
}
.card-botoes .btn-wpp:hover {
    background: #00bfae;
}

.btn-msg {
    background-color: var(--primary-color);
    color: var(--on-primary-color);
}
.btn-msg:hover {
    background-color: var(--primary-variant-color);
}

.btn-wpp {
    background-color: #25D366;
    color: #fff;
}
.btn-wpp:hover {
    background-color: #1DA851;
}


/* --- Badges de Destaque --- */
.badge {
    position: absolute;
    top: 10px;
    right: -1px;
    padding: 4px 12px 4px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--on-primary-color);
    border-radius: 15px 0 0 15px;
    box-shadow: -2px 2px 5px rgba(0,0,0,0.3);
    text-transform: uppercase;
    z-index: 2;
}

.badge i {
    margin-right: 5px;
}

.badge-boosted {
    background: linear-gradient(45deg, #00e0c6, #00b3a1);
    color: #000;
}

/* Cores dos Badges por Plano */
.badge-ouro { background: linear-gradient(45deg, #FFD700, #F0C400); color: #000; }
.badge-prata { background: linear-gradient(45deg, #e0e0e0, #C0C0C0); color: #000; }
.badge-bronze { background: linear-gradient(45deg, #CD7F32, #b8732d); color: #fff; }


/* --- Estilos Específicos por Plano (Bordas) --- */
.card-anuncio.card-boosted {
    border-color: var(--secondary-color);
}
.card-anuncio.card-ouro {
    border-color: #FFD700;
}
.card-anuncio.card-prata {
    border-color: #C0C0C0;
}
.card-anuncio.card-bronze {
    border-color: #CD7F32;
}
.card-anuncio.card-gratis {
    border-color: #333;
}

/* ==========================================================================
   PÁGINA DO ANÚNCIO INDIVIDUAL (/public/anuncio.php)
   ========================================================================== */

.page-anuncio {
    padding-top: 2rem;
    padding-bottom: 4rem;
}

.anuncio-main-title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.anuncio-media-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .anuncio-media-container {
        /* Se houver vídeo, cria duas colunas. Senão, uma só. */
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

.anuncio-main-image,
.anuncio-main-video {
    width: 100%;
    overflow: hidden;
    border-radius: var(--border-radius-md);
    background-color: #f0f0f0;
}

.anuncio-main-image img,
.anuncio-main-video video {
    max-height: 220px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
    margin: 0 auto 10px auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.anuncio-gallery-thumbnails {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.anuncio-gallery-thumbnails .thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s ease;
}

.anuncio-gallery-thumbnails .thumbnail:hover {
    border-color: var(--primary-color);
}

.anuncio-details {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .anuncio-details {
        grid-template-columns: 2fr 1fr;
        gap: 3rem;
    }
}

.anuncio-description h2,
.anuncio-contact h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--light-gray-color);
    padding-bottom: 0.5rem;
}

.anuncio-description p {
    line-height: 1.8;
    color: var(--text-color);
}

.anuncio-contact p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.anuncio-contact .btn-whatsapp {
    display: inline-block;
    width: 100%;
    text-align: center;
    padding: 1rem;
    font-size: 1.1rem;
    background-color: #25D366;
    color: #fff;
    border-radius: var(--border-radius-md);
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.anuncio-contact .btn-whatsapp:hover {
    background-color: #1EAE54;
}

.anuncio-contact .btn-whatsapp i {
    margin-right: 0.5rem;
}

/* ==========================================================================
   PÁGINAS DE AUTENTICAÇÃO (Login, Cadastro)
   ========================================================================== */

.page-auth {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4rem 0;
    min-height: 70vh;
}

.auth-form-container {
    background-color: var(--surface-color);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 450px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.auth-form-container h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.auth-form-container p {
    color: var(--on-background-color);
    margin-bottom: 2rem;
}

.auth-form {
    text-align: left;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--on-surface-color);
}

.form-group input {
    width: 100%;
    padding: 0.9rem 1rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    background-color: var(--background-color);
    color: var(--on-surface-color);
    font-size: 1rem;
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(158, 71, 255, 0.3);
}

.btn-auth {
    width: 100%;
    padding: 1rem;
    background-color: var(--primary-color);
    color: var(--on-primary-color);
    border: none;
    border-radius: var(--border-radius);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color var(--transition-speed);
}

.btn-auth:hover {
    background-color: var(--primary-variant-color);
}

.auth-link {
    margin-top: 2rem;
}

.auth-alert {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 500;
}

.auth-alert-error {
    background-color: #4d1a1a;
    color: #ffacac;
    border: 1px solid #8c2b2b;
}

.auth-alert-success {
    background-color: #1a4d2d;
    color: #ace6c3;
    border: 1px solid #2b8c5a;
}

/* Estilos para o modo de desenvolvimento em esqueci_senha.php */
.dev-notice {
    background-color: #2a2a2a;
    border: 1px solid var(--border-color);
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    text-align: left;
}

.dev-notice strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 0.5rem;
}

.dev-link-container {
    background-color: var(--background-color);
    padding: 0.75rem;
    border-radius: 4px;
    margin-top: 0.75rem;
    word-wrap: break-word;
}

.dev-link-container a {
    color: var(--secondary-color);
    font-family: monospace;
}


.placeholder-form {
    background-color: var(--background-color);
    border: 1px dashed var(--border-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    margin-top: 2rem;
}

.nav-button-cadastro {
    background-color: var(--primary-color);
    color: var(--on-primary-color) !important;
}

.nav-button-cadastro:hover {
    background-color: var(--primary-variant-color) !important;
}

/* --- Footer --- */
.main-footer {
    background-color: var(--background-color);
    padding: 2rem 0;
    text-align: center;
    margin-top: 2rem;
    color: #888;
    border-top: 1px solid var(--border-color);
}

/* --- Media Queries --- */
@media (max-width: 992px) {
    .search-form {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: var(--surface-color);
        flex-direction: column;
        padding: 1rem 0;
        border-top: 1px solid var(--border-color);
        z-index: 1000;
        justify-content: center;
        align-items: center;
    }

    .main-nav.active {
        display: flex;
    }

    .main-nav ul {
        flex-direction: column;
        width: 100%;
        text-align: center;
    }

    .main-nav ul li {
        margin: 1rem 0;
        width: 100%;
    }

    .main-nav ul li a {
        display: block;
        padding: 1rem;
        border-radius: 0;
        border-bottom: 1px solid var(--border-color);
    }

    .main-nav ul li:last-child a {
        border-bottom: none;
    }

    .nav-toggle {
        display: block;
    }

    .nav-toggle.active .hamburger {
        transform: rotate(45deg);
    }

    .nav-toggle.active .hamburger::before {
        transform: translate(0, 8px) rotate(90deg);
        top: 0;
    }

    .nav-toggle.active .hamburger::after {
        transform: translate(0, -8px) rotate(90deg);
        bottom: 0;
    }
}

/* Ajuste visual para bloco de mídia do anúncio */
.anuncio-midia {
    max-width: 1200px;
    margin: 0 auto 24px;
    overflow: visible !important;
    height: auto !important;
}
.midia-principal,
.midia-video {
    width: 100%;
    margin-bottom: 16px;
    height: auto !important;
    padding: 10px 0;
    overflow: visible !important;
}
.midia-principal picture {
    height: auto !important;
    display: block;
}
.midia-principal img {
    width: 100%;
    max-height: none !important;
    height: auto !important;
    object-fit: contain;
    border-radius: 10px;
    background: #000;
    display: block;
}
.midia-video video {
    width: 100%;
    max-height: 520px;
    object-fit: cover;
    border-radius: 10px;
    background: #000;
    display: block;
}

/* Nacionalidade nos cards de anúncio */
.card-nacionalidade {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 2px 0 4px 0;
}
.nacionalidade-flag {
    width: 18px;
    height: 18px;
    border-radius: 2px;
    object-fit: contain;
    box-shadow: 0 1px 2px rgba(0,0,0,0.07);
}
.nacionalidade-nome {
    font-size: 13px;
    color: #666;
    font-weight: 400;
    letter-spacing: 0.2px;
}

/* Bandeira de nacionalidade nos cards */
.flag-icon {
    width: 20px;
    height: 14px;
    margin-right: 7px;
    vertical-align: middle;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.10);
}

/* Badge de plano nos cards */
.badge-plano {
    display: inline-block;
    font-size: 12px;
    padding: 2px 10px;
    border-radius: 8px;
    margin-bottom: 4px;
    margin-right: 6px;
    color: #fff;
    background: #888;
    font-weight: 600;
    vertical-align: middle;
    opacity: 0.92;
    letter-spacing: 0.2px;
}
.badge-ouro { background: #FFD700; color: #222; }
.badge-prata { background: #C0C0C0; color: #222; }
.badge-bronze { background: #cd7f32; color: #fff; }
.badge-gratis { background: #888; color: #fff; }

/* Badge de impulso ativo nos cards */
.badge-impulso {
    display: inline-block;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 8px;
    margin-bottom: 4px;
    margin-right: 6px;
    color: #fff;
    background: #ff5e00;
    font-weight: 700;
    vertical-align: middle;
    opacity: 0.95;
    letter-spacing: 0.5px;
}
/* Responsividade aprimorada */
@media (max-width: 900px) {
    .container {
        width: 99%;
        max-width: 100vw;
    }
    .search-form {
        flex-direction: column;
        gap: 12px;
        padding: 1rem 0.5rem;
    }
}
@media (max-width: 768px) {
    .grid-container {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 12px;
    }
    .card-foto {
        height: 140px;
    }
}

@media (max-width: 480px) {
    .grid-container {
        grid-template-columns: 1fr; /* Força 1 coluna em telas muito pequenas */
        gap: 10px;
    }
    .card-anuncio {
        max-width: 100%;
        width: 100%;
    }
}

@media (max-width: 600px) {
    .section-title {
        font-size: 1.3rem;
        padding-bottom: 0.15rem;
    }
    .search-area {
        padding: 0.7rem 0 0.5rem 0;
    }
    .search-form input[type="text"],
    .search-form select,
    .search-form button[type="submit"] {
        min-width: 0;
        width: 100%;
        margin-right: 0;
    }
    .card-foto {
        height: 110px;
    }
    .card-conteudo {
        padding: 10px 7px 8px 7px;
        min-height: 60px;
    }
}

@media (max-width: 768px) {
    .container {
        width: 100%;
        padding: 0;
    }
    .announcements-section {
        padding: 0 10px;
    }
    .announcements-section .container {
        display: block; /* Remove flex para evitar problemas */
    }
    .grid-container {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 8px;
        margin-left: 0;
        margin-right: 0;
        padding: 0;
        box-sizing: border-box;
    }
    .card-anuncio {
        max-width: 100%;
    }
}

.nome-fantasia-card {
    color: #1e88e5;      /* Azul destacado */
    font-weight: bold;
    font-size: 1.15em;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 3px rgba(30,136,229,0.08);
    margin-bottom: 4px;
    display: block;
}

/* Media Queries para Mobile */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    .main-header {
        padding: 0.25rem 0;
    }
    .main-header .logo img {
        height: 40px;
    }
    .anuncios-grid {
        grid-template-columns: 1fr;
    }
    .blog-grid {
        grid-template-columns: 1fr;
    }
    .card-anuncio .card-foto {
        height: 180px !important;
    }
    .pagination a {
        padding: 8px 12px;
        font-size: 0.9em;
    }
    .btn {
        padding: 10px 15px;
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .main-nav ul {
        flex-direction: column;
    }
    .main-nav li {
        margin: 5px 0;
    }
    h1 {
        font-size: 1.5em;
    }
    .card-conteudo h3 {
        font-size: 0.9em;
    }
}

/* Estilos para Blog e Cidades */
.blog-section, .cidades-section {
    background: #f9f9f9;
}

.cidades-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.cidade-link {
    display: block;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    color: #2d5fa7;
    font-weight: bold;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: background 0.3s;
}

.cidade-link:hover {
    background: #2d5fa7;
    color: #fff;
}

/* HERO Section */
.anuncio-hero {
    position: relative;
    margin-bottom: 2rem;
    height: auto;
    overflow: visible;
}

.hero-image-container {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 500px;
    overflow: visible;
}

.hero-image-container img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

.btn-ver-video {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.3s;
}

.btn-ver-video:hover {
    background: rgba(0, 0, 0, 0.9);
}

.btn-ver-video i {
    font-size: 1.4rem;
}

.anuncio-gallery-thumbnails {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
    justify-content: center;
}

.anuncio-gallery-thumbnails .thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s ease;
}

.anuncio-gallery-thumbnails .thumbnail:hover {
    border-color: var(--primary-color);
}

/* Video Modal */
.video-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
}

.video-modal.show {
    display: flex;
}

.video-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.video-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#modalVideo {
    width: 100%;
    height: auto;
    max-height: 80vh;
    display: block;
}

/* Estabilidade de layout para página de anúncio */
.hero-image-container {
    aspect-ratio: 4 / 5; /* Proporção 4:5 para evitar CLS */
    display: flex;
    align-items: center;
    justify-content: center;
    background: #222;
    border-radius: 12px;
    overflow: hidden;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
}

.container.page-anuncio {
    height: auto !important;
    overflow: visible !important;
}

.container {
    position: static !important;
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 1rem !important;
}
