@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Cores baseadas na nova logo "Encontro PRIVÊ" */
    --primary-color: #9e2a2b;
    /* Vinho escuro (PRIVÊ) */
    --secondary-color: #c44554;
    /* Vermelho suave (Encontro) */
    --bg-color: #f3f4f6;
    /* Fundo cinza bem claro */
    --card-bg: #ffffff;
    --text-dark: #1f2937;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --success-color: #10b981;
    /* Verde para "Verificada" */
    --warning-color: #f59e0b;
    /* Amarelo para "Destaque" */
    --whatsapp-color: #25d366;
    /* Verde do WhatsApp */
    --telegram-color: #0088cc;
    /* Azul do Telegram */
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-dark);
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

.site-main {
    flex: 1;
}

/* --- HEADER --- */
.site-header {
    background-color: var(--card-bg);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Simulação da Logo em CSS (Substitua por sua tag <img> real) */
.logo-text {
    font-size: 1.8rem;
    font-weight: 500;
    letter-spacing: -0.5px;
}

.logo-text .encontro {
    color: var(--secondary-color);
}

.logo-text .prive {
    color: var(--primary-color);
    font-weight: 800;
    text-transform: uppercase;
}

.logo-sub {
    display: block;
    font-size: 0.7rem;
    color: var(--primary-color);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: -5px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* --- MOBILE HEADER --- */
/* Hamburger — hidden on desktop */
.header-menu-toggle {
    display: none;
}

@media (max-width: 600px) {
    .header-container {
        flex-wrap: wrap;
        align-items: center;
        gap: 0;
    }

    /* Hamburger button */
    .header-menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 6px;
        margin-left: auto;
    }

    .header-menu-toggle span {
        display: block;
        width: 22px;
        height: 2px;
        background-color: var(--text-dark);
        border-radius: 2px;
        transition: transform 0.25s, opacity 0.25s;
    }

    /* Animated X when open */
    .header-menu-toggle.open span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

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

    .header-menu-toggle.open span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    /* Actions — hidden by default on mobile */
    .header-actions {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 8px;
        padding: 12px 0 8px;
        border-top: 1px solid var(--border-color);
        margin-top: 8px;
    }

    .header-actions.open {
        display: flex;
    }

    .lang-switcher {
        width: 100%;
    }

    .lang-current {
        width: 100%;
        justify-content: space-between;
    }

    .lang-dropdown {
        width: 100%;
        left: 0;
        right: 0;
    }

    .btn-publish {
        width: 100%;
        text-align: center;
    }
}

.btn-publish {
    background-color: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.btn-publish:hover {
    background-color: #7a2021;
}

.btn-login {
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.9rem;
}

/* --- LANGUAGE SWITCHER (custom dropdown) --- */
.lang-switcher {
    position: relative;
}

.lang-current {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 0.85rem;
    font-family: inherit;
    color: var(--text-dark);
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

.lang-current:hover,
.lang-current:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(158, 42, 43, 0.1);
}

.lang-flag {
    font-size: 1.1rem;
    line-height: 1;
}

.lang-name {
    font-weight: 500;
}

.lang-arrow {
    color: var(--text-muted);
    transition: transform 0.2s;
    flex-shrink: 0;
}

.lang-switcher.open .lang-arrow {
    transform: rotate(180deg);
}

.lang-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    min-width: 140px;
    list-style: none;
    overflow: hidden;
    z-index: 200;
}

.lang-switcher.open .lang-dropdown {
    display: block;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    font-size: 0.9rem;
    color: var(--text-dark);
    transition: background-color 0.15s;
}

.lang-option:hover {
    background-color: #f9fafb;
    color: var(--primary-color);
}

/* --- SEARCH BAR --- */
.search-section {
    background-color: white;
    border-bottom: 1px solid var(--border-color);
    padding: 15px 20px;
}

.search-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    gap: 10px;
}

.search-input-group {
    flex: 1;
    display: flex;
    align-items: center;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0 15px;
}

.city-input-group {
    position: relative;
}

/* Dropdown de cidades */
.city-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    min-width: 280px;
    /* Garante largura mínima no mobile */
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-top: 5px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    /* Sombra mais forte para destaque */
    z-index: 999;
    /* Z-index bem alto para sobrepor tudo */
    display: none;
    max-height: 300px;
    overflow-y: auto;
}

@media (max-width: 768px) {
    .city-dropdown {
        width: calc(100vw - 40px);
        /* Ocupa quase toda a largura em telas pequenas */
        left: 0;
        right: 0;
        max-height: 250px;
    }
}

.city-dropdown.show {
    display: block;
    animation: fadeInDropdown 0.2s ease-out;
}

