/* ===================================================
   Roberta Santos Imóveis - CSS
   Cores: branco, dourado suave, cinza elegante
   Fontes: Playfair Display (títulos) + Inter (corpo)
   =================================================== */

:root {
    --gold: #c5993e;
    --gold-light: #f5ecd5;
    --bg: #faf8f5;
    --bg-muted: #f2ede5;
    --card: #ffffff; 
    --foreground: #2a2318;
    --muted: #7a7062;
    --border: #e5ddd0;
    --white: #ffffff;
    --whatsapp: #25d366;
    --danger: #dc3545;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 2px 12px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.1);
}

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

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--foreground);
    background: var(--bg);
}

h1, h2, h3, h4 { font-family: 'Playfair Display', serif; font-weight: 700; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.text-center { text-align: center; }
.text-muted { color: var(--muted); }
.text-gold { color: var(--gold); }
.bg-light { background: var(--bg); }
.bg-muted { background: var(--bg-muted); }

/* ---- Botões ---- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 24px; border-radius: var(--radius-sm); font-size: 14px;
    font-weight: 600; border: none; cursor: pointer; transition: all 0.2s; text-decoration: none;
}
.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--gold); color: var(--white); }
.btn-primary:hover { filter: brightness(1.1); }
.btn-outline { border: 2px solid var(--gold); color: var(--gold); background: transparent; }
.btn-outline:hover { background: var(--gold); color: var(--white); }
.btn-outline-light { border: 2px solid rgba(255,255,255,0.4); color: var(--white); background: rgba(255,255,255,0.1); backdrop-filter: blur(4px); }
.btn-outline-light:hover { background: rgba(255,255,255,0.2); }
.btn-whatsapp { background: var(--whatsapp); color: var(--white); }
.btn-whatsapp:hover { filter: brightness(1.1); }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-danger:hover { filter: brightness(1.1); }
.btn-sm { padding: 6px 14px; font-size: 13px; }

/* ---- Header ---- */
.site-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(255,255,255,0.95); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.header-inner {
    max-width: 1200px; margin: 0 auto; display: flex;
    align-items: center; justify-content: space-between; padding: 12px 1rem;
}
.logo { display: flex; flex-direction: column; }
.logo-name { font-family: 'Playfair Display', serif; font-size: 20px; font-weight: 700; color: var(--foreground); line-height: 1.2; }
.logo-sub { font-size: 10px; text-transform: uppercase; letter-spacing: 0.25em; color: var(--muted); }
.logo-footer .logo-name { color: var(--white); }
.logo-footer .logo-sub { color: rgba(255,255,255,0.6); }

.nav-desktop { display: none; align-items: center; gap: 32px; }
.nav-desktop a { font-size: 14px; font-weight: 500; color: var(--foreground); opacity: 0.8; transition: all 0.2s; }
.nav-desktop a:hover { color: var(--gold); opacity: 1; }

.mobile-toggle {
    display: flex; flex-direction: column; gap: 5px; background: none; border: none;
    cursor: pointer; padding: 8px;
}
.mobile-toggle span { width: 24px; height: 2px; background: var(--foreground); border-radius: 2px; transition: all 0.3s; }
 
.nav-mobile {
    display: none; flex-direction: column; padding: 16px; border-top: 1px solid var(--border); background: var(--card);
}
.nav-mobile.active { display: flex; }
.nav-mobile a { padding: 12px 0; font-size: 16px; font-weight: 500; color: var(--foreground); border-bottom: 1px solid rgba(0,0,0,0.05); }
 
.header-cta { display: none; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; color: var(--foreground); padding: 6px 0; background: none; border: none; border-radius: 0; text-decoration: none; transition: color 0.2s; line-height: 1.4; }
.header-cta:hover { background: none; color: var(--gold); }
.header-cta svg { color: var(--whatsapp); flex-shrink: 0; width: 18px; height: 18px; }

/* Na home: header sobre o hero = transparente, texto claro; Zap igual aos outros links (só texto + ícone) */
.page-home .site-header {
    background: rgba(0,0,0,0.15); backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.page-home .logo-name { color: var(--white); }
.page-home .logo-sub { color: rgba(255,255,255,0.85); }
.page-home .nav-desktop a { color: var(--white); opacity: 0.95; }
.page-home .nav-desktop a:hover { color: var(--gold-light); opacity: 1; }
.page-home .header-cta { color: var(--white); opacity: 0.95; }
.page-home .header-cta:hover { color: var(--gold-light); background: none; }
.page-home .header-cta svg { color: var(--whatsapp); }

@media (min-width: 1024px) {
    .nav-desktop { display: flex; }
    .header-cta { display: inline-flex; }
    .mobile-toggle { display: none; }
    .logo-name { font-size: 24px; }
    .logo-sub { font-size: 12px; }
}

/* ---- Hero ---- */
.hero {
    position: relative; min-height: 100vh; display: flex; align-items: center;
    justify-content: center; background: url('../images/hero-bg.jpg') center/cover no-repeat;
    overflow: hidden;
}
.hero-overlay { position: absolute; inset: 0; background: rgba(42,35,24,0.6); }
.hero-content {
    position: relative; z-index: 2; text-align: center;
    padding: 120px 1rem 80px; max-width: 800px;
}
.hero-title {
    font-size: clamp(28px, 5vw, 56px); font-weight: 700; color: var(--white); line-height: 1.15;
}
.hero-subtitle { margin-top: 24px; font-size: clamp(16px, 2vw, 20px); color: rgba(255,255,255,0.85); max-width: 600px; margin-left: auto; margin-right: auto; }
.hero-buttons { margin-top: 40px; display: flex; flex-direction: column; gap: 16px; align-items: center; }
@media (min-width: 640px) { .hero-buttons { flex-direction: row; justify-content: center; gap: 20px; } }
/* Botão secundário do hero: fundo claro, texto escuro, borda sutil (como na referência) */
.btn-hero-whatsapp {
    background: rgba(255,255,255,0.95); color: var(--foreground); border: 1px solid rgba(255,255,255,0.5);
}
.btn-hero-whatsapp:hover { background: var(--white); color: var(--foreground); border-color: var(--border); }

/* ---- Search Bar (esticada fora do layout) ---- */
.search-bar { position: relative; z-index: 20; margin-top: -48px; width: 100%; }
.search-bar-inner { width: 100%; padding: 0 1rem; box-sizing: border-box; }
.search-bar--hero {
    margin-top: 48px; margin-bottom: 0; max-width: none;
    width: 100vw; margin-left: calc(-50vw + 50%); margin-right: calc(-50vw + 50%);
    box-sizing: border-box;
}
.search-bar--page { margin-top: 0; padding-top: 120px; }
.search-box {
    width: 100%; max-width: none; margin: 0 auto; background: var(--card);
    border: 1px solid var(--border); border-radius: 16px; padding: 24px; box-shadow: var(--shadow-lg);
    box-sizing: border-box;
}
.search-title { text-align: center; font-size: 18px; font-weight: 600; margin-bottom: 20px; color: var(--foreground); }
.search-form { display: flex; flex-direction: column; gap: 0; }
.search-row { display: grid; grid-template-columns: 1fr; gap: 12px 16px; align-items: end; } 
@media (min-width: 768px) {
    .search-row-main { grid-template-columns: 1fr 1fr 1fr 1fr auto auto; gap: 12px 16px; } 
    .search-row-extra { grid-template-columns: repeat(4, 1fr); gap: 12px 16px; }
}
.search-row-extra {
    margin-top: 0; padding: 16px 0 0; border-top: 1px solid var(--border);
    background: rgba(0,0,0,0.02);
}
.search-row-extra.is-closed { display: none !important; }
.search-row-extra[hidden] { display: none !important; }
.search-form .form-group-btn .btn { white-space: nowrap; }
.btn-toggle-filtros {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 44px; min-height: 44px; padding: 0 16px;
}
.btn-toggle-filtros svg { flex-shrink: 0; }
.search-form .btn-primary { min-width: 160px; }
@media (max-width: 767px) {
    .search-row-main .form-group-btn { grid-column: span 1; }
    .search-row-extra .form-group { margin-bottom: 0; }
}
 
/* ---- Form Elements ---- */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.form-group input,
.form-group select,
.form-group textarea {
    height: 44px; border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 0 14px; font-size: 14px; color: var(--foreground); background: var(--bg);
    font-family: 'Inter', sans-serif; transition: border 0.2s;
}
.form-group textarea { height: 100px; padding: 12px 14px; resize: vertical; }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(197,153,62,0.15); }
.form-group-btn { display: flex; align-items: flex-end; }
.form-group-btn .btn {
    width: 100%; height: 44px; min-height: 44px; padding: 0 20px; box-sizing: border-box;
    display: inline-flex; align-items: center; justify-content: center; line-height: 1;
}
.search-form .form-group-btn .btn { height: 44px; min-height: 44px; }

.form-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } }
.full-width { grid-column: 1 / -1; }

