/* ============================================================
   GOMA IMMOBILIER — Main Stylesheet
   Mobile-first | Orange + Green + Red palette
   ============================================================ */

/* ── CSS Variables ──────────────────────────────────────── */
:root {
  --orange:        #E8580A;
  --orange-light:  #FF7A35;
  --orange-dark:   #C44A06;
  --orange-pale:   #FFF3ED;
  --green:         #1B6B3A;
  --green-light:   #2D9A56;
  --green-dark:    #124828;
  --green-pale:    #F0FAF5;
  --red:           #DC3545;
  --red-pale:      #FFF0F1;
  --white:         #FFFFFF;
  --gray-50:       #F9FAFB;
  --gray-100:      #F3F4F6;
  --gray-200:      #E5E7EB;
  --gray-400:      #9CA3AF;
  --gray-600:      #4B5563;
  --gray-800:      #1F2937;
  --text:          #1A1A2E;
  --text-muted:    #6B7280;
  --border:        #E5E7EB;
  --shadow-xs:     0 1px 2px rgba(0,0,0,.06);
  --shadow-sm:     0 1px 3px rgba(0,0,0,.10), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:     0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg:     0 10px 15px rgba(0,0,0,.10), 0 4px 6px rgba(0,0,0,.05);
  --shadow-xl:     0 20px 25px rgba(0,0,0,.15), 0 10px 10px rgba(0,0,0,.04);
  --radius:        12px;
  --radius-sm:     8px;
  --radius-lg:     18px;
  --radius-full:   9999px;
  --transition:    all .22s ease;
  --font:          'DM Sans', system-ui, -apple-system, sans-serif;
  --font-display:  'Urbanist', 'DM Sans', system-ui, sans-serif;
}

/* ── Reset & Base ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
/* Offset for fixed navbar (logo height ~80px + vertical padding ~24px) */
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  padding-top: 86px; /* reserve space for fixed navbar */
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--orange); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--orange-dark); }
ul { list-style: none; padding: 0; margin: 0; }
input, select, textarea, button { font-family: var(--font); }

/* ── Typography ─────────────────────────────────────────── */
h1, h2, h3, h4, h5 { font-family: var(--font-display); font-weight: 700; line-height: 1.25; }
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }
.section-title { text-align: center; margin-bottom: 2.5rem; }
.section-title h2 { margin-bottom: .5rem; }
.section-title p { color: var(--text-muted); max-width: 500px; margin: 0 auto; }
.section-title h2 span { color: var(--orange); }

/* ── Utilities ──────────────────────────────────────────── */
.text-orange { color: var(--orange) !important; }
.text-green  { color: var(--green)  !important; }
.text-red    { color: var(--red)    !important; }
.bg-orange   { background: var(--orange)   !important; }
.bg-green    { background: var(--green)    !important; }
.bg-orange-pale { background: var(--orange-pale) !important; }
.bg-green-pale  { background: var(--green-pale)  !important; }

