/* ============================================================
   TheOnsiteManager.com.au — Modern Stylesheet (2026)
   A clean, professional redesign for the property portal
   ============================================================ */

/* ---------- CSS Variables / Design Tokens ---------- */
:root {
  /* Brand Colors — matches TheOnsiteManager.com.au */
  --brand-primary: #9D2820;
  --brand-secondary: #b83028;
  --brand-accent: #d4a017;
  --brand-success: #27ae60;
  --brand-danger: #c0392b;

  /* Neutrals */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Plus Jakarta Sans', var(--font-sans);
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Borders */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 350ms ease;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  color: var(--gray-800);
  background: var(--gray-50);
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

a {
  color: var(--brand-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--brand-primary);
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--gray-900);
  margin-top: 0;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.375rem; }
h4 { font-size: 1.125rem; }

/* ---------- Layout ---------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

#page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- Top Bar ---------- */
#top {
  background: var(--brand-primary);
  color: white;
  padding: var(--space-sm) 0;
  font-size: 0.85rem;
}

#top a {
  color: rgba(255, 255, 255, 0.85);
  transition: color var(--transition-fast);
}

#top a:hover {
  color: white;
}

.userPanel {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  list-style: none;
  margin: 0;
  padding: 0;
}

.userPanel > li > a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85) !important;
}

.userPanel > li > a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white !important;
}

/* ---------- Navigation ---------- */
.pgl-navbar-main,
.navbar-default {
  background: white;
  border: none;
  border-bottom: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  margin-bottom: 0;
  padding: var(--space-sm) 0;
  position: sticky;
  top: 0;
  z-index: 1030;
  transition: box-shadow var(--transition-normal);
}

.pgl-navbar-main.scrolled {
  box-shadow: var(--shadow-md);
}

.navbar-default .navbar-nav > li > a {
  color: var(--gray-700) !important;
  font-weight: 500;
  font-size: 0.9rem;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  letter-spacing: -0.01em;
}

.navbar-default .navbar-nav > li > a:hover,
.navbar-default .navbar-nav > li > a:focus {
  color: var(--brand-primary) !important;
  background: var(--gray-100);
}

.navbar-default .navbar-nav > .active > a,
.navbar-default .navbar-nav > .active > a:hover {
  color: var(--brand-primary) !important;
  background: rgba(26, 82, 118, 0.08);
}

.logo img {
  height: 45px;
  width: auto;
  transition: transform var(--transition-fast);
}

.logo:hover img {
  transform: scale(1.03);
}

/* Dropdown Menus */
.dropdown-menu {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: var(--space-sm) 0;
  min-width: 220px;
  animation: dropdownFadeIn 200ms ease;
}

@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.dropdown-menu > li > a {
  padding: var(--space-sm) var(--space-lg);
  color: var(--gray-700);
  font-size: 0.875rem;
  transition: all var(--transition-fast);
}

.dropdown-menu > li > a:hover {
  background: var(--gray-100);
  color: var(--brand-primary);
}

/* Mobile Nav Toggle */
.navbar-toggle {
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  margin-top: 10px;
}

.navbar-toggle .icon-bar {
  background: var(--gray-600);
  width: 22px;
  height: 2px;
  border-radius: 2px;
}

/* ---------- Hero / Banner Section ---------- */
.item,
.hero-section {
  background-size: cover;
  background-position: center;
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.item::after,
.hero-section::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(26, 82, 118, 0.7) 0%, rgba(26, 82, 118, 0.4) 100%);
}

.item > *,
.hero-section > * {
  position: relative;
  z-index: 1;
}

/* ---------- Search Box ---------- */
.search-box,
.pgl-search-form {
  background: white;
  border-radius: var(--radius-xl);
  padding: var(--space-xl) var(--space-2xl);
  box-shadow: var(--shadow-xl);
  max-width: 800px;
  margin: 0 auto;
}

