:root {
  /* Daylight Gold & Corporate Blue Design System */
  --bg-deep-navy: #f8fafc;
  --brand-blue: #000082; /* Best House signature exact logo blue */
  --brand-blue-hover: #0000a0;
  --accent-amber: #ffda2a; /* Brand yellow from logo */
  --text-slate: #1e293b;
  
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(0, 0, 0, 0.05);
  --glass-blur: blur(16px);
  --glass-gradient-border: linear-gradient(145deg, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0.2) 100%);
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-deep-navy);
  color: var(--text-slate);
  min-height: 100vh;
  /* Add a subtle background pattern or gradient here later */
}

/* Glassmorphism Pro Utilities */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur); /* Safari support */
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  padding: 2rem;
  
  /* The gradient border to look like carved glass */
  position: relative;
}

.glass-panel::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: 16px;
  padding: 1px;
  background: var(--glass-gradient-border);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.hero {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.95) 100%), url('https://images.unsplash.com/photo-1512917774080-9991f1c4c750?auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
  text-align: center;
}

.hero-search-card {
  width: 100%;
  max-width: 900px;
  background: #f8fafc; /* Very light subtle gray-white */
  border-radius: 16px;
  padding: 2rem 4rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
  margin-top: 1.5rem;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: #1e293b;
  letter-spacing: -1px;
}

.hero .subtitle {
  font-size: 1.25rem;
  color: #475569;
  margin-bottom: 1.5rem;
  font-weight: 500;
}

/* Fotocasa Inspired Search Form */
.fotocasa-search-box {
  margin-top: 1.5rem;
  width: 100%;
}

/* Tabs */
.search-tabs {
  display: flex;
  background: transparent;
  border-bottom: 2px solid transparent;
  margin-bottom: 1rem;
}

.search-tab {
  flex: 1;
  padding: 1rem;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  color: #334155;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.search-tab:hover {
  color: var(--brand-blue);
}

.search-tab.active {
  color: var(--brand-blue);
  border-bottom-color: var(--brand-blue);
}

.search-tab.highlight-tab {
  background: #d1fae5; /* Very light green */
  color: #065f46;
  border-radius: 8px;
  border: none;
  margin-left: 1rem;
}

.search-tab.highlight-tab:hover {
  background: #a7f3d0;
}

/* Input Row */
.fotocasa-search-form {
  background: transparent;
}

.input-group {
  display: flex;
  background: #fff;
  border-radius: 8px;
  padding: 0.5rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  align-items: center;
  border: 1px solid #e2e8f0;
}

.select-wrapper {
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background: transparent;
  border-radius: 8px;
  border: none;
}

.home-icon {
  margin-right: 0.5rem;
  font-size: 1.1rem;
}

.select-wrapper select {
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 1rem;
  color: #334155;
  outline: none;
  cursor: pointer;
}

.divider {
  width: 1px;
  height: 24px;
  background: #cbd5e1;
  margin: 0 0.5rem;
}

.main-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1.1rem;
  font-family: inherit;
  color: #334155;
  padding: 0.5rem;
}

.main-input::placeholder {
  color: #94a3b8;
}

.fotocasa-search-btn {
  background: var(--accent-amber); /* Brand yellow */
  color: var(--brand-blue); /* Brand blue text */
  border: none;
  border-radius: 8px;
  padding: 0.8rem 2rem;
  font-weight: 800;
  font-size: 1.05rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.fotocasa-search-btn:hover {
  background: #fcd34d;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.properties-section {
  padding: 2rem 2rem 4rem;
  max-width: 1200px;
  margin: 0 auto;
}

.properties-section h2 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: var(--text-slate);
  text-align: center;
}

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

/* Refined Filters Bar (Match reference design) */
.filters-bar {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 0.8rem 1.5rem;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08); /* Clean, soft shadow */
  align-items: center;
  flex-wrap: wrap;
  border: 1px solid rgba(0,0,0,0.03);
}