@keyframes fadeInDropdown {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.city-dropdown-item {
    padding: 12px 15px;
    font-size: 0.95rem;
    color: var(--text-dark);
    cursor: pointer;
    transition: background-color 0.2s;
    text-align: left;
}

.city-dropdown-item:hover {
    background-color: var(--bg-color);
}

.btn-geolocation {
    color: var(--primary-color);
    font-weight: 600;
}

.btn-geolocation i {
    color: var(--primary-color) !important;
    margin-right: 5px;
}

.city-dropdown-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 5px 0;
}

.search-input-group i {
    color: var(--text-muted);
}

.search-input-group input {
    width: 100%;
    padding: 12px 10px;
    border: none;
    background: transparent;
    outline: none;
    font-family: inherit;
    font-size: 0.95rem;
}

/* Remove fundo azul do preenchimento automático (autofill) */
.search-input-group input:-webkit-autofill,
.search-input-group input:-webkit-autofill:hover, 
.search-input-group input:-webkit-autofill:focus, 
.search-input-group input:-webkit-autofill:active {
    transition: background-color 5000s ease-in-out 0s;
    -webkit-text-fill-color: var(--text-dark) !important;
}

.btn-search {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0 25px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.2s;
}

.btn-search:hover {
    opacity: 0.9;
}

/* Extras / Filtros */
.search-filters {
    max-width: 1280px;
    margin: 15px auto 0;
    display: flex;
    justify-content: flex-start;
}

.filter-toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-dark);
    font-weight: 500;
}

.filter-toggle input {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 40px;
    height: 22px;
    background-color: var(--border-color);
    border-radius: 20px;
    transition: 0.3s;
}

.toggle-slider::before {
    content: "";
    position: absolute;
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: 0.3s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.filter-toggle input:checked+.toggle-slider {
    background-color: var(--primary-color);
}

.filter-toggle input:checked+.toggle-slider::before {
    transform: translateX(18px);
}

/* --- CATEGORIES --- */
.categories-nav {
    max-width: 1280px;
    margin: 15px auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    overflow-x: auto;
    scrollbar-width: none;
    /* Firefox */
}

.categories-nav::-webkit-scrollbar {
    display: none;
}

.nav-group {
    display: flex;
    gap: 10px;
}

.nav-divider {
    width: 1px;
    height: 24px;
    background: var(--border-color);
    flex-shrink: 0;
}

.cat-pill {
    background: white;
    border: 1px solid var(--border-color);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 500;
    white-space: nowrap;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    text-decoration: none;
}

.cat-pill i {
    font-size: 0.9rem;
    opacity: 0.8;
}

.cat-pill.cat-sub {
    background: #f9fafb;
}

.cat-pill.cat-sub:hover:not(.active) {
    background: white;
}

.cat-pill:hover:not(.active) {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.cat-pill.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* --- MAIN CONTENT --- */
.main-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.grid-layout-toggle {
    display: none;
}

/* --- GRID DE ANÚNCIOS --- */
.ads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
    gap: 15px;
}

/* --- NOVO DESIGN AD-CARD (STITCH STYLE) --- */
.ad-card {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1.8;
    border-radius: 1.5rem; /* rounded-3xl */
    overflow: hidden;
    border: 1.5px solid var(--plan-color, #D1D5DB);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* NOVO: Suporte para Mídia (Foto ou Vídeo) de Fundo */
.ad-card-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.ad-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.16);
}

/* Overlay para garantir contraste no texto */
.ad-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 40%, transparent 80%);
    pointer-events: none;
    z-index: 2;
}

/* Cores por Plano */
.ad-card.premium {
    --plan-color: #be123c;
    box-shadow: 0 4px 8px rgba(190, 18, 60, 0.2);
}

.ad-card.top {
    --plan-color: #FF9800;
    box-shadow: 0 4px 8px rgba(255, 152, 0, 0.2);
}

/* Badges Superiores */
.ad-card-top-badges {
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    display: flex;
    gap: 6px;
    z-index: 5;
    flex-wrap: wrap;
}

/* Conteúdo Inferior */
.ad-card-content {
    position: relative;
    z-index: 5;
    padding: 25px 20px;
    color: white;
}

.ad-card-name {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 2px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.1;
    color: white;
}

.ad-card-tagline {
    font-size: 0.85rem;
    margin-bottom: 12px;
    opacity: 0.95;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    font-weight: 400;
}

.ad-card-footer-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

@media (max-width: 600px) {
    .grid-1-col .ad-card {
        aspect-ratio: auto;
        height: 500px; /* Reduzido de 600px conforme pedido */
    }
}

.info-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 9999px; /* rounded-full */
    font-size: 0.68rem; /* text-xs Reduzido 10% */
    font-weight: 700;
    backdrop-filter: blur(8px);
    background-color: rgba(0, 0, 0, 0.45); /* Fundo mais escuro para destaque */
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.info-badge i {
    font-size: 0.9em;
}

