:root {
  --bg: #0c0e14;
  --bg-card: #161a22;
  --accent: #e8b86d;
  --accent-2: #ff6b9d;
  --accent-3: #4ecdc4;
  --accent-soft: rgba(232, 184, 109, 0.15);
  --text: #f8f6f2;
  --text-muted: #b8b4ac;
  --border: rgba(232, 184, 109, 0.3);
  --available: #4ade80;
  --limited: #fbbf24;
}

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

body {
  font-family: "Inter", system-ui, sans-serif;
  background: linear-gradient(180deg, #0c0e14 0%, #12151c 100%);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(12, 14, 20, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 1rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: "Playfair Display", serif;
  font-size: 1.6rem;
  letter-spacing: 0.08em;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

nav a {
  color: var(--text-muted);
  text-decoration: none;
  margin-left: 1.5rem;
  font-size: 0.9rem;
  transition: color 0.2s;
}

nav a:hover { color: var(--accent); }

.hero {
  padding: 5rem 5% 3rem;
  text-align: center;
  background: radial-gradient(ellipse at top, rgba(232,184,109,0.12), transparent 50%),
              radial-gradient(ellipse at bottom right, rgba(255,107,157,0.08), transparent 40%);
}

.hero h1 {
  font-family: "Playfair Display", serif;
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #fff 30%, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  max-width: 620px;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.portfolio-section {
  padding: 1.5rem 4% 5rem;
  display: flex;
  flex-direction: column;
}

.section-title {
  font-family: "Playfair Display", serif;
  font-size: 1.8rem;
  margin-bottom: 1.25rem;
  text-align: center;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin-bottom: 2rem;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.filter-btn {
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover,
.filter-btn.active {
  background: linear-gradient(135deg, var(--accent), #d4a017);
  color: #0c0e14;
  border-color: var(--accent);
  font-weight: 600;
}

#portfolioGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s;
  cursor: pointer;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px rgba(0,0,0,0.45), 0 0 0 1px var(--accent);
}

.card-image {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
}

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

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

.status-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  backdrop-filter: blur(8px);
}

.status-badge.available { background: rgba(74, 222, 128, 0.25); color: var(--available); border: 1px solid rgba(74,222,128,0.5); }
.status-badge.limited { background: rgba(251, 191, 36, 0.25); color: var(--limited); border: 1px solid rgba(251,191,36,0.5); }

.card-content {
  padding: 1.1rem 1.2rem 1.25rem;
}

.card-content h3 {
  font-family: "Playfair Display", serif;
  font-size: 1.35rem;
  margin-bottom: 0.3rem;
}

.price {
  color: var(--accent);
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.price span { font-size: 0.72rem; color: var(--text-muted); font-weight: 400; }

.areas { color: var(--text-muted); font-size: 0.82rem; margin-bottom: 0.9rem; }

.cta-btn {
  width: 100%;
  padding: 0.65rem;
  background: linear-gradient(135deg, transparent, transparent);
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 10px;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s;
}

.cta-btn:hover { 
  background: linear-gradient(135deg, var(--accent), #d4a017); 
  color: #0c0e14; 
  border-color: transparent;
}

.no-results {
  text-align: center;
  color: var(--text-muted);
  padding: 2rem;
  font-size: 1.05rem;
}

/* Modal */
#modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  padding: 1rem;
}

#modal.open { opacity: 1; pointer-events: auto; }

#modalContent {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  max-width: 920px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  position: relative;
}

@media (max-width: 768px) {
  #modalContent { grid-template-columns: 1fr; }
  .hero { 
    padding: 1.2rem 5% 0.6rem; 
  }
  .hero h1 { 
    font-size: 1.9rem; 
    margin-bottom: 0.3rem;
  }
  .hero p { 
    font-size: 0.85rem; 
    margin-bottom: 0;
  }
  header { padding: 0.6rem 4%; }
  nav a { margin-left: 1rem; font-size: 0.85rem; }
  .portfolio-section { padding: 0.5rem 4% 4rem; }
  .section-title { 
    font-size: 1.3rem; 
    margin-bottom: 0.6rem;
  }
  .filters { 
    order: 3;
    gap: 0.4rem; 
    margin: 1.5rem 0 0;
  }
  .filter-btn { padding: 0.4rem 0.8rem; font-size: 0.75rem; }
  #portfolioGrid { 
    order: 2;
    grid-template-columns: 1fr; 
    gap: 1.1rem; 
    max-width: 420px;
    margin: 0 auto;
  }
  .card-image { aspect-ratio: 3/3.6; }
}

.modal-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 300px;
}

.modal-details { padding: 1.75rem; }

.modal-details h2 {
  font-family: "Playfair Display", serif;
  font-size: 2rem;
  margin-bottom: 0.4rem;
}

.modal-details .status { display: inline-block; margin-bottom: 1rem; font-size: 0.9rem; }

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
  margin: 1rem 0;
  font-size: 0.92rem;
}

.stats div { color: var(--text-muted); }
.stats strong { color: var(--text); display: block; font-size: 0.78rem; letter-spacing: 0.04em; }

.description { margin: 0.9rem 0 1.1rem; color: var(--text-muted); }

.pricing {
  display: flex;
  gap: 1.4rem;
  margin-bottom: 0.9rem;
  font-size: 1.02rem;
}

.pricing strong { color: var(--accent); }

.areas-full { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 0.9rem; }

.services { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 1.4rem; }
.services span {
  background: var(--accent-soft);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--accent);
}

.cta-row {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.whatsapp-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: white;
  padding: 0.75rem 1.2rem;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s, box-shadow 0.2s;
  flex: 1;
  justify-content: center;
  min-width: 140px;
}

.whatsapp-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(37,211,102,0.4); }

.call-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  padding: 0.75rem 1.2rem;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s, box-shadow 0.2s;
  flex: 1;
  justify-content: center;
  min-width: 120px;
}

.call-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(59,130,246,0.4); }

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  font-size: 0.88rem;
  cursor: pointer;
  margin-bottom: 1rem;
  transition: all 0.2s;
}

.back-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.close-btn {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  background: rgba(0,0,0,0.55);
  border: none;
  color: white;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  z-index: 10;
}

.content-block {
  padding: 2.5rem 5% 2rem;
  background: rgba(255,255,255,0.02);
  border-top: 1px solid var(--border);
}

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

.content-inner h3 {
  font-family: "Playfair Display", serif;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--accent);
}

.content-inner p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 0.8rem;
}

.content-inner p:last-child {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .content-block { padding: 1.8rem 5% 1.5rem; }
  .content-inner h3 { font-size: 1.3rem; }
  .content-inner p { font-size: 0.9rem; }
}

footer {
  text-align: center;
  padding: 1.5rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  border-top: 1px solid var(--border);
}

@media (max-width: 480px) {
  .card-content h3 { font-size: 1.15rem; }
  .modal-details { padding: 1.25rem; }
  .modal-details h2 { font-size: 1.6rem; }
}