/* near.com.au - Professional Real Estate Styling (Bootstrap 5 Compatible) */
:root {
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-text: #0f172a;
  --color-muted: #64748b;
  --color-accent: #0b5cad;
  --color-accent-text: #ffffff;
  --color-border: #e2e8f0;
  --color-border-subtle: #cbd5e1;
  --color-danger: #dc2626;
  --color-danger-bg: #fef2f2;
  --color-success: #16a34a;
  --color-success-bg: #f0fdf4;
  --color-warning: #f59e0b;
  --radius: 0.75rem;
  --radius-sm: 0.5rem;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -2px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 25px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.05);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-bs-theme="light"]) {
    --color-bg: #0b0f19;
    --color-surface: #131b2e;
    --color-text: #f1f5f9;
    --color-muted: #94a3b8;
    --color-accent: #38bdf8;
    --color-accent-text: #04111d;
    --color-border: #1e293b;
    --color-border-subtle: #334155;
    --color-danger: #f87171;
    --color-danger-bg: #2d1215;
    --color-success: #4ade80;
    --color-success-bg: #0f2e1b;
  }
}

:root[data-theme="dark"], [data-bs-theme="dark"] {
  --color-bg: #0b0f19;
  --color-surface: #131b2e;
  --color-text: #f1f5f9;
  --color-muted: #94a3b8;
  --color-accent: #38bdf8;
  --color-accent-text: #04111d;
  --color-border: #1e293b;
  --color-border-subtle: #334155;
  --color-danger: #f87171;
  --color-danger-bg: #2d1215;
  --color-success: #4ade80;
  --color-success-bg: #0f2e1b;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--color-accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-accent);
  color: var(--color-accent-text);
  padding: 0.5rem 1rem;
  z-index: 1050;
  border-radius: 0 0 6px 0;
  text-decoration: none;
  font-weight: 500;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.wrap {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header & Navbar */
header.site {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1020;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
}

.navbar-brand.brand {
  font-weight: 800;
  font-size: 1.45rem;
  letter-spacing: -0.025em;
  color: var(--color-text);
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.navbar-brand.brand .brand-badge {
  color: var(--color-accent);
}

.navbar-nav {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  font-weight: 500;
  color: var(--color-muted);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
}
.nav-link:hover {
  color: var(--color-accent);
  background-color: rgba(11, 92, 173, 0.08);
  text-decoration: none;
}
.nav-link.active {
  color: var(--color-accent);
  font-weight: 600;
  background-color: rgba(11, 92, 173, 0.12);
  text-decoration: none;
}

/* Main Content */
main#main {
  flex: 1 0 auto;
  padding: 0 0 3.5rem;
  min-height: 60vh;
  width: 100%;
}

/* Cards & Surfaces */
.card-surface, .card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.card-body {
  padding: 1.25rem;
}

/* Property Card */
.property-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}
.property-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* Typography & Badges */
.muted {
  color: var(--color-muted);
}
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.65rem;
  font-size: 0.775rem;
  font-weight: 600;
  border-radius: 9999px;
  line-height: 1;
}
.badge.bg-primary {
  background-color: var(--color-accent) !important;
  color: #fff;
}
.badge.text-bg-light {
  background-color: var(--color-bg) !important;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

legend {
  float: none;
  width: 100%;
  padding: 0;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: inherit;
  color: var(--color-muted);
}

/* Form Controls */
.form-label {
  display: block;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--color-muted);
  margin-bottom: 0.35rem;
}

