/* ==========================================================================
   CASA PROGRAMADA - DESIGN SYSTEM & STYLESHEET
   Endereço: imobiliaria.tudopronto.app
   Luís Eduardo Magalhães - BA
   ========================================================================== */

:root {
  --primary: #0b1e36;
  --primary-light: #162f52;
  --primary-dark: #071324;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --gold: #d97706;
  --gold-light: #fef3c7;
  --whatsapp: #25d366;
  --whatsapp-dark: #128c7e;
  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border: #e2e8f0;
  --border-focus: #93c5fd;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text-main);
  background-color: var(--bg-body);
  line-height: 1.5;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

button, input, select, textarea {
  font: inherit;
}

/* Container */
.container {
  width: 100%;
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* Header & Navbar */
.site-header {
  background-color: var(--primary);
  color: #ffffff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

.header-top {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.82rem;
  color: #cbd5e1;
  padding: 6px 0;
}

.header-top-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-top-info {
  display: flex;
  gap: 16px;
  align-items: center;
}

.header-top-info span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.header-top-links {
  display: flex;
  gap: 14px;
}

.header-top-links a:hover {
  color: #ffffff;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--accent), #3b82f6);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.4);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  line-height: 1.1;
}

.brand-subtitle {
  font-size: 0.72rem;
  color: #93c5fd;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.nav-link {
  font-weight: 500;
  font-size: 0.95rem;
  color: #e2e8f0;
  padding: 6px 4px;
  position: relative;
  transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
  color: #ffffff;
}

.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--accent);
  border-radius: var(--radius-full);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-whatsapp-nav {
  background-color: var(--whatsapp);
  color: #ffffff;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp-nav:hover {
  background-color: var(--whatsapp-dark);
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 1.6rem;
  cursor: pointer;
  padding: 4px;
}

/* Mobile Drawer */
.mobile-drawer {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(7, 19, 36, 0.7);
  z-index: 200;
  backdrop-filter: blur(4px);
}

.mobile-drawer.open {
  display: block;
}

.mobile-drawer-content {
  width: 280px;
  max-width: 80%;
  height: 100%;
  background-color: var(--primary);
  color: #ffffff;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-xl);
}

.mobile-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 30px;
}

.mobile-nav-list a {
  font-size: 1.1rem;
  font-weight: 500;
  color: #e2e8f0;
  display: block;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, rgba(7, 19, 36, 0.92), rgba(11, 30, 54, 0.85)), url('https://images.unsplash.com/photo-1600585154340-be6161a56a0c?auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
  color: #ffffff;
  padding: 60px 0 80px;
  position: relative;
}

.hero-content {
  text-align: center;
  max-width: 860px;
  margin: 0 auto 40px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: #93c5fd;
  margin-bottom: 20px;
  backdrop-filter: blur(6px);
}

.hero-title {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.18;
  margin-bottom: 18px;
  letter-spacing: -0.03em;
}

.hero-title span {
  color: #60a5fa;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: #cbd5e1;
  line-height: 1.6;
}

/* Search Box / Filter Bar */
.search-card {
  background-color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-xl);
  color: var(--text-main);
  max-width: 1040px;
  margin: 0 auto;
}

.search-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}

.search-tab-btn {
  background: none;
  border: none;
  padding: 8px 18px;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition);
}

.search-tab-btn.active, .search-tab-btn:hover {
  background-color: var(--primary);
  color: #ffffff;
}

.search-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) 150px;
  gap: 14px;
  align-items: end;
}

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

.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background-color: #ffffff;
  color: var(--text-main);
  font-size: 0.95rem;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.btn-search {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 11px 20px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
  height: 44px;
}

.btn-search:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

/* Sections */
.section {
  padding: 70px 0;
}

.section-alt {
  background-color: #ffffff;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 45px;
}

.section-tag {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  display: block;
}

.section-title {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section-desc {
  font-size: 1.02rem;
  color: var(--text-muted);
}

/* Grid of Cards */
.imoveis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 28px;
}

/* Property Card */
.imovel-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.imovel-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: #cbd5e1;
}

.imovel-thumb-wrapper {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background-color: #e2e8f0;
}

.imovel-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.imovel-card:hover .imovel-thumb {
  transform: scale(1.05);
}

.badge-group {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  z-index: 2;
}

