/* ============================================================
   Ronaldo Carvalho Corretor — Custom Styles
   Tema: Light / Cream (inspirado em HAMAC)
   ============================================================ */

/* ---------- Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Inter:wght@300;400;500;600;700&display=swap');

/* ---------- Variables — Light Theme ---------- */
:root {
  --dark:       #F8F5F0;
  --card:       #FFFFFF;
  --card-hover: #F5F2EC;
  --gold:       #C8A96E;
  --gold-light: #D4B896;
  --gold-dark:  #A8894E;
  --border:     #E5E0D8;
  --muted:      #9CA3AF;
  --text:       #1C1C2E;
  --text-soft:  #5C6370;
  --navy:       #1C1C2E;
}

/* Admin panel restores dark theme */
body.admin-page {
  --dark:       #0A0A0A;
  --card:       #141414;
  --card-hover: #1C1C1C;
  --border:     #2A2A2A;
  --text:       #FFFFFF;
  --text-soft:  #D1D5DB;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--dark);
  color: var(--text);
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Typography ---------- */
.font-display { font-family: 'Playfair Display', serif; }

/* ---------- Gold Divider ---------- */
.gold-divider {
  display: block;
  width: 48px;
  height: 2px;
  background: var(--gold);
  margin: 12px 0 20px;
}

/* ============================================================
   HEADER / NAV
   ============================================================ */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background 0.3s, box-shadow 0.3s;
}
#site-header.scrolled {
  background: rgba(248,245,240,0.97);
  box-shadow: 0 2px 20px rgba(0,0,0,0.08);
  backdrop-filter: blur(10px);
}
#site-header .nav-link {
  position: relative;
  color: rgba(255,255,255,0.88);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.2s;
  padding: 4px 0;
}
#site-header.scrolled .nav-link {
  color: rgba(28,28,46,0.75);
}
#site-header .nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width 0.3s;
}
#site-header .nav-link:hover { color: var(--gold); }
#site-header .nav-link:hover::after { width: 100%; }
#site-header.scrolled .nav-link:hover { color: var(--gold); }

/* Hamburger button */
#site-header.scrolled #menu-btn { color: var(--navy); }

/* Mobile menu */
#mobile-menu {
  background: rgba(248,245,240,0.98);
  backdrop-filter: blur(16px);
}
#mobile-menu a {
  color: rgba(28,28,46,0.75) !important;
}
#mobile-menu a.btn-gold {
  color: #0a0a0a !important;
}

/* ============================================================
   HERO
   ============================================================ */
.hero-section {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
  animation: heroZoom 12s ease-in-out infinite alternate;
}
@keyframes heroZoom {
  from { transform: scale(1.05); }
  to   { transform: scale(1.12); }
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(0,0,0,0.72) 0%,
    rgba(0,0,0,0.45) 50%,
    rgba(0,0,0,0.65) 100%
  );
}
.hero-content { position: relative; z-index: 2; }

.hero-search-bar {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(200,169,110,0.35);
  border-radius: 6px;
}
.hero-search-bar select,
.hero-search-bar input {
  background: transparent;
  color: #fff;
  border: none;
  outline: none;
}
.hero-search-bar select option {
  background: #1a1a1a;
  color: #fff;
}

/* ============================================================
   PROPERTY CARDS
   ============================================================ */
