/* ========================================
   Variables CSS - TEMA VERDE PROFESIONAL
   ======================================== */
:root {
  --primary-color: #059669;
  --primary-dark: #047857;
  --secondary-color: #064E3B;
  --accent-color: #34D399;
  --text-color: #1A1A2E;
  --text-light: #555;
  --text-lighter: #888;
  --border-color: #E8E8E8;
  --background: #F7F9FC;
  --white: #ffffff;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --transition: all 0.3s ease;
}

/* ========================================
   Reset y Base
   ======================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text-color);
  background: var(--background);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ========================================
   Header con Logo - MÁS GRANDE
   ======================================== */
.main-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-md);
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  height: auto;
  padding: 4px 0;
  background: transparent;
  border-radius: 0;
  backdrop-filter: none;
  box-shadow: none;
  transition: opacity 0.3s ease;
}

.logo:hover {
  opacity: 0.85;
}

.logo-image {
  height: 95px;
  width: auto;
  max-width: none;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.15));
  transition: filter 0.3s ease;
}

.logo:hover .logo-image {
  filter: drop-shadow(0 2px 12px rgba(0,0,0,0.2));
}

.main-header nav ul {
  list-style: none;
  display: flex;
  gap: 32px;
  margin: 0;
  padding: 0;
}

.main-header nav ul li a {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
  position: relative;
  padding: 8px 0;
}

.main-header nav ul li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-color);
  transition: width 0.3s ease;
}

.main-header nav ul li a:hover::after,
.main-header nav ul li a.active::after {
  width: 100%;
}

/* ========================================
   Breadcrumb
   ======================================== */
.breadcrumb {
  background: var(--white);
  padding: 16px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
}

.breadcrumb a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

.breadcrumb a:hover {
  color: var(--primary-dark);
}

.breadcrumb span {
  color: var(--text-light);
}

/* ========================================
   Properties Hero
   ======================================== */
.properties-hero {
  background: linear-gradient(135deg, var(--secondary-color) 0%, #053321 100%);
  padding: 60px 0;
  text-align: center;
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.properties-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
  opacity: 0.3;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.properties-hero h1 {
  font-size: 2.8rem;
  font-weight: 800;
  margin-bottom: 12px;
  text-shadow: 2px 4px 8px rgba(0,0,0,0.2);
}

.properties-hero p {
  font-size: 1.2rem;
  opacity: 0.95;
}

/* ========================================
   Properties Section
   ======================================== */
.properties-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 60px 24px;
}

/* ========================================
   Filters Container
   ======================================== */
.filters-container {
  background: var(--white);
  padding: 32px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin-bottom: 48px;
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--secondary-color);
}

.filter-group label svg {
  color: var(--primary-color);
  flex-shrink: 0;
}

.filter-group input,
.filter-group select {
  padding: 12px 14px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  transition: var(--transition);
  background: var(--white);
  color: var(--text-color);
}

.filter-group input:focus,
.filter-group select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.filter-group input::placeholder {
  color: var(--text-lighter);
}

.filters-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: var(--white);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: var(--white);
  color: var(--text-color);
  border: 2px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--background);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

/* ========================================
   Properties Grid
   ======================================== */
.properties-container {
  margin-bottom: 48px;
}

.properties-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 32px;
  padding: 0;
}

.property-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  position: relative;
  animation: fadeInUp 0.6s ease backwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.property-card:hover {
  transform: translateY(-12px);
  box-shadow: var(--shadow-lg);
}

.property-image {
  position: relative;
  width: 100%;
  height: 240px;
  overflow: hidden;
}

.property-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.property-card:hover .property-image img {
  transform: scale(1.15) rotate(2deg);
}

.property-type {
  position: absolute;
  top: 16px;
  right: 16px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: var(--white);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow-md);
  z-index: 2;
}

.property-content {
  padding: 24px;
}

.property-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--secondary-color);
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
  min-height: 56px;
  transition: color 0.3s ease;
}

.property-card:hover .property-title {
  color: var(--primary-color);
}

.property-price {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 16px;
}

.property-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.feature {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--text-light);
}

.feature svg {
  color: var(--primary-color);
  flex-shrink: 0;
}

.property-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: var(--white);
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
  width: 100%;
  justify-content: center;
}

.property-btn:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

.property-btn svg {
  transition: transform 0.3s ease;
}

