/* CasaChapín - Modern Real Estate Platform */
/* Design inspired by Airbnb & Zillow */

:root {
  /* Colors - Clean & Modern */
  --primary: #E07A5F;
  --primary-dark: #c86a51;
  --primary-light: #f39881;
  --secondary: #3D405B;
  --accent: #81B29A;
  --accent-dark: #6fa285;
  
  --text-primary: #222222;
  --text-secondary: #717171;
  --text-light: #b0b0b0;
  
  --bg-white: #FFFFFF;
  --bg-light: #F7F7F7;
  --bg-card: #FFFFFF;
  
  --border-light: #EBEBEB;
  --border-medium: #DDDDDD;
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 0.75rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.15);
  --shadow-xl: 0 16px 32px rgba(0, 0, 0, 0.18);
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.2s ease;
  --transition-slow: 0.3s ease;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  color: var(--text-primary);
  background: #FAFAF8;
  line-height: 1.6;
  overflow-x: hidden;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-base);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  transition: var(--transition-base);
}

input, select, textarea {
  font-family: inherit;
  font-size: 1rem;
}

/* Typography */
h1 {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.3;
}

h4 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.4;
}

h5 {
  font-size: 1.125rem;
  font-weight: 600;
}

h6 {
  font-size: 1rem;
  font-weight: 600;
}

@media (max-width: 768px) {
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.35rem; }
}

/* Container */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--spacing-xl);
}

.container-wide {
  max-width: 1600px;
}

@media (max-width: 768px) {
  .container {
    padding: 0 var(--spacing-md);
  }
}

/* Header & Navbar */
.header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.98);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-md) 0;
  height: 80px;
}

/* Logo - Poppins Bold with House Icon */
.logo {
  font-family: 'Poppins', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: -0.01em;
  position: relative;
  text-decoration: none;
}

.logo .logo-accent {
  color: var(--primary);
}

.logo .logo-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
  margin-left: 3px;
  align-self: flex-end;
  margin-bottom: 5px;
}

.logo-icon {
  display: flex;
  align-items: center;
}

.logo-icon svg {
  width: 28px;
  height: 28px;
  stroke: var(--primary);
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.logo::before {
  display: none;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: var(--spacing-md);
  align-items: center;
}

.nav-menu a {
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.9375rem;
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-lg);
  transition: var(--transition-base);
}

.nav-menu a:hover {
  background: var(--bg-light);
}

.nav-menu a.active {
  background: var(--bg-light);
}

.mobile-menu-btn {
  display: none;
  font-size: 1.5rem;
  color: var(--text-primary);
  padding: var(--spacing-sm);
}

@media (max-width: 768px) {
  .navbar {
    height: 64px;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .nav-menu {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-white);
    flex-direction: column;
    gap: 0;
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-lg);
    display: none;
    border-top: 1px solid var(--border-light);
  }
  
  .nav-menu.active {
    display: flex;
  }
  
  .nav-menu li {
    width: 100%;
  }
  
  .nav-menu a {
    width: 100%;
    padding: var(--spacing-md);
    display: block;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xs);
  padding: 0.875rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9375rem;
  text-align: center;
  transition: var(--transition-base);
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.btn-primary:hover {
  background: #c86a51;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--secondary);
  color: white;
}

.btn-secondary:hover {
  background: #2d2f43;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--text-primary);
  color: var(--text-primary);
}

.btn-outline:hover {
  background: var(--text-primary);
  color: white;
}

.btn-light {
  background: var(--bg-white);
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
}

.btn-light:hover {
  background: var(--bg-light);
  border-color: var(--text-primary);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 1.125rem 2rem;
  font-size: 1.0625rem;
}

/* Hero Section - Airbnb Style */
.hero {
  background: linear-gradient(135deg, #E07A5F 0%, #F4A261 100%);
  padding: var(--spacing-3xl) 0 var(--spacing-3xl);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -50%;
  left: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 960px;
  margin: 0 auto;
}

.hero h1 {
  margin-bottom: var(--spacing-md);
  color: white;
}

.hero p {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: var(--spacing-2xl);
  font-weight: 400;
}

@media (max-width: 768px) {
  .hero {
    padding: var(--spacing-2xl) 0;
  }
  
  .hero p {
    font-size: 1.0625rem;
  }
}

/* Search Box - Airbnb Style */
.search-box {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  max-width: 1040px;
  margin: 0 auto;
  border: none;
}

.search-form {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.form-group {
  background: var(--bg-white);
  padding: var(--spacing-md) var(--spacing-lg);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
  position: relative;
}

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

.form-control {
  padding: var(--spacing-sm) var(--spacing-md);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  color: var(--text-primary);
  background: var(--bg-white);
  outline: none;
  font-weight: 400;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
}

select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--spacing-md) center;
  padding-right: var(--spacing-xl);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(224, 122, 95, 0.1);
}

