/* Reset e variáveis CSS */
:root {
    --primary: #000000;
    --primary-dark: #333333;
    --accent: #22c55e;
    --accent-dark: #16a34a;
    --bg: #f8fafc;
    --card: #ffffff;
    --text: #000000;
    --text-light: #666666;
    --muted: #999999;
    --border: #e5e5e5;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --radius: 12px;
    --transition: all 0.3s ease;
    /* header height used to offset content (adjust for your header padding) */
    --header-height: 80px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(12px, 3vw, 24px);
}

section {
    padding: clamp(40px, 8vh, 80px) 0;
}

.section-title {
    text-align: center;
    margin-bottom: clamp(24px, 4vh, 50px);
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    font-weight: 800;
    color: var(--text);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 2px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: clamp(4px, 1.5vw, 8px);
    padding: clamp(8px, 1.5vh, 12px) clamp(12px, 2vw, 24px);
    background-color: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow);
    font-size: clamp(0.85rem, 1.5vw, 1rem);
    line-height: 1;
    white-space: nowrap;
}

.btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn:active {
    transform: translateY(0);
}

.btn-accent {
    background-color: var(--accent);
    color: #000;
}

.btn-accent:hover {
    background-color: var(--accent-dark);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    box-shadow: none;
}

.btn-outline:hover {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    box-shadow: var(--shadow);
}

.btn-host {
    background-color: #22c55e;
    color: white;
    font-size: clamp(0.7rem, 1.2vw, 0.85rem);
    padding: clamp(6px, 1vh, 10px) clamp(8px, 1.5vw, 16px);
    font-weight: 600;
}

.btn-host:hover {
    background-color: #16a34a;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

/* Fail-closed por padrão: menus de área restrita (Anfitrião/Coanfitrião/
   Administração) ficam ocultos até que js/role-access.js confirme, via API,
   que o usuário autenticado tem o perfil necessário. Isso evita qualquer
   "flash" desses menus para visitantes não autenticados, independente de
   timing/ordem de carregamento do JavaScript. */
.btn-admin,
.btn-vendor,
.btn-cohost {
    display: none;
}

.btn-cohost {
    background-color: #8b5cf6;
    color: #fff;
    font-size: clamp(0.7rem, 1.2vw, 0.85rem);
    padding: clamp(6px, 1vh, 10px) clamp(8px, 1.5vw, 16px);
}

.btn-cohost:hover {
    background-color: #7c3aed;
}

.btn-vendor {
    background-color: var(--success);
    color: #000;
    font-size: clamp(0.7rem, 1.2vw, 0.85rem);
    padding: clamp(6px, 1vh, 10px) clamp(8px, 1.5vw, 16px);
}

.btn-vendor:hover {
    background-color: #0da271;
}

.btn-admin {
    background-color: var(--warning);
    color: #000;
    font-size: clamp(0.7rem, 1.2vw, 0.85rem);
    padding: clamp(6px, 1vh, 10px) clamp(8px, 1.5vw, 16px);
}

.btn-admin:hover {
    background-color: #d97706;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(15px);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    min-height: var(--header-height);
    box-sizing: border-box;
}

header.scrolled {
    box-shadow: var(--shadow);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(8px, 1.5vh, 16px) clamp(12px, 2vw, 24px);
    width: 100%;
    flex-wrap: wrap;
    gap: clamp(8px, 1.5vw, 16px);
}

.brand {
    display: flex;
    align-items: center;
    gap: clamp(8px, 1.5vw, 12px);
    text-decoration: none;
    flex-shrink: 0;
}

.logo {
    width: clamp(40px, 6vw, 50px);
    height: clamp(40px, 6vw, 50px);
    border-radius: var(--radius);
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    box-shadow: var(--shadow);
    flex-shrink: 0;
    padding: 4px;
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.brand-text h1 {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    font-weight: 900;
    color: var(--text);
    line-height: 1.2;
}

.brand-text p {
    font-size: clamp(0.65rem, 1.2vw, 0.75rem);
    color: var(--text-light);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: clamp(12px, 2vw, 24px);
    flex-wrap: wrap;
    justify-content: center;
    flex: 1;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    padding: clamp(6px, 1vh, 8px) clamp(8px, 1.5vw, 12px);
    border-radius: 8px;
    transition: var(--transition);
    position: relative;
    font-size: clamp(0.85rem, 1.5vw, 1rem);
    white-space: nowrap;
}

.nav-menu a:hover {
    color: var(--primary);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-menu a:hover::after {
    width: 100%;
}

.auth-buttons {
    display: flex;
    gap: clamp(8px, 1.5vw, 12px);
    flex-shrink: 0;
}

/* Host button and user avatar/dropdown */
.host-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.user-menu {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
    cursor: pointer;
}

.user-name {
    font-weight: 700;
    color: var(--text);
    font-size: 0.95rem;
    white-space: nowrap;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
}

.user-name:hover {
    background: rgba(34, 197, 94, 0.1);
    color: var(--accent);
}

.user-avatar {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    overflow: hidden;
    border: 2.5px solid var(--accent);
    background: linear-gradient(135deg, var(--accent), #16a34a);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.25);
    flex-shrink: 0;
}

.user-avatar:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.35);
    border-color: #16a34a;
}

.user-avatar:active {
    transform: scale(0.98);
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.user-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 12px);
    min-width: 260px;
    background: var(--card);
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
    padding: 12px 0;
    display: none;
    z-index: 1100;
    border: 1px solid rgba(0, 0, 0, 0.08);
    animation: dropdownSlide 0.25s ease-out;
}

@keyframes dropdownSlide {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-dropdown.show { display: block; }

.user-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.user-dropdown .dropdown-item:hover {
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.08), transparent);
    border-left-color: var(--accent);
    padding-left: 20px;
}

