﻿/* ===== RESET & BASE ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; color: #333; background: #fff; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ===== VARIABLES ===== */
:root {
  --primary: #1a73e8;
  --primary-dark: #1558b0;
  --secondary: #f4f7fc;
  --accent: #ff6b35;
  --text: #333;
  --text-light: #666;
  --white: #fff;
  --border: #e0e0e0;
  --shadow: 0 2px 12px rgba(0,0,0,0.1);
  --radius: 8px;
}

/* ===== NAVBAR ===== */
.navbar {
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 0 5%;
}
.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}
.nav-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--primary); }
.nav-btn {
  background: var(--primary);
  color: var(--white) !important;
  padding: 8px 20px;
  border-radius: 25px;
  transition: background 0.2s !important;
}
.nav-btn:hover { background: var(--primary-dark) !important; }
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 5px;
}
.hamburger span {
  width: 25px; height: 3px;
  background: var(--text);
  border-radius: 3px;
  transition: all 0.3s;
}

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, #1a73e8 0%, #1558b0 50%, #0d3b7a 100%);
  color: var(--white);
  padding: 80px 5% 60px;
  text-align: center;
}
.hero h1 { font-size: 2.8rem; font-weight: 700; margin-bottom: 15px; line-height: 1.2; }
.hero p { font-size: 1.1rem; opacity: 0.9; margin-bottom: 40px; }
.search-box {
  background: var(--white);
  border-radius: 12px;
  padding: 20px;
  max-width: 800px;
  margin: 0 auto;
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}
.search-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr) auto;
  gap: 12px;
  align-items: end;
}
.search-grid select, .search-grid input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color 0.2s;
}
.search-grid select:focus, .search-grid input:focus { border-color: var(--primary); }
.search-grid label { font-size: 0.8rem; color: var(--text-light); margin-bottom: 4px; display: block; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 11px 28px;
  border-radius: 25px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-accent { background: var(--accent); color: var(--white); }
.btn-accent:hover { background: #e55a28; transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover { background: var(--primary); color: var(--white); }
.btn-full { width: 100%; text-align: center; border-radius: var(--radius); }

/* ===== SECTIONS ===== */
.section { padding: 60px 5%; }
.section-alt { background: var(--secondary); }
.section-title { text-align: center; margin-bottom: 40px; }
.section-title h2 { font-size: 2rem; color: var(--text); margin-bottom: 10px; }
.section-title p { color: var(--text-light); font-size: 1rem; }
.section-title .line {
  width: 60px; height: 4px;
  background: var(--primary);
  margin: 12px auto 0;
  border-radius: 2px;
}

/* ===== PROPERTY CARDS ===== */
.properties-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
}
.property-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}
.property-card:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0,0,0,0.15); }
.card-img {
  position: relative;
  height: 200px;
  overflow: hidden;
}
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.property-card:hover .card-img img { transform: scale(1.05); }
.card-badge {
  position: absolute;
  top: 12px; left: 12px;
  background: var(--primary);
  color: var(--white);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
}
.card-badge.sold { background: #e53935; }
.card-badge.rented { background: #43a047; }
.card-body { padding: 18px; }
.card-price { font-size: 1.3rem; font-weight: 700; color: var(--primary); margin-bottom: 6px; }
.card-title { font-size: 1rem; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.card-location { font-size: 0.85rem; color: var(--text-light); margin-bottom: 14px; display: flex; align-items: center; gap: 4px; }
.card-features {
  display: flex;
  gap: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-light);
}
.card-features span { display: flex; align-items: center; gap: 4px; }

/* ===== SERVICES ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 25px;
}
.service-card {
  background: var(--white);
  border-radius: 12px;
  padding: 30px 25px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}
.service-card:hover { transform: translateY(-4px); }
.service-icon {
  width: 65px; height: 65px;
  background: var(--secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  font-size: 1.8rem;
}
.service-card h3 { font-size: 1.1rem; margin-bottom: 10px; color: var(--text); }
.service-card p { font-size: 0.9rem; color: var(--text-light); line-height: 1.6; }

/* ===== STATS ===== */
.stats-section {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  padding: 50px 5%;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 30px;
  text-align: center;
}
.stat-item h3 { font-size: 2.5rem; font-weight: 700; }
.stat-item p { font-size: 0.95rem; opacity: 0.85; margin-top: 5px; }

/* ===== CTA ===== */
.cta-section {
  background: var(--secondary);
  padding: 60px 5%;
  text-align: center;
}
.cta-section h2 { font-size: 2rem; margin-bottom: 15px; }
.cta-section p { color: var(--text-light); margin-bottom: 30px; font-size: 1rem; }
.cta-buttons { display: flex; gap: 15px; justify-content: center; flex-wrap: wrap; }

/* ===== FILTER BAR ===== */
.filter-bar {
  background: var(--white);
  padding: 20px 5%;
  box-shadow: var(--shadow);
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  align-items: center;
}
.filter-bar select, .filter-bar input {
  padding: 9px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  outline: none;
  min-width: 140px;
}
.filter-bar select:focus, .filter-bar input:focus { border-color: var(--primary); }
.results-count { margin-left: auto; color: var(--text-light); font-size: 0.9rem; }

/* ===== PROPERTY DETAIL ===== */
.detail-hero { background: var(--secondary); padding: 30px 5%; }
.detail-hero h1 { font-size: 1.8rem; margin-bottom: 8px; }
.detail-hero .price { font-size: 1.6rem; color: var(--primary); font-weight: 700; }
.detail-grid { display: grid; grid-template-columns: 1fr 350px; gap: 30px; padding: 40px 5%; }
.gallery { border-radius: 12px; overflow: hidden; margin-bottom: 25px; }
.gallery-main { height: 380px; overflow: hidden; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.gallery-thumbs img {
  width: 80px; height: 60px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.2s;
}
.gallery-thumbs img:hover, .gallery-thumbs img.active { border-color: var(--primary); }
.detail-features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  background: var(--secondary);
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 25px;
}
.feature-item { text-align: center; }
.feature-item .icon { font-size: 1.5rem; margin-bottom: 5px; }
.feature-item .label { font-size: 0.78rem; color: var(--text-light); }
.feature-item .value { font-size: 0.95rem; font-weight: 600; }
.detail-sidebar { position: sticky; top: 80px; }
.agent-card, .inquiry-card {
  background: var(--white);
  border-radius: 12px;
  padding: 25px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.agent-info { display: flex; align-items: center; gap: 15px; margin-bottom: 15px; }
.agent-avatar {
  width: 60px; height: 60px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--secondary);
}
.agent-name { font-weight: 600; font-size: 1rem; }
.agent-title { font-size: 0.85rem; color: var(--text-light); }

/* ===== FORMS ===== */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 0.88rem; font-weight: 500; margin-bottom: 6px; color: var(--text); }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
  background: #fff;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--primary); }
.form-group textarea { resize: vertical; min-height: 110px; }
.form-error { color: #e53935; font-size: 0.8rem; margin-top: 4px; display: none; }
.form-success {
  background: #e8f5e9;
  color: #2e7d32;
  padding: 14px;
  border-radius: var(--radius);
  text-align: center;
  margin-top: 15px;
  display: none;
}

/* ===== CONTACT PAGE ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact-info h3 { font-size: 1.3rem; margin-bottom: 20px; }
.contact-item { display: flex; gap: 15px; margin-bottom: 20px; align-items: flex-start; }
.contact-item .icon {
  width: 45px; height: 45px;
  background: var(--secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.contact-item h4 { font-size: 0.9rem; color: var(--text-light); margin-bottom: 3px; }
.contact-item p { font-size: 0.95rem; font-weight: 500; }

/* ===== AUTH PAGES ===== */
.auth-page {
  min-height: 100vh;
  background: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.auth-card {
  background: var(--white);
  border-radius: 16px;
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}
.auth-card h2 { font-size: 1.6rem; margin-bottom: 8px; text-align: center; }
.auth-card p { color: var(--text-light); text-align: center; margin-bottom: 28px; font-size: 0.9rem; }
.auth-tabs { display: flex; margin-bottom: 28px; border-bottom: 2px solid var(--border); }
.auth-tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-light);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}
.auth-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ===== ABOUT PAGE ===== */
.about-hero {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  padding: 70px 5%;
  text-align: center;
}
.about-hero h1 { font-size: 2.5rem; margin-bottom: 15px; }
.about-hero p { font-size: 1.1rem; opacity: 0.9; max-width: 600px; margin: 0 auto; }
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 25px;
}
.team-card {
  background: var(--white);
  border-radius: 12px;
  padding: 25px;
  text-align: center;
  box-shadow: var(--shadow);
}
.team-avatar {
  width: 90px; height: 90px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 15px;
  background: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}
