/* Estilos Globais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary-color: #0066cc;
    --secondary-color: #00a699;
    --dark-color: #222;
    --light-color: #f8f9fa;
    --gray-color: #767676;
    --border-radius: 12px;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    
    /* Cores para o tema escuro (padrão) */
    --bg-color: #000;
    --text-color: #fff;
    --card-bg: #1e1e1e;
    --header-bg: #111;
}

/* Tema claro */
body.light-theme {
    --bg-color: #f8f9fa;
    --text-color: #333;
    --card-bg: #fff;
    --header-bg: #fff;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    padding-bottom: 90px; /* Espaço para a navegação inferior */
    transition: background-color 0.3s ease;
}

/* Cabeçalho */
header {
    padding: 15px;
    background-color: var(--header-bg);
    transition: background-color 0.3s ease;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

/* Novo estilo para o ícone de busca (substituindo o menu-icon) */
.search-icon, .theme-toggle {
    width: 40px;
    height: 40px;
    background-color: #333;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.search-icon:hover, .theme-toggle:hover {
    background-color: var(--primary-color);
    transform: scale(1.05);
}

/* Estilo para o botão de alternar tema */
.theme-toggle {
    position: relative;
    overflow: hidden;
}

.theme-toggle i {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.theme-toggle .fa-sun {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.7);
}

.theme-toggle .fa-moon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Quando o tema claro estiver ativo */
body.light-theme .theme-toggle .fa-sun {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

body.light-theme .theme-toggle .fa-moon {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.7);
}

/* Ajustes para ícones no tema claro */
body.light-theme .search-icon,
body.light-theme .theme-toggle {
    background-color: #e0e0e0;
}

body.light-theme .search-icon i,
body.light-theme .theme-toggle i {
    color: #333;
}

body.light-theme .bottom-nav {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

body.light-theme .nav-item {
    color: #555;
}

body.light-theme .nav-item.active {
    color: var(--primary-color);
}

/* Novo estilo para o logo (substituindo a localização) */
.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
}

.logo-text {
    font-size: 18px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Novo estilo para o banner de anúncio (substituindo a barra de pesquisa) */
.ad-banner {
    background: linear-gradient(135deg, #333, #111);
    border-radius: var(--border-radius);
    margin: 15px 0;
    overflow: hidden;
    position: relative;
}

.ad-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shine 2s infinite;
}

@keyframes shine {
    100% { left: 150%; }
}

.ad-content {
    padding: 15px;
    text-align: center;
}

/* Novo estilo para o slider de anúncios */
.ad-slider {
    position: relative;
    width: 100%;
    height: auto;
    overflow: hidden;
}

.ad-slider a {
    display: none; /* Esconder todos os banners por padrão */
    width: 100%;
    height: auto;
    transition: opacity 0.5s ease-in-out;
}

.ad-slider a:first-child {
    display: block; /* Mostrar o primeiro banner por padrão */
}

.ad-slider a.active {
    display: block; /* Mostrar o banner ativo */
}

.ad-slider img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

.ad-content img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

.ad-content p {
    font-size: 16px;
    color: #aaa;
}

.ad-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.ad-button:hover {
    background-color: #0055b3;
    transform: scale(1.05);
}

/* Propriedades */
.properties-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 15px;
}

.property-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeIn 0.5s ease-out;
    cursor: pointer;
}

.property-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.property-image {
    position: relative;
    height: 200px;
}

.property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rating {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 30px;
    padding: 5px 10px;
    display: flex;
    align-items: center;
    gap: 5px;
    color: #000;
    font-weight: bold;
}

.rating i {
    color: #ffb400;
}

.favorite-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.favorite-btn:hover {
    transform: scale(1.1);
}

.favorite-btn i {
    color: #ff5a5f;
    font-size: 18px;
}

/* Estilo para o botão de favorito ativo */
.favorite-btn.active i {
    color: #ff5a5f;
}

.favorite-btn i.far {
    color: #888;
}

.favorite-btn i.fas {
    color: #ff5a5f;
}

.property-info {
    padding: 15px;
}

.property-info h3 {
    margin-bottom: 5px;
    font-size: 18px;
}

.price {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 20px;
    margin-bottom: 10px;
}

.location-info {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--gray-color);
    margin-bottom: 10px;
    font-size: 14px;
}

.property-details {
    display: flex;
    justify-content: space-between;
    color: var(--gray-color);
    font-size: 14px;
}

.property-details span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Navegação Inferior - Atualizada com animações */
.bottom-nav {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(30, 30, 30, 0.95);
    display: flex;
    justify-content: space-between;
    padding: 18px 30px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 100;
    width: 85%;
    max-width: 320px;
    backdrop-filter: blur(10px);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--gray-color);
    position: relative;
    padding: 8px;
    transition: color 0.3s;
    min-width: 50px;
    touch-action: manipulation;
}

.nav-item i {
    font-size: 26px;
    transition: transform 0.3s, color 0.3s;
}

.nav-item span {
    display: none;
}

.nav-item.active {
    color: var(--primary-color);
}

.nav-item.active i {
    transform: scale(1.2);
}

.nav-item::after {
    display: none;
}

.nav-item.active::after {
    display: none;
}


.nav-item:active i {
    transform: scale(0.9);
}

/* Responsividade */
@media (max-width: 360px) {
    .bottom-nav {
        width: 95%;
        padding: 16px 25px;
    }
    
    .nav-item i {
        font-size: 24px;
    }
}

@media (min-width: 768px) {
    .properties-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 20px;
    }
    
    .broker-photo {
        width: 50px;
        height: 50px;
    }
    
    .broker-name {
        font-size: 18px;
    }
    
    .broker-title {
        font-size: 14px;
    }
    
    .logo-text {
        font-size: 22px;
    }
}

@media (min-width: 1024px) {
    .properties-container {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .bottom-nav {
        max-width: 380px;
        padding: 20px 35px;
    }
    
    .nav-item i {
        font-size: 28px;
    }
}

/* Animações */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.property-card {
    animation: fadeIn 0.5s ease-out;
}

/* Animação para o modal de busca (será usado pelo JavaScript) */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 200;
    display: flex;
    flex-direction: column;
    padding: 20px;
    transform: translateY(-100%);
    transition: transform 0.3s ease-in-out;
}

.search-modal.active {
    transform: translateY(0);
}

.search-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.search-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.search-modal-input {
    background-color: #333;
    border: none;
    border-radius: 30px;
    padding: 15px 20px;
    color: white;
    font-size: 16px;
    width: 100%;
    margin-bottom: 20px;
}

.search-modal-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--primary-color);
}

.search-modal-results {
    flex: 1;
    overflow-y: auto;
}

.properties-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 15px;
}

.property-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeIn 0.5s ease-out;
    cursor: pointer;
}

.property-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}


.favorites-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray-color);
}

.favorites-empty i {
    font-size: 48px;
    margin-bottom: 15px;
    color: #ff5a5f;
}

.favorites-empty p {
    font-size: 18px;
    margin-bottom: 20px;
}

.favorites-empty button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.favorites-empty button:hover {
    background-color: #0055b3;
}

.broker-photo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}


.broker-profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.broker-info {
    display: flex;
    flex-direction: column;
}

.broker-name {
    font-size: 16px;
    font-weight: 700;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.broker-title {
    font-size: 12px;
    color: var(--text-color);
    opacity: 0.8;
} 