.badge {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-venda {
  background-color: var(--primary);
  color: #ffffff;
}

.badge-aluguel {
  background-color: #0284c7;
  color: #ffffff;
}

.badge-ambos {
  background-color: #4f46e5;
  color: #ffffff;
}

.badge-destaque {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.4);
}

.badge-status-vendido {
  background-color: #dc2626;
  color: #ffffff;
}

.badge-status-reservado {
  background-color: #ea580c;
  color: #ffffff;
}

.imovel-photo-count {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background-color: rgba(0, 0, 0, 0.65);
  color: #ffffff;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.imovel-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.imovel-header-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.imovel-codigo {
  font-weight: 600;
  color: var(--accent);
}

.imovel-tipo {
  font-weight: 600;
  text-transform: uppercase;
}

.imovel-title {
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.35;
  margin-bottom: 8px;
}

.imovel-title a:hover {
  color: var(--accent);
}

.imovel-location {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.imovel-specs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}

.spec-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.spec-icon {
  color: var(--text-light);
  margin-bottom: 2px;
}

.spec-val {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-main);
}

.spec-label {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.imovel-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.imovel-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
}

.imovel-price-box {
  display: flex;
  flex-direction: column;
}

.price-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.price-val {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
}

.imovel-actions {
  display: flex;
  gap: 8px;
}

.btn-details {
  background-color: #f1f5f9;
  color: var(--primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  transition: var(--transition);
}

.btn-details:hover {
  background-color: var(--primary);
  color: #ffffff;
}

.btn-card-whatsapp {
  background-color: var(--whatsapp);
  color: #ffffff;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

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

/* Feature/Value Props Section */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.feature-card {
  background-color: #ffffff;
  padding: 30px 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.feature-icon-box {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: #eff6ff;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.feature-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 10px;
}

.feature-text {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Categories Grid */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px;
}

.category-card {
  background-color: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 16px;
  text-align: center;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.category-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.category-icon {
  width: 48px;
  height: 48px;
  background-color: #f1f5f9;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  margin-bottom: 12px;
  transition: var(--transition);
}

.category-card:hover .category-icon {
  background-color: var(--accent);
  color: #ffffff;
}

.category-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--primary);
  margin-bottom: 4px;
}

.category-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* CTA Banner */
.cta-banner {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 50px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  box-shadow: var(--shadow-xl);
}

.cta-text h3 {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 10px;
}

.cta-text p {
  color: #cbd5e1;
  font-size: 1.05rem;
}

.cta-buttons {
  display: flex;
  gap: 14px;
  flex-shrink: 0;
}

.btn-cta-primary {
  background-color: var(--accent);
  color: #ffffff;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  transition: var(--transition);
}

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

.btn-cta-secondary {
  background-color: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
}

.btn-cta-secondary:hover {
  background-color: rgba(255, 255, 255, 0.25);
}

/* Single Property Details Page */
.prop-details-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 36px;
  align-items: start;
}

.prop-main {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Gallery Component */
.gallery-container {
  background-color: #000000;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.gallery-main-view {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background-color: #0f172a;
}

.gallery-main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
}

.gallery-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: #ffffff;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  z-index: 5;
}

.gallery-nav-btn:hover {
  background-color: rgba(0, 0, 0, 0.85);
}

.gallery-nav-btn.prev {
  left: 14px;
}

.gallery-nav-btn.next {
  right: 14px;
}

.gallery-expand-btn {
  position: absolute;
  bottom: 14px;
  right: 14px;
  background-color: rgba(0, 0, 0, 0.65);
  color: #ffffff;
  border: none;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--transition);
}

.gallery-expand-btn:hover {
  background-color: rgba(0, 0, 0, 0.9);
}

.gallery-thumbs {
  display: flex;
  gap: 10px;
  padding: 12px;
  background-color: #1e293b;
  overflow-x: auto;
  scrollbar-width: thin;
}

.gallery-thumb-item {
  width: 86px;
  height: 60px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  opacity: 0.6;
  border: 2px solid transparent;
  transition: var(--transition);
}

.gallery-thumb-item.active, .gallery-thumb-item:hover {
  opacity: 1;
  border-color: var(--accent);
}

.gallery-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Lightbox Modal */
.lightbox-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  z-index: 999;
  align-items: center;
  justify-content: center;
}