.form-group:last-child {
  padding: var(--spacing-sm);
}

.form-group:last-child .btn {
  width: 100%;
  height: 100%;
  min-height: 56px;
}

@media (max-width: 968px) {
  .search-form {
    grid-template-columns: 1fr;
  }
  
  .form-group:last-child .btn {
    min-height: 48px;
  }
}

/* Property Grid */
.properties-section {
  padding: var(--spacing-3xl) 0;
}

.properties-section.warm-bg {
  background: #FFF5F2;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-2xl);
}

.property-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--spacing-xl);
}

@media (max-width: 640px) {
  .property-grid {
    grid-template-columns: 1fr;
  }
}

/* Property Card - Airbnb Style */
.property-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: visible;
  transition: var(--transition-base);
  cursor: pointer;
  position: relative;
  border: 1px solid transparent;
}

.property-card:hover {
  transform: translateY(-4px);
  border-color: #F4A261;
}

.property-card:hover .property-image img {
  transform: scale(1.05);
}

.property-image {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--bg-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: var(--transition-base);
}

.property-card:hover .property-image {
  box-shadow: 0 8px 24px rgba(224, 122, 95, 0.25);
}

.property-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.property-badge {
  position: absolute;
  top: var(--spacing-md);
  left: var(--spacing-md);
  background: var(--bg-white);
  color: var(--text-primary);
  padding: var(--spacing-xs) var(--spacing-md);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: var(--shadow-sm);
}

.property-badge.venta {
  background: #4CAF50;
  color: white;
}

.property-badge.renta {
  background: #2196F3;
  color: white;
}

.favorite-btn {
  position: absolute;
  top: var(--spacing-md);
  right: var(--spacing-md);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-base);
  box-shadow: var(--shadow-sm);
  opacity: 0;
}

.property-card:hover .favorite-btn {
  opacity: 1;
}

.favorite-btn:hover {
  transform: scale(1.1);
  background: white;
}

.favorite-btn.active {
  opacity: 1;
}

.favorite-btn svg {
  width: 20px;
  height: 20px;
  stroke: var(--primary);
  fill: none;
  stroke-width: 2;
}

.favorite-btn.active svg {
  fill: var(--primary);
}

.property-info {
  padding: var(--spacing-md) 0 0;
}

.property-location {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: var(--spacing-xs);
  font-weight: 500;
}

.property-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--spacing-xs);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.property-features {
  display: flex;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-sm);
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.property-price {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: var(--spacing-sm);
}

.property-price-usd {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 400;
  margin-left: var(--spacing-xs);
}

/* Filters Panel - Sticky Sidebar */
.filters-panel {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  position: sticky;
  top: 100px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.filter-group {
  margin-bottom: var(--spacing-xl);
  padding-bottom: var(--spacing-xl);
  border-bottom: 1px solid var(--border-light);
}

.filter-group:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.filter-group h4 {
  margin-bottom: var(--spacing-md);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 600;
}

/* Map Container */
.map-container {
  height: 500px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-light);
  background: var(--bg-light);
}

#map {
  height: 100%;
  width: 100%;
}

/* Property Detail Page */
.property-detail {
  padding: var(--spacing-xl) 0 var(--spacing-3xl);
}

/* Photo Gallery - Airbnb Style */
.property-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 280px);
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-2xl);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.gallery-item {
  position: relative;
  cursor: pointer;
  overflow: hidden;
  background: var(--bg-light);
}