.property-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.property-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: 0 16px 40px rgba(200,169,110,0.15);
}
.property-card-image {
  position: relative;
  height: 220px;
  overflow: hidden;
}
.property-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
.property-card:hover .property-card-image img {
  transform: scale(1.05);
}
.property-card-badge {
  position: absolute;
  top: 12px; left: 12px;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.badge-venda   { background: var(--gold); color: #1C1C2E; }
.badge-locacao { background: #3B82F6; color: #fff; }
.badge-ambos   { background: #8B5CF6; color: #fff; }

.property-card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.property-price {
  font-family: 'Playfair Display', serif;
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--gold-dark);
  margin-bottom: 4px;
}
.property-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.4;
}
.property-title a { color: inherit; text-decoration: none; }
.property-title a:hover { color: var(--gold-dark); }
.property-location {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 14px;
}
.property-features {
  display: flex;
  gap: 14px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.property-feature {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: rgba(28,28,46,0.55);
}
.property-feature svg { color: var(--gold-dark); flex-shrink: 0; }

/* ============================================================
   SECTION LABELS
   ============================================================ */
.section-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 12px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-gold {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gold);
  color: #1C1C2E;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 12px 28px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
  letter-spacing: 0.02em;
}
.btn-gold:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
}
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--gold-dark);
  font-weight: 600;
  font-size: 0.875rem;
  padding: 11px 27px;
  border-radius: 4px;
  border: 1.5px solid var(--gold);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.btn-outline:hover {
  background: var(--gold);
  color: #1C1C2E;
}

/* ============================================================
   FORMS
   ============================================================ */
.form-input {
  width: 100%;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  padding: 12px 16px;
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  -webkit-appearance: none;
}
.form-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200,169,110,0.15);
}
.form-input::placeholder { color: var(--muted); }
.form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(28,28,46,0.55);
  margin-bottom: 6px;
}

/* Admin form inputs stay dark */
body.admin-page .form-input {
  background: #1a1a1a;
  border-color: #2a2a2a;
  color: #FFFFFF;
}
body.admin-page .form-label {
  color: rgba(255,255,255,0.6);
}

/* ============================================================
   DIFFERENTIALS CARDS
   ============================================================ */
.differential-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px 24px;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.differential-card:hover {
  border-color: var(--gold);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(200,169,110,0.1);
}
.differential-icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(200,169,110,0.12);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  color: var(--gold-dark);
}

/* ============================================================
   TESTIMONIALS — dark contrast section
   ============================================================ */
.testimonial-card {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 28px;
}
.testimonial-stars { color: var(--gold); font-size: 1.1rem; margin-bottom: 12px; }
.testimonial-text {
  font-size: 0.95rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.8);
  font-style: italic;
  margin-bottom: 16px;
}
.testimonial-author { font-weight: 600; font-size: 0.88rem; color: #fff; }

/* ============================================================
   ABOUT SECTION — photo
   ============================================================ */
.about-photo {
  border-radius: 10px;
  border: 3px solid var(--gold);
  width: 100%;
  max-width: 380px;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: top;
  display: block;
}

/* ============================================================
   LIGHTBOX
   ============================================================ */
#lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
#lightbox.active { display: flex; }
#lightbox img {
  max-height: 82vh;
  max-width: 92vw;
  object-fit: contain;
  border-radius: 4px;
}
#lightbox-close {
  position: absolute;
  top: 20px; right: 28px;
  font-size: 2rem;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
}
#lightbox-close:hover { color: var(--gold); }
#lightbox-nav {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 100%; display: flex; justify-content: space-between;
  padding: 0 16px; pointer-events: none;
}
.lb-nav-btn {
  pointer-events: all;
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.8);
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.lb-nav-btn:hover { background: var(--gold); color: #1C1C2E; }
#lightbox-counter {
  position: absolute; bottom: 24px;
  font-size: 0.85rem; color: rgba(255,255,255,0.5);
}

/* ============================================================
   GALLERY THUMBNAILS
   ============================================================ */
.gallery-main img {
  width: 100%; height: 420px;
  object-fit: cover; border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.2s;
}
.gallery-main img:hover { opacity: 0.9; }
.gallery-thumb-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 8px;
}
.gallery-thumb {
  aspect-ratio: 1;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.2s;
}
.gallery-thumb.active { border-color: var(--gold); }
.gallery-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.gallery-thumb:hover img { transform: scale(1.05); }

/* ============================================================
   WHATSAPP FLOAT BUTTON
   ============================================================ */
