/* Custom Properties (Premium Real Estate Design System) */
:root {
  --bg-ivory: #FAFAF7; /* Cooler ivory, Apple-like neutral */
  --text-graphite: #2C2826; /* Darker for better contrast */
  --accent-gold: #B8943F; /* Deeper, authoritative champagne gold */
  
  --color-ivory: var(--bg-ivory);
  --color-graphite: var(--text-graphite);
  --color-gold: var(--accent-gold);
  --color-gold-hover: #9E7D32;
  --color-white: #FFFFFF;
  --color-gray: #F5F2ED; /* Slightly more contrast for section backgrounds */
  --color-dark-gray: #8A8279; /* Stronger for legibility */
  --color-border: #E8E4DD; /* Subtly more visible borders */
  
  --color-success: #6CA965;
  --color-danger: #E24C4C;
  --color-warning: #FFC069;

  --font-heading: 'Cormorant Garamond', serif;
  --font-body: 'Inter', sans-serif;

  --shadow-sm: 0 4px 12px rgba(44, 40, 38, 0.05);
  --shadow-md: 0 12px 28px rgba(44, 40, 38, 0.08);
  --shadow-lg: 0 24px 56px rgba(44, 40, 38, 0.12);

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  color: var(--color-graphite);
  background-color: var(--color-white);
  line-height: 1.6;
  scroll-behavior: smooth;
}
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-graphite);
  margin-bottom: 1rem;
}
a { text-decoration: none; color: var(--color-gold); transition: color 0.3s; }
a:hover { color: var(--color-gold-hover); }
img { max-width: 100%; height: auto; display: block; }

/* Layout & Utility */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.grid { display: grid; gap: 1.5rem; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.text-center { text-align: center; }

/* Spacing */
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.p-1 { padding: 1rem; }
.p-2 { padding: 2rem; }
.p-3 { padding: 3rem; }
.gap-sm { gap: 0.5rem; }
.gap-md { gap: 1rem; }
.gap-lg { gap: 2rem; }

/* Typography Helpers */
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.font-medium { font-weight: 500; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.color-gold { color: var(--color-gold); }
.color-muted { color: var(--color-dark-gray); }

/* Animation & Accessibility */
.animate-fade-in { opacity: 0; transform: translateY(20px); transition: opacity 0.8s ease, transform 0.8s ease; }
.animate-fade-in.visible { opacity: 1; transform: translateY(0); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Header */
.top-bar {
  background-color: var(--color-graphite);
  color: var(--color-white);
  padding: 0.5rem 0;
  font-size: 0.875rem;
}
.top-bar a { color: var(--color-white); margin-left: 1rem; }
.top-bar a:hover { color: var(--color-gold); }
.site-header { 
  background: rgba(255, 255, 255, 0.95); 
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 1rem 0; 
  position: sticky; 
  top: 0; 
  z-index: 100; 
  transition: box-shadow 0.3s;
}
.site-header.scrolled { box-shadow: var(--shadow-sm); }
.site-header .container { display: flex; justify-content: space-between; align-items: center; }
.logo { font-family: var(--font-heading); font-size: 1.75rem; font-weight: 700; color: var(--color-graphite); letter-spacing: -0.02em; }
.main-nav { display: flex; align-items: center; }
.main-nav a { margin-left: 2rem; font-weight: 500; color: var(--color-graphite); transition: color 0.3s; }
.main-nav a:hover { color: var(--color-gold); }
.main-nav .btn { margin-left: 2rem; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-align: center;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
  font-family: var(--font-body);
}
.btn-primary {
  background-color: var(--color-gold);
  color: var(--color-white) !important;
}
.btn-primary:hover {
  background-color: var(--color-gold-hover);
  transform: translateY(-2px);
}
.btn-outline {
  border: 1px solid var(--color-border);
  color: var(--color-graphite);
  background: transparent;
}
.btn-outline:hover {
  border-color: var(--color-gold);
  color: var(--color-gold);
}

/* Cards */
.card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  border: 1px solid var(--color-border);
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}
.card-img-wrapper { overflow: hidden; position: relative; }
.card-img { width: 100%; height: 240px; object-fit: cover; transition: transform 0.6s ease; }
.card:hover .card-img { transform: scale(1.05); }
.card-body { padding: 1.5rem; }
.card-title { font-size: 1.25rem; margin-bottom: 0.5rem; line-height: 1.3; }
.badge {
  display: inline-block; padding: 0.35rem 0.75rem; font-size: 0.75rem; border-radius: var(--radius-sm); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
}
.badge-delivered { background: rgba(108, 169, 101, 0.1); color: var(--color-success); border: 1px solid rgba(108, 169, 101, 0.2); }
.badge-delayed { background: rgba(226, 76, 76, 0.1); color: var(--color-danger); border: 1px solid rgba(226, 76, 76, 0.2); }
.badge-under_construction { background: rgba(255, 192, 105, 0.1); color: #D48806; border: 1px solid rgba(255, 192, 105, 0.2); }
.badge-completed { background: rgba(184, 148, 63, 0.1); color: var(--color-gold); border: 1px solid rgba(184, 148, 63, 0.2); }

/* Forms */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; margin-bottom: 0.5rem; font-weight: 500; font-size: 0.875rem; color: var(--color-graphite); }
.form-control {
  width: 100%; padding: 0.875rem 1rem; border: 1px solid var(--color-border); border-radius: var(--radius-sm); font-family: var(--font-body); background: var(--color-white); color: var(--color-graphite); transition: border-color 0.3s, box-shadow 0.3s;
}
.form-control:focus { outline: none; border-color: var(--color-gold); box-shadow: 0 0 0 3px rgba(184, 148, 63, 0.1); }

/* Tables */
.table-responsive { overflow-x: auto; }
table { width: 100%; border-collapse: separate; border-spacing: 0; margin-bottom: 1rem; }
th, td { padding: 1rem; text-align: left; border-bottom: 1px solid var(--color-border); }
th { background: var(--color-gray); font-weight: 600; color: var(--color-graphite); }

/* Footer */
.site-footer { background: var(--color-graphite); color: var(--color-white); padding: 4rem 0 2rem 0; margin-top: 4rem; }
.site-footer h4 { color: var(--color-white); font-family: var(--font-body); margin-bottom: 1.5rem; font-size: 1.1rem; }
.site-footer a { color: rgba(255,255,255,0.9); transition: color 0.3s; }
.site-footer a:hover { color: var(--color-gold); }
.site-footer ul { list-style: none; padding: 0; }
.site-footer ul li { margin-bottom: 0.75rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); margin-top: 3rem; padding-top: 1.5rem; display: flex; justify-content: space-between; align-items: center; font-size: 0.875rem; color: rgba(255,255,255,0.9); }

/* Floating WhatsApp Button */
.whatsapp-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-color: #25D366;
  color: #FFF;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
  z-index: 1000;
  transition: transform 0.3s ease;
}
.whatsapp-float:hover {
  transform: scale(1.1);
  color: #fff;
}

