/* ================================================
   BEST HOUSE TOURS - Design System
   Colores corporativos Best House
================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Best House Corporate Colors */
  --bh-blue-deep: #1e3c72;
  --bh-blue-mid: #2a52a0;
  --bh-blue-light: #3a6bc8;
  --bh-yellow: #faca31;
  --bh-yellow-hover: #e5b92d;
  --bh-yellow-dark: #c9a520;

  /* Dark Mode (default) */
  --bg: #080e1a;
  --surface: #0e1e38;
  --surface-1: #0e1e38;
  --surface-2: #152847;
  --card-bg: #1a3050;
  --border: rgba(250,202,49,0.15);
  --border-subtle: rgba(250,202,49,0.08);
  --text-primary: #eef2ff;
  --text-secondary: #a8bcdc;
  --text-muted: #607090;
  --accent: #faca31;
  --accent-hover: #e5b92d;
  --gold: #faca31;
  --gold-light: #fcd966;
  --gold-dark: #c9a520;
  --btn-text: #1e3c72;
  --nav-bg: rgba(8,14,26,0.95);
  --input-bg: rgba(21,40,71,0.8);
  --overlay: rgba(8,14,26,0.7);
  --shadow: 0 8px 32px rgba(0,0,0,0.5);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.6);
  --shadow-card: 0 4px 24px rgba(0,0,0,0.4);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --radius-pill: 50px;
  --transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
  --transition-fast: 0.15s cubic-bezier(0.4,0,0.2,1);
  --success: #22c55e;
  --error: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;
  --glass-bg: rgba(21,40,71,0.7);
  --glass-border: rgba(250,202,49,0.1);
  --glass-blur: blur(16px);
  --header-h: 68px;

  /* Spacing scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;

  /* Typography scale */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
}

html.light {
  --bg: #f0f4ff;
  --surface: #ffffff;
  --surface-1: #ffffff;
  --surface-2: #e8eeff;
  --card-bg: #ffffff;
  --border: rgba(30,60,114,0.12);
  --border-subtle: rgba(30,60,114,0.07);
  --text-primary: #1e3c72;
  --text-secondary: #2a52a0;
  --text-muted: #5070a0;
  --accent: #faca31;
  --accent-hover: #e5b92d;
  --gold: #faca31;
  --gold-light: #fcd966;
  --gold-dark: #c9a520;
  --btn-text: #1e3c72;
  --nav-bg: rgba(255,255,255,0.97);
  --input-bg: rgba(240,244,255,0.9);
  --overlay: rgba(8,14,26,0.5);
  --shadow: 0 8px 32px rgba(30,60,114,0.15);
  --shadow-lg: 0 16px 48px rgba(30,60,114,0.2);
  --shadow-card: 0 4px 24px rgba(30,60,114,0.1);
  --glass-bg: rgba(255,255,255,0.8);
  --glass-border: rgba(30,60,114,0.1);
}

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s, color 0.3s;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent-hover); }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ── Theme toggle (floating) ──────────────────────────────── */
.theme-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9000;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bh-yellow);
  color: var(--bh-blue-deep);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 4px 20px rgba(250,202,49,0.4);
  transition: var(--transition);
}
.theme-toggle:hover { transform: scale(1.1); background: var(--bh-yellow-hover); }

/* ── Dark/Light toggle inline (for header) ────────────────── */
.toggle-theme-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: var(--transition);
}
.toggle-theme-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ── Container ────────────────────────────────────────────── */
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* ── Typography ───────────────────────────────────────────── */
h1,h2,h3,h4,h5,h6 { font-weight: 700; line-height: 1.2; color: var(--text-primary); }
h1 { font-size: clamp(1.8rem, 4vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.5rem); }

/* ── Logo ─────────────────────────────────────────────────── */
.bh-logo { height: 100px; width: auto; object-fit: contain; }
.bh-logo-sm { height: 75px; }
.bh-logo-lg { height: 140px; }

/* ── BH Brand Header ──────────────────────────────────────── */
.bh-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.bh-header-left { display: flex; align-items: center; gap: 16px; }
.bh-header-right { display: flex; align-items: center; gap: 12px; }

/* ── Site Header ──────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

/* ── Logo component ───────────────────────────────────────── */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo img { height: 100px; width: auto; object-fit: contain; }
.logo-mark {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--bh-yellow) 0%, var(--bh-yellow-dark) 100%);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  color: var(--bh-blue-deep);
  flex-shrink: 0;
}
.logo-text {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}
.logo-text span {
  display: block;
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ── Nav ──────────────────────────────────────────────────── */
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}
.nav-link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
  text-decoration: none;
}
.nav-link:hover { color: var(--text-primary); }
.nav-link.active { color: var(--gold); }