.search-box h2,
.pgl-search-form h2 {
  color: var(--brand-primary);
  margin-bottom: var(--space-lg);
  text-align: center;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.625rem 1.25rem;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary,
.btn-submit {
  background: var(--brand-primary);
  color: white;
  border-color: var(--brand-primary);
}

.btn-primary:hover,
.btn-submit:hover {
  background: #7a1f19;
  border-color: #7a1f19;
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: white;
  color: var(--brand-primary);
  border-color: var(--gray-300);
}

.btn-secondary:hover {
  background: var(--gray-50);
  border-color: var(--brand-primary);
}

.btn-accent,
.btn-warning {
  background: var(--brand-accent);
  color: white;
  border-color: var(--brand-accent);
}

.btn-accent:hover,
.btn-warning:hover {
  background: #e67e22;
  border-color: #e67e22;
  color: white;
}

.btn-success {
  background: var(--brand-success);
  color: white;
  border-color: var(--brand-success);
}

.btn-success:hover {
  background: #219a52;
  border-color: #219a52;
  color: white;
}

.btn-lg {
  padding: 0.75rem 1.75rem;
  font-size: 1rem;
}

.btn-sm {
  padding: 0.375rem 0.875rem;
  font-size: 0.8125rem;
}

/* ---------- Forms ---------- */
.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="search"],
input[type="url"],
textarea,
select,
.select {
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--gray-800);
  background: white;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.form-control:focus,
input:focus,
textarea:focus,
select:focus,
.select:focus {
  border-color: var(--brand-secondary);
  box-shadow: 0 0 0 3px rgba(46, 134, 193, 0.15);
}

.form-control::placeholder,
input::placeholder {
  color: var(--gray-400);
}

label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--gray-700);
  margin-bottom: var(--space-xs);
}

/* ---------- Cards / Content Blocks ---------- */
.panel,
.well,
.card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-xl);
  margin-bottom: var(--space-lg);
  transition: box-shadow var(--transition-normal);
}

.panel:hover,
.card:hover {
  box-shadow: var(--shadow-md);
}

.panel-heading {
  background: var(--gray-50) !important;
  border-bottom: 1px solid var(--gray-200);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
  padding: var(--space-md) var(--space-xl);
}

.panel-heading h3,
.panel-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gray-800);
  margin: 0;
}

.panel-body {
  padding: var(--space-xl);
}

/* ---------- Property Listing Cards ---------- */
.listing-card,
.product-item,
.pgl-property {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
}

.listing-card:hover,
.product-item:hover,
.pgl-property:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  border-color: var(--gray-300);
}

.listing-card img,
.product-item img,
.pgl-property img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.listing-card:hover img,
.product-item:hover img {
  transform: scale(1.03);
}

.listing-card .price,
.product-item .price {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--brand-primary);
}

/* ---------- Badges / Labels ---------- */
.badge,
.label {
  display: inline-flex;
  align-items: center;
  padding: 0.2em 0.65em;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.label-primary,
.badge-primary {
  background: rgba(26, 82, 118, 0.1);
  color: var(--brand-primary);
}

.label-success,
.badge-success {
  background: rgba(39, 174, 96, 0.1);
  color: var(--brand-success);
}

.label-warning,
.badge-warning {
  background: rgba(243, 156, 18, 0.1);
  color: #c47f10;
}

.label-danger,
.badge-danger {
  background: rgba(231, 76, 60, 0.1);
  color: var(--brand-danger);
}

/* ---------- Tables ---------- */
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.table thead th {
  background: var(--gray-50);
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: var(--space-md) var(--space-lg);
  border-bottom: 2px solid var(--gray-200);
}

.table tbody td {
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.9rem;
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.table tbody tr:hover {
  background: var(--gray-50);
}

.table-striped > tbody > tr:nth-of-type(odd) {
  background: var(--gray-50);
}

/* ---------- Alerts ---------- */
.alert {
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  border: 1px solid;
  font-size: 0.9rem;
  margin-bottom: var(--space-lg);
}

.alert-success {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}

.alert-warning {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

.alert-danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.alert-info {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e40af;
}

/* ---------- Footer ---------- */
.pgl-footer {
  background: var(--gray-900);
  color: var(--gray-300);
  padding: var(--space-3xl) 0 var(--space-xl);
  margin-top: auto;
}

.pgl-footer h2 {
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: var(--space-lg);
  position: relative;
  padding-bottom: var(--space-sm);
}

.pgl-footer h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 3px;
  background: var(--brand-accent);
  border-radius: var(--radius-full);
}

.pgl-footer a {
  color: var(--gray-400);
  transition: color var(--transition-fast);
}

.pgl-footer a:hover {
  color: white;
}

.pgl-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pgl-footer ul li {
  margin-bottom: var(--space-sm);
}

.pgl-footer ul li a {
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
}

.pgl-footer ul li a::before {
  content: '→';
  font-size: 0.75rem;
  opacity: 0;
  transition: all var(--transition-fast);
  transform: translateX(-4px);
}

.pgl-footer ul li a:hover::before {
  opacity: 1;
  transform: translateX(0);
}

.pgl-footer address {
  font-style: normal;
  line-height: 1.8;
}

.pgl-footer address i {
  color: var(--brand-accent);
  width: 20px;
  margin-right: var(--space-xs);
}

.pgl-copyrights {
  border-top: 1px solid var(--gray-700);
  margin-top: var(--space-2xl);
  padding-top: var(--space-lg);
  text-align: center;
  font-size: 0.825rem;
  color: var(--gray-500);
}

/* Footer Newsletter */
.pgl-form-newsletter input {
  background: var(--gray-800);
  border-color: var(--gray-700);
  color: white;
}

.pgl-form-newsletter input::placeholder {
  color: var(--gray-500);
}

.pgl-form-newsletter input:focus {
  border-color: var(--brand-secondary);
  background: var(--gray-800);
}

.pgl-form-newsletter .btn-submit {
  background: var(--brand-accent);
  border-color: var(--brand-accent);
  color: white;
  border-radius: var(--radius-md);
  padding: 0.625rem 1rem;
}

/* Social Icons in Footer */
.social a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
  font-size: 0.9rem;
}

.social i {
  color: var(--brand-accent);
  transition: color var(--transition-fast);
}

.social a:hover i {
  color: white;
}

/* ---------- Breadcrumbs ---------- */
.breadcrumb {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-lg);
  font-size: 0.8125rem;
  margin-bottom: var(--space-lg);
}

