:root {
  --bg: #0b0d12;
  --card: #111722;
  --muted: #93a1b3;
  --text: #e6edf3;
  --accent: #5ab3ff;
  --accent-2: #7cf29c;
  --ring: #294059;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: linear-gradient(180deg, #0b0d12 0%, #0e1420 100%);
  color: var(--text);
  line-height: 1.6;
}

.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 16px; }

.site-header { position: sticky; top: 0; z-index: 10; backdrop-filter: blur(8px); background: rgba(11,13,18,0.7); border-bottom: 1px solid #1a2230; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { margin: 0; font-size: 20px; letter-spacing: 0.2px; }
.brand a { color: var(--text); text-decoration: none; }
.brand a:hover { color: var(--accent); }
.nav a { color: var(--muted); text-decoration: none; margin-left: 16px; }
.nav a:hover { color: var(--text); }

.hero { padding: 56px 0 24px; border-bottom: 1px solid #1a2230; }
.hero h2 { margin: 0 0 8px; font-size: 32px; }
.hero p { margin: 0 0 16px; color: var(--muted); }

.filters { display: grid; grid-template-columns: 1fr repeat(3, minmax(120px, 160px)) auto; gap: 8px; }
.filters input, .filters select, .filters button {
  height: 40px; padding: 0 12px; border-radius: 10px;
  border: 1px solid #223047; background: #0e1420; color: var(--text);
}
.filters button { background: linear-gradient(180deg, var(--accent), #3c96e0); border: none; color: #001324; font-weight: 700; }
.filters button:hover { filter: brightness(1.05); }

main.container { padding: 24px 0 56px; }
.properties-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* Custom Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes gradientX {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes gridMove {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(50px, 50px);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.8s ease-out forwards;
}

.animate-gradient-x {
  background-size: 200% 200%;
  animation: gradientX 3s ease infinite;
}

.delay-200 {
  animation-delay: 0.2s;
}

.delay-400 {
  animation-delay: 0.4s;
}

.delay-600 {
  animation-delay: 0.6s;
}

.delay-800 {
  animation-delay: 0.8s;
}

/* Mobile-specific optimizations */
@media (max-width: 768px) {
  /* Ensure property cards are easily tappable on mobile */
  .property-card {
    min-height: 44px; /* Minimum touch target size */
    -webkit-tap-highlight-color: rgba(90, 179, 255, 0.2);
  }
  
  /* Improve text readability on mobile */
  .text-xs {
    font-size: 0.75rem;
    line-height: 1rem;
  }
  
  /* Better spacing for mobile */
  .mobile-spacing {
    padding: 1rem;
  }
  
  /* Optimize button sizes for touch */
  .mobile-button {
    min-height: 44px;
    min-width: 44px;
  }
}

/* Property card hover effects - disabled on mobile for better performance */
@media (hover: hover) and (pointer: fine) {
  .property-card:hover {
    transform: translateY(-4px) scale(1.02);
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  .property-card:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
  }
}

.card {
  background: radial-gradient(120% 120% at 0% 0%, #111722 0%, #0f1622 60%, #0f141d 100%);
  border: 1px solid #1a2230; border-radius: 16px; overflow: hidden;
  box-shadow: 0 10px 24px rgba(0,0,0,0.35);
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 16px 28px rgba(0,0,0,0.5); }
.card .media { position: relative; padding-top: 62%; background: #0d1117; overflow: hidden; }
.card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.badge { position: absolute; top: 10px; left: 10px; background: rgba(0,0,0,0.6); border: 1px solid #2a3a52; color: var(--text); padding: 6px 10px; border-radius: 999px; font-size: 12px; }
.card .body { padding: 14px 14px 16px; }
.title { margin: 0 0 8px; font-size: 16px; }
.meta { display: flex; gap: 8px; color: var(--muted); font-size: 12px; }
.price { margin-top: 10px; font-weight: 700; color: var(--accent-2); }
.view-details { 
  display: inline-block; margin-top: 12px; padding: 8px 16px; 
  background: linear-gradient(180deg, var(--accent), #3c96e0); 
  color: #001324; text-decoration: none; border-radius: 8px; 
  font-size: 14px; font-weight: 600; transition: filter 160ms ease;
}
.view-details:hover { filter: brightness(1.05); }

.about, .contact { padding: 24px 0 56px; border-top: 1px solid #1a2230; }
.site-footer { border-top: 1px solid #1a2230; padding: 16px 0; color: var(--muted); }

/* Property Details Page */
.property-details { max-width: 1000px; }
.back-link { 
  display: inline-block; margin-bottom: 16px; color: var(--accent); 
  text-decoration: none; font-weight: 600; 
}
.back-link:hover { color: var(--accent-2); }
.property-header h1 { margin: 0 0 8px; font-size: 32px; }
.property-location { display: flex; gap: 16px; margin-bottom: 24px; }
.city { color: var(--muted); font-size: 18px; }
.type { color: var(--accent); font-weight: 600; text-transform: uppercase; font-size: 14px; }

.property-content { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 24px; }
.property-image img { width: 100%; height: 400px; object-fit: cover; border-radius: 12px; }
.property-info { display: flex; flex-direction: column; gap: 24px; }

.price-section { border-bottom: 1px solid #1a2230; padding-bottom: 24px; }
.price { font-size: 36px; font-weight: 700; color: var(--accent-2); margin-bottom: 16px; }
.property-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.meta-item { text-align: center; }
.meta-item .label { display: block; color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.meta-item .value { display: block; font-weight: 600; font-size: 18px; }

.description h3, .features h3, .contact-section h3 { 
  margin: 0 0 12px; font-size: 20px; color: var(--text); 
}
.description p { margin: 0; line-height: 1.6; color: var(--muted); }

.features-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.feature-tag { 
  background: rgba(90, 179, 255, 0.1); border: 1px solid var(--accent); 
  color: var(--accent); padding: 6px 12px; border-radius: 20px; 
  font-size: 12px; font-weight: 500; 
}

/* PDF Leaflets Section */
.pdf-leaflets { 
  background: rgba(11, 17, 34, 0.3); border: 1px solid #1a2230; 
  padding: 24px; border-radius: 12px; margin-top: 24px; 
}
.pdf-leaflets h3 { margin: 0 0 8px; font-size: 20px; color: var(--text); }
.pdf-leaflets p { margin: 0 0 16px; color: var(--muted); font-size: 14px; }

.pdf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.pdf-item { 
  background: rgba(17, 23, 34, 0.6); border: 1px solid #223047; 
  border-radius: 12px; padding: 16px; display: flex; align-items: center; 
  gap: 12px; transition: all 160ms ease; 
}
.pdf-item:hover { 
  background: rgba(17, 23, 34, 0.8); border-color: var(--accent); 
  transform: translateY(-2px); 
}

.pdf-icon { 
  flex-shrink: 0; width: 48px; height: 48px; 
  background: rgba(90, 179, 255, 0.1); border: 1px solid var(--accent); 
  border-radius: 8px; display: flex; align-items: center; justify-content: center; 
  color: var(--accent); 
}

.pdf-info { flex: 1; min-width: 0; }
.pdf-info h4 { 
  margin: 0 0 4px; font-size: 14px; font-weight: 600; 
  color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; 
}
.pdf-size { 
  margin: 0; font-size: 12px; color: var(--muted); 
}

.pdf-download { 
  flex-shrink: 0; display: flex; align-items: center; gap: 6px; 
  background: linear-gradient(180deg, var(--accent), #3c96e0); 
  color: #001324; text-decoration: none; padding: 8px 12px; 
  border-radius: 6px; font-size: 12px; font-weight: 600; 
  transition: filter 160ms ease; 
}
.pdf-download:hover { filter: brightness(1.05); }

.contact-section { 
  background: rgba(11, 17, 34, 0.5); border: 1px solid #1a2230; 
  padding: 24px; border-radius: 12px; 
}
.contact-actions { display: flex; gap: 12px; margin-top: 16px; }
.btn { 
  padding: 12px 24px; border-radius: 8px; text-decoration: none; 
  font-weight: 600; transition: all 160ms ease; 
}
.btn-primary { 
  background: linear-gradient(180deg, var(--accent), #3c96e0); 
  color: #001324; 
}
.btn-primary:hover { filter: brightness(1.05); }
.btn-secondary { 
  background: transparent; border: 1px solid var(--accent); 
  color: var(--accent); 
}
.btn-secondary:hover { background: var(--accent); color: #001324; }

.error, .no-results { 
  text-align: center; padding: 40px; color: var(--muted); 
  background: rgba(11, 17, 34, 0.5); border-radius: 12px; 
}

@media (max-width: 900px) {
  .filters { grid-template-columns: 1fr 1fr 1fr 1fr; }
  .properties-grid { grid-template-columns: repeat(2, 1fr); }
  .property-content { grid-template-columns: 1fr; }
  .property-meta { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .filters { grid-template-columns: 1fr 1fr; }
  .properties-grid { grid-template-columns: 1fr; }
  .property-meta { grid-template-columns: 1fr; }
  .contact-actions { flex-direction: column; }
}