/* ── Buttons ────────────────────────────────────────────── */
.btn-orange {
  background: var(--orange);
  color: var(--white);
  border: 2px solid var(--orange);
  border-radius: var(--radius-full);
  padding: .55rem 1.4rem;
  font-weight: 600;
  font-size: .9rem;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  white-space: nowrap;
}
.btn-orange:hover { background: var(--orange-dark); border-color: var(--orange-dark); color: var(--white); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(232,88,10,.35); }
.btn-green {
  background: var(--green);
  color: var(--white);
  border: 2px solid var(--green);
  border-radius: var(--radius-full);
  padding: .55rem 1.4rem;
  font-weight: 600;
  font-size: .9rem;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.btn-green:hover { background: var(--green-dark); border-color: var(--green-dark); color: var(--white); transform: translateY(-1px); }
.btn-outline-orange {
  background: transparent;
  color: var(--orange);
  border: 2px solid var(--orange);
  border-radius: var(--radius-full);
  padding: .55rem 1.4rem;
  font-weight: 600;
  font-size: .9rem;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.btn-outline-orange:hover { background: var(--orange); color: var(--white); }
.btn-sm { padding: .35rem 1rem; font-size: .82rem; }
.btn-lg { padding: .75rem 2rem; font-size: 1rem; }

/* ── Forms ──────────────────────────────────────────────── */
.form-control, .form-select {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .6rem .9rem;
  font-size: .9rem;
  color: var(--text);
  background: var(--white);
  transition: var(--transition);
  width: 100%;
}
.form-control:focus, .form-select:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(232,88,10,.12);
  outline: none;
}
.form-label { font-weight: 600; font-size: .875rem; margin-bottom: .3rem; color: var(--gray-800); }
.form-group { margin-bottom: 1.1rem; }
.invalid-feedback { color: var(--red); font-size: .82rem; margin-top: .25rem; }
.is-invalid { border-color: var(--red) !important; }
.is-valid   { border-color: var(--green-light) !important; }

/* ── Navbar ─────────────────────────────────────────────── */
.navbar {
  background: var(--white);
  box-shadow: var(--shadow-sm);
  padding: .75rem 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1050;
  transition: box-shadow .25s ease;
}
/* Slightly deeper shadow on scroll (class toggled by JS) */
.navbar.scrolled {
  box-shadow: var(--shadow-md);
}
.navbar .dropdown-menu {
  z-index: 1060;
}
.navbar-brand {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--green) !important;
  text-decoration: none;
}
.navbar-brand .brand-dot { color: var(--orange); }
.navbar-brand .brand-icon {
  width: 38px; height: 38px;
  background: var(--orange);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 1.1rem;
}
.navbar-nav .nav-link {
  color: var(--gray-800) !important;
  font-weight: 500;
  font-size: .9rem;
  padding: .5rem .9rem !important;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.navbar-nav .nav-link:hover, .navbar-nav .nav-link.active {
  color: var(--orange) !important;
  background: var(--orange-pale);
}
.navbar-toggler { border: none; padding: .25rem .5rem; }
.navbar-toggler:focus { box-shadow: none; }
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='rgba(27,107,58,1)' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}
.nav-btn-group { display: flex; align-items: center; gap: .5rem; }
.lang-switch { font-size: .82rem; font-weight: 600; color: var(--text-muted); display: flex; align-items: center; gap: .25rem; }
.lang-switch a { color: var(--text-muted); text-decoration: none; padding: 2px 4px; border-radius: 4px; }
.lang-switch a.active { color: var(--orange); font-weight: 700; }
.lang-switch span { color: var(--border); }

/* Mobile collapsed navbar — lang switch alignment */
@media (max-width: 991.98px) {
  .nav-btn-group {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    padding: .5rem 0;
    gap: .5rem;
    border-top: 1px solid var(--border);
    margin-top: .25rem;
  }
  .lang-switch {
    padding: .2rem .9rem;
    font-size: .875rem;
  }
  /* Dropdown opens right (not left) on mobile so it doesn't go off-screen */
  .nav-btn-group .dropdown-menu {
    right: auto !important;
    left: 0 !important;
  }
}

/* User dropdown */
.user-avatar-nav {
  width: 34px; height: 34px; border-radius: 50%;
  object-fit: cover; border: 2px solid var(--orange);
}
.user-avatar-nav-placeholder {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--orange); color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem;
}

/* ── Hero Section ───────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green) 50%, #2D7A45 100%);
  padding: 4rem 0 5rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url('../images/hero-pattern.svg') center/cover;
  opacity: .05;
}
.hero-content { position: relative; z-index: 1; }
.hero-title {
  color: var(--white);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
}
.hero-title span { color: var(--orange-light); }
.hero-subtitle {
  color: rgba(255,255,255,.85);
  font-size: clamp(1rem, 2vw, 1.15rem);
  margin-bottom: 2rem;
  max-width: 540px;
}
.hero-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}
.hero-stat-item {
  color: rgba(255,255,255,.9);
  font-size: .9rem;
}
.hero-stat-item strong { display: block; font-size: 1.5rem; color: var(--orange-light); }
.hero-image { display: none; }
@media (min-width: 992px) {
  .hero-image { display: flex; align-items: center; justify-content: center; }
  .hero-image img { border-radius: var(--radius-lg); box-shadow: var(--shadow-xl); max-height: 380px; }
}

/* Hero Search Box */
.hero-search-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.2rem;
  box-shadow: var(--shadow-xl);
  max-width: 680px;
}
.hero-search-tabs {
  display: flex;
  gap: .5rem;
  margin-bottom: 1rem;
}
.hero-search-tab {
  padding: .4rem 1rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: .875rem;
  cursor: pointer;
  border: 2px solid var(--border);
  color: var(--text-muted);
  background: transparent;
  transition: var(--transition);
}
.hero-search-tab.active, .hero-search-tab:hover {
  background: var(--orange);
  color: white;
  border-color: var(--orange);
}
.hero-search-form { display: flex; gap: .5rem; flex-wrap: wrap; }
.hero-search-form .form-control {
  flex: 1; min-width: 200px;
  border-radius: var(--radius-full) !important;
}
.hero-search-form .form-select {
  flex: 0 0 auto; width: auto; min-width: 140px;
  border-radius: var(--radius-full) !important;
}
.hero-search-form .btn-orange { border-radius: var(--radius-full); padding: .6rem 1.5rem; }