.user-dropdown .dropdown-item i {
    width: 18px;
    color: var(--accent);
    font-size: 1rem;
}

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

.user-dropdown .dropdown-button {
    margin: 12px 8px 8px 8px;
    display: flex;
}

.user-dropdown .dropdown-button button {
    width: 100%;
    padding: 10px 18px;
    background: linear-gradient(135deg, var(--accent), #16a34a);
    color: #000;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.user-dropdown .dropdown-button button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(34, 197, 94, 0.3);
}

@media (max-width: 720px) {
    .user-avatar { 
        width: 38px; 
        height: 38px; 
    }
    
    .user-name {
        display: none;
    }
    
    .user-menu {
        margin-left: auto;
    }
    
    .user-dropdown {
        min-width: 240px;
    }
    
    .host-btn { padding: 8px 10px; font-size: 0.85rem; }
    .auth-buttons { gap: 8px; }
}

/* Estilos para a página de listagem (filtros) */
.properties-filters { background: var(--card); padding: 12px; border-radius: 12px; border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.properties-filters input[type="number"], .properties-filters select { background: #fff; }
.property-card { display:flex; gap:12px; border-radius: 12px; background: var(--card); padding: 12px; border:1px solid var(--border); box-shadow: var(--shadow-sm); margin-bottom:12px; align-items:center; }
.property-image img { width: 160px; height: 110px; object-fit:cover; border-radius: 8px; }
.property-content { flex:1; }
.property-price { font-weight:800; color:var(--primary); }
.property-features .property-feature { display:inline-block; margin-right:6px; padding:4px 8px; background: rgba(0,0,0,0.03); border-radius:6px; font-size:0.85rem; }

@media (max-width: 720px) {
    .property-card { flex-direction:column; align-items:flex-start; }
    .property-image img { width:100%; height:180px; }
}

.auth-buttons .btn {
    font-size: clamp(0.75rem, 1.2vw, 0.9rem);
    padding: clamp(6px, 1vh, 10px) clamp(10px, 1.5vw, 16px);
}

.hamburger {
    display: none;
    cursor: pointer;
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    color: var(--text);
    z-index: 1001;
    background: none;
    border: none;
    padding: 8px;
    flex-shrink: 0;
}

/* Hero Section */
.hero {
    padding: clamp(100px, 15vh, 160px) 0 clamp(60px, 10vh, 100px);
    background: linear-gradient(rgba(10, 18, 34, 0.7), rgba(10, 18, 34, 0.7)), 
                url('https://images.unsplash.com/photo-1600585154340-be6161a56a0c?w=1600&q=80&auto=format&fit=crop') center/cover no-repeat;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-top: var(--header-height);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(90, 79, 255, 0.2), rgba(6, 182, 212, 0.2));
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 clamp(12px, 2vw, 24px);
}

.hero h1 {
    font-size: clamp(1.8rem, 6vw, 3.5rem);
    font-weight: 900;
    margin-bottom: clamp(12px, 2vh, 20px);
    line-height: 1.1;
}

.hero p {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    margin-bottom: clamp(20px, 4vh, 40px);
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.search-container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: var(--radius);
    padding: clamp(6px, 1.5vh, 8px);
    box-shadow: var(--shadow-xl);
    display: flex;
    gap: clamp(6px, 1vw, 8px);
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    padding: clamp(10px, 1.5vh, 14px) clamp(10px, 2vw, 16px);
    border: none;
    border-radius: 8px;
    font-size: clamp(0.85rem, 1.5vw, 1rem);
    outline: none;
    min-width: 150px;
}

.search-btn {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    padding: clamp(10px, 1.5vh, 14px) clamp(14px, 2vw, 24px);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: clamp(4px, 1vw, 8px);
    font-size: clamp(0.8rem, 1.5vw, 0.95rem);
    flex-shrink: 0;
}

.search-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.hero-actions {
    display: flex;
    gap: clamp(10px, 2vw, 15px);
    justify-content: center;
    margin-top: clamp(16px, 3vh, 30px);
    flex-wrap: wrap;
}

/* Categories */
.categories {
    background: white;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(clamp(200px, 35vw, 250px), 1fr));
    gap: clamp(16px, 3vw, 30px);
}

.category-card {
    text-align: center;
    padding: clamp(16px, 2vh, 30px) clamp(12px, 2vw, 20px);
    border-radius: var(--radius);
    transition: var(--transition);
    border: 1px solid var(--border);
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

/* Booking page styles */
.booking-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 24px;
    align-items: start;
}

.booking-form .form-section {
    background: var(--card);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.booking-form .form-section h3 {
    margin-bottom: 12px;
    font-size: 1.05rem;
}

.booking-form .row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.booking-form .form-group {
    flex: 1 1 200px;
    display: flex;
    flex-direction: column;
    margin-bottom: 8px;
}

.form-control {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
}

.muted { color: var(--text-light); }

.booking-summary .summary-card {
    background: var(--card);
    border-radius: 12px;
    padding: 16px;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: calc(var(--header-height) + 20px);
}

.summary-row { display:flex; justify-content:space-between; padding:6px 0; border-bottom: 1px dashed var(--border); }
.summary-row.total { font-weight:800; border-top:1px solid var(--border); }

@media (max-width: 920px) {
    .booking-grid { grid-template-columns: 1fr; }
    .booking-summary .summary-card { position: static; }
}

/* Gallery styles to match site look */
.property-gallery {
    background: linear-gradient(90deg, rgba(140,120,255,0.06), rgba(34,197,94,0.04));
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 16px;
    display: block;
}
.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: var(--shadow);
}
.gallery-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}
.thumb-btn { border: none; background: transparent; padding:0; cursor:pointer; }
.thumb-btn img { width: 80px; height: 60px; object-fit: cover; border-radius:8px; box-shadow: var(--shadow-sm); border: 2px solid transparent; }
.thumb-btn:hover img { transform: translateY(-4px); border-color: var(--accent); }

