/* ==========================================================
   DIRECTORIO RESIDENCIAL - CORE DESIGN SYSTEM
   Modern, Mobile-First CSS Architecture (v2.3)
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  /* User Custom Palette: #f2e5dc, #bf7e7b, #c36c6e */
  --brand-primary: #c36c6e;
  --brand-primary-hover: #b05b5d;
  --brand-primary-light: #fdf5f4;
  --brand-primary-border: #f4d4d3;

  --brand-accent: #bf7e7b;
  --brand-accent-light: #fdf8f6;
  --brand-warm-bg: #f2e5dc;
  --brand-dark: #231b1b;
  --brand-surface: #362928;

  /* Neutral Surfaces & Texts */
  --bg-body: #fcf9f7;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --bg-subtle: #f7ede7;
  --bg-glass: rgba(255, 255, 255, 0.96);

  --text-main: #231b1b;
  --text-muted: #6e5c5b;
  --text-light: #9e8a89;
  --text-inverse: #ffffff;

  /* Status Colors */
  --color-success: #10b981;
  --color-success-bg: #ecfdf5;
  --color-warning: #f59e0b;
  --color-warning-bg: #fffbeb;
  --color-danger: #ef4444;
  --color-danger-bg: #fef2f2;
  --color-info: #0ea5e9;
  --color-info-bg: #f0f9ff;

  /* WhatsApp Brand Color */
  --color-whatsapp: #25d366;
  --color-whatsapp-hover: #1ebd5a;
  --color-whatsapp-dark: #075e54;

  /* Borders & Radii */
  --border-subtle: #ebdcd5;
  --border-medium: #dfcdc4;
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(35, 27, 27, 0.04);
  --shadow-sm: 0 2px 4px rgba(35, 27, 27, 0.06);
  --shadow-md: 0 4px 14px rgba(35, 27, 27, 0.08);
  --shadow-lg: 0 10px 24px rgba(35, 27, 27, 0.12);
  --shadow-xl: 0 18px 36px rgba(35, 27, 27, 0.15);

  /* Typography */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Layout */
  --container-max: 1200px;
  --header-height: 60px;
  --bottom-nav-height: 60px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-main);
  background-color: var(--bg-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 0px));
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (min-width: 1024px) {
  body {
    padding-bottom: 0;
    font-size: 1rem;
  }
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.25;
}

p {
  color: var(--text-muted);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

img, svg {
  display: block;
  max-width: 100%;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  outline: none;
}

.tabular-nums {
  font-variant-numeric: tabular-nums;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 768px) {
  .container {
    padding-left: 1.75rem;
    padding-right: 1.75rem;
  }
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: var(--bg-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  height: var(--header-height);
  display: flex;
  align-items: center;
  transition: box-shadow 0.2s ease;
}

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

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

.brand-title-link {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1 1 auto;
}

.brand-main-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--brand-dark);
  line-height: 1.15;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (min-width: 640px) {
  .brand-main-title {
    font-size: 1.25rem;
  }
}

.brand-main-title span {
  color: var(--brand-primary);
}

.brand-subtitle-badge {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--brand-accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

@media (min-width: 640px) {
  .brand-subtitle-badge {
    font-size: 0.68rem;
  }
}

.desktop-nav {
  display: none;
  align-items: center;
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .desktop-nav {
    display: flex;
  }
}

.nav-link {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.15s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--brand-primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.header-publish-btn {
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(195, 108, 110, 0.25);
  background-color: var(--brand-primary);
  color: #ffffff;
}

@media (min-width: 640px) {
  .header-publish-btn {
    padding: 0.45rem 1rem;
    font-size: 0.85rem;
  }
}

.header-publish-btn:hover {
  background-color: var(--brand-primary-hover);
}

/* Announcement Top Banner */
.announcement-banner {
  background: linear-gradient(90deg, #362928, #c36c6e);
  color: #ffffff;
  padding: 0.4rem 1rem;
  font-size: 0.78rem;
  font-weight: 500;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.announcement-banner .badge {
  background-color: var(--brand-warm-bg);
  color: var(--brand-dark);
  font-weight: 700;
  font-size: 0.68rem;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-xs);
}

/* Bottom Mobile Navigation Bar (3 items) */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background-color: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-subtle);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  z-index: 100;
  box-shadow: 0 -4px 16px rgba(43, 31, 30, 0.08);
}

@media (min-width: 1024px) {
  .bottom-nav {
    display: none;
  }
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0;
  transition: color 0.15s ease, transform 0.15s ease;
  user-select: none;
}

.bottom-nav-item svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.8;
  transition: stroke 0.15s ease, transform 0.15s ease;
}

.bottom-nav-item.active {
  color: var(--brand-primary);
}

.bottom-nav-item.active svg {
  stroke: var(--brand-primary);
  transform: translateY(-2px);
}

.bottom-nav-item:active {
  transform: scale(0.92);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.6rem 1.15rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.12s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  text-align: center;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.96);
}

.btn-primary {
  background-color: var(--brand-primary);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(195, 108, 110, 0.25);
}

.btn-primary:hover {
  background-color: var(--brand-primary-hover);
  box-shadow: 0 4px 12px rgba(195, 108, 110, 0.35);
}

.btn-whatsapp {
  background-color: var(--color-whatsapp) !important;
  color: #ffffff !important;
  border: 1px solid #1ebd5a !important;
  box-shadow: 0 3px 10px rgba(37, 211, 102, 0.35) !important;
  font-weight: 700 !important;
}