/* ── Categories Strip ───────────────────────────────────── */
.categories-strip {
  padding: 2.5rem 0;
  background: var(--gray-50);
  border-bottom: 1px solid var(--border);
}
.category-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  padding: .9rem .5rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  color: var(--text);
  border: 2px solid transparent;
}
.category-item:hover, .category-item.active {
  background: var(--orange-pale);
  border-color: var(--orange);
  color: var(--orange);
}
.category-icon {
  width: 52px; height: 52px;
  background: var(--white);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  color: var(--orange);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.category-item:hover .category-icon { background: var(--orange); color: white; }
.category-name { font-size: .78rem; font-weight: 600; text-align: center; }
.category-count { font-size: .72rem; color: var(--text-muted); }

/* ── Section Layouts ────────────────────────────────────── */
.section { padding: 3.5rem 0; }
.section-alt { background: var(--gray-50); }
.section-dark { background: var(--green-dark); color: white; }
.section-dark h2, .section-dark p { color: white; }

/* ── Listing Cards ──────────────────────────────────────── */
.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}
.listing-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.listing-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}
.listing-img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--gray-100);
}
.listing-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.listing-card:hover .listing-img-wrap img { transform: scale(1.06); }
.listing-badges {
  position: absolute;
  top: .6rem; left: .6rem;
  display: flex; gap: .3rem; flex-wrap: wrap;
}
.badge {
  font-size: .72rem;
  font-weight: 700;
  padding: .25rem .6rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: .03em;
}
.badge-rent     { background: var(--orange); color: white; }
.badge-sale     { background: var(--green);  color: white; }
.badge-featured { background: var(--text);   color: white; }
.badge-verified { background: #17a2b8;       color: white; }

.btn-favorite {
  position: absolute;
  top: .6rem; right: .6rem;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,.9);
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-400);
  font-size: .95rem;
  transition: var(--transition);
  backdrop-filter: blur(4px);
}
.btn-favorite:hover, .btn-favorite.favorited {
  background: white;
  color: var(--red);
  transform: scale(1.15);
}

.listing-body { padding: .9rem; flex: 1; display: flex; flex-direction: column; }
.listing-cat { font-size: .75rem; font-weight: 600; color: var(--orange); text-transform: uppercase; letter-spacing: .04em; margin-bottom: .3rem; }
.listing-title { font-size: .95rem; font-weight: 700; margin-bottom: .3rem; line-height: 1.3; }
.listing-title a { color: var(--text); }
.listing-title a:hover { color: var(--orange); }
.listing-location { font-size: .8rem; color: var(--text-muted); margin-bottom: .5rem; }
.listing-location i { color: var(--orange); }
.listing-meta {
  display: flex; gap: .7rem; flex-wrap: wrap;
  font-size: .8rem; color: var(--text-muted);
  margin-bottom: .7rem;
}
.listing-meta i { color: var(--green); margin-right: .2rem; }
.listing-footer {
  margin-top: auto;
  padding-top: .7rem;
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 0;
}
.listing-price { font-size: .95rem; font-weight: 800; color: var(--orange); line-height: 1.3; padding-bottom: .6rem; }
.listing-footer-divider { border: none; border-top: 1px solid var(--border); margin: 0; }
.btn-detail {
  display: block; width: 100%; text-align: center;
  font-size: .82rem; font-weight: 600;
  color: var(--green);
  border: 1.5px solid var(--green);
  border-radius: var(--radius-full);
  padding: .4rem .7rem;
  margin-top: .6rem;
  transition: var(--transition);
}
.btn-detail:hover { background: var(--green); color: white; }