/* Improve form visual to match site style */
.booking-form .form-section { border: 1px solid rgba(0,0,0,0.04); }
.form-label { font-weight: 600; color: var(--text); margin-bottom:6px; }
.form-control { background: #fff; }
.checkbox input { margin-right:8px; }

@media (max-width: 560px) {
    .gallery-main img { height: 240px; }
    .thumb-btn img { width: 56px; height: 44px; }
}

/* Payment options styling to match vendor/admin look */
.payment-options { display:flex; gap:8px; flex-wrap:wrap; }
.payment-options .checkbox { background: var(--bg); padding:8px 12px; border-radius:8px; border:1px solid var(--border); cursor:pointer; }
.payment-options .checkbox input { margin-right:8px; }
.payment-options .checkbox:hover { background: linear-gradient(90deg, rgba(140,120,255,0.03), rgba(34,197,94,0.03)); }

/* selected payment option style (degrade padrão do site) */
.payment-options .checkbox.payment-selected {
    /* degradê linear do menu lateral do vendedor */
    background: linear-gradient(200deg, var(--primary), var(--accent));
    color: #fff;
    border-color: transparent;
    box-shadow: var(--shadow);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.payment-options .checkbox.payment-selected:hover { transform: translateY(-2px); }
.payment-options .checkbox.payment-selected input { filter: brightness(0.95); }

.booking-form .card-header h3 { margin:0; }
.booking-summary .summary-card { padding: 20px; }
/* Títulos das seções com gradiente radial verde (mesma cor do botão) */
.form-section h3 {
    background: radial-gradient(circle at 30% 30%, #16a34a 0%, #0b3b1a 45%, #000000 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    font-weight: 700;
}

.booking-summary .summary-card {
    background: var(--card);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: calc(var(--header-height) + 20px);
}

.booking-summary .summary-card h3 {
    margin: 0 0 20px 0;
    font-size: 1.2rem;
    font-weight: 700;
    background: radial-gradient(circle at 30% 30%, #16a34a 0%, #0b3b1a 45%, #000000 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    padding-bottom: 0;
    border-bottom: none;
    display: block;
}

/* Linha do imóvel - destaque especial */
.booking-summary .summary-card .summary-row:first-of-type {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 3px solid var(--accent) !important;
}

.booking-summary .summary-card .summary-row:first-of-type span:first-child {
    font-size: 0.8rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 600;
    flex: 0 0 auto;
    margin-top: 2px;
}

.booking-summary .summary-card .summary-row:first-of-type span:last-child {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--text);
    text-align: right;
    flex: 1;
    line-height: 1.3;
}

/* Linhas normais do resumo */
.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px dashed #e0e0e0;
}

.summary-row:not(:first-of-type) span:first-child {
    color: var(--text-light);
    font-size: 0.95rem;
    font-weight: 500;
}

.summary-row:not(:first-of-type) span:last-child {
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 600;
}

/* Total final - destaque */
.summary-row.total {
    font-weight: 800;
    border-top: 2px solid var(--text) !important;
    border-bottom: none !important;
    padding-top: 12px;
    margin-top: 8px;
}

.summary-row.total span:first-child {
    color: var(--text);
    font-size: 1.05rem;
}

.summary-row.total span:last-child {
    color: var(--text);
    font-size: 1.15rem;
    font-weight: 900;
}

/* Texto informativo */
.booking-summary .summary-card > p {
    margin: 16px 0 0 0;
    padding-top: 12px;
    border-top: 1px dashed #e0e0e0;
}

/* Make confirm button match primary accent */
.booking-form .btn-accent { background: linear-gradient(90deg, var(--accent), #8b6bff); color: #000; }

/* Improve spacing inside card-body */
.card-body .form-section { margin-bottom: 18px; }

/* Confirm button color variants per payment method */
/* ensure button transitions smoothly */
#confirmBtn { transition: all 0.25s ease; }

/* botão de confirmação com degradê linear do menu lateral do vendedor */
#confirmBtn {
    background: linear-gradient(200deg, var(--primary), var(--accent));
    color: #fff;
    border: none;
    box-shadow: var(--shadow-lg);
}

#confirmBtn:hover { transform: translateY(-2px); }

.category-icon {
    width: clamp(50px, 8vw, 70px);
    height: clamp(50px, 8vw, 70px);
    margin: 0 auto clamp(12px, 2vh, 20px);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: clamp(1.3rem, 2.5vw, 1.8rem);
    box-shadow: var(--shadow);
}

.category-card h3 {
    margin-bottom: clamp(8px, 1.5vh, 15px);
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 700;
}

.category-card p {
    color: var(--text-light);
    font-size: clamp(0.8rem, 1.5vw, 0.95rem);
}

/* Properties */
.filters {
    display: flex;
    gap: clamp(8px, 1.5vw, 12px);
    margin-bottom: clamp(16px, 3vh, 30px);
    flex-wrap: wrap;
    justify-content: center;
}

.filter-chip {
    padding: clamp(8px, 1.5vh, 10px) clamp(14px, 2vw, 20px);
    background: white;
    border: 1px solid var(--border);
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: clamp(0.8rem, 1.5vw, 0.9rem);
    white-space: nowrap;
}

.filter-chip:hover, .filter-chip.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.properties-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* Property card styles are defined in all-properties.css for unified design */

.load-more-container {
    text-align: center;
    margin-top: clamp(24px, 4vh, 40px);
}

/* How it Works */
.how-it-works {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(clamp(250px, 35vw, 300px), 1fr));
    gap: clamp(16px, 3vw, 30px);
}

.step-card {
    text-align: center;
    padding: clamp(20px, 3vh, 40px) clamp(12px, 2vw, 20px);
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.step-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.step-number {
    width: clamp(50px, 8vw, 60px);
    height: clamp(50px, 8vw, 60px);
    margin: 0 auto clamp(12px, 2vh, 20px);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
    font-weight: 800;
    flex-shrink: 0;
}

.step-card h3 {
    margin-bottom: clamp(10px, 1.5vh, 15px);
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-weight: 700;
}

.step-card p {
    color: var(--text-light);
    font-size: clamp(0.85rem, 1.5vw, 0.95rem);
    line-height: 1.5;
}

/* Footer */
footer {
    background: #0f172a;
    color: #cbd5e1;
    padding: clamp(40px, 8vh, 70px) 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(clamp(200px, 35vw, 250px), 1fr));
    gap: clamp(24px, 4vw, 40px);
    margin-bottom: clamp(30px, 5vh, 50px);
    padding: 0 clamp(12px, 2vw, 24px);
}

.footer-column h3 {
    color: white;
    margin-bottom: clamp(12px, 2vh, 25px);
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    position: relative;
    padding-bottom: 10px;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--accent);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: clamp(8px, 1.5vh, 12px);
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: var(--transition);
    font-size: clamp(0.85rem, 1.5vw, 0.95rem);
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding: clamp(12px, 2vh, 20px) clamp(12px, 2vw, 24px);
    border-top: 1px solid #334155;
    color: #94a3b8;
    font-size: clamp(0.8rem, 1.5vw, 0.9rem);
}

/* Social icons in footer */
.footer-social {
    display: inline-flex;
    gap: 12px;
    margin-top: 8px;
}
.footer-social .social-link {
    display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255,255,255,0.03);
    color: #cbd5e1;
    transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
    text-decoration: none;
}
.footer-social .social-link i {
    font-size: 16px;
}
.footer-social .social-link:hover {
    transform: translateY(-4px) scale(1.05);
    background: rgba(34,197,94,0.12);
    color: var(--accent);
}