.team-card h3 { font-size: 1rem; margin-bottom: 5px; }
.team-card p { font-size: 0.85rem; color: var(--text-light); }

/* ===== ADMIN ===== */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 240px;
  background: #1a1f36;
  color: var(--white);
  padding: 0;
  flex-shrink: 0;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
}
.admin-logo {
  padding: 20px;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.admin-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  transition: all 0.2s;
}
.admin-nav a:hover, .admin-nav a.active {
  background: rgba(255,255,255,0.1);
  color: var(--white);
}
.admin-main { margin-left: 240px; flex: 1; background: #f0f2f5; min-height: 100vh; }
.admin-header {
  background: var(--white);
  padding: 15px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
.admin-content { padding: 30px; }
.stats-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}
.stat-card {
  background: var(--white);
  border-radius: 12px;
  padding: 22px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 18px;
}
.stat-icon {
  width: 55px; height: 55px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}
.stat-icon.blue { background: #e3f2fd; }
.stat-icon.green { background: #e8f5e9; }
.stat-icon.orange { background: #fff3e0; }
.stat-info h3 { font-size: 1.8rem; font-weight: 700; }
.stat-info p { font-size: 0.85rem; color: var(--text-light); }
.admin-table-card {
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.table-header {
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.table-header h3 { font-size: 1rem; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 22px; text-align: left; font-size: 0.88rem; }
th { background: var(--secondary); font-weight: 600; color: var(--text-light); }
td { border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafafa; }
.badge {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
}
.badge-green { background: #e8f5e9; color: #2e7d32; }
.badge-red { background: #ffebee; color: #c62828; }
.badge-blue { background: #e3f2fd; color: #1565c0; }
.action-btns { display: flex; gap: 8px; }
.btn-sm {
  padding: 5px 12px;
  font-size: 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  border: none;
  font-weight: 500;
}
.btn-edit { background: #e3f2fd; color: #1565c0; }
.btn-delete { background: #ffebee; color: #c62828; }

/* ===== FOOTER ===== */
.footer {
  background: #1a1f36;
  color: rgba(255,255,255,0.8);
  padding: 50px 5% 20px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand .logo { font-size: 1.4rem; font-weight: 700; color: var(--white); margin-bottom: 12px; }
.footer-brand p { font-size: 0.9rem; line-height: 1.7; }
.footer-col h4 { color: var(--white); font-size: 1rem; margin-bottom: 16px; }
.footer-col a {
  display: block;
  font-size: 0.88rem;
  margin-bottom: 10px;
  color: rgba(255,255,255,0.7);
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
}

/* ===== PAGE HERO ===== */
.page-hero {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  padding: 50px 5%;
  text-align: center;
}
.page-hero h1 { font-size: 2.2rem; margin-bottom: 10px; }
.page-hero p { opacity: 0.9; font-size: 1rem; }

/* ===== MODAL ===== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--white);
  border-radius: 16px;
  padding: 35px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}
.modal-close {
  position: absolute;
  top: 15px; right: 18px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-light);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .detail-grid { grid-template-columns: 1fr; }
  .detail-sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: 65px; left: 0; right: 0; background: var(--white); padding: 20px; box-shadow: var(--shadow); gap: 15px; }
  .nav-links.open { display: flex; }
  .hamburger { display: flex; }
  .hero h1 { font-size: 1.9rem; }
  .search-grid { grid-template-columns: 1fr 1fr; }
  .search-grid > *:last-child { grid-column: 1 / -1; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 25px; }
  .detail-features { grid-template-columns: repeat(2, 1fr); }
  .admin-sidebar { width: 200px; }
  .admin-main { margin-left: 200px; }
  .section-title h2 { font-size: 1.6rem; }
}
@media (max-width: 480px) {
  .hero { padding: 50px 5% 40px; }
  .hero h1 { font-size: 1.6rem; }
  .search-grid { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
  .admin-main { margin-left: 0; }
  .stats-cards { grid-template-columns: 1fr 1fr; }
  .cta-buttons { flex-direction: column; align-items: center; }
}