.form-card { background: var(--card); border-radius: 16px; padding: 32px; box-shadow: var(--shadow); }
@media (min-width: 768px) { .form-card { padding: 40px; } }

.upload-area {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    border: 2px dashed var(--border); border-radius: var(--radius-sm);
    padding: 32px; text-align: center; cursor: pointer; transition: border 0.2s; position: relative;
}
.upload-area:hover { border-color: var(--gold); }
.upload-area.upload-dragover { border-color: var(--gold); background: rgba(197,153,62,0.05); }
.upload-area input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.upload-area span { font-size: 14px; color: var(--muted); pointer-events: none; }
.upload-area svg { color: var(--muted); pointer-events: none; }
.upload-hint { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); }

/* ---- Sections ---- */
.section { padding: 80px 0; }
.section-header { text-align: center; margin-bottom: 48px; }
.section-title { font-size: clamp(24px, 3vw, 36px); color: var(--foreground); }
.section-subtitle { margin-top: 12px; font-size: 16px; color: var(--muted); max-width: 560px; margin-left: auto; margin-right: auto; }
.label-sm { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.15em; color: var(--gold); margin-bottom: 4px; }

/* ---- Property Grid ---- */
.properties-grid { display: grid; grid-template-columns: 1fr; gap: 32px; }
@media (min-width: 640px) { .properties-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .properties-grid { grid-template-columns: repeat(4, 1fr); } }