@media (max-width: 640px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    .footer-bottom {
        text-align: center;
        display: flex;
        flex-direction: column;
        gap: 8px;
        align-items: center;
    }
    .footer-social {
        margin: 4px 0 0;
    }
}

/* FAQ Accordion */
.faq-section .faq-list {
    margin-top: 12px;
    display: grid;
    gap: 10px;
}
.faq-item {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.faq-question {
    width: 100%;
    text-align: left;
    padding: 14px 16px;
    background: transparent;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    cursor: pointer;
}
.faq-question .faq-toggle {
    display: inline-flex;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: var(--bg);
    color: var(--text);
}
.faq-answer {
    padding: 12px 16px 18px;
    color: var(--text-dark);
    background: transparent;
    line-height: 1.5;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.28s ease, padding 0.2s ease;
}

.faq-item.open .faq-answer {
    /* allow JS to set max-height dynamically, but provide a fallback */
    max-height: 400px;
}

@media (max-width: 640px) {
    .faq-section .container {
        padding-left: clamp(12px, 3vw, 24px);
        padding-right: clamp(12px, 3vw, 24px);
    }
    .faq-question {
        padding: 12px 14px;
    }
}

.developer-credit {
    margin-top: clamp(6px, 1.2vh, 10px);
}

.developer-credit a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.developer-credit a:hover {
    color: white;
    text-decoration: underline;
}

/* WhatsApp Float */
.whatsapp-float {
    position: fixed;
    bottom: clamp(16px, 3vw, 25px);
    right: clamp(16px, 3vw, 25px);
    width: clamp(48px, 8vw, 60px);
    height: clamp(48px, 8vw, 60px);
    background: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1.5rem, 2.5vw, 1.8rem);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    transition: var(--transition);
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-xl);
}