.filters-bar strong {
  color: var(--brand-blue);
  font-size: 1.1rem;
  font-weight: 800;
  margin-right: 0.5rem;
}

.filters-bar select,
.filters-bar input {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: var(--text-slate);
  padding: 0.6rem 1rem;
  border-radius: 6px;
  outline: none;
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

.filters-bar select:focus,
.filters-bar input:focus {
  border-color: var(--brand-blue);
}

.filters-bar select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  background-size: 1em;
  padding-right: 2.5rem;
}

.filters-bar .btn-primary {
  padding: 0.6rem 2rem; /* slightly tighter padding for the bar */
}

/* Navigation Styles */
.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 15px;
  text-decoration: none;
}

.logo-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.logo-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--brand-blue);
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.logo-address {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 400;
  letter-spacing: 0;
  margin-top: 2px;
}

.logo img {
  height: 55px;
  width: auto;
  object-fit: contain;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.nav-links a {
  text-decoration: none;
  color: #475569;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: var(--brand-blue);
}

/* Empresa Section Styles */
.empresa-section {
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.empresa-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

@media (max-width: 768px) {
  .empresa-container {
    grid-template-columns: 1fr;
  }
}

.text-content {
  text-align: left;
  line-height: 1.8;
}

.text-content h2 {
  font-size: 2.5rem;
  color: var(--brand-blue);
  margin-bottom: 1.5rem;
}

.text-content p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  color: #475569;
}

.image-content {
  position: relative;
}

.empresa-img {
  width: 100%;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  border: 1px solid rgba(0,0,0,0.05);
  transition: transform 0.3s ease;
}

.empresa-img:hover {
  transform: translateY(-5px);
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  color: var(--brand-blue);
  margin-bottom: 3rem;
  font-weight: 700;
}

/* Features Section */
.features-section {
  padding: 4rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.feature-card {
  text-align: center;
  padding: 2.5rem 2rem;
  transition: transform 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: rgba(251, 191, 36, 0.4);
}

.feature-icon {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
}

.feature-card h3 {
  color: var(--brand-blue);
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

.feature-card p {
  color: #475569;
  line-height: 1.6;
}

/* Neighborhoods Section */
.neighborhoods-section {
  padding: 4rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.neighborhood-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.neighborhood-card {
  height: 380px; 
  border-radius: 24px;
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2.5rem 2rem;
  color: #fff;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  box-shadow: 0 15px 45px rgba(0,0,0,0.1);
  border: none; 
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.neighborhood-card::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.2) 60%, transparent 100%);
  z-index: 1;
}

.neighborhood-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.neighborhood-card h3 {
  font-size: 2rem;
  color: #f8fafc; /* Ivory white */
  font-weight: 800;
  margin-bottom: 0.8rem;
  z-index: 2;
  letter-spacing: -0.02em;
}

.neighborhood-card p {
  color: #f1f5f9;
  line-height: 1.6;
  font-size: 1rem;
  opacity: 0.95;
  z-index: 2;
}

/* Testimonials Section */
.testimonials-section {
  padding: 4rem 2rem;
  max-width: 1000px;
  margin: 0 auto;
  background: radial-gradient(circle at center, rgba(241, 245, 249, 0.8) 0%, transparent 70%);
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.testimonial-card {
  padding: 2rem;
  position: relative;
}

.testimonial-card .stars {
  margin-bottom: 1rem;
  letter-spacing: 2px;
}

.testimonial-card p {
  font-style: italic;
  color: #475569;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.testimonial-card .client-name {
  color: var(--accent-amber);
  font-weight: 600;
  text-align: right;
}

/* CTA Section */
.cta-section {
  padding: 6rem 2rem;
  display: flex;
  justify-content: center;
  background: url('https://images.unsplash.com/photo-1600607687939-ce8a6c25118c?auto=format&fit=crop&w=1920&q=80') center/cover fixed;
  position: relative;
}

.cta-section::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255, 255, 255, 0.85); /* Light overlay */
}

.cta-content {
  position: relative; /* Above overlay */
  max-width: 800px;
  text-align: center;
  padding: 4rem 3rem;
  border-color: rgba(251, 191, 36, 0.5);
}

.cta-content h2 {
  font-size: 2.5rem;
  color: var(--text-slate);
  margin-bottom: 1.5rem;
}

.cta-content p {
  color: #475569;
  font-size: 1.2rem;
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

.btn-primary {
  display: inline-block;
  background: var(--accent-amber);
  color: var(--brand-blue);
  padding: 0.8rem 1.8rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.btn-primary:hover {
  background: #fcd34d; /* Lighter yellow on hover */
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Base button styles for property cards */
.btn-card-primary, .btn-card-secondary {
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-card-primary {
  background: var(--accent-amber);
  color: var(--brand-blue);
}

.btn-card-primary:hover {
  background: #fcd34d;
}

.btn-card-secondary {
  background: transparent;
  color: var(--brand-blue);
  border-color: var(--brand-blue);
}

.btn-card-secondary:hover {
  background: rgba(0, 0, 130, 0.05);
}

/* Location Section */
.location-section {
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.location-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  padding: 0;
  background: rgba(255, 255, 255, 0.7);
}

@media (max-width: 768px) {
  .location-container {
    grid-template-columns: 1fr;
  }
}

.location-info {
  padding: 4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.location-info h2 {
  font-size: 2.2rem;
  color: var(--text-slate);
  margin-bottom: 2rem;
}

.info-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.info-item .icon {
  font-size: 1.5rem;
  margin-right: 1.2rem;
  margin-top: 0.2rem;
}

.info-item p {
  color: #475569;
  line-height: 1.6;
  font-size: 1.05rem;
}

.info-item a {
  color: var(--brand-blue);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s;
}

.info-item a:hover {
  color: var(--brand-blue-hover);
}

.google-badge {
  margin-top: 2rem;
  padding: 1rem 1.5rem;
  background: rgba(0,0,0,0.02);
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.05);
  display: inline-flex;
  align-items: center;
  gap: 1rem;
}

.google-badge p {
  color: #334155;
  margin: 0;
}

.location-map {
  min-height: 500px;
}

.location-map iframe {
  width: 100%;
  height: 100%;
}

.main-footer {
  background: #f8fafc;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  padding: 4rem 2rem 2rem;
  margin-top: 4rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer-col h3 {
  color: var(--brand-blue);
  margin-bottom: 1rem;
  font-size: 1.2rem;
  font-weight: 700;
}

.footer-col p {
  color: #64748b;
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.footer-col a {
  color: #64748b;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: var(--brand-blue);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: #64748b;
  font-size: 0.9rem;
}

/* ==========================================================================
   Mobile Responsive Styles (max-width: 768px)
   ========================================================================== */
@media (max-width: 768px) {
  /* General Spacing */
  section {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  /* Navigation */
  .nav-container {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }
  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }

  /* Hero Section */
  .hero h1 {
    font-size: 2.5rem;
  }
  .hero .subtitle {
    font-size: 1.1rem;
    margin-bottom: 2rem;
  }
  
  /* Filter Bar (Alquiler / Venta pages) */
  .filters-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.8rem !important;
  }
  .filters-bar > select, 
  .filters-bar > input, 
  .filters-bar > button {
    width: 100% !important;
    text-align: center;
  }

  /* Property Cards Grid */
  .property-grid {
    grid-template-columns: 1fr; /* Force single column on mobile */
    gap: 1.5rem;
  }
  
  /* Property Card specifically */
  .property-card h2 {
    font-size: 1.5rem !important;
  }

  /* Footer */
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }

  /* Homepage Search Box */
  .input-group {
    flex-direction: column;
    padding: 1rem;
    gap: 0.5rem;
  }
  .select-wrapper, .main-input, .fotocasa-search-btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
  .divider {
    display: none;
  }
  .search-tabs {
    flex-direction: column;
  }
}