.gallery-item:first-child {
  grid-column: 1 / 3;
  grid-row: 1 / 3;
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.gallery-item:nth-child(2) {
  border-radius: 0 var(--radius-lg) 0 0;
}

.gallery-item:nth-child(4) {
  border-radius: 0 0 var(--radius-lg) 0;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-item:last-child::after {
  content: 'Ver todas las fotos';
  position: absolute;
  bottom: var(--spacing-md);
  right: var(--spacing-md);
  background: var(--bg-white);
  color: var(--text-primary);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: var(--shadow-md);
}

@media (max-width: 968px) {
  .property-gallery {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(3, 240px);
    border-radius: var(--radius-md);
  }
  
  .gallery-item:first-child {
    grid-column: 1;
    grid-row: 1 / 3;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
  }
  
  .gallery-item:nth-child(2),
  .gallery-item:nth-child(4) {
    border-radius: 0;
  }
  
  .gallery-item:nth-child(3),
  .gallery-item:nth-child(4) {
    display: none;
  }
  
  .gallery-item:last-child::after {
    content: 'Ver fotos';
  }
}

/* Property Main Info Layout */
.property-main-info {
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  gap: var(--spacing-3xl);
  align-items: start;
}

@media (max-width: 968px) {
  .property-main-info {
    grid-template-columns: 1fr;
    gap: var(--spacing-2xl);
  }
}

.property-details {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: var(--spacing-2xl);
  border: 1px solid var(--border-light);
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--spacing-xl);
  padding: var(--spacing-2xl) 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  margin: var(--spacing-xl) 0;
}

.detail-item {
  text-align: left;
}

.detail-icon {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-xs);
  opacity: 0.8;
}

.detail-value {
  display: block;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.detail-label {
  display: block;
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 400;
}

.amenities-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--spacing-md);
  list-style: none;
  margin-top: var(--spacing-md);
}

.amenities-list li {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  font-size: 0.9375rem;
  padding: var(--spacing-md);
  border-radius: var(--radius-sm);
  background: var(--bg-light);
}

/* Agent Card - Sticky Sidebar */
.agent-card {
  background: #FFF5F2;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  position: sticky;
  top: 100px;
  box-shadow: var(--shadow-md);
}

.agent-profile {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-xl);
  padding-bottom: var(--spacing-xl);
  border-bottom: 1px solid var(--border-light);
}

.agent-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-light);
}

.agent-info h4 {
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  font-size: 1rem;
}

.agent-specialty {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.agent-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-md);
  padding-bottom: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
  border-bottom: 1px solid var(--border-light);
}

.stat {
  text-align: left;
}

.stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.contact-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

/* Mortgage Calculator */
.mortgage-calculator {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--spacing-2xl);
  margin-top: var(--spacing-xl);
}

.calculator-inputs {
  display: grid;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
}

.calculator-result {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
  border-radius: var(--radius-md);
  padding: var(--spacing-2xl);
  text-align: center;
  color: white;
}

.monthly-payment {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: var(--spacing-xs);
}

.payment-label {
  font-size: 0.875rem;
  opacity: 0.9;
}

/* Footer */
.footer {
  background: #2D3748;
  border-top: none;
  padding: var(--spacing-3xl) 0 var(--spacing-xl);
  margin-top: var(--spacing-3xl);
  color: rgba(255, 255, 255, 0.9);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-2xl);
  margin-bottom: var(--spacing-2xl);
}

.footer-section h4 {
  margin-bottom: var(--spacing-md);
  color: white;
  font-size: 0.875rem;
  font-weight: 700;
}

.footer-section p {
  color: rgba(255, 255, 255, 0.7);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: var(--spacing-sm);
  color: rgba(255, 255, 255, 0.7);
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
  transition: var(--transition-base);
}

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

.footer-bottom {
  text-align: center;
  padding-top: var(--spacing-xl);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
}

/* Loading States */
.loading {
  text-align: center;
  padding: var(--spacing-3xl);
  color: var(--text-secondary);
}

.spinner {
  border: 3px solid var(--border-light);
  border-top: 3px solid var(--primary);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  animation: spin 0.8s linear infinite;
  margin: 0 auto var(--spacing-lg);
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.4s ease-out;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.96);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-xl);
}

.lightbox.active {
  display: flex;
}

.lightbox-content {
  max-width: 90vw;
  max-height: 90vh;
  position: relative;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius-md);
}

.lightbox-close {
  position: absolute;
  top: -48px;
  right: 0;
  background: transparent;
  color: white;
  font-size: 2rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 50%;
  transition: var(--transition-base);
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  color: white;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  border-radius: 50%;
  transition: var(--transition-base);
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lightbox-prev {
  left: var(--spacing-xl);
}

.lightbox-next {
  right: var(--spacing-xl);
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: var(--spacing-md); }
.mt-2 { margin-top: var(--spacing-lg); }
.mt-3 { margin-top: var(--spacing-xl); }
.mb-1 { margin-bottom: var(--spacing-md); }
.mb-2 { margin-bottom: var(--spacing-lg); }
.mb-3 { margin-bottom: var(--spacing-xl); }
.hidden { display: none !important; }

@media (max-width: 768px) {
  .hide-mobile { display: none !important; }
}

@media (min-width: 769px) {
  .hide-desktop { display: none !important; }
}

/* Mobile Bottom Navigation */
@media (max-width: 768px) {
  .mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-white);
    border-top: 1px solid var(--border-light);
    padding: var(--spacing-sm) 0;
    z-index: 99;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
  }
  
  .mobile-bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    padding: var(--spacing-xs);
    transition: var(--transition-fast);
  }
  
  .mobile-bottom-nav a.active {
    color: var(--primary);
  }
  
  .mobile-bottom-nav svg {
    width: 24px;
    height: 24px;
  }
  
  body {
    padding-bottom: 70px;
  }
}