.form-control, .form-select {
  width: 100%;
  padding: 0.55rem 0.85rem;
  font-size: 0.925rem;
  font-family: inherit;
  color: var(--color-text);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-control:focus, .form-select:focus {
  border-color: var(--color-accent);
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(11, 92, 173, 0.18);
}

.input-group {
  display: flex;
  position: relative;
  width: 100%;
}
.input-group-text {
  display: flex;
  align-items: center;
  padding: 0.55rem 0.85rem;
  font-size: 0.925rem;
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  color: var(--color-muted);
}
.input-group .form-control {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.form-check {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-right: 0.75rem;
  margin-bottom: 0.35rem;
}
.form-check-input {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--color-accent);
  cursor: pointer;
  margin: 0;
}
.form-check-label {
  font-size: 0.875rem;
  color: var(--color-text);
  cursor: pointer;
  user-select: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-weight: 500;
  font-size: 0.925rem;
  font-family: inherit;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease-in-out;
  border: 1px solid transparent;
}
.btn:hover {
  text-decoration: none;
}

.btn-primary, .btn:not([class*="btn-"]):not(.secondary) {
  background-color: var(--color-accent);
  color: #ffffff;
  border-color: var(--color-accent);
}
.btn-primary:hover, .btn:not([class*="btn-"]):not(.secondary):hover {
  opacity: 0.92;
  box-shadow: 0 4px 12px rgba(11, 92, 173, 0.25);
  color: #ffffff;
}

.btn-outline-primary, .btn.secondary {
  background-color: transparent;
  color: var(--color-accent);
  border-color: var(--color-accent);
}
.btn-outline-primary:hover, .btn.secondary:hover {
  background-color: rgba(11, 92, 173, 0.08);
  color: var(--color-accent);
}

.btn-outline-secondary {
  background-color: transparent;
  color: var(--color-muted);
  border-color: var(--color-border);
}
.btn-outline-secondary:hover {
  background-color: var(--color-bg);
  color: var(--color-text);
  border-color: var(--color-muted);
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.825rem;
  border-radius: 0.375rem;
}

/* Alerts */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  border: 1px solid transparent;
}
.alert-danger {
  background-color: var(--color-danger-bg);
  color: var(--color-danger);
  border-color: rgba(220, 38, 38, 0.2);
}

/* Grid & Layout Utilities */
.row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -0.75rem;
  margin-left: -0.75rem;
}
.row > * {
  padding-right: 0.75rem;
  padding-left: 0.75rem;
}
.g-2 { margin-right: -0.25rem; margin-left: -0.25rem; }
.g-2 > * { padding-right: 0.25rem; padding-left: 0.25rem; }
.g-3 { margin-right: -0.5rem; margin-left: -0.5rem; }
.g-3 > * { padding-right: 0.5rem; padding-left: 0.5rem; }
.g-4 { margin-right: -0.75rem; margin-left: -0.75rem; }
.g-4 > * { padding-right: 0.75rem; padding-left: 0.75rem; }

.col-12 { flex: 0 0 auto; width: 100%; }
.col-6 { flex: 0 0 auto; width: 50%; }

@media (min-width: 768px) {
  .col-md-2 { flex: 0 0 auto; width: 16.666667%; }
  .col-md-3 { flex: 0 0 auto; width: 25%; }
  .col-md-4 { flex: 0 0 auto; width: 33.333333%; }
  .col-md-6 { flex: 0 0 auto; width: 50%; }
  .row-cols-md-2 > * { flex: 0 0 auto; width: 50%; }
}

@media (min-width: 992px) {
  .col-lg-2 { flex: 0 0 auto; width: 16.666667%; }
  .col-lg-3 { flex: 0 0 auto; width: 25%; }
  .col-lg-4 { flex: 0 0 auto; width: 33.333333%; }
  .col-lg-8 { flex: 0 0 auto; width: 66.666667%; }
  .row-cols-lg-3 > * { flex: 0 0 auto; width: 33.333333%; }
}