.property-btn:hover svg {
  transform: translateX(4px);
}

/* ========================================
   No Results
   ======================================== */
.no-results {
  grid-column: 1/-1;
  text-align: center;
  padding: 80px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.no-results svg {
  opacity: 0.3;
  color: var(--text-lighter);
  margin-bottom: 8px;
}

.no-results h3 {
  color: var(--text-light);
  font-size: 1.4rem;
  margin: 0;
}

.no-results p {
  color: var(--text-lighter);
  font-size: 1rem;
  margin: 0;
}

/* ========================================
   Footer con Logo - MÁS GRANDE
   ======================================== */
.main-footer {
  background: var(--secondary-color);
  color: var(--white);
  padding: 48px 0 24px;
  margin-top: 80px;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 24px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: flex-start;
}

.logo-footer {
  display: flex;
  align-items: center;
  height: auto;
  background: transparent;
  padding: 4px 0;
  border-radius: 0;
  backdrop-filter: none;
  transition: opacity 0.3s ease;
  box-shadow: none;
}

.logo-footer:hover {
  opacity: 0.85;
}

.logo-footer-image {
  height: 85px;
  width: auto;
  max-width: none;
  object-fit: contain;
  filter: brightness(1.15) contrast(1.05) drop-shadow(0 2px 10px rgba(0,0,0,0.25));
  transition: filter 0.3s ease;
}

.logo-footer:hover .logo-footer-image {
  filter: brightness(1.2) contrast(1.05) drop-shadow(0 2px 14px rgba(0,0,0,0.3));
}

.footer-brand p {
  color: rgba(255,255,255,0.85);
  font-size: 0.95rem;
  margin: 0;
  padding-left: 2px;
}

.footer-social {
  display: flex;
  gap: 16px;
}

.footer-social a,
.footer-social .social-disabled {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  color: var(--white);
  transition: var(--transition);
}

.footer-social a:hover {
  background: var(--primary-color);
  transform: translateY(-3px);
}

.footer-social .social-disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.footer-bottom {
  text-align: center;
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1024px) {
  .properties-hero h1 {
    font-size: 2.4rem;
  }

  .filters-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
  }

  .logo-image {
    height: 85px;
  }

  .logo-footer-image {
    height: 78px;
  }
}

@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    gap: 12px;
    align-items: center;
    padding: 10px 20px;
  }

  .logo {
    padding: 3px 0;
  }

  .logo-image {
    height: 75px;
  }

  .main-header nav ul {
    gap: 20px;
  }

  .properties-hero {
    padding: 50px 0;
  }

  .properties-hero h1 {
    font-size: 2rem;
  }

  .properties-hero p {
    font-size: 1.1rem;
  }

  .properties-section {
    padding: 40px 16px;
  }

  .filters-container {
    padding: 24px;
  }

  .filters-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .filters-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .properties-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-content {
    flex-direction: column;
    gap: 24px;
    text-align: center;
  }

  .footer-brand {
    align-items: center;
  }

  .logo-footer {
    padding: 3px 0;
  }

  .logo-footer-image {
    height: 70px;
  }

  .footer-brand p {
    padding-left: 0;
  }
}

@media (max-width: 480px) {
  .header-container {
    padding: 8px 16px;
  }

  .logo {
    padding: 2px 0;
  }

  .logo-image {
    height: 65px;
  }

  .properties-hero {
    padding: 40px 0;
  }

  .properties-hero h1 {
    font-size: 1.8rem;
  }

  .properties-hero p {
    font-size: 1rem;
  }

  .properties-section {
    padding: 32px 16px;
  }

  .filters-container {
    padding: 20px;
  }

  .filter-group input,
  .filter-group select {
    padding: 10px 12px;
    font-size: 0.9rem;
  }

  .btn {
    padding: 12px 24px;
    font-size: 0.95rem;
  }

  .property-card {
    border-radius: var(--radius-md);
  }

  .property-image {
    height: 200px;
  }

  .property-content {
    padding: 20px;
  }

  .property-title {
    font-size: 1.2rem;
    min-height: 48px;
  }

  .property-price {
    font-size: 1.5rem;
  }

  .no-results {
    padding: 60px 20px;
  }

  .no-results h3 {
    font-size: 1.2rem;
  }

  .logo-footer {
    padding: 2px 0;
  }

  .logo-footer-image {
    height: 60px;
  }
}