/* Modal */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: clamp(12px, 2vw, 20px);
    overflow-y: auto;
}

.modal {
    width: 100%;
    max-width: 1200px;
    background: white;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    box-shadow: var(--shadow-xl);
}

.modal-sm {
    max-width: 500px;
}

.modal-header {
    padding: clamp(12px, 2vh, 20px) clamp(12px, 2vw, 24px);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    gap: 12px;
}

.modal-title {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    font-weight: 700;
    min-width: 0;
}

.close-modal {
    background: none;
    border: none;
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    cursor: pointer;
    color: var(--text-light);
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--text);
    background: var(--bg);
    border-radius: 6px;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: clamp(12px, 2vh, 20px) clamp(12px, 2vw, 24px);
}

.modal-images {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: clamp(8px, 1.5vw, 10px);
    margin-bottom: clamp(12px, 2vh, 20px);
}

.main-image {
    height: clamp(250px, 40vh, 400px);
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
}

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

.side-images {
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: clamp(8px, 1.5vw, 10px);
}

.side-image {
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.side-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.side-image:hover img {
    transform: scale(1.05);
}

.modal-details {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: clamp(16px, 3vw, 30px);
}

.modal-info h2 {
    margin-bottom: clamp(6px, 1vh, 10px);
    font-size: clamp(1.4rem, 3.5vw, 1.8rem);
    line-height: 1.3;
}

.modal-price {
    font-size: clamp(1.5rem, 3.5vw, 1.8rem);
    font-weight: 800;
    color: var(--primary);
    margin-bottom: clamp(8px, 1.5vh, 10px);
}

.property-location {
    display: flex;
    align-items: center;
    gap: clamp(6px, 1.2vw, 8px);
    margin-bottom: clamp(12px, 2vh, 20px);
    color: var(--text-light);
    font-size: clamp(0.85rem, 1.5vw, 0.95rem);
}

.modal-description {
    color: var(--text-light);
    margin-bottom: clamp(12px, 2vh, 20px);
    line-height: 1.6;
    font-size: clamp(0.85rem, 1.5vw, 0.95rem);
}

.modal-features {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(8px, 1.5vw, 10px);
    margin-bottom: clamp(12px, 2vh, 20px);
}

.modal-feature {
    background: #f1f5f9;
    padding: clamp(6px, 1vh, 8px) clamp(10px, 1.5vw, 15px);
    border-radius: 50px;
    font-weight: 600;
    color: var(--text-light);
    font-size: clamp(0.8rem, 1.5vw, 0.9rem);
    white-space: nowrap;
}

.modal-sidebar {
    background: #f8fafc;
    padding: clamp(12px, 2vh, 20px);
    border-radius: var(--radius);
}

.seller-info h4 {
    margin-bottom: clamp(12px, 2vh, 15px);
    font-size: clamp(1rem, 2vw, 1.2rem);
    font-weight: 700;
}

.agent-info {
    display: flex;
    align-items: center;
    gap: clamp(10px, 1.5vw, 15px);
    margin-bottom: clamp(12px, 2vh, 20px);
    padding-bottom: clamp(12px, 2vh, 20px);
    border-bottom: 1px solid var(--border);
}

.agent-avatar {
    width: clamp(45px, 8vw, 60px);
    height: clamp(45px, 8vw, 60px);
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.agent-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.agent-details h4 {
    margin-bottom: clamp(2px, 0.5vh, 5px);
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    font-weight: 700;
}

.agent-details p {
    color: var(--text-light);
    font-size: clamp(0.8rem, 1.5vw, 0.9rem);
}

.seller-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #f5b400;
    font-weight: 600;
    margin-top: clamp(4px, 0.8vh, 5px);
    font-size: clamp(0.8rem, 1.5vw, 0.9rem);
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: clamp(8px, 1.5vh, 10px);
}

.modal-actions .btn {
    width: 100%;
    justify-content: center;
}

/* Form Styles */
.form-group {
    margin-bottom: clamp(12px, 2vh, 20px);
}

.form-label {
    display: block;
    margin-bottom: clamp(4px, 0.8vh, 8px);
    font-weight: 600;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
}

.form-control {
    width: 100%;
    padding: clamp(8px, 1.5vh, 12px) clamp(10px, 1.5vw, 15px);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(90, 79, 255, 0.1);
}

textarea.form-control {
    min-height: clamp(100px, 15vh, 120px);
    resize: vertical;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: clamp(12px, 2vh, 20px);
    flex-wrap: wrap;
    gap: 12px;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: clamp(6px, 1.2vw, 8px);
    cursor: pointer;
    font-size: clamp(0.85rem, 1.5vw, 0.9rem);
}

.checkbox input {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.checkbox input:checked + .checkmark {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox input:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-size: 12px;
}

.forgot-password {
    color: var(--primary);
    text-decoration: none;
    font-size: clamp(0.8rem, 1.5vw, 0.9rem);
}

.forgot-password:hover {
    text-decoration: underline;
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: clamp(12px, 2vh, 20px) 0;
    color: var(--text-light);
    font-size: clamp(0.85rem, 1.5vw, 0.95rem);
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-divider span {
    padding: 0 clamp(8px, 1.5vw, 15px);
}

.social-auth {
    display: flex;
    flex-direction: column;
    gap: clamp(8px, 1.5vh, 10px);
}

.social-btn {
    justify-content: center;
    width: 100%;
}

.auth-switch {
    text-align: center;
    margin-top: clamp(12px, 2vh, 20px);
    font-size: clamp(0.85rem, 1.5vw, 0.95rem);
}

.auth-switch a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.auth-switch a:hover {
    text-decoration: underline;
}

/* ========================================
   LOGIN MODAL - MODERN UX
   ======================================== */

.modal-backdrop {
    animation: fadeInBackdrop 0.3s ease;
}

@keyframes fadeInBackdrop {
    from { background-color: rgba(0, 0, 0, 0); }
    to { background-color: rgba(0, 0, 0, 0.7); }
}

.modal-login {
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    animation: slideUpModal 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-width: 440px;
}

@keyframes slideUpModal {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header-login {
    border: none;
    padding: 28px 28px 20px;
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
}

.modal-title-login {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text);
    margin: 0 0 6px;
    letter-spacing: -0.3px;
}

.modal-subtitle {
    font-size: 0.9rem;
    color: var(--text-light);
    margin: 0;
    font-weight: 400;
}

.modal-body-login {
    padding: 28px;
}

/* Form styling */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group-icon {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    font-size: 1rem;
    color: var(--text-light);
    pointer-events: none;
    z-index: 2;
    transition: color 0.3s ease;
}

.form-control-lg {
    padding: 10px 46px 10px 42px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    background: white;
    transition: all 0.3s ease;
    width: 100%;
    height: 44px;
    box-sizing: border-box;
}

.form-control-lg:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.1);
    background: #fafbff;
}

.form-control-lg:focus ~ .input-icon {
    color: var(--accent);
}

.form-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text);
    font-weight: 600;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    font-size: 0.95rem;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
    z-index: 3;
}