.d-flex { display: flex !important; }
.flex-column { flex-direction: column !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-grow-1 { flex-grow: 1 !important; }
.align-items-center { align-items: center !important; }
.align-items-baseline { align-items: baseline !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-center { justify-content: center !important; }
.gap-1 { gap: 0.25rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }
.gap-4 { gap: 1.5rem !important; }
.position-relative { position: relative !important; }
.position-absolute { position: absolute !important; }
.overflow-hidden { overflow: hidden !important; }
.w-100 { width: 100% !important; }
.h-100 { height: 100% !important; }
.object-fit-cover { object-fit: cover !important; }
.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.border { border: 1px solid var(--color-border) !important; }
.border-top { border-top: 1px solid var(--color-border) !important; }
.border-bottom { border-bottom: 1px solid var(--color-border) !important; }
.mt-auto { margin-top: auto !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.p-3 { padding: 1rem !important; }
.p-4 { padding: 1.5rem !important; }
.pt-2 { padding-top: 0.5rem !important; }
.pt-3 { padding-top: 1rem !important; }
.small { font-size: 0.875rem !important; }
.fw-semibold { font-weight: 600 !important; }
.fw-bold { font-weight: 700 !important; }
.fw-bolder { font-weight: 800 !important; }
.text-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-decoration-none { text-decoration: none !important; }
.text-primary { color: var(--color-accent) !important; }
.text-body { color: var(--color-text) !important; }
.text-capitalize { text-transform: capitalize !important; }

/* Footer */
footer.site {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  color: var(--color-muted);
  font-size: 0.9rem;
  padding: 2.5rem 0 1.5rem;
  margin-top: auto;
}
.footer-brand {
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--color-text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.footer-nav a {
  color: var(--color-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.footer-nav a:hover {
  color: var(--color-accent);
  text-decoration: underline;
}
.list-unstyled {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

/* Collapse & Navbar toggler */
.collapse:not(.show) {
  display: none !important;
}
.collapse.show {
  display: block !important;
}
.navbar-collapse {
  flex-basis: 100%;
  flex-grow: 1;
  align-items: center;
}
@media (min-width: 992px) {
  .navbar-expand-lg .navbar-collapse {
    display: flex !important;
    flex-basis: auto;
  }
  .navbar-expand-lg .navbar-toggler {
    display: none;
  }
}
@media (max-width: 991.98px) {
  .navbar-collapse:not(.show) {
    display: none !important;
  }
}

.navbar-toggler {
  padding: 0.35rem 0.65rem;
  font-size: 1.15rem;
  line-height: 1;
  background-color: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--color-text);
}
.navbar-toggler-icon {
  display: inline-block;
  width: 1.3em;
  height: 1.3em;
  vertical-align: middle;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2815, 23, 42, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100%;
}

.accordion-button {
  background: transparent;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  font-family: inherit;
}

/* Hero Carousel & Slider */
.hero-slider-section {
  position: relative;
  border-radius: 0;
  width: 100%;
  overflow: hidden;
  margin-bottom: 0;
  background-color: #0b1220;
  box-shadow: 0 15px 35px rgba(0,0,0,0.12);
  min-height: 520px;
}
.hero-carousel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}
.hero-carousel .carousel-inner,
.hero-carousel .carousel-item {
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
}
.carousel-fade .carousel-item {
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}
.carousel-fade .carousel-item.active {
  opacity: 1;
}
.hero-carousel .carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.68);
  transform: scale(1.02);
  transition: transform 7s ease;
}
.hero-carousel .carousel-item.active img {
  transform: scale(1.06);
}
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.45) 0%, rgba(15, 23, 42, 0.85) 100%);
  z-index: 2;
}
.hero-content {
  position: relative;
  z-index: 3;
  padding: 3rem 1.25rem 2.5rem;
}
@media (min-width: 768px) {
  .hero-content {
    padding: 4rem 2.5rem 3.5rem;
  }
}
.hero-search-card {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 1rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  color: #0f172a;
}
[data-bs-theme="dark"] .hero-search-card,
:root[data-theme="dark"] .hero-search-card {
  background: rgba(19, 27, 46, 0.95);
  border-color: rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
}
.purpose-tabs {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 9999px;
  padding: 0.35rem;
  margin-bottom: 1.25rem;
  gap: 0.25rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.purpose-tab-btn {
  border: 0;
  background: transparent;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.45rem 1.25rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.purpose-tab-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  text-decoration: none;
}
.purpose-tab-btn.active {
  background: var(--color-accent);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(11, 92, 173, 0.4);
}

/* Category Quick Filter Pills */
.category-pill {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
  padding: 0.75rem 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text);
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}
.category-pill:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}
.category-pill.active {
  background: var(--color-accent);
  color: #ffffff;
  border-color: var(--color-accent);
}

/* Highlights Bar */
.highlight-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease;
  height: 100%;
}
.highlight-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.text-shadow {
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}