/* List view variant */
.listing-card-list {
  flex-direction: row;
  max-height: 200px;
}
.listing-card-list .listing-img-wrap {
  width: 240px; flex-shrink: 0;
  aspect-ratio: unset; height: 200px;
}
@media (max-width: 576px) {
  .listing-card-list { flex-direction: column; max-height: none; }
  .listing-card-list .listing-img-wrap { width: 100%; height: 200px; }
}

/* ── Filters Sidebar ────────────────────────────────────── */
.filters-sidebar {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1.2rem;
  position: sticky;
  top: 80px;
}
.filters-sidebar h5 {
  font-size: .95rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--green);
  display: flex; align-items: center; gap: .4rem;
}
.filter-section { margin-bottom: 1.2rem; }
.filter-section-title { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin-bottom: .5rem; }
.filter-range { display: flex; gap: .4rem; align-items: center; }
.filter-range .form-control { font-size: .82rem; padding: .4rem .6rem; }
.price-range-sep { color: var(--text-muted); font-size: .85rem; flex-shrink: 0; }

/* Mobile filter toggle */
.filter-toggle-btn {
  display: none;
  width: 100%;
  background: var(--green);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: .6rem 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 1rem;
  gap: .4rem;
  align-items: center;
  justify-content: space-between;
}
@media (max-width: 991px) {
  .filter-toggle-btn { display: flex; }
  .filters-sidebar { position: static; display: none; }
  .filters-sidebar.show { display: block; }
}

/* Listings toolbar */
.listings-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
}
.listings-count { font-size: .9rem; color: var(--text-muted); }
.listings-count strong { color: var(--text); }
.view-toggle { display: flex; gap: .3rem; }
.view-btn {
  width: 34px; height: 34px;
  border: 1.5px solid var(--border);
  background: white;
  border-radius: var(--radius-sm);
  cursor: pointer; color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.view-btn.active { border-color: var(--orange); color: var(--orange); background: var(--orange-pale); }
.sort-select { font-size: .85rem; min-width: 160px; }

/* ── Pagination ─────────────────────────────────────────── */
.pagination-wrap { display: flex; justify-content: center; margin-top: 2rem; }
.pagination { gap: .3rem; }
.page-item .page-link {
  color: var(--text);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm) !important;
  padding: .4rem .75rem;
  font-weight: 500;
  font-size: .875rem;
  transition: var(--transition);
}
.page-item.active .page-link { background: var(--orange); border-color: var(--orange); color: white; }
.page-item .page-link:hover { background: var(--orange-pale); color: var(--orange); border-color: var(--orange); }

/* ── How It Works ───────────────────────────────────────── */
.step-card {
  text-align: center;
  padding: 2rem 1.5rem;
}
.step-number {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--orange-pale);
  color: var(--orange);
  font-size: 1.3rem;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem;
  border: 3px solid var(--orange);
}
.step-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--green);
}
.step-card h4 { margin-bottom: .5rem; }
.step-card p { color: var(--text-muted); font-size: .9rem; }

/* ── Stats Counter ──────────────────────────────────────── */
.stats-section { background: var(--green); color: white; padding: 3rem 0; }
.stat-item { text-align: center; padding: 1rem; }
.stat-number { font-size: 2.5rem; font-weight: 800; color: var(--orange-light); }
.stat-label { font-size: .9rem; color: rgba(255,255,255,.8); margin-top: .25rem; }

/* ── CTA Section ────────────────────────────────────────── */
.cta-section {
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
  padding: 4rem 0;
  text-align: center;
  color: white;
}
.cta-section h2 { color: white; margin-bottom: .75rem; }
.cta-section p { color: rgba(255,255,255,.85); margin-bottom: 1.5rem; }
.cta-section .btn-white {
  background: white; color: var(--orange);
  border: 2px solid white;
  border-radius: var(--radius-full);
  padding: .65rem 1.8rem;
  font-weight: 700; font-size: 1rem;
  transition: var(--transition);
}
.cta-section .btn-white:hover { background: transparent; color: white; }
.cta-section .btn-outline-white {
  background: transparent; color: white;
  border: 2px solid rgba(255,255,255,.6);
  border-radius: var(--radius-full);
  padding: .65rem 1.8rem;
  font-weight: 700; font-size: 1rem;
  transition: var(--transition);
}
.cta-section .btn-outline-white:hover { background: rgba(255,255,255,.15); }