.toggle-password:hover {
    color: var(--text);
}

.error-message {
    font-size: 0.8rem;
    color: #dc2626;
    display: none;
    margin-top: 4px;
    animation: slideDown 0.2s ease;
}

.error-message.show {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-control-lg.error {
    border-color: #dc2626;
    background: rgba(220, 38, 38, 0.04);
}

/* Form options */
.form-options-login {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
}

.checkbox-sm {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.checkbox-sm .checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 4px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.checkbox-sm input {
    display: none;
}

.checkbox-sm input:checked + .checkmark {
    background: var(--accent);
    border-color: var(--accent);
}

.checkbox-sm input:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.checkbox-label {
    color: var(--text);
    font-weight: 500;
}

.forgot-password-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.forgot-password-link:hover {
    color: #16a34a;
    text-decoration: underline;
}

/* Submit Button */
.btn-login {
    height: 48px;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    background: var(--accent);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
}

.btn-login:hover {
    background: #16a34a;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(34, 197, 94, 0.3);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-text {
    display: flex;
    align-items: center;
}

.btn-loader {
    animation: spin 1s linear infinite;
}

.spinner-border {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.spinner-border-sm {
    width: 14px;
    height: 14px;
    border-width: 2px;
}


@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    gap: 12px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.divider-text {
    color: var(--text-light);
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
}

/* Social Auth */
.social-auth-login {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    transition: all 0.3s ease;
    flex-direction: column;
    min-height: 56px;
}

.btn-social:hover {
    border-color: var(--accent);
    background: #f0fdf4;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.15);
}

.btn-social i {
    font-size: 1.3rem;
}

.btn-social span {
    font-size: 0.75rem;
    font-weight: 500;
}

/* Signup Link */
.auth-switch-login {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.auth-switch-login p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-light);
}

.signup-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
}

.signup-link:hover {
    color: #16a34a;
    text-decoration: underline;
}

/* Animations */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes slideUpNotif {
    from {
        opacity: 0;
        transform: translateY(100px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOutNotif {
    to {
        opacity: 0;
        transform: translateY(10px);
    }
}

/* Responsive Design */

/* Extra Large (1920px and up) */
@media (min-width: 1920px) {
    html {
        font-size: 18px;
    }
}

/* Large (1440px and up) */
@media (min-width: 1440px) {
    html {
        font-size: 17px;
    }
}

/* Medium-Large (1200px and below) */
@media (max-width: 1200px) {
    .modal-details {
        grid-template-columns: 1fr;
    }
    
    .modal-images {
        grid-template-columns: 1fr;
    }
    
    .side-images {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
    }
}

/* Medium (992px and below) */
@media (max-width: 992px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .properties-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .steps-grid {
        grid-template-columns: 1fr;
    }
}

/* Tablet (768px and below) */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
    
    .header-container {
        padding: 10px 12px;
        /* Sem isso, o header-container mantinha "justify-content: space-between"
           herdado da regra base. Com o menu (.nav-menu) virando position:fixed
           no mobile (saindo do fluxo do flex), sobravam só 3 itens no flex:
           logo, hamburguer e auth-buttons/avatar — e "space-between" distribui
           esses 3 com espaço igual entre eles, deixando o hamburguer flutuando
           sozinho bem no meio do header em vez de ficar ao lado do avatar. */
        justify-content: flex-start;
    }
    
    .brand {
        gap: 8px;
    }
    
    .brand-text h1 {
        font-size: 1.1rem;
    }
    
    .brand-text p {
        font-size: 0.65rem;
    }
    
    .nav-menu {
        position: fixed;
        top: var(--header-height);
        left: -100%;
        flex-direction: column;
        background: linear-gradient(135deg, var(--primary), var(--accent));
        width: 80%;
        height: calc(100vh - var(--header-height));
        padding: 20px 30px 30px;
        transition: var(--transition);
        box-shadow: var(--shadow-lg);
        z-index: 999;
        gap: 12px;
        flex: none;
        overflow-y: auto;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu a {
        padding: 12px 0;
        border-radius: 0;
        display: block;
        color: white;
        text-decoration: none;
        font-weight: 600;
        transition: var(--transition);
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }

    .nav-menu a:hover {
        color: var(--accent);
        padding-left: 8px;
    }

    .nav-menu a::after {
        display: none;
    }

    .nav-menu .btn-host,
    .nav-menu .btn-cohost,
    .nav-menu .btn-vendor,
    .nav-menu .btn-admin {
        border: none;
        display: block;
        text-align: center;
        padding: 10px 16px;
        margin-top: 8px;
        border-radius: var(--radius);
    }

    /* Antes disso os botões Entrar/Cadastrar ficavam com display:none no
       mobile e o menu hamburguer não tinha nenhuma alternativa para login —
       ou seja, era impossível entrar/cadastrar pelo celular. Mantemos os
       botões visíveis, só reduzindo o tamanho para caber ao lado da logo. */
    .auth-buttons {
        gap: 6px;
    }

    .auth-buttons .btn {
        padding: 6px 10px;
        font-size: 0.78rem;
        white-space: nowrap;
    }

    .hamburger {
        display: flex;
        /* Empurra o hamburguer (e tudo depois dele, ou seja, o botão/avatar de
           login) para a direita, já que o header-container agora usa
           flex-start. Resultado: logo fixa à esquerda, hamburguer + avatar
           agrupados no canto direito — em vez do hamburguer centralizado. */
        margin-left: auto;
    }

    /* ensure header height can be adjusted on mobile */
    :root {
        --mobile-header-height: 60px;
    }

    /* use mobile header height as the effective header height on small screens */
    :root {
        --header-height: var(--mobile-header-height);
    }

    .hero {
        padding: 100px 0 60px;
        margin-top: var(--header-height);
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .search-container {
        flex-direction: column;
    }

    .search-input {
        width: 100%;
        min-width: auto;
    }

    .search-btn {
        width: 100%;
        justify-content: center;
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }

    .properties-grid {
        grid-template-columns: 1fr;
    }

    .modal-images {
        grid-template-columns: 1fr;
    }

    .modal-sidebar {
        order: 2;
    }

    .modal-info {
        order: 1;
    }
}

/* Small Mobile (576px and below) */
@media (max-width: 576px) {
    html {
        font-size: 14px;
    }
    
    .header-container {
        padding: 8px 10px;
    }
    
    .logo {
        width: 38px;
        height: 38px;
        font-size: 0.95rem;
    }
    
    .brand-text h1 {
        font-size: 1rem;
    }
    
    .brand-text p {
        font-size: 0.6rem;
    }
    
    .hero {
        padding: 90px 0 50px;
        margin-top: 50px;
    }
    
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .hero p {
        font-size: 0.95rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .footer-column h3 {
        font-size: 1.1rem;
    }
    
    .modal-sm {
        margin: 12px;
    }
    
    .modal-header {
        padding: 12px;
    }
    
    .modal-body {
        padding: 12px;
    }
    
    .modal-actions .btn {
        padding: 8px 12px;
    }
}

/* Extra Small (480px and below) */
@media (max-width: 480px) {
    html {
        font-size: 13px;
    }
    
    .header-container {
        padding: 6px 8px;
        gap: 6px;
    }
    
    .logo {
        width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }
    
    .brand-text h1 {
        font-size: 0.95rem;
    }
    
    .brand-text p {
        font-size: 0.55rem;
    }
    
    .hamburger {
        font-size: 1.2rem;
    }

    .auth-buttons {
        gap: 4px;
    }

    .auth-buttons .btn {
        padding: 5px 8px;
        font-size: 0.7rem;
    }

    .hero {
        padding: 80px 0 40px;
        margin-top: 48px;
    }
    
    .hero h1 {
        font-size: 1.3rem;
    }
    
    .hero p {
        font-size: 0.9rem;
    }
    
    .hero-actions {
        gap: 8px;
    }
    
    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .section-title {
        font-size: 1.5rem;
        margin-bottom: 16px;
    }
    
    .section-title::after {
        bottom: -8px;
        width: 60px;
    }
    
    .category-icon {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
        margin-bottom: 10px;
    }
    
    .category-card h3 {
        font-size: 0.95rem;
    }
    
    .property-image {
        height: 150px;
    }
    
    .property-card {
        border-radius: 8px;
    }
    
    .property-features {
        gap: 4px;
    }
    
    .property-feature {
        font-size: 0.65rem;
        padding: 3px 6px;
    }
    
    .step-number {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .step-card h3 {
        font-size: 1rem;
    }
    
    .whatsapp-float {
        width: 48px;
        height: 48px;
        font-size: 1.4rem;
        bottom: 12px;
        right: 12px;
    }
    
    .modal {
        margin: 12px;
    }
}

/* Print styles */
@media print {
    header,
    .nav-menu,
    .hamburger,
    .whatsapp-float {
        display: none !important;
    }
    
    .hero {
        padding: 20px 0;
        margin-top: 0;
    }
    
    body {
        background: white;
    }
    
    section {
        padding: 20px 0;
        page-break-inside: avoid;
    }
    
    .property-card,
    .category-card,
    .step-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* Prefers Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}



/* Landscape mode adjustments for mobile */
@media (max-height: 500px) and (orientation: landscape) {
    header {
        position: relative;
    }
    
    .hero {
        padding: 60px 0 40px;
        margin-top: 0;
    }
    
    .hero h1 {
        font-size: 1.5rem;
    }
    
    section {
        padding: 20px 0;
    }
}

/* Header height tuning per breakpoint: keeps header proportional and avoids overlap */
@media (min-width: 1440px) {
    :root { --header-height: 84px; }
}

@media (max-width: 1439px) and (min-width: 993px) {
    :root { --header-height: 76px; }
}

@media (max-width: 992px) and (min-width: 769px) {
    :root { --header-height: 72px; }
}

@media (max-width: 768px) and (min-width: 481px) {
    :root { --header-height: 64px; }
}

@media (max-width: 480px) {
    :root { --header-height: 56px; }
}
