/* style.css */

/* =========================================
   1. RESET E VARIÁVEIS GLOBAIS
   ========================================= */
:root {
    --primary: #ff385c;       /* Cor principal (Vermelho/Rosa Airbnb) */
    --secondary: #222222;     /* Preto suave */
    --text: #717171;          /* Cinza texto */
    --bg: #ffffff;            /* Fundo do site */
    --hover-bg: #f7f7f7;      /* Fundo hover */
    --border: #dddddd;        /* Bordas sutis */
    --success: #2ed573;       /* Verde sucesso */
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Manrope', 'Segoe UI', sans-serif; }
body { background: var(--bg); color: var(--secondary); padding-bottom: 50px; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; outline: none; font-family: inherit; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* =========================================
   2. NAVBAR
   ========================================= */
.navbar-minimal { border-bottom: 1px solid #ebebeb; padding: 15px 0; position: sticky; top: 0; z-index: 1000; background: white; }
.nav-container { display: flex; justify-content: space-between; align-items: center; }
.nav-logo { font-size: 1.4rem; font-weight: 800; color: var(--primary); letter-spacing: -0.5px; }
.nav-logo span { color: var(--secondary); }
.nav-actions { display: flex; align-items: center; gap: 15px; }
.nav-link { color: var(--secondary); font-weight: 600; font-size: 0.9rem; }

/* Botões de Auth (Login/Cadastro) */
.auth-buttons { display: flex; gap: 10px; }
.btn-text { background: none; font-weight: 600; padding: 8px 12px; border-radius: 20px; transition: 0.2s; color: var(--secondary); }
.btn-text:hover { background: #f7f7f7; }
.btn-primary { background: var(--secondary); color: white; padding: 10px 18px; border-radius: 30px; font-weight: 600; transition: 0.2s; }
.btn-primary:hover { transform: scale(1.02); box-shadow: 0 4px 10px rgba(0,0,0,0.1); }

/* Área Logada */
.user-logged-area { display: flex; align-items: center; gap: 10px; }
.user-name { font-weight: 600; font-size: 0.9rem; color: var(--secondary); }
.mini-avatar { width: 32px; height: 32px; border-radius: 50%; border: 1px solid #ddd; }
.btn-logout-icon { background: #f1f2f6; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--text); transition: 0.2s; }
.btn-logout-icon:hover { background: #e0e0e0; color: var(--primary); }

/* =========================================
   3. FILTROS (MACRO CATEGORIAS)
   ========================================= */
.filters-section { padding: 30px 0 10px 0; }
.section-header { text-align: center; margin-bottom: 25px; }
.section-header h3 { font-size: 1.8rem; font-weight: 800; color: var(--secondary); }

.macro-categories { display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; margin-bottom: 30px; }
.category-card {
    position: relative; width: 120px; height: 120px; border-radius: 16px; overflow: hidden; 
    transition: 0.3s; background: #ddd; display: flex; align-items: center; justify-content: center;
    --theme-color: #ff385c; 
}
.category-card:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.15); }
.category-card.active { box-shadow: 0 0 0 3px var(--secondary); transform: scale(0.98); }

.card-bg { position: absolute; inset: 0; background-size: cover; background-position: center; transition: 0.5s; opacity: 0.85; }
.category-card:hover .card-bg { transform: scale(1.1); opacity: 0.7; }
.card-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.6), transparent); }
.card-label { position: relative; z-index: 2; color: white; font-weight: 800; font-size: 1rem; text-shadow: 0 2px 4px rgba(0,0,0,0.5); text-transform: uppercase; }

/* =========================================
   4. SEARCH BAR & DROPDOWNS
   ========================================= */
.airbnb-bar-wrapper { position: relative; display: flex; justify-content: center; margin-bottom: 20px; z-index: 500; }
.airbnb-bar-wrapper.hidden { display: none; }

.airbnb-search-bar {
    display: flex; align-items: center; background: white; border: 1px solid var(--border); border-radius: 40px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.08); transition: 0.2s; position: relative; z-index: 502;
}
.airbnb-search-bar:hover { box-shadow: 0 6px 16px rgba(0,0,0,0.12); }

.search-segment { padding: 14px 20px; cursor: pointer; border-radius: 32px; min-width: 140px; }
.search-segment:hover { background: #ebebeb; }
.search-segment.active { background: white; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.segment-label { font-size: 0.75rem; font-weight: 800; color: var(--secondary); display: block; margin-bottom: 2px; }
.segment-placeholder { font-size: 0.9rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 130px; }
.segment-placeholder.filled { color: var(--secondary); font-weight: 600; }

.search-divider { width: 1px; height: 32px; background: #dddddd; }
.search-action { padding: 8px 10px 8px 0; }
.search-icon-btn {
    width: 48px; height: 48px; border-radius: 50%; background: var(--primary); color: white;
    display: flex; align-items: center; justify-content: center; transition: 0.2s;
}
.search-icon-btn:hover { transform: scale(1.05); }

/* Dropdowns */
.search-dropdown {
    position: absolute; top: 75px; background: white; border-radius: 24px; padding: 25px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15); border: 1px solid #ebebeb; width: 100%; max-width: 700px;
    z-index: 502; animation: popDown 0.2s ease-out;
}
.search-dropdown.hidden { display: none; }
.dropdown-content-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.dropdown-header-row { display: flex; justify-content: space-between; margin-bottom: 15px; font-size: 0.85rem; color: var(--text); }
.clear-btn { background: none; text-decoration: underline; color: var(--secondary); font-weight: 600; }
.dropdown-backdrop { position: fixed; inset: 0; background: transparent; z-index: 501; }
.dropdown-backdrop.hidden { display: none; }
@keyframes popDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* Filtros Opções */
.filter-option {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
    height: 110px; padding: 10px; border: 1px solid var(--border); border-radius: 12px;
    cursor: pointer; transition: 0.2s; text-align: center; background: white;
}
.filter-option:hover { border-color: var(--secondary); background-color: #f9f9f9; }
.filter-option.selected { background: #f0f2f5; border: 2px solid var(--secondary); font-weight: 700; }
.option-icon { font-size: 32px; }
.option-label { font-size: 0.85rem; font-weight: 600; color: var(--secondary); line-height: 1.2; }

/* =========================================
   5. CARDS DE RESULTADOS
   ========================================= */
.main-layout { margin-top: 30px; }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.venue-card { 
    background: white; border-radius: 12px; overflow: hidden; cursor: pointer; transition: all 0.3s ease; 
    border: 1px solid #f0f0f0; --hover-color: #222; 
}
.venue-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.1); border-color: var(--hover-color); }
.card-img { height: 200px; background: #eee; background-size: cover; position: relative; border-radius: 12px; margin: 10px 10px 0 10px; }
.card-price { position: absolute; top: 10px; right: 10px; background: rgba(255,255,255,0.95); padding: 4px 8px; border-radius: 4px; font-size: 0.8rem; font-weight: 700; }
.card-body { padding: 15px; }
.card-title { font-size: 1.1rem; margin-bottom: 2px; color: var(--secondary); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta { font-size: 0.85rem; color: var(--text); margin-bottom: 6px; display: flex; justify-content: space-between; }
.card-cat { text-transform: uppercase; font-weight: 700; font-size: 0.75rem; color: var(--hover-color); }

/* =========================================
   6. MODAIS GERAIS (LOGIN/REGISTER)
   ========================================= */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 2000; display: flex; justify-content: center; align-items: center; }
.modal-overlay.hidden { display: none; }
.modal-content { background: white; border-radius: 16px; width: 90%; max-width: 600px; max-height: 90vh; overflow-y: auto; }
.small-modal { max-width: 400px; padding: 30px; position: relative; }
.close-modal { position: absolute; top: 15px; right: 15px; background: none; border: none; font-size: 24px; cursor: pointer; }
.input-group { margin-bottom: 15px; } 
.input-group label { display: block; margin-bottom: 5px; font-weight: 600; font-size: 0.9rem; }
.input-group input { width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 8px; }
.cta-btn { width: 100%; padding: 12px; background: var(--primary); color: white; border-radius: 8px; font-weight: bold; transition: 0.2s; }
.cta-btn:hover { opacity: 0.9; }

/* =================================================================
   7. MODAL DE DETALHES (O Card Completo)
   ================================================================= */

/* Estrutura Flex para Rodapé fixo */
.venue-modal-content {
    padding: 0 !important; 
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Importante para o border-radius */
}

/* 7.1 CAPA */
.venue-modal-cover {
    position: relative;
    width: 100%;
    height: 250px; 
    background-color: #f0f0f0;
    flex-shrink: 0; 
}
#modal-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.close-modal-btn {
    position: absolute; top: 15px; right: 15px;
    background: white; border-radius: 50%; width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15); transition: 0.2s; z-index: 10;
}
.close-modal-btn:hover { transform: scale(1.1); }

/* Etiqueta de Fonte */
.image-source-badge {
    position: absolute; bottom: 12px; right: 12px;
    background-color: rgba(0, 0, 0, 0.6); color: rgba(255, 255, 255, 0.95);
    font-size: 0.7rem; padding: 4px 10px; border-radius: 12px;
    pointer-events: none; z-index: 5; font-weight: 600; backdrop-filter: blur(4px);
}

/* 7.2 CORPO DO MODAL (Rolável) */
.venue-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex-grow: 1; /* Ocupa o espaço restante */
}

/* Header do Modal */
.venue-header-row { margin-bottom: 15px; }
.rating-badge { display: inline-block; background: #fff5e6; color: #ffa502; padding: 4px 8px; border-radius: 6px; font-weight: bold; font-size: 0.85rem; margin-top: 5px; }
#modal-title { font-size: 1.8rem; color: var(--secondary); margin: 0; line-height: 1.2; font-weight: 800; }

/* Tags (Pills) */
.venue-tags-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 25px; }
.tag-pill { background: #f1f2f6; padding: 5px 12px; border-radius: 20px; font-size: 0.8rem; color: #57606f; font-weight: 600; }

/* --- BLOCO DE INFORMAÇÕES (Onde estava quebrado) --- */
.venue-info-section {
    background-color: #f8f9fa; /* Fundo cinza claro */
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    gap: 16px; /* Espaço entre as linhas */
}

.venue-info-row {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    color: #444;
}

/* Ícones das linhas de info */
.venue-info-row .material-symbols-outlined {
    color: var(--primary);
    font-size: 20px;
    width: 24px; /* Largura fixa para alinhar texto */
    text-align: center;
}

/* Links dentro do box de info (Site, Insta) */
.venue-info-row a {
    display: inline-block;
    color: var(--secondary);
    font-weight: 700;
    border-bottom: 1px solid #ccc;
    transition: 0.2s;
}
.venue-info-row a:hover {
    color: var(--primary);
    border-color: var(--primary);
}

/* Descrição */
.venue-description { line-height: 1.6; color: #444; margin-bottom: 25px; font-size: 1rem; }

/* Features (Grid de ícones) */
.features-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 20px; }
.feature-tag {
    display: flex; align-items: center; gap: 10px; padding: 10px;
    border-radius: 8px; background: white; border: 1px solid #f0f0f0;
    font-size: 0.9rem; color: #555;
}
.feature-tag span.material-symbols-outlined { color: #888; }

/* 7.3 RODAPÉ DO MODAL (Botões de Ação) */
.venue-modal-footer {
    border-top: 1px solid #ebebeb;
    padding: 16px 24px;
    background: white;
    display: flex;
    gap: 12px;
    z-index: 20;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.03);
}

.btn-large {
    flex: 1; /* Ocupa espaço igual */
    padding: 14px;
    border-radius: 8px;
    border: none;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: 0.2s;
    text-decoration: none; /* Caso seja link */
}

/* Botão Whatsapp / Secundário */
.btn-secondary-action {
    background: white;
    border: 1px solid var(--secondary);
    color: var(--secondary);
}
.btn-secondary-action:hover { background: #f7f7f7; }

/* Botão Ir Agora / Primário */
.btn-primary-action {
    background: linear-gradient(to right, #ff385c, #e03250);
    color: white;
    border: none;
}
.btn-primary-action:hover {
    box-shadow: 0 4px 12px rgba(255, 56, 92, 0.3);
    transform: translateY(-1px);
}

/* =========================================
   8. RESPONSIVIDADE
   ========================================= */
@media(max-width: 768px) {
    .airbnb-search-bar { width: 100%; flex-direction: column; align-items: stretch; gap: 5px; padding: 10px; border-radius: 24px; }
    .search-divider { display: none; }
    .search-segment { padding: 12px; border-radius: 12px; }
    .search-action { position: absolute; bottom: 10px; right: 10px; }
    .dropdown-content-grid { grid-template-columns: repeat(2, 1fr); }
    .filter-option { height: 100px; }
    
    /* Modal Mobile Fullscreen */
    .venue-modal-content { max-height: 100vh; height: 100vh; width: 100%; border-radius: 0; }
    .venue-modal-cover { height: 250px; }
    .features-grid { grid-template-columns: 1fr; }
}