/* ── Listing Detail ─────────────────────────────────────── */
.listing-detail-header {
  background: var(--gray-50);
  padding: 2rem 0 1.5rem;
  border-bottom: 1px solid var(--border);
}
.detail-breadcrumb { font-size: .83rem; color: var(--text-muted); margin-bottom: .75rem; }
.detail-breadcrumb a { color: var(--text-muted); }
.detail-breadcrumb a:hover { color: var(--orange); }
.detail-breadcrumb .sep { margin: 0 .4rem; }
.detail-title { font-size: clamp(1.3rem, 3vw, 2rem); margin-bottom: .5rem; }
.detail-meta-bar {
  display: flex; gap: 1rem; flex-wrap: wrap; align-items: center;
  font-size: .85rem; color: var(--text-muted);
}
.detail-meta-bar i { color: var(--orange); margin-right: .25rem; }

/* Gallery */
.gallery-main {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--gray-100);
  margin-bottom: .75rem;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: .4rem;
}
.gallery-thumb {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
  background: var(--gray-100);
}
.gallery-thumb.active, .gallery-thumb:hover { border-color: var(--orange); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-more {
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.5);
  color: white; font-weight: 700;
  font-size: .85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  aspect-ratio: 1;
}

/* Detail features grid */
.detail-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .6rem;
  margin-bottom: 1.5rem;
}
@media (min-width: 576px) { .detail-features { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) { .detail-features { grid-template-columns: repeat(4, 1fr); } }
.detail-feature-item {
  display: flex; align-items: center; gap: .5rem;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  padding: .6rem .75rem;
  font-size: .85rem;
}
.detail-feature-item i { color: var(--green); width: 16px; }

/* Detail specs */
.detail-specs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .75rem;
  margin-bottom: 1.5rem;
}
@media (min-width: 768px) { .detail-specs { grid-template-columns: repeat(4, 1fr); } }
.spec-card {
  text-align: center;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  padding: 1rem .5rem;
  border: 1px solid var(--border);
}
.spec-card .spec-icon { font-size: 1.4rem; color: var(--orange); margin-bottom: .3rem; }
.spec-card .spec-value { font-weight: 700; font-size: 1.1rem; }
.spec-card .spec-label { font-size: .75rem; color: var(--text-muted); }

/* Price card (sidebar) */
.price-card {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: sticky;
  top: 85px;
  box-shadow: var(--shadow-md);
}
.price-card .main-price {
  font-size: 1.8rem; font-weight: 800;
  color: var(--orange);
  margin-bottom: .25rem;
}
.price-card .price-period { font-size: .85rem; color: var(--text-muted); }
.price-card .mode-badge { margin-bottom: 1rem; }
.price-divider { border: none; border-top: 1px solid var(--border); margin: 1rem 0; }
.min-months-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  margin-top: .45rem;
  padding: .3rem .7rem;
  background: #fff8f0;
  border: 1px solid var(--orange);
  border-radius: 20px;
  font-size: .8rem;
  color: var(--orange);
  font-weight: 600;
}