/* Quando tem apenas ícone, removemos a margem extra do ícone */
.info-badge:not(:has(span)):not(:has(text)) i {
    margin-right: 0;
}

/* Variações de Badge com Transparência (Efeito Blur/Glass) */
.bg-premium { 
    background-color: #be123c !important; 
    border-color: rgba(255, 255, 255, 0.3); 
}
.bg-top { 
    background-color: #FF9800 !important; 
    border-color: rgba(255, 255, 255, 0.3); 
}
.bg-verified { 
    background-color: #10B981 !important; 
    border-color: rgba(255, 255, 255, 0.3); 
}
.bg-id { 
    background-color: rgba(0, 0, 0, 0.4); 
    border-color: rgba(255, 255, 255, 0.1); 
    text-transform: none; 
}

/* Padding especial para badges sem texto (estilo ícone circular) */
.ad-card-top-badges .info-badge {
    padding: 6px;
    width: 28px;
    height: 28px;
    justify-content: center;
}

.ad-card-top-badges .info-badge.bg-id {
    width: auto;
    height: auto;
    padding: 6px 12px;
}

/* Badge de Preço e Cidade - Seguem a cor do plano no Premium/Top (Com transparência) */
.ad-card.premium .btn-price, .ad-card.premium .bg-city { background-color: rgba(190, 18, 60, 0.7) !important; border-color: rgba(255, 255, 255, 0.2); }
.ad-card.top .btn-price, .ad-card.top .bg-city { background-color: rgba(255, 152, 0, 0.7) !important; border-color: rgba(255, 255, 255, 0.2); }

/* Grid columns handled by layout toggle logic */


/* --- SEO / TEXTO INFERIOR --- */
.seo-section {
    max-width: 1280px;
    margin: 40px auto;
    padding: 30px 20px;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.seo-section h2 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.seo-section p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    line-height: 1.6;
}

/* --- FOOTER --- */
.site-footer {
    background: #111827;
    color: #9ca3af;
    padding: 40px 20px 20px;
    margin-top: 40px;
}

.footer-content {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-col h3 {
    color: white;
    font-size: 1rem;
    margin-bottom: 15px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col ul a {
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-col ul a:hover {
    color: white;
}

.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    border-top: 1px solid #374151;
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.footer-social a {
    color: white;
    font-size: 1.2rem;
}

/* --- RESPONSIVO --- */
@media (max-width: 768px) {
    .search-container {
        flex-direction: column;
    }

    .btn-search {
        padding: 12px;
        justify-content: center;
    }

    .ads-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .logo-text {
        font-size: 1.4rem;
    }

    .btn-publish {
        padding: 8px 12px;
        font-size: 0.8rem;
    }

    .btn-login span {
        display: none;
    }

    /* Esconde texto do login, deixa só icone */

    .ads-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .ad-info {
        padding: 8px;
    }

    .ad-title {
        font-size: 0.85rem;
    }

    .tag {
        padding: 3px 6px;
        font-size: 0.65rem;
    }

    /* No mobile, o botão "Ver anúncio" pode atrapalhar o clique, então ocultamos o overlay */
    .ad-overlay {
        display: none;
    }
}

@media (max-width: 768px) {

    /* --- TOGGLE GRID/LISTA --- */
    .grid-layout-toggle {
        display: flex;
        background: var(--bg-color);
        border: 1px solid var(--border-color);
        border-radius: 6px;
        overflow: hidden;
        margin-left: auto;
    }

    .layout-btn {
        border: none;
        background: transparent;
        padding: 6px 14px;
        cursor: pointer;
        color: var(--text-muted);
        transition: all 0.2s;
        font-size: 1rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .layout-btn.active {
        background: var(--primary-color);
        color: white;
    }

    .ads-grid.grid-1-col {
        grid-template-columns: 1fr;
    }
}

/* --- RTA CARD --- */
.rta-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin: 40px auto 20px;
    max-width: 1000px;
    display: flex;
    gap: 20px;
    align-items: center;
}

.rta-text {
    flex: 1;
}

.rta-text h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #1e293b;
    font-size: 1rem;
}

.rta-text h4 i {
    color: #dc2626;
}

.rta-text p {
    font-size: 0.85rem;
    color: #475569;
    line-height: 1.6;
    margin: 0;
}

.rta-logo-link {
    flex-shrink: 0;
    transition: transform 0.2s;
}

.rta-logo-link:hover {
    transform: scale(1.05);
}

.rta-logo-link img {
    height: 45px;
    display: block;
}

@media (max-width: 768px) {
    .rta-card {
        flex-direction: column;
        text-align: center;
        padding: 20px 15px;
        margin: 30px 15px 15px;
    }
    
    .rta-text h4 {
        justify-content: center;
    }
}