.whatsapp-float {
  position: fixed;
  bottom: 28px; right: 28px;
  z-index: 90;
  display: flex; align-items: center; gap: 10px;
  background: #25D366;
  color: #fff;
  padding: 14px 20px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  box-shadow: 0 6px 24px rgba(37,211,102,0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}
.whatsapp-float:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 32px rgba(37,211,102,0.45);
}
.whatsapp-float svg { flex-shrink: 0; }

/* ============================================================
   FOOTER — dark navy
   ============================================================ */
footer {
  background: #1C1C2E;
  border-top: none;
  color: rgba(255,255,255,0.55);
}
footer a {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s;
}
footer a:hover { color: var(--gold); }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border-radius: 4px;
  border: 1px solid var(--border);
  font-size: 0.875rem;
  text-decoration: none;
  color: var(--text);
  background: var(--card);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.pagination a:hover { background: var(--gold); border-color: var(--gold); color: #1C1C2E; }
.pagination span.current { background: var(--gold); border-color: var(--gold); color: #1C1C2E; font-weight: 700; }

/* ============================================================
   ADMIN PANEL — keeps dark theme
   ============================================================ */
.admin-sidebar {
  width: 260px;
  background: #0d0d0d;
  border-right: 1px solid #2a2a2a;
  min-height: 100vh;
  position: fixed;
  left: 0; top: 0;
  overflow-y: auto;
  z-index: 50;
}
.admin-content {
  margin-left: 260px;
  min-height: 100vh;
  background: #0A0A0A;
}
.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  color: rgba(255,255,255,0.6);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  border-radius: 6px;
  margin: 2px 10px;
}
.admin-nav-link:hover,
.admin-nav-link.active {
  background: rgba(200,169,110,0.1);
  color: var(--gold);
}
.admin-stat-card {
  background: #141414;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  padding: 24px;
}
.admin-stat-value {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold);
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
}
.admin-table th {
  background: #0d0d0d;
  padding: 12px 16px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6B7280;
  border-bottom: 1px solid #2a2a2a;
}
.admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #1a1a1a;
  font-size: 0.875rem;
  vertical-align: middle;
  color: rgba(255,255,255,0.8);
}
.admin-table tr:hover td { background: rgba(255,255,255,0.02); }

/* ============================================================
   KANBAN
   ============================================================ */
.kanban-board {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 16px;
  min-height: 70vh;
}
.kanban-col {
  flex: 0 0 240px;
  background: #0d0d0d;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  padding: 16px;
  min-height: 200px;
}
.kanban-col-header {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--gold);
  display: flex; align-items: center; justify-content: space-between;
}
.kanban-card {
  background: #141414;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  padding: 14px;
  margin-bottom: 10px;
  cursor: grab;
  transition: border-color 0.2s, transform 0.15s;
  user-select: none;
}
.kanban-card:hover { border-color: var(--gold); transform: translateY(-1px); }
.kanban-card.dragging { opacity: 0.5; cursor: grabbing; }
.kanban-col.drag-over { border-color: var(--gold); background: rgba(200,169,110,0.04); }
.kanban-card-name { font-weight: 600; font-size: 0.875rem; margin-bottom: 4px; color: #fff; }
.kanban-card-imovel { font-size: 0.75rem; color: #6B7280; margin-bottom: 6px; }
.kanban-card-date { font-size: 0.72rem; color: var(--gold); }

/* ============================================================
   CALENDAR (Admin Agenda)
   ============================================================ */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-day {
  aspect-ratio: 1;
  min-height: 72px;
  background: #141414;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  padding: 8px;
  cursor: pointer;
  transition: border-color 0.2s;
  color: rgba(255,255,255,0.7);
}
.cal-day:hover { border-color: var(--gold); }
.cal-day.has-event { border-color: rgba(200,169,110,0.5); }
.cal-day.today { border-color: var(--gold); background: rgba(200,169,110,0.08); }
.cal-day.other-month { opacity: 0.3; }
.cal-day-num { font-size: 0.8rem; font-weight: 600; margin-bottom: 4px; }
.cal-event {
  font-size: 0.65rem;
  background: var(--gold);
  color: #1C1C2E;
  border-radius: 3px;
  padding: 1px 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

/* ============================================================
   NOTIFICATION BADGE
   ============================================================ */
.notif-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  background: #EF4444;
  font-size: 0.65rem;
  font-weight: 700;
  color: #fff;
  padding: 0 4px;
}

/* ============================================================
   UTILITY
   ============================================================ */
.section-pad { padding: 80px 0; }
@media (max-width: 768px) {
  .section-pad { padding: 56px 0; }
  .admin-sidebar { transform: translateX(-100%); }
  .admin-content { margin-left: 0; }
  .admin-sidebar.open { transform: translateX(0); }
  .kanban-board { flex-direction: column; }
  .kanban-col { flex: none; width: 100%; }
}

/* Scroll animations */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s, transform 0.6s;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Loading spinner */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(200,169,110,0.3);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Alert boxes */
.alert-success {
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.3);
  color: #166534;
  border-radius: 6px;
  padding: 14px 18px;
  font-size: 0.9rem;
}
.alert-error {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  color: #991b1b;
  border-radius: 6px;
  padding: 14px 18px;
  font-size: 0.9rem;
}

/* Admin alert boxes stay adapted */
body.admin-page .alert-success { color: #86efac; }
body.admin-page .alert-error   { color: #fca5a5; }

/* ============================================================
   PUBLIC LIGHT THEME — Tailwind white-text class overrides
   Applied only when body.public-light to avoid admin conflicts
   ============================================================ */
body.public-light .text-white\/25 { color: rgba(28,28,46,0.25) !important; }
body.public-light .text-white\/30 { color: rgba(28,28,46,0.3) !important; }
body.public-light .text-white\/40 { color: rgba(28,28,46,0.4) !important; }
body.public-light .text-white\/50 { color: rgba(28,28,46,0.55) !important; }
body.public-light .text-white\/60 { color: rgba(28,28,46,0.6) !important; }
body.public-light .text-white\/70 { color: rgba(28,28,46,0.7) !important; }
body.public-light .text-white\/75 { color: rgba(28,28,46,0.75) !important; }
body.public-light .text-white\/80 { color: rgba(28,28,46,0.8) !important; }

/* Restore white text inside dark sections */
body.public-light .dark-section .text-white\/25 { color: rgba(255,255,255,0.25) !important; }
body.public-light .dark-section .text-white\/30 { color: rgba(255,255,255,0.3) !important; }
body.public-light .dark-section .text-white\/40 { color: rgba(255,255,255,0.4) !important; }
body.public-light .dark-section .text-white\/50 { color: rgba(255,255,255,0.5) !important; }
body.public-light .dark-section .text-white\/60 { color: rgba(255,255,255,0.6) !important; }
body.public-light .dark-section .text-white\/70 { color: rgba(255,255,255,0.7) !important; }
body.public-light .dark-section .text-white\/75 { color: rgba(255,255,255,0.75) !important; }
body.public-light .dark-section .text-white\/80 { color: rgba(255,255,255,0.8) !important; }

/* Restore white text in hero content */
body.public-light .hero-content .text-white\/70,
body.public-light .hero-content .text-white\/75,
body.public-light .hero-content .text-white\/60 { color: rgba(255,255,255,0.7) !important; }

/* Footer always white text */
body.public-light footer .text-white\/25 { color: rgba(255,255,255,0.25) !important; }
body.public-light footer .text-white\/40 { color: rgba(255,255,255,0.4) !important; }
body.public-light footer .text-white\/50 { color: rgba(255,255,255,0.5) !important; }

/* Dark section base color */
.dark-section { color: rgba(255,255,255,0.85); }