.property-card {
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    overflow: hidden; box-shadow: var(--shadow); transition: all 0.3s;
}
.property-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.property-image { position: relative; padding-top: 75%; overflow: hidden; }
.property-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.property-card:hover .property-image img { transform: scale(1.05); }
.property-no-image { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: var(--bg-muted); color: var(--muted); font-size: 14px; }
.property-badge {
    position: absolute; left: 12px; top: 12px; background: var(--gold); color: var(--white);
    font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 6px;
}
.property-price-tag {
    position: absolute; right: 12px; bottom: 12px; background: rgba(42,35,24,0.8); color: var(--white);
    font-size: 14px; font-weight: 700; padding: 6px 16px; border-radius: var(--radius-sm);
}
.property-body { padding: 20px; }
.property-title { font-size: 18px; line-height: 1.3; }
.property-location { margin-top: 8px; font-size: 14px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.property-location svg { color: var(--gold); flex-shrink: 0; }
.property-features { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); display: flex; gap: 16px; font-size: 13px; color: var(--muted); }
.property-actions { margin-top: 16px; display: flex; gap: 12px; }
.property-actions .btn { flex: 1; font-size: 13px; padding: 10px 12px; }

/* ---- Property Detail ---- */
.detail-content { display: grid; grid-template-columns: 1fr; gap: 32px; }
@media (min-width: 768px) { .detail-content { grid-template-columns: 2fr 1fr; } }
.detail-price { font-family: 'Playfair Display', serif; font-size: 32px; font-weight: 700; color: var(--gold); }
.detail-title { margin-top: 8px; font-size: 28px; }
.detail-location { margin-top: 8px; font-size: 16px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.detail-location svg { color: var(--gold); }
.detail-features { margin-top: 24px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (min-width: 640px) { .detail-features { grid-template-columns: repeat(4, 1fr); } }
.detail-feature { background: var(--bg-muted); border-radius: var(--radius-sm); padding: 16px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.detail-feature-value { font-size: 16px; font-weight: 700; color: var(--foreground); }
.detail-feature-label { font-size: 12px; color: var(--muted); }
.detail-description { margin-top: 24px; }
.detail-description h2 { font-size: 20px; margin-bottom: 12px; }
.detail-description p { color: var(--muted); line-height: 1.7; }
  
.detail-sidebar { position: sticky; top: 100px; }
.detail-cta-box { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; }
.detail-cta-box h3 { font-size: 18px; text-align: center; margin-bottom: 8px; }
.detail-cta-phone { margin-top: 8px; font-size: 14px; color: var(--muted); display: flex; align-items: center; gap: 8px; justify-content: center; }
 
/* ---- Galeria carrossel (página do imóvel) ---- */
.detail-carousel { position: relative; display: flex; align-items: center; gap: 12px; max-width: 900px; margin: 0 auto; }
.detail-carousel-viewport { flex: 1; overflow: hidden; border-radius: var(--radius); box-shadow: var(--shadow); }
.detail-carousel-track { display: flex; transition: transform 0.3s ease; }
.detail-carousel-slide { flex: 0 0 100%; min-width: 0; }
.detail-carousel-slide img { width: 100%; height: auto; max-height: 480px; object-fit: contain; background: var(--bg-muted); display: block; border-radius: var(--radius-sm); }
.detail-carousel-btn { flex-shrink: 0; width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--border); background: var(--card); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: border-color 0.2s, background 0.2s; color: var(--foreground); }
.detail-carousel-btn:hover { border-color: var(--gold); background: rgba(197,153,62,0.08); color: var(--gold); }
.detail-carousel-slide--clickable { cursor: pointer; }

.detail-foto-modal { position: fixed; inset: 0; z-index: 9999; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; box-sizing: border-box; }
.detail-foto-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.9); cursor: pointer; }
.detail-foto-modal-content { position: relative; display: flex; align-items: center; justify-content: center; max-width: 95vw; max-height: 85vh; z-index: 1; }
.detail-foto-modal-content img { max-width: 100%; max-height: 80vh; width: auto; height: auto; object-fit: contain; border-radius: 8px; }
.detail-foto-modal-close { position: absolute; top: -44px; right: 0; width: 40px; height: 40px; border: none; border-radius: 50%; background: rgba(255,255,255,0.2); color: #fff; font-size: 28px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; z-index: 2; }
.detail-foto-modal-close:hover { background: rgba(255,255,255,0.3); }
.detail-foto-modal-prev, .detail-foto-modal-next { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border: none; border-radius: 50%; background: rgba(255,255,255,0.2); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; z-index: 2; }
.detail-foto-modal-prev:hover, .detail-foto-modal-next:hover { background: rgba(255,255,255,0.35); }
.detail-foto-modal-prev { left: -56px; }
.detail-foto-modal-next { right: -56px; }
@media (max-width: 767px) { .detail-foto-modal-prev { left: 8px; } .detail-foto-modal-next { right: 8px; } }
.detail-foto-modal-counter { position: relative; z-index: 1; margin-top: 16px; font-size: 14px; color: rgba(255,255,255,0.9); }

/* ---- About ---- */
.about-grid { display: grid; grid-template-columns: 1fr; gap: 48px; align-items: center; }
@media (min-width: 1024px) { .about-grid { grid-template-columns: 1fr 1fr; } }
.about-photo { position: relative; display: flex; justify-content: center; }
.about-photo-bg { position: absolute; inset: -16px; border-radius: 20px; background: var(--gold-light); }
.about-photo img { position: relative; border-radius: 16px; box-shadow: var(--shadow-lg); width: 100%; max-width: 400px; object-fit: cover; }
.about-role { font-size: 16px; color: var(--muted); margin-bottom: 24px; }
.about-text p { color: var(--muted); margin-bottom: 12px; }
.about-stats { margin-top: 32px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (min-width: 640px) { .about-stats { grid-template-columns: repeat(4, 1fr); } }
.stat-box { display: flex; flex-direction: column; align-items: center; background: var(--bg-muted); border-radius: var(--radius-sm); padding: 20px 12px; text-align: center; }
.stat-value { font-family: 'Playfair Display', serif; font-size: 22px; font-weight: 700; color: var(--foreground); }
.stat-label { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* ---- Footer ---- */
.site-footer { background: var(--foreground); color: rgba(255,255,255,0.7); padding: 48px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 40px 24px; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr 1fr; } }
.footer-col { }
.footer-brand .logo-name { font-size: 22px; }
.footer-brand .logo-sub { font-size: 11px; margin-top: 2px; }
.footer-desc { margin-top: 16px; font-size: 14px; line-height: 1.6; color: rgba(255,255,255,0.85); max-width: 320px; }
.footer-creci { margin-top: 12px; font-size: 14px; color: rgba(255,255,255,0.5); }
.footer-title { font-family: 'Playfair Display', serif; font-size: 18px; color: var(--white); margin-bottom: 16px; font-weight: 700; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 14px; color: rgba(255,255,255,0.85); transition: color 0.2s; }
.footer-links a:hover { color: var(--gold); }
.footer-contact { display: flex; flex-direction: column; gap: 12px; }
.footer-contact a, .footer-contact span { display: flex; align-items: center; gap: 8px; font-size: 14px; color: rgba(255,255,255,0.85); transition: color 0.2s; }
.footer-contact a:hover { color: var(--gold); }
.footer-contact svg { flex-shrink: 0; }
.footer-bottom { margin-top: 40px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.15); text-align: center; }
.footer-bottom p { font-size: 14px; color: rgba(255,255,255,0.5); margin: 0; }

/* ---- WhatsApp Float ---- */
.whatsapp-float {
    position: fixed; bottom: 24px; right: 24px; z-index: 50;
    width: 56px; height: 56px; border-radius: 50%;
    background: var(--whatsapp); color: var(--white);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 16px rgba(37,211,102,0.4); transition: transform 0.2s;
}
.whatsapp-float:hover { transform: scale(1.1); }
@media (min-width: 768px) { .whatsapp-float { width: 64px; height: 64px; } }

/* ---- Alerts ---- */
.alert {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 16px 20px; border-radius: var(--radius-sm); margin-bottom: 24px; font-size: 14px;
}
.alert-success { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.alert-error { background: #fce4ec; color: #c62828; border: 1px solid #ef9a9a; }
.alert svg { flex-shrink: 0; margin-top: 2px; }