/* Agent Directory Cards */
.agents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--spacing-xl);
}

.agent-directory-card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  text-align: center;
  transition: var(--transition-base);
  cursor: pointer;
}

.agent-directory-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.agent-directory-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin: 0 auto var(--spacing-md);
  object-fit: cover;
  border: 3px solid var(--border-light);
}

.agent-rating {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  color: #FDB022;
  margin-bottom: var(--spacing-md);
  font-size: 0.875rem;
}

.agent-zones {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xs);
  justify-content: center;
  margin: var(--spacing-md) 0;
}

.zone-tag {
  background: var(--bg-light);
  color: var(--text-secondary);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
}

/* Form Styles */
.publish-form {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--spacing-2xl);
  max-width: 800px;
  margin: 0 auto;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

/* Smooth scrolling behavior */
html {
  scroll-padding-top: 100px;
}

/* ============================================================================
   AUTH UI STYLES
   ============================================================================ */

/* Modal Base Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease;
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  max-width: 480px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-xl) var(--spacing-2xl);
  border-bottom: 1px solid var(--border-light);
}

.modal-header h3 {
  margin: 0;
  font-size: 1.5rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 2rem;
  line-height: 1;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: var(--bg-light);
  color: var(--text-primary);
}

.modal-body {
  padding: var(--spacing-2xl);
}

.modal-footer {
  border-top: 1px solid var(--border-light);
  padding: var(--spacing-lg) var(--spacing-2xl);
}

/* Auth Buttons in Navbar */
.auth-buttons {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.btn-text {
  background: none;
  border: none;
  color: var(--text-primary);
  padding: var(--spacing-sm) var(--spacing-md);
  font-weight: 500;
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.btn-text:hover {
  background: var(--bg-light);
  color: var(--primary);
}

/* User Dropdown */
.user-dropdown {
  position: relative;
}

.user-btn {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  background: none;
  border: 1px solid var(--border-light);
  border-radius: 100px;
  padding: 0.375rem 0.75rem 0.375rem 0.375rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.user-btn:hover {
  border-color: var(--border-dark);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.user-avatar,
.user-avatar-placeholder {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.user-avatar-placeholder {
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
}

.user-name {
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--text-primary);
}

.user-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  min-width: 220px;
  padding: var(--spacing-sm);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 1000;
}

.user-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-menu-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-md);
  color: var(--text-primary);
  text-decoration: none;
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  transition: all 0.2s ease;
}

.user-menu-item:hover {
  background: var(--bg-light);
  color: var(--primary);
}

.user-menu-item svg {
  flex-shrink: 0;
}

.user-menu-divider {
  height: 1px;
  background: var(--border-light);
  margin: var(--spacing-sm) 0;
}

/* Form Divider */
.divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin: var(--spacing-xl) 0;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-light);
}

.divider::before {
  margin-right: var(--spacing-md);
}

.divider::after {
  margin-left: var(--spacing-md);
}

/* Notifications */
.notification {
  position: fixed;
  bottom: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text-primary);
  color: white;
  padding: var(--spacing-md) var(--spacing-xl);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  z-index: 10001;
  transition: bottom 0.3s ease;
  max-width: 90%;
  text-align: center;
  font-weight: 500;
}

.notification.show {
  bottom: var(--spacing-2xl);
}

.notification-success {
  background: #10b981;
}

.notification-error {
  background: #ef4444;
}

.notification-info {
  background: #3b82f6;
}

/* Modal Form Controls */
.modal .form-control {
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: var(--spacing-sm) var(--spacing-md);
  background: var(--bg-white);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .auth-buttons {
    flex-direction: column;
    gap: var(--spacing-sm);
    width: 100%;
  }
  
  .auth-buttons .btn {
    width: 100%;
    justify-content: center;
  }
  
  .user-name {
    display: none;
  }
  
  .modal-content {
    width: 95%;
    max-height: 95vh;
  }
  
  .modal-body {
    padding: var(--spacing-lg);
  }
}