/* ── Badges ───────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.badge-publicado { background: rgba(34,197,94,0.15); color: #22c55e; border: 1px solid rgba(34,197,94,0.3); }
.badge-borrador { background: rgba(245,158,11,0.15); color: #f59e0b; border: 1px solid rgba(245,158,11,0.3); }
.badge-vendido { background: rgba(239,68,68,0.15); color: #ef4444; border: 1px solid rgba(239,68,68,0.3); }
.badge-reservado { background: rgba(59,130,246,0.15); color: #3b82f6; border: 1px solid rgba(59,130,246,0.3); }
.badge-3d { background: rgba(250,202,49,0.15); color: var(--bh-yellow); border: 1px solid rgba(250,202,49,0.3); }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
  font-family: inherit;
}
.btn-primary {
  background: var(--bh-yellow);
  color: var(--bh-blue-deep);
  box-shadow: 0 4px 16px rgba(250,202,49,0.3);
}
.btn-primary:hover {
  background: var(--bh-yellow-hover);
  color: var(--bh-blue-deep);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(250,202,49,0.4);
}
.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--border);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-blue {
  background: var(--bh-blue-mid);
  color: #fff;
}
.btn-blue:hover { background: var(--bh-blue-deep); color: #fff; transform: translateY(-2px); }
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: none;
}
.btn-ghost:hover { color: var(--gold); background: rgba(250,202,49,0.07); }
.btn-danger { background: rgba(239,68,68,0.15); color: #ef4444; border: 1px solid rgba(239,68,68,0.3); }
.btn-danger:hover { background: #ef4444; color: #fff; }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-xl { padding: 1rem 2rem; font-size: 1.1rem; }
.w-full { width: 100%; }

/* ── Forms ────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; display: flex; flex-direction: column; gap: 6px; }
.form-label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--input-bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: inherit;
  transition: var(--transition);
  outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(250,202,49,0.1);
}
.form-textarea { resize: vertical; min-height: 100px; }
.form-select { appearance: none; cursor: pointer; }

/* ── Card ─────────────────────────────────────────────────── */
.card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: var(--transition);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
}

/* ── Spinner ──────────────────────────────────────────────── */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(250,202,49,0.15);
  border-top-color: var(--bh-yellow);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.spinner-sm { width: 1rem; height: 1rem; border-width: 2px; }
.spinner-lg { width: 3rem; height: 3rem; border-width: 3px; }

/* ── Toasts ───────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  min-width: 280px;
  max-width: 400px;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.88rem;
  font-weight: 500;
  animation: slideInRight 0.3s cubic-bezier(0.4,0,0.2,1);
  pointer-events: all;
  position: relative;
}
.toast.removing { animation: slideOutRight 0.25s cubic-bezier(0.4,0,0.2,1) forwards; }
.toast-icon {
  width: 20px; height: 20px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}
.toast-success { border-left: 4px solid var(--success); }
.toast-success .toast-icon { background: rgba(34,197,94,0.2); color: var(--success); }
.toast-error { border-left: 4px solid var(--error); }
.toast-error .toast-icon { background: rgba(239,68,68,0.2); color: var(--error); }
.toast-warning { border-left: 4px solid var(--warning); }
.toast-warning .toast-icon { background: rgba(245,158,11,0.2); color: var(--warning); }
.toast-info { border-left: 4px solid var(--info); }
.toast-info .toast-icon { background: rgba(59,130,246,0.2); color: var(--info); }
.toast-close {
  margin-left: auto;
  opacity: 0.5;
  font-size: 14px;
  line-height: 1;
  padding: 2px 4px;
  cursor: pointer;
  background: none;
  border: none;
  color: var(--text-primary);
  transition: var(--transition-fast);
}
.toast-close:hover { opacity: 1; }

/* ── Divider ──────────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 20px 0; }
.divider-gold {
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  height: 1px;
  opacity: 0.4;
}

/* ── Skeleton shimmer ─────────────────────────────────────── */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--surface-1) 0px,
    var(--surface-2) 200px,
    var(--surface-1) 400px
  );
  background-size: 600px;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: var(--radius);
}

/* ── Animations ───────────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideOutRight { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(24px); } }
@keyframes shimmer { 0% { background-position: -600px 0; } 100% { background-position: 600px 0; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
@keyframes gradientShift { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }

.fade-in, .animate-fadeIn { animation: fadeIn 0.4s ease forwards; }
.slide-up, .animate-slideUp { animation: slideUp 0.4s cubic-bezier(0.4,0,0.2,1) forwards; }
.animate-scaleIn { animation: scaleIn 0.3s cubic-bezier(0.4,0,0.2,1) forwards; }

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
  background: var(--surface-1);
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-12) 0 var(--space-8);
  margin-top: var(--space-20);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}
.footer-brand p {
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  max-width: 280px;
  line-height: 1.7;
}
.footer-heading {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-4);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.footer-links { display: flex; flex-direction: column; gap: var(--space-2); }
.footer-link {
  font-size: var(--text-sm);
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition-fast);
}
.footer-link:hover { color: var(--gold); }
.footer-bottom {
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* ── Responsive grid ──────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--bh-blue-mid); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--bh-yellow); }
::selection { background: rgba(250,202,49,0.3); color: var(--text-primary); }

/* ── Utility ──────────────────────────────────────────────── */
.text-gold, .text-accent { color: var(--bh-yellow); }
.text-blue { color: var(--bh-blue-mid); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.mt-1{margin-top:4px}.mt-2{margin-top:8px}.mt-3{margin-top:16px}.mt-4{margin-top:24px}.mt-5{margin-top:40px}
.mb-1{margin-bottom:4px}.mb-2{margin-bottom:8px}.mb-3{margin-bottom:16px}.mb-4{margin-bottom:24px}
.gap-2{gap:8px}.gap-3{gap:16px}.gap-4{gap:16px}
.flex{display:flex}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-between{justify-content:space-between}.flex-wrap{flex-wrap:wrap}
.hidden{display:none!important}
.rounded{border-radius:var(--radius)}

/* ── Topbar social action button ──────────────────────────── */
.topbar-action-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.topbar-action-btn:hover { border-color: var(--gold); color: var(--gold); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  :root { --header-h: 60px; }
  .container { padding: 0 16px; }
  .nav-links { display: none; }
  .grid-2,.grid-3,.grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: var(--space-6); }
  .footer-bottom { flex-direction: column; gap: var(--space-2); text-align: center; }
}
@media (max-width: 480px) {
  .container { padding: 0 12px; }
  .btn-xl { padding: 0.75rem 1.5rem; font-size: var(--text-base); }
}