.btn-whatsapp:hover {
  background-color: var(--color-whatsapp-hover) !important;
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.45) !important;
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--bg-card);
  color: var(--text-main);
  border-color: var(--border-medium);
}

.btn-secondary:hover {
  background-color: var(--bg-subtle);
  border-color: var(--brand-accent);
}

.btn-ghost {
  background-color: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  background-color: var(--bg-subtle);
  color: var(--text-main);
}

.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 0.8rem 1.5rem;
  font-size: 1rem;
  border-radius: var(--radius-lg);
}

.btn-icon {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Sections Structure & Headings */
.section {
  padding-top: 2.25rem;
  padding-bottom: 2.25rem;
}

@media (min-width: 768px) {
  .section {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.section-title-wrap {
  flex: 1 1 260px;
}

.section-title-wrap h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
}

@media (min-width: 768px) {
  .section-title-wrap h2 {
    font-size: 1.65rem;
  }
}

.section-title-wrap p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

.section-link {
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--brand-primary);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
  padding: 0.25rem 0;
}

.section-link:hover {
  color: var(--brand-primary-hover);
  text-decoration: underline;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(180deg, var(--brand-warm-bg) 0%, var(--bg-body) 100%);
  padding: 1.75rem 0 1.75rem;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border-subtle);
}

@media (min-width: 768px) {
  .hero-section {
    padding: 3rem 0 2.75rem;
  }
}

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

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.8rem;
  background-color: #ffffff;
  border: 1px solid var(--brand-primary-border);
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--brand-primary);
  box-shadow: var(--shadow-xs);
  margin-bottom: 0.75rem;
}

.hero-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--brand-primary);
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.3); }
}

.hero-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--brand-dark);
  margin-bottom: 0.5rem;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 2.75rem;
    line-height: 1.15;
    margin-bottom: 0.85rem;
  }
}

.hero-title span {
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  line-height: 1.5;
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 768px) {
  .hero-subtitle {
    font-size: 1.05rem;
    margin-bottom: 1.85rem;
  }
}

/* Unified Mobile-First Search & Category Card/Bar (Fixed Height & Zero Gap) */
.search-bar-unified {
  background: #ffffff;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 0.65rem;
  box-shadow: 0 4px 14px rgba(35, 27, 27, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 720px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .search-bar-unified {
    flex-direction: row;
    align-items: center;
    border-radius: var(--radius-full);
    padding: 0.35rem 0.45rem 0.35rem 1.25rem;
    gap: 0.65rem;
  }
}

.search-bar-unified:focus-within {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 4px rgba(195, 108, 110, 0.15), var(--shadow-lg);
}

.search-bar-input-group {
  display: flex;
  align-items: center;
  background: var(--bg-body);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0 0.85rem;
  height: 46px;
  width: 100%;
  flex: none;
}

@media (min-width: 768px) {
  .search-bar-input-group {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    height: auto;
    flex: 1 1 auto;
    width: auto;
  }
}

.search-bar-input-group .search-icon {
  color: var(--brand-accent);
  margin-right: 0.65rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.search-bar-input {
  width: 100%;
  height: 100%;
  border: none;
  background: transparent;
  font-size: 0.925rem;
  color: var(--text-main);
  font-weight: 500;
}

.search-bar-input::placeholder {
  color: var(--text-light);
}

.search-bar-divider {
  display: none;
  width: 1px;
  height: 26px;
  background-color: var(--border-medium);
}

@media (min-width: 768px) {
  .search-bar-divider {
    display: block;
  }
}

.search-bar-select-group {
  display: flex;
  align-items: center;
  background: var(--bg-body);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0 0.85rem;
  height: 46px;
  width: 100%;
  flex: none;
}

@media (min-width: 768px) {
  .search-bar-select-group {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    height: auto;
    flex: 0 1 210px;
    width: auto;
  }
}

.search-bar-category-select {
  width: 100%;
  height: 100%;
  border: none;
  background: transparent;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2214%22%20height%3D%2214%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23bf7e7b%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpolyline%20points%3D%226%209%2012%2015%2018%209%22%3E%3C%2Fpolyline%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 0.25rem center;
  padding-right: 1.5rem;
}

.search-bar-submit-btn {
  height: 46px;
  width: 100%;
  border-radius: var(--radius-md);
  padding: 0 1.25rem;
  font-weight: 700;
}

@media (min-width: 768px) {
  .search-bar-submit-btn {
    width: auto;
    height: 40px;
    border-radius: var(--radius-full);
  }
}

/* Stats Counter Pill */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-top: 1.25rem;
  background: #ffffff;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--brand-dark);
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Grid Layouts */
.business-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .business-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.35rem;
  }
}

@media (min-width: 1024px) {
  .business-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}

/* Footer */
.site-footer {
  background-color: var(--brand-dark);
  color: #9e8a89;
  padding: 3rem 0 1.75rem;
  margin-top: auto;
  font-size: 0.875rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.footer-brand h3 {
  color: #ffffff;
  font-size: 1.25rem;
  margin-bottom: 0.65rem;
}

.footer-links-title {
  color: #ffffff;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.85rem;
}

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

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.8rem;
  text-align: center;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    text-align: left;
  }
}

/* Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.hidden { display: none !important; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }
.w-full { width: 100%; }