/* Newly-built badge */
.badge-newly-built {
  background: linear-gradient(135deg, #1b6b3a 0%, #2d8a50 100%);
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  padding: .3rem .75rem;
  border-radius: 20px;
  letter-spacing: .3px;
}

/* ── Listing map section ─────────────────────────────── */
.listing-map-section {
  border-radius: var(--radius);
  overflow: hidden;
}

/* Placeholder (deactivated by default) */
.listing-map-placeholder {
  position: relative;
  height: 180px;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--border);
  background: var(--gray-100);
  cursor: pointer;
}
.listing-map-placeholder-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.0) 0%, rgba(255,255,255,.0) 100%),
    repeating-linear-gradient(0deg,  transparent, transparent 28px, rgba(0,0,0,.04) 29px),
    repeating-linear-gradient(90deg, transparent, transparent 28px, rgba(0,0,0,.04) 29px);
  pointer-events: none;
}
.listing-map-placeholder-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
  text-align: center;
  padding: 1rem;
}
.listing-map-pin-icon {
  width: 52px; height: 52px;
  background: var(--orange);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(227,97,24,.35);
}
.listing-map-pin-icon i {
  transform: rotate(45deg);
  color: #fff;
  font-size: 1.1rem;
}
.listing-map-location {
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.listing-map-location strong { font-size: .95rem; color: var(--text); }
.listing-map-location span   { font-size: .8rem;  color: var(--text-muted); }

/* Frame (shown after activation) */
.listing-map-frame {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
}
.listing-map-close {
  position: absolute;
  top: 10px; right: 10px;
  background: rgba(0,0,0,.6);
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: .3rem .8rem;
  font-size: .8rem;
  cursor: pointer;
  display: flex; align-items: center; gap: .3rem;
  transition: background .2s;
  z-index: 5;
}
.listing-map-close:hover { background: rgba(0,0,0,.85); }

/* Admin map help box */
.admin-map-help {
  margin-top: .5rem;
  background: #fff8f0;
  border: 1px solid rgba(227,97,24,.2);
  border-radius: 8px;
  padding: .5rem .75rem;
  font-size: .82rem;
}
.admin-map-help summary { cursor: pointer; color: var(--text-muted); }
.admin-map-help code { background: rgba(0,0,0,.06); padding: .1rem .35rem; border-radius: 3px; font-size: .8rem; }

/* Visit form */
.visit-form-card {
  background: var(--green-pale);
  border: 1px solid rgba(27,107,58,.15);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-top: 1.5rem;
}
.visit-form-card h5 { color: var(--green); margin-bottom: 1rem; }

/* ── Auth Pages ─────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green) 100%);
  display: flex; align-items: center;
  padding: 2rem 0;
}
.auth-card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  max-width: 460px;
  width: 100%;
  margin: 0 auto;
}
.auth-card-header {
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
  padding: 2rem;
  text-align: center;
  color: white;
}
.auth-card-header h2 { color: white; margin-bottom: .25rem; }
.auth-card-header p { color: rgba(255,255,255,.85); font-size: .9rem; margin: 0; }
.auth-card-body { padding: 2rem; }
.auth-link { font-size: .875rem; text-align: center; margin-top: .75rem; }
.auth-divider { display: flex; align-items: center; gap: .75rem; margin: 1rem 0; color: var(--text-muted); font-size: .82rem; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── Profile Page ───────────────────────────────────────── */
.profile-sidebar {
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1.5rem;
  text-align: center;
  position: sticky;
  top: 80px;
}
.profile-avatar {
  width: 100px; height: 100px; border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--orange);
  margin: 0 auto 1rem;
  display: block;
}
.profile-avatar-placeholder {
  width: 100px; height: 100px; border-radius: 50%;
  background: var(--orange); color: white;
  font-size: 2.5rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem;
  border: 4px solid var(--orange);
}
.profile-name { font-size: 1.1rem; font-weight: 700; }
.profile-email { font-size: .85rem; color: var(--text-muted); }
.profile-nav { margin-top: 1.5rem; text-align: left; }
.profile-nav-item {
  display: flex; align-items: center; gap: .6rem;
  padding: .6rem .75rem;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
  font-size: .9rem;
}
.profile-nav-item:hover, .profile-nav-item.active {
  background: var(--orange-pale);
  color: var(--orange);
}
.profile-nav-item i { width: 18px; color: var(--orange); }
.profile-content-card {
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1.5rem;
}
.profile-content-card h4 { margin-bottom: 1.5rem; color: var(--green); }