.breadcrumb > li + li::before {
  content: '›';
  padding: 0 var(--space-sm);
  color: var(--gray-400);
}

/* ---------- Pagination ---------- */
.pagination > li > a,
.pagination > li > span {
  border: 1px solid var(--gray-200);
  color: var(--gray-700);
  padding: var(--space-sm) var(--space-md);
  margin: 0 2px;
  border-radius: var(--radius-md) !important;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.pagination > li > a:hover {
  background: var(--gray-100);
  border-color: var(--gray-300);
  color: var(--brand-primary);
}

.pagination > .active > a,
.pagination > .active > a:hover {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: white;
}

/* ---------- Modals ---------- */
.modal-content {
  border-radius: var(--radius-xl);
  border: none;
  box-shadow: var(--shadow-xl);
}

.modal-header {
  border-bottom: 1px solid var(--gray-200);
  padding: var(--space-lg) var(--space-xl);
}

.modal-body {
  padding: var(--space-xl);
}

.modal-footer {
  border-top: 1px solid var(--gray-200);
  padding: var(--space-lg) var(--space-xl);
}

/* ---------- Content Area ---------- */
.main-content,
#content {
  padding: var(--space-2xl) 0;
  flex: 1;
}

/* ---------- Sidebar ---------- */
.sidebar .panel {
  border-radius: var(--radius-lg);
}

.sidebar .panel-heading {
  background: var(--brand-primary) !important;
  color: white;
}

.sidebar .panel-heading h3,
.sidebar .panel-title {
  color: white;
}

/* ---------- Utilities ---------- */
.text-muted { color: var(--gray-500); }
.text-primary { color: var(--brand-primary) !important; }
.text-accent { color: var(--brand-accent) !important; }
.bg-light { background: var(--gray-100); }
.rounded { border-radius: var(--radius-md); }
.shadow { box-shadow: var(--shadow-md); }

/* Smooth image overflow on cards */
.overflow-hidden { overflow: hidden; }

/* ---------- Loading Skeleton ---------- */
.skeleton {
  background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.375rem; }
  
  .container {
    padding: 0 var(--space-md);
  }
}

@media (max-width: 767px) {
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }
  
  .pgl-footer .row > div {
    margin-bottom: var(--space-2xl);
  }
  
  .item,
  .hero-section {
    min-height: 300px;
  }
  
  .search-box,
  .pgl-search-form {
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
  }

  .navbar-collapse {
    background: white;
    border-top: 1px solid var(--gray-200);
    padding: var(--space-md) 0;
  }
  
  .dropdown-menu {
    box-shadow: none;
    border: none;
    padding-left: var(--space-lg);
  }
}

/* ---------- Print Styles ---------- */
@media print {
  .pgl-navbar-main,
  #top,
  .pgl-footer,
  .sidebar {
    display: none !important;
  }
  
  body {
    background: white;
    color: black;
    font-size: 12pt;
  }
}

/* ---------- Staging Banner ---------- */
.staging-banner {
  background: linear-gradient(135deg, var(--brand-accent), #e67e22);
  color: white;
  text-align: center;
  padding: var(--space-xs) var(--space-md);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