/* Mobile Action Bar */
.mobile-action-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--color-white);
  box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
  z-index: 999;
  padding: 0.5rem;
}
.mobile-action-bar .grid { gap: 0.5rem; }
.mobile-action-bar .btn { padding: 0.75rem 0.5rem; font-size: 0.875rem; border-radius: var(--radius-sm); }

/* Issue Badges */
.badge-issue { padding: 0.25rem 0.5rem; border-radius: 4px; font-size: 0.75rem; font-weight: bold; color: white; display: inline-block; text-transform: uppercase; }
.badge-water { background-color: #3b82f6; }
.badge-power { background-color: #eab308; }
.badge-construction { background-color: #ef4444; }
.badge-delay { background-color: #f97316; }
.badge-maintenance { background-color: #a855f7; }
.badge-noise { background-color: #6b7280; }
.badge-other { background-color: #4b5563; }

/* Admin Row States */
.admin-row-pending { background-color: rgba(249, 115, 22, 0.1) !important; border-left: 3px solid #f97316; }

/* Media Queries */
@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 767px) {
  #menu-toggle { display: block !important; }
  .main-nav { 
    display: none; 
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--color-white);
    flex-direction: column; 
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
    align-items: flex-start;
  }
  .main-nav.active { display: flex; }
  .main-nav a { margin: 0; padding: 1rem 1.5rem; width: 100%; border-bottom: 1px solid var(--color-border); }
  .main-nav .btn { margin: 1rem 1.5rem; width: calc(100% - 3rem); }
  
  .top-bar { display: none; }
  .whatsapp-float { bottom: 5rem; right: 1rem; width: 50px; height: 50px; font-size: 1.5rem; }
  .mobile-action-bar { display: block; }
  body { padding-bottom: 4rem; } /* Space for mobile bar */
  
  .footer-bottom { flex-direction: column; text-align: center; gap: 1rem; }
}