.lightbox-modal.open {
  display: flex;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 2.2rem;
  cursor: pointer;
}

/* Property Detail Blocks */
.detail-card {
  background-color: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.detail-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.features-tags-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.feature-tag-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background-color: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
}

.feature-tag-item svg {
  color: var(--accent);
  flex-shrink: 0;
}

/* Contact Sidebar Card */
.contact-sidebar-card {
  background-color: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 24px;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 90px;
}

.sidebar-price-header {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.sidebar-price-main {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
}

.sidebar-price-fees {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.btn-whatsapp-full {
  width: 100%;
  background-color: var(--whatsapp);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: var(--transition);
  margin-bottom: 18px;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35);
}

.btn-whatsapp-full:hover {
  background-color: var(--whatsapp-dark);
  transform: translateY(-2px);
}

.sidebar-divider {
  text-align: center;
  position: relative;
  margin: 20px 0;
  color: var(--text-light);
  font-size: 0.8rem;
  text-transform: uppercase;
}

.sidebar-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: var(--border);
  z-index: 1;
}

.sidebar-divider span {
  background-color: #ffffff;
  padding: 0 12px;
  position: relative;
  z-index: 2;
}

/* Broker/Agent Card */
.agent-mini-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background-color: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-top: 20px;
}

.agent-avatar {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-full);
  object-fit: cover;
}

.agent-info h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary);
}

.agent-info p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Footer */
.site-footer {
  background-color: var(--primary-dark);
  color: #94a3b8;
  padding-top: 60px;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 36px;
  margin-bottom: 40px;
}

.footer-col h4 {
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 18px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: #ffffff;
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 20px 0;
  font-size: 0.82rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

/* Floating WhatsApp Button */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 58px;
  height: 58px;
  background-color: var(--whatsapp);
  color: #ffffff;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
  z-index: 99;
  transition: var(--transition);
}

.whatsapp-float:hover {
  background-color: var(--whatsapp-dark);
  transform: scale(1.08);
}

/* Admin Styles */
.admin-wrapper {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.admin-sidebar {
  background-color: var(--primary);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-sidebar-header {
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-nav {
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-grow: 1;
}

.admin-nav a {
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  color: #cbd5e1;
  font-weight: 500;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: var(--transition);
}

.admin-nav a:hover, .admin-nav a.active {
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.admin-nav a.active {
  background-color: var(--accent);
}

.admin-main {
  background-color: #f1f5f9;
  padding: 30px;
  overflow-y: auto;
}

.admin-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

.admin-title h1 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary);
}

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
  margin-bottom: 30px;
}

.stat-card {
  background-color: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.stat-icon.blue { background: #dbeafe; color: #1d4ed8; }
.stat-icon.green { background: #dcfce7; color: #15803d; }
.stat-icon.amber { background: #fef3c7; color: #b45309; }
.stat-icon.purple { background: #ede9fe; color: #6d28d9; }

.stat-val {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Admin Tables */
.admin-card {
  background-color: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 24px;
}

.admin-card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-card-header h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.admin-table th {
  background-color: #f8fafc;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.admin-table tr:hover td {
  background-color: #f8fafc;
}

/* Alerts */
.alert {
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 0.92rem;
  font-weight: 500;
}

.alert-success {
  background-color: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.alert-error {
  background-color: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* Media Queries Responsividade */
@media (max-width: 992px) {
  .hero-title {
    font-size: 2.2rem;
  }
  .search-form-grid {
    grid-template-columns: 1fr 1fr;
  }
  .prop-details-grid {
    grid-template-columns: 1fr;
  }
  .contact-sidebar-card {
    position: static;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .admin-wrapper {
    grid-template-columns: 1fr;
  }
  .admin-sidebar {
    display: none;
  }
}

@media (max-width: 768px) {
  .header-top {
    display: none;
  }
  .nav-links, .nav-cta .btn-whatsapp-nav {
    display: none;
  }
  .mobile-toggle {
    display: block;
  }
  .hero-title {
    font-size: 1.85rem;
  }
  .search-form-grid {
    grid-template-columns: 1fr;
  }
  .imoveis-grid {
    grid-template-columns: 1fr;
  }
  .cta-banner {
    flex-direction: column;
    text-align: center;
    padding: 30px 20px;
  }
  .cta-buttons {
    width: 100%;
    flex-direction: column;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}