/* ── Visit Request Cards ────────────────────────────────── */
.visit-request-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
  display: flex; gap: 1rem; align-items: flex-start;
  transition: var(--transition);
}
.visit-request-card:hover { box-shadow: var(--shadow-md); }
.visit-req-thumb {
  width: 80px; height: 80px; border-radius: var(--radius-sm);
  object-fit: cover; flex-shrink: 0;
}
.visit-status-badge {
  font-size: .72rem; font-weight: 700; padding: .2rem .55rem; border-radius: var(--radius-full);
}
.visit-status-pending   { background: #FFF3CD; color: #856404; }
.visit-status-confirmed { background: #D1FAE5; color: #065F46; }
.visit-status-cancelled { background: #FEE2E2; color: #991B1B; }
.visit-status-completed { background: #DBEAFE; color: #1E40AF; }

/* ── Footer ─────────────────────────────────────────────── */
footer {
  background: var(--green-dark);
  color: rgba(255,255,255,.85);
  padding: 3rem 0 0;
  margin-top: 4rem;
}
.footer-brand { font-size: 1.4rem; font-weight: 800; color: white; margin-bottom: .5rem; }
.footer-brand span { color: var(--orange-light); }
.footer-desc { font-size: .875rem; color: rgba(255,255,255,.65); max-width: 260px; }
.footer-heading { font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.5); margin-bottom: .9rem; }
.footer-links li { margin-bottom: .4rem; }
.footer-links a { color: rgba(255,255,255,.7); font-size: .875rem; transition: var(--transition); }
.footer-links a:hover { color: var(--orange-light); padding-left: 4px; }
.footer-contact-item {
  display: flex; gap: .5rem; align-items: flex-start;
  color: rgba(255,255,255,.7); font-size: .875rem; margin-bottom: .5rem;
}
.footer-contact-item i { color: var(--orange-light); margin-top: .15rem; width: 16px; }
.footer-social { display: flex; gap: .6rem; margin-top: .75rem; }
.footer-social a {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.25);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.7);
  font-size: .9rem;
  transition: var(--transition);
}
.footer-social a:hover { background: var(--orange); border-color: var(--orange); color: white; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  margin-top: 2rem;
  padding: 1rem 0;
  font-size: .8rem;
  color: rgba(255,255,255,.45);
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem;
}
.footer-bottom a { color: rgba(255,255,255,.45); }
.footer-bottom a:hover { color: var(--orange-light); }

/* ── Alert / Flash ──────────────────────────────────────── */
.alert {
  border-radius: var(--radius-sm);
  padding: .85rem 1.1rem;
  font-size: .9rem;
  border: none;
  margin-bottom: 1rem;
}
.alert-success { background: #D1FAE5; color: #065F46; }
.alert-danger   { background: #FEE2E2; color: #991B1B; }
.alert-warning  { background: #FEF3C7; color: #92400E; }
.alert-info     { background: #DBEAFE; color: #1E40AF; }

/* ── Toast ──────────────────────────────────────────────── */
#goma-toast {
  position: fixed; bottom: 1.5rem; right: 1.5rem;
  z-index: 9999;
  background: var(--text);
  color: white;
  padding: .8rem 1.2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-xl);
  font-size: .9rem;
  display: none;
  align-items: center; gap: .5rem;
  min-width: 250px; max-width: 380px;
  animation: slideInRight .3s ease;
}
#goma-toast.show { display: flex; }
#goma-toast.toast-success { background: var(--green); }
#goma-toast.toast-error   { background: var(--red);   }
@keyframes slideInRight {
  from { transform: translateX(30px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* ── Breadcrumb ─────────────────────────────────────────── */
.goma-breadcrumb {
  background: var(--gray-50);
  padding: .75rem 0;
  border-bottom: 1px solid var(--border);
  font-size: .85rem;
}
.goma-breadcrumb a { color: var(--text-muted); }
.goma-breadcrumb a:hover { color: var(--orange); }
.goma-breadcrumb .active { color: var(--text); font-weight: 500; }
.goma-breadcrumb .sep { margin: 0 .4rem; color: var(--border); }

/* ── Empty States ───────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}
.empty-state-icon { font-size: 4rem; margin-bottom: 1rem; opacity: .3; }
.empty-state h4 { color: var(--text); margin-bottom: .5rem; }

/* ── Loading Spinner ────────────────────────────────────── */
.spinner-orange { color: var(--orange) !important; }
.loading-overlay {
  position: fixed; inset: 0;
  background: rgba(255,255,255,.8);
  z-index: 9998;
  display: flex; align-items: center; justify-content: center;
}

/* ── Lightbox / Gallery Modal ───────────────────────────── */
.gallery-modal .modal-content {
  background: rgba(0,0,0,.95);
  border: none;
  border-radius: var(--radius-lg);
}
.gallery-modal .modal-body { padding: 0; }
.gallery-modal img { width: 100%; max-height: 80vh; object-fit: contain; }

/* ── Page Hero (internal pages) ─────────────────────────── */
.page-hero {
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  color: white;
  padding: 2.5rem 0;
}
.page-hero h1 { color: white; margin-bottom: .3rem; }
.page-hero p { color: rgba(255,255,255,.8); margin: 0; }

/* ── Responsive Helpers ─────────────────────────────────── */
@media (max-width: 576px) {
  .hero { padding: 2.5rem 0 3rem; }
  .hero-search-box { padding: .9rem; }
  .hero-search-form { flex-direction: column; }
  .listings-grid { grid-template-columns: 1fr; }
  .gallery-thumbs { grid-template-columns: repeat(4, 1fr); }
  .detail-features { grid-template-columns: 1fr; }
  footer { padding-top: 2rem; }
}
@media (min-width: 768px) {
  .listings-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 992px) {
  .listings-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300, #d1d5db); border-radius: 3px; }

/* ── Selection ──────────────────────────────────────────── */
::selection { background: rgba(232,88,10,.2); }

/* ════════════════════════════════════════════════════════════
   CUSTOM VIDEO PLAYER  (.lvp)
   Styled to match the red-bordered broadcast player aesthetic
   ════════════════════════════════════════════════════════════ */

/* Outer wrapper */
.lvp {
  position: relative;
  background: #0a0a0a;
  border: 4px solid #d92020;
  border-radius: 10px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(217,32,32,.25),
    0 20px 50px rgba(0,0,0,.5);
  user-select: none;
}

/* ── Screen area ─────────────────────────────────────────── */
.lvp-screen {
  position: relative;
  background: #000;
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
}
.lvp-screen video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* ── Centre overlay (big play button) ────────────────────── */
.lvp-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity .25s;
}
.lvp-center-btn {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(10,10,10,.7);
  border: 2px solid rgba(255,255,255,.75);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.3rem;
  padding-left: 4px; /* optical centre for play triangle */
  transition: background .2s, transform .15s, border-color .2s;
  backdrop-filter: blur(4px);
}
.lvp-overlay:hover .lvp-center-btn {
  background: rgba(217,32,32,.75);
  border-color: #fff;
  transform: scale(1.1);
}

/* ── Progress bar ────────────────────────────────────────── */
.lvp-progress-wrap {
  background: transparent;
  padding: 6px 0 0;
  cursor: pointer;
  position: relative;
}
.lvp-progress-bg {
  height: 3px;
  background: rgba(255,255,255,.22);
  position: relative;
  transition: height .15s;
}
.lvp-progress-wrap:hover .lvp-progress-bg { height: 5px; }

.lvp-progress-played {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: #fff;
  pointer-events: none;
  transition: width .1s linear;
}
.lvp-progress-knob {
  position: absolute;
  top: 50%;
  left: 0;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%);
  pointer-events: none;
  box-shadow: 0 0 0 2px rgba(0,0,0,.4);
  transition: transform .15s;
}
.lvp-progress-wrap:hover .lvp-progress-knob {
  transform: translate(-50%, -50%) scale(1.3);
}

/* ── Controls bar ────────────────────────────────────────── */
.lvp-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px 8px;
  background: rgba(14,14,14,.96);
  gap: .5rem;
}
.lvp-bar-left,
.lvp-bar-right {
  display: flex;
  align-items: center;
  gap: .3rem;
  flex-shrink: 0;
}

/* Generic player button */
.lvp-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,.8);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  font-size: .9rem;
  padding: 0;
  transition: color .15s, background .15s;
  flex-shrink: 0;
}
.lvp-btn:hover {
  color: #fff;
  background: rgba(255,255,255,.1);
}
.lvp-btn:focus-visible { outline: 2px solid #d92020; outline-offset: 1px; }

/* Time display */
.lvp-time {
  font-size: .75rem;
  font-variant-numeric: tabular-nums;
  color: rgba(255,255,255,.7);
  white-space: nowrap;
  letter-spacing: .2px;
  padding: 0 .2rem;
}

/* ── Volume group ────────────────────────────────────────── */
.lvp-vol-group {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Vertical popup slider */
.lvp-vol-popup {
  display: none;
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(14,14,14,.95);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  padding: 10px 10px 8px;
  z-index: 30;
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
}
.lvp-vol-popup.open { display: flex; }

/* The vertical track */
.lvp-vtrack {
  width: 4px;
  height: 80px;
  background: rgba(255,255,255,.2);
  border-radius: 4px;
  position: relative;
  cursor: pointer;
}
.lvp-vfill {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: #fff;
  border-radius: 4px;
  height: 0%;
  pointer-events: none;
  transition: height .05s;
}
.lvp-vknob {
  position: absolute;
  left: 50%;
  top: 0%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%);
  pointer-events: none;
  box-shadow: 0 0 0 2px rgba(0,0,0,.4);
  transition: top .05s;
}

/* ── Fullscreen overrides ────────────────────────────────── */
.lvp:-webkit-full-screen .lvp-screen { aspect-ratio: auto; height: calc(100vh - 80px); }
.lvp:-moz-full-screen    .lvp-screen { aspect-ratio: auto; height: calc(100vh - 80px); }
.lvp:fullscreen          .lvp-screen { aspect-ratio: auto; height: calc(100vh - 80px); }
