/* 1. RESET & GLOBALS */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;     /* Include padding in element’s total width/height */
}
body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #fff;
}
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;            /* Centered wrapper */
}

/* 2. HEADER */
.site-header {
  background: #4c3535;
  border-bottom: 1px solid #eee;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1em 0;
}
.logo {
  height: 40px;               /* Logo sizing */
}
/* Core nav styling */
/* New: only target the *direct* child UL of .main-nav */
.main-nav > ul {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 1em;
}
/* Style for the “current page” link */
.main-nav a.current{
  color: #dcc811;               /* bright highlight color */
  text-decoration: underline;   /* optional extra cue */
}


.main-nav a {
  text-decoration: none;
  color: #cdcbcb;
  font-weight: bold;
}
.main-nav a:hover {
  color: #007bff;
}

/* Dropdown styling */
.dropdown {
  position: relative;     /* create a positioning context */
}
.dropdown-toggle {
  background: none;
  border: none;
  font-size: 1.2em;
  cursor: pointer;
  color: #cdcbcb;
}
.dropdown-toggle:hover {
    color: #007bff;
}
.dropdown-menu {
  position: absolute;
  top: 100%;              /* place below the toggle */
  left: 0;
  background: #fff;
  border: 1px solid #ddd;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  display: none;          /* hidden by default */
  list-style: none;
  padding: 0.5em 0;
  min-width: 8em;
  z-index: 1000;
}
.dropdown-menu,
.profile-dropdown {
  z-index: 1000;    /* bring to front */
}

.dropdown-menu li + li {
  border-top: 1px solid #eee;
}
.dropdown-menu a {
  display: block;
  padding: 0.5em 1em;
  color: #333;
}
.dropdown-menu a:hover {
  background: #f4f4f4;
}

/* Show the dropdown when parent has .open */
.dropdown.open .dropdown-menu {
  display: block;
}


/* 4. USER MENU & PROFILE DROPDOWN */
.user-menu {
  position: relative;
  text-align: right;
}

.profile-toggle {
  background: none;
  border: none;
  font-size: 1.5em;
  cursor: pointer;
  color: #333;
}
.profile-toggle i {
  font-size: 1.5em;   /* try 1.2em, 1.3em, etc., until you like the size */
  color: #fff;        /* or whatever contrast you need */
}


.profile-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: #4c3535;      /* match your header color */
  padding: 1em;
  border-radius: 4px;
  display: none;
  text-align: left;
}

.profile-dropdown h2 {
  margin: 0 0 0.5em;
  font-size: 1em;
  color: #fff;
}

.profile-dropdown a {
  display: block;
  color: #fff;
  text-decoration: none;
  margin: 0.25em 0;
}

.profile-dropdown a:hover {
  text-decoration: underline;
}

.hidden {
  display: none !important;
}

/* toggle open state */
.user-menu.open .profile-dropdown {
  display: block;
}


/* 5. HERO SECTION */
.hero {
  position: relative;
  height: 100vh;
  overflow: hidden;
}
.hero-slider .slide {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  
  /* 1) Cover the container fully, no tiling */
  background-size: cover;          /* fills the area, cropping if needed */
  background-position: center;     /* centers the focal point */
  background-repeat: no-repeat;    /* prevents any repeating */

  /* 2) Boost brightness */
  filter: brightness(1.2);         /* increase brightness by 20% */

  opacity: 0;
  transition: opacity 1s ease-in-out, filter 0.5s ease;
}

.hero-slider .slide.active {
  opacity: 1;
}
.hero-content {
  position: relative;
  z-index: 2;                 /* Above slides */
  text-align: center;
  color: #fff;
  top: 50%;
  transform: translateY(-50%);
}
.hero-content h1 {
  font-size: 2.5em;
  margin-bottom: 0.5em;
  text-shadow: 
    2px  2px 0 #2f38b1,
   -2px  2px 0 #2f38b1,
    2px -2px 0 #2f38b1,
   -2px -2px 0 #2f38b1,
    2px  0   0 #2f38b1,
   -2px  0   0 #2f38b1,
    0   2px  0 #2f38b1,
    0  -2px  0 #2f38b1;
}
.hero-content p {
  font-size: 1.2em;
  margin-bottom: 1em;
  text-shadow: 
    1px  1px 0 #2f38b1,
   -1px  1px 0 #2f38b1,
    1px -1px 0 #2f38b1,
   -1px -1px 0 #2f38b1,
    1px  0   0 #2f38b1,
   -1px  0   0 #2f38b1,
    0   1px  0 #2f38b1,
    0  -1px  0 #2f38b1;
}
.btn {
  display: inline-block;
  background: #007bff;
  color: #fff;
  padding: 0.75em 1.5em;
  border-radius: 4px;
  text-decoration: none;
}
.btn:hover {
  background: #0056b3;
}

/* ABOUT HERO SECTION - Enhanced Styles */
.about-hero {
  /* Inherit background-size/position, add a subtle overlay for text readability */
  background-size: cover;
  background-position: center;
  padding: 6em 0; /* Increased vertical padding for more breathing room */
  color: #ffffff; /* Pure white for contrast */
  text-align: center;
  position: relative; /* Needed for the overlay */
  overflow: hidden; /* Ensures background doesn't bleed out */
}

.about-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4); /* Dark overlay for text readability */
  z-index: 1; /* Place below text content */
}

.about-hero h2 {
  font-size: 3.2em; /* Larger, more impactful heading */
  margin-bottom: 0.4em; /* Slightly reduced for tighter feel */
  line-height: 1.2;
  position: relative; /* Bring text above overlay */
  z-index: 2;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3); /* Subtle text shadow for depth */
}

.about-hero p {
  font-size: 1.35em; /* Slightly larger, more inviting paragraph */
  max-width: 700px; /* Constrain width for better readability on large screens */
  margin: 0.5em auto 0; /* Center and add top margin */
  position: relative; /* Bring text above overlay */
  z-index: 2;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3); /* Subtle text shadow */
}

/* FEATURES GRID - Modernized & Refined */
/* The section itself gets the background color and main padding */
/* CORRECTED CSS for Features Section */

/* The outer container for the entire section, handling the full-width background */
.features-container { /* Renamed from .features.container for clarity with HTML structure */
  background-color: #b7bac0; /* Dark blue background, now full width */
  padding: 2rem 0; /* Vertical padding, no horizontal padding here */
  margin-bottom: 5em; /* Space below the entire features section */
  width: 100%; /* Ensure it spans the full viewport width */
  max-width: none; /* Crucial: Remove any max-width restriction */
  box-sizing: border-box;
}

/* The grid container itself, holding the cards */
.features-grid { /* Renamed from .features for clearer distinction */
  display: grid;
  /* This creates columns that are at least 280px wide.
     They will automatically arrange into 3 columns on large screens,
     and then wrap responsively. */
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* */
  gap: 2.5em; /* This is the space between each card (both horizontal and vertical) */
  max-width: 1200px; /* Limits the content width of the cards */
  margin: 0 auto; /* Centers the grid of cards within the full-width background */
  padding: 0 1.5rem; /* Corrected: Horizontal padding for the content (cards) within the blue section */
  box-sizing: border-box;
  align-items: stretch; /* Ensures all cards in a row stretch to the same height */
}

.feature-card {
  background: #ffffff; /* Explicitly white background for the cards */
  padding: 2.5em 1.5em; /* Generous padding inside each card */
  text-align: center; /* */
  border-radius: 10px; /* Slightly more rounded corners */
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08); /* Softer, more pronounced shadow */
  transition: transform 0.3s ease, box-shadow 0.3s ease; /* Smooth hover effects */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start; /* Align content to the top */
  min-height: 300px; /* Increased minimum height for consistency across all cards. Adjust as needed. */
}

.feature-card:hover {
  transform: translateY(-8px); /* Lift card on hover */
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.12); /* Enhanced shadow on hover */
}

.feature-card i {
  font-size: 2.8em; /* Larger, more prominent icons */
  margin-bottom: 0.75em; /* More space below icon */
  color: #007bff; /* Primary brand color for icons */
}

.feature-card h3 {
  font-size: 1.4em; /* Slightly larger, clearer headings */
  margin: 0 0 0.6em; /* Adjusted margin */
  color: #333; /* Darker text for readability */
}

.feature-card p {
  flex-grow: 1; /* Make paragraphs stretch to even heights, pushing content down */
  font-size: 0.95em; /* Slightly smaller for detail */
  color: #555; /* Softer text color */
  line-height: 1.5; /* */
}

/* Responsive adjustments for single column stacking on smaller screens */
@media (max-width: 992px) { /* Adjust breakpoint as needed for when 3 columns might become too squished */
  .features-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Allows 2 columns on some tablet sizes, adjust minmax if you only want 1 column */
  }
}

@media (max-width: 768px) { /* For typical tablet and larger phone sizes */
  .features-grid {
    grid-template-columns: 1fr; /* Force single column on smaller screens */
  }
  .feature-card {
    min-height: auto; /* Allow height to adjust to content when stacking vertically */
  }
}
.blog-teaser.container { /* Apply container styles directly to the section */
  text-align: center;
  margin: 5em auto 6em; /* More vertical margin, centered */
}

.blog-teaser h3 {
  font-size: 2.8em; /* Larger, more inviting heading */
  margin-bottom: 0.6em;
  color: #333;
}

.blog-teaser p {
  font-size: 1.1em; /* Slightly larger, more prominent intro text */
  margin-bottom: 2em; /* More space before the blog list */
  color: #666;
}

.blog-list {
  list-style: none;
  padding: 0;
  margin-top: 1.5em; /* Adjusted margin */
  display: flex; /* Use flexbox for horizontal list items */
  flex-wrap: wrap; /* Allow items to wrap on smaller screens */
  justify-content: center; /* Center items within the list */
  gap: 1.5em; /* Space between list items */
}

.blog-list li {
  margin: 0; /* Reset default margin if using flex gap */
  flex-basis: auto; /* Allow items to size naturally */
}

.blog-list a {
  color: #007bff;
  text-decoration: none;
  font-weight: bold; /* Make links stand out more */
  padding: 0.5em 0.8em; /* Add some padding around links */
  border-radius: 4px; /* Slight roundness */
  transition: all 0.2s ease-in-out; /* Smooth transition for hover */
}

.blog-list a:hover {
  text-decoration: none; /* Remove underline on hover for a cleaner look */
  color: #fff; /* White text on hover */
  background-color: #007bff; /* Blue background on hover */
}


@media (max-width: 992px) { /* Intermediate breakpoint for larger tablets/smaller desktops */
  .features.container {
    padding: 4em 0;
  }
  .features {
    gap: 2em;
  }
  .blog-teaser h3 {
    font-size: 2.5em;
  }
}

@media (max-width: 768px) {
  .features.container {
    padding: 3em 0; /* Adjust padding for smaller screens */
  }
  .features {
    gap: 1.5em; /* Slightly less gap on smaller screens */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Allow narrower cards if needed */
  }
  .feature-card {
    padding: 2em 1em;
    min-height: unset; /* Let height be natural when stacked */
  }
  .blog-teaser h3 {
    font-size: 2em;
  }
  .blog-teaser p {
    font-size: 1em;
  }
  .blog-list {
    flex-direction: column; /* Stack blog links vertically on small screens */
    align-items: center;
  }
  .blog-list li {
    width: 100%; /* Full width for stacked links */
  }
}

@media (max-width: 580px) { /* Force single column for features on very small screens */
  .features {
    grid-template-columns: 1fr; /* Single column layout for very small screens */
    gap: 1.5em; /* Maintain consistent gap */
  }
}

@media (max-width: 480px) { /* Even smaller screens */
  .features.container {
    padding: 2em 0;
  }
  .blog-teaser h3 {
    font-size: 1.8em;
  }
}

/* CONTACT INTRO */
.contact-intro {
  text-align: center;
  margin: 3em 0 2em;
}
.contact-intro h2 { font-size: 2.5em; }
.contact-intro p { font-size: 1.2em; color: #555; }

/* FORM STYLING */
.contact-form {
  max-width: 600px;
  margin: 0 auto 3em;
}
.form-group {
  margin-bottom: 1.5em;
}
.form-group label {
  display: block;
  margin-bottom: 0.5em;
  font-weight: bold;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75em;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1em;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: #007bff;
  outline: none;
}
.contact-form .btn {
  display: block;
  width: 100%;
  text-align: center;
}

/* CONTACT INFO */
.contact-info {
  text-align: center;
  margin-bottom: 4em;
}
.contact-info h3 {
  font-size: 2em;
  margin-bottom: 0.5em;
}
.contact-info p {
  line-height: 1.6;
  color: #555;
}

.breadcrumb {
  margin: 1em 0;
  font-size: 0.9em;
}
.breadcrumb a {
  text-decoration: none;
  color: #007bff;
}
.breadcrumb span {
  color: #555;
}

/* Registration Form */
.register-form {
  max-width: 500px;
  margin: 2em auto 4em;
  padding: 2em;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.register-form h2 {
  text-align: center;
  margin-bottom: 1em;
  font-size: 1.8em;
  color: #333;
}

.register-form .form-row {
  margin-bottom: 1em;
  display: flex;
  flex-direction: column;
}

.register-form .form-row label {
  margin-bottom: 0.25em;
  font-weight: bold;
  color: #555;
}

.register-form .form-row input,
.register-form .form-row select {
  padding: 0.75em;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1em;
}

.form-row {
  position: relative; /* Create a positioning context for the icon */
}

.register-form .form-row input:focus,
.register-form .form-row select:focus {
  outline: none;
  border-color: #007bff;
}

.register-form .form-row.checkbox {
  flex-direction: row;
  align-items: center;
}

.register-form .form-row.checkbox input {
  width: auto;
  margin-right: 0.5em;
}

.register-form .form-row.checkbox label {
  margin: 0;
  font-weight: normal;
}

.register-form .btn {
  display: block;
  width: 100%;
  padding: 0.75em;
  background: #007bff;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 1em;
  cursor: pointer;
  text-align: center;
  margin-top: 1em;
}

.register-form .btn:hover {
  background: #0056b3;
}

.register-form .alt-action {
  text-align: center;
  margin-top: 1em;
  color: #555;
}

.register-form .alt-action a {
  color: #007bff;
  text-decoration: none;
}

.register-form .alt-action a:hover {
  text-decoration: underline;
}

.toggle-password {
  position: absolute;
  top: 70%; /* Adjust to vertically center with the input */
  right: 15px;
  transform: translateY(-50%);
  cursor: pointer;
  color: #888;
}

/* Responsive tweaks */
@media (max-width: 480px) {
  .register-form {
    padding: 1em;
    margin: 1em;
  }
}

/* Login Form */
.login-form {
  max-width: 400px;
  margin: 3em auto 4em;
  padding: 2em;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.login-form h2 {
  text-align: center;
  margin-bottom: 1.5em;
  font-size: 1.8em;
  color: #333;
}

.login-form .form-row {
  margin-bottom: 1.25em;
}

.login-form .form-row label {
  display: block;
  margin-bottom: 0.5em;
  color: #555;
  font-weight: bold;
}

.login-form .form-row input {
  width: 100%;
  padding: 0.75em;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1em;
}
.login-form .form-row input:focus {
  outline: none;
  border-color: #007bff;
}

.login-form .form-row.checkbox {
  display: flex;
  align-items: center;  
  justify-content: flex-start;    /* vertically center the checkbox and its label */
  gap: 0.5em;               /* space between checkbox and label */
  width: 100%;
  margin-bottom: 1.5em;     /* add a bit more breathing room below */
}

.login-form .form-row.checkbox label {
  display: flex;
  align-items: center;     /* center the box with its text */
  gap: 0.5em;              /* space between checkbox and text */
  white-space: nowrap;
  font-weight: normal;
  color: #555;
  cursor: pointer;
  margin-left: 0.5em;
  font-weight: normal;
}

.login-form .btn {
  width: 100%;
  padding: 0.75em;
  margin-top: 0;
  background: #007bff;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 1em;
  cursor: pointer;
}
.login-form .btn:hover {
  background: #0056b3;
}

.login-form .alt-action {
  text-align: center;
  margin-top: 1em;
  color: #555;
}
.login-form .alt-action a {
  color: #007bff;
  text-decoration: none;
}
.login-form .alt-action a:hover {
  text-decoration: underline;
}

@media (max-width: 480px) {
  .login-form { margin: 2em 1em; padding: 1.5em; }
}


/* 6. FOOTER */
.site-footer {
  background: #191e22;
  padding: 2em 0;
  text-align: center;
  color: #333;
}
.footer-btn {
  margin-bottom: 1em;
}
.state-list,
.footer-links {
  margin-bottom: 1em;
}
.state-list li,
.footer-links a {
  display: inline-block;
  margin: 0 0.5em;
}
.state-list a,
.footer-links a {
  text-decoration: none;
  color: #007bff;
}
.state-list a:hover,
.footer-links a:hover {
  text-decoration: underline;
}
.social-icons {
  margin-bottom: 1em;
}
.social-icons a {
  margin: 0 0.5em;
  font-size: 1.2em;
  color: #959292;
}
.social-icons a:hover {
  color: #007bff;
}
.site-footer p {
  font-size: 0.85em;
  color: #868484;
}
.site-footer p a {
  color: #007bff;
  text-decoration: none;
}
.site-footer p a:hover {
  text-decoration: underline;
}

/* 7. RESPONSIVE BREAKPOINTS */
@media (max-width: 768px) {
  .menu-toggle { display: block; }
  .site-header .container { position: relative; }
}

/* Create Listing Page */
/* =============================================
   REFINED CREATE LISTING WIZARD STYLES
   ============================================= */

/* --- Main Page Layout --- */
.create-listing {
  max-width: 850px;
  margin: 2rem auto 5rem;
  padding: 0 1rem;
}

.create-listing h1 {
  font-size: 2.25rem;
  margin-bottom: 0.5rem;
  color: #212529;
}

.create-listing p {
  margin-bottom: 2rem;
  font-size: 1.1rem;
  color: #6c757d;
}

/* --- Form Section "Cards" --- */
.create-listing .form-section {
  background: #ffffff;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  margin-bottom: 2.5rem;
  padding: 2rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.create-listing .form-section h2 {
  font-size: 1.5rem;
  margin-top: 0;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e9ecef;
  color: #343a40;
}

/* --- Unified Form Control Styles --- */
.create-listing label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #495057;
}

.create-listing .text-input,
.create-listing input[type="text"],
.create-listing input[type="number"],
.create-listing input[type="url"],
.create-listing input[type="file"],
.create-listing select,
.create-listing textarea {
  width: 100%;
  padding: 12px 15px;
  font-size: 1rem;
  font-family: inherit;
  color: #495057;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none; /* Removes default OS styling */
  -moz-appearance: none;
  appearance: none;
}

.create-listing input:focus,
.create-listing select:focus,
.create-listing textarea:focus {
  outline: none;
  border-color: #007bff;
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
}

.create-listing input[type="file"] {
  background-color: #fff;
  padding: 8px;
}

/* --- Custom Styled Dropdowns (Selects) --- */
.select-wrapper {
  position: relative;
}

.select-wrapper::after {
  content: '\f078'; /* FontAwesome down-chevron icon */
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  top: 50%;
  right: 15px;
  transform: translateY(-50%);
  color: #888;
  pointer-events: none;
}

.create-listing select {
  padding-right: 40px;
  cursor: pointer;
}

/* --- Rich Text Editor --- */
.rich-editor {
  min-height: 250px;
  border-color: #dee2e6;
  background-color: #f8f9fa;
}

/* --- Media Upload Dropzone --- */
.dropzone {
  border: 2px dashed #adb5bd;
  background-color: #f8f9fa;
  transition: background-color 0.2s, border-color 0.2s;
}
.dropzone.dragover {
  background-color: #e9ecef;
  border-color: #007bff;
}

/* --- "Additional Details" & Repeater Row Styling --- */
.details-container, .floorplan-row, .sublisting-row {
  border: 1px solid #dee2e6;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 1rem;
}
.details-header, .plan-header {
  background-color: #f8f9fa;
  padding: 0.75rem;
  border-bottom: 1px solid #dee2e6;
}
.detail-row, .floorplan-row > .field-group, .sublisting-row > .field-group {
  padding: 0.75rem;
  border-bottom: 1px solid #e9ecef;
}
.detail-row:last-child {
  border-bottom: none;
}
.delete-detail, .delete-floorplan, .delete-sublisting {
    color: #dc3545;
    font-size: 1.5rem;
    font-weight: bold;
}

/* --- Action Buttons --- */
.create-listing .actions {
  display: flex;
  justify-content: space-between;
  gap: 1em;
  margin-top: 2rem;
}

.create-listing .btn {
  font-weight: 600;
  padding: 12px 24px;
}

/* --- Responsive Layout for Desktop --- */
@media (min-width: 768px) {
  .field-grid-2-col {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 1.5rem;
  }
  .detail-row, .plan-header {
      display: grid;
      grid-template-columns: 1fr 1fr auto;
      gap: 1rem;
      padding: 0.5rem 1rem;
  }
}
/* =============================================
   RESPONSIVE STYLES FOR CREATE LISTING WIZARD
   ============================================= */

/* --- Tablet & Smaller Desktop Styles (e.g., screens under 992px) --- */
@media (max-width: 992px) {
  .create-listing {
    margin: 2rem auto 4rem;
    width: 95%;
  }
}


/* --- Main Mobile Styles (Phones & Small Tablets, under 768px) --- */
@media (max-width: 768px) {
  .create-listing {
    padding: 0;
    margin: 1.5rem auto 3rem;
  }

  .create-listing .form-section {
    padding: 1.5rem; /* Reduce padding on mobile */
  }

  .create-listing h1 {
    font-size: 1.8rem; /* Make main title smaller */
  }

  .create-listing .form-section h2 {
    font-size: 1.3rem; /* Make section titles smaller */
    margin-bottom: 1rem;
  }

  /* Force all two-column grids to stack into a single column */
  .create-listing .field-grid-2-col {
    grid-template-columns: 1fr;
    gap: 0; /* Remove grid gap when stacked */
  }
  
  /* Make the action buttons stack nicely */
  .create-listing .actions {
    flex-direction: column-reverse;
    gap: 0.75rem;
  }
  
  .create-listing .actions .btn {
    width: 100%;
  }

  /* Style the "Additional Details" and Floorplan rows for mobile */
  .detail-row,
  .plan-header {
    grid-template-columns: 1fr auto; /* Title on left, delete button on right */
  }
  
  .detail-row .cell:nth-child(2), /* Hide the second input cell on mobile */
  .details-header .header-cell:nth-child(2) {
      display: none;
  }
  
  /* Stack floorplan fields vertically */
  .floorplan-row, .sublisting-row {
      display: flex;
      flex-direction: column;
      gap: 1.25rem;
      padding: 1.5rem;
  }

  .floorplan-row > .field-group, 
  .sublisting-row > .field-group {
      padding: 0;
      border-bottom: none;
  }
}


/* --- Small Mobile Phone Adjustments (under 480px) --- */
@media (max-width: 480px) {
    .create-listing .form-section {
        padding: 1rem;
    }
    .create-listing h1 {
        font-size: 1.5rem;
    }
}

/* Dropzone styling */
.dropzone {
  position: relative;
  border: 2px dashed #ccc;
  border-radius: 6px;
  padding: 2em 1em;
  text-align: center;
  background: #fafafa;
  margin-bottom: 2em;
}
.dropzone i.fa-image {
  color: #888;
  margin-bottom: 0.5em;
}
.dropzone h3 {
  margin: 0.5em 0;
  color: #555;
}
.dropzone p small {
  color: #888;
}

/* Dropzone controls (upload button + counter) */
.dropzone-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1em;
  margin-top: 1em;
}
.dropzone-controls .small-btn {
  padding: 0.4em 0.8em;
  font-size: 0.85em;
}
.dropzone-controls .counter {
  font-size: 0.9em;
  color: #2071f4;
  margin-left: auto;
  position: absolute;
  top: 8px;
  right: 12px;
  background: rgba(255,255,255,0.9);
  padding: 0 0.4em;
  border-radius: 12px;
}

/* File thumbnails (once uploaded) */
.dropzone .thumbnail-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75em;
  margin-top: 1em;
}
.dropzone .thumbnail {
  position: relative;
  width: 80px;
  height: 60px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-size: cover;
  background-position: center;
}
.dropzone .thumbnail .cover-icon {
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 1em;
  color: gold;
  cursor: pointer;
  display: none;
}
.dropzone .thumbnail.cover .cover-icon {
  display: block;
}
/* Delete “×” icon on thumbnails */
.dropzone .thumbnail .delete-icon {
  position: absolute;
  top: 4px;
  left: 4px;
  font-size: 1em;
  color: #f00;
  background: rgba(255,255,255,0.8);
  border-radius: 50%;
  padding: 2px;
  cursor: pointer;
  display: none;
}
.dropzone .thumbnail:hover .delete-icon {
  display: block;
}
@media (hover: none) {
  .dropzone .thumbnail .delete-icon {
    display: block;
    opacity: 0.8;
  }
}


/* Video URL section reuse */
.create-listing .form-section input[type="url"] {
  width: 100%;
  padding: 0.75em;
  border: 1px solid #ccc;
  border-radius: 4px;
  margin-bottom: 0.5em;
}
.create-listing .form-section input[type="url"]:focus {
  outline: none;
  border-color: #007bff;
}

/* Reuse your .actions button group */
.create-listing .actions {
  display: flex;
  justify-content: flex-end;
  gap: 1em;
}

.details-container {
  display: grid;
  grid-template-rows: auto 1fr;
}
.details-header,
.detail-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.5em;
  align-items: center;
}
.details-header .header-cell {
  font-weight: bold;
  color: #444;
}
.detail-row .cell input {
  width: 100%;
  padding: 0.5em;
  border: 1px solid #ccc;
  border-radius: 4px;
}
.detail-row .action-cell {
  text-align: center;
}
.detail-row .delete-detail {
  background: none;
  border: none;
  font-size: 1.2em;
  color: #c00;
  cursor: pointer;
}

/* Features checkbox grid */
.features-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1em;
  margin-top: 1em;
}

.features-list label {
  display: flex;
  align-items: center;
  gap: 0.5em;
  font-size: 0.95em;
  cursor: pointer;
}

.features-list input[type="checkbox"] {
  width: 1em;
  height: 1em;
}

/* On very small screens, force two columns */
@media (max-width: 480px) {
  .features-list {
    grid-template-columns: repeat(2, 1fr);
  }
}
/* Map container styling */
.map-container {
  width: 100%;
  height: 300px;           /* fixed height for map */
  border: 1px solid #ccc;  /* subtle border matching other inputs */
  border-radius: 4px;
  margin: 0.75em 0 1.5em;   /* spacing above/below like other sections */
}

/* “Place the pin…” button */
#pin-to-address {
  display: inline-block;
  margin-bottom: 1.5em;
  padding: 0.6em 1.2em;
  font-size: 0.95em;
  border-radius: 4px;
  background: #eee;
  color: #333;
  border: 1px solid #ccc;
  cursor: pointer;
}
#pin-to-address:hover {
  background: #ddd;
  border-color: #bbb;
}

/* Field groups (address + coordinates) */
.field-group {
  margin-bottom: 1em;
}
.field-group label {
  display: block;
  margin-bottom: 0.3em;
  font-weight: bold;
  color: #444;
}
.field-group .text-input {
  width: 100%;
  padding: 0.75em;
  border: 1px solid #ccc;
  border-radius: 4px;
}
.field-group .text-input:focus {
  outline: none;
  border-color: #007bff;
}

/* Ensure the map and inputs stack nicely on mobile */
@media (max-width: 600px) {
  .map-container {
    height: 250px;
  }
  #pin-to-address {
    width: 100%;
    text-align: center;
  }
}

/* Floor-plan header controls (input + delete X) */
.plan-header-controls {
  display: flex;
  align-items: center;
  gap: 0.5em;
}

/* “×” delete button */
.delete-floorplan {
  background: none;
  border: none;
  font-size: 1.2em;
  color: #c00;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.delete-floorplan:hover {
  color: #900;
}

/* Insights Page Styles */

/* Container & Title */
.insights .page-title {
  font-size: 2em;
  margin-bottom: 1em;
  color: #333;
}

/* Reuse form-section and field-group from other pages */
.insights .form-section {
  margin-bottom: 2em;
}
.insights .field-group {
  margin-bottom: 1em;
}
.insights .field-group label {
  display: block;
  margin-bottom: 0.3em;
  font-weight: bold;
  color: #444;
}
.insights .field-group .text-input,
.insights .field-group select {
  width: 100%;
  padding: 0.75em;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1em;
}
.insights .field-group .text-input:focus,
.insights .field-group select:focus {
  outline: none;
  border-color: #007bff;
}

/* Metrics Section */
.dashboard-section.metrics {
  display: flex;
  gap: 1.5em;
  flex-wrap: wrap;
}
.metric-card {
  flex: 1 1 300px;
  background: #fafafa;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 1em;
}
.metric-card h3 {
  margin-bottom: 0.75em;
  font-size: 1.2em;
  color: #333;
}

/* Toggles inside metric-card */
.metric-toggles {
  display: flex;
  justify-content: space-between;
  gap: 0.5em;
}
.toggle-item {
  flex: 1;
  text-align: center;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 0.75em 0.5em;
}
.toggle-item .metric-value {
  display: block;
  font-size: 1.5em;
  font-weight: bold;
  color: #007bff;
}
.toggle-item .fa-caret-up {
  color: #007bff;
  margin: 0.25em 0;
}
.toggle-item .metric-percent {
  display: block;
  color: #28a745;
  font-size: 0.9em;
  margin-bottom: 0.5em;
}
.toggle-item .metric-label {
  display: block;
  font-size: 0.85em;
  color: #666;
}

/* Visits Chart Section */
.dashboard-section.visits {
  margin-bottom: 2em;
}
.dashboard-section.visits h3 {
  font-size: 1.3em;
  margin-bottom: 0.75em;
  color: #333;
}
.visit-toggles {
  display: flex;
  gap: 0.5em;
  margin-bottom: 1em;
}
.visit-toggles .toggle-btn {
  flex: 1;
  padding: 0.5em;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9em;
  text-align: center;
}
.visit-toggles .toggle-btn:hover,
.visit-toggles .toggle-btn.active {
  background: #007bff;
  color: #fff;
  border-color: #007bff;
}

/* Chart container common */
.chart-container {
  width: 100%;
  min-height: 200px;
  background: #fafafa;
  border: 1px solid #ddd;
  border-radius: 6px;
  position: relative;
  margin-bottom: 1em;
}

/* Legend styling */
.chart-legend {
  display: flex;
  gap: 1.5em;
  flex-wrap: wrap;
}
.chart-legend label {
  display: flex;
  align-items: center;
  font-size: 0.9em;
  color: #333;
  cursor: pointer;
}
.chart-legend input[type="checkbox"] {
  margin-right: 0.4em;
}

.chart-wrapper {
  position: relative;
  width: 100%;
  height: 300px; /* or whatever fixed height you prefer */
  margin-bottom: 1em;
}
.chart-canvas {
  width: 100% !important;
  height: 100% !important;
}

/* Other Dashboard Sections */
.dashboard-section h3 {
  font-size: 1.2em;
  margin-bottom: 0.75em;
  color: #333;
}

/* Profile Page Styles */

/* Container */
.profile-page {
  padding: 2em 0;
}
.profile-page h1 {
  font-size: 2em;
  margin-bottom: 0.5em;
  color: #333;
}
.profile-page .btn.primary {
  margin-bottom: 2em;
}

/* Form Sections */
.profile-page .form-section {
  margin-bottom: 2.5em;
  background: #fafafa;
  padding: 1.5em;
  border: 1px solid #ddd;
  border-radius: 6px;
}
.profile-page .form-section h2 {
  font-size: 1.3em;
  margin-bottom: 1em;
  color: #333;
}

/* Field Group */
.profile-page .field-group {
  margin-bottom: 1em;
}
.profile-page .field-group label {
  display: block;
  margin-bottom: 0.3em;
  font-weight: bold;
  color: #444;
}
.profile-page .field-group .text-input,
.profile-page .field-group select {
  width: 100%;
  padding: 0.75em;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1em;
}
.profile-page .field-group .text-input:focus,
.profile-page .field-group select:focus {
  outline: none;
  border-color: #007bff;
}

/* Profile Picture Preview */
.profile-pic-preview {
  font-size: 5em;
  color: #ccc;
  margin-bottom: 0.5em;
  text-align: center;
}
.profile-pic-preview img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
}

/* Buttons */
.profile-page .btn {
  padding: 0.6em 1.2em;
  border-radius: 4px;
  font-size: 1em;
  cursor: pointer;
}
.profile-page .btn.primary {
  background: #007bff;
  color: #fff;
  border: none;
}
.profile-page .btn.primary:hover {
  background: #0056b3;
}
.profile-page .btn.secondary {
  background: #fff;
  color: #333;
  border: 1px solid #ccc;
}
.profile-page .btn.secondary:hover {
  background: #f4f4f4;
}
.profile-page .btn.danger {
  background: #dc3545;
  color: #fff;
  border: none;
}
.profile-page .btn.danger:hover {
  background: #a71d2a;
}

/* === About Me Section === */
.field-group label {
  display: block;
  margin-bottom: 0.4em;
  font-weight: bold;
  color: #444;
}

.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
  margin-bottom: 0.5em;
}

.editor-toolbar button {
  background: #fff;
  border: 1px solid #ccc;
  padding: 0.4em 0.6em;
  font-size: 1em;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.editor-toolbar button:hover,
.editor-toolbar button:focus {
  background: #f0f8ff;
  border-color: #007bff;
}

.rich-text-editor {
  width: 100%;
  min-height: 160px;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 0.8em;
  font-size: 1em;
  line-height: 1.5;
  color: #333;
  background: #fff;
  overflow-y: auto;
}
.rich-text-editor:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 2px rgba(0,123,255,0.4);
}

/* Hide the underlying textarea */
.about-hidden {
  display: none;
  visibility: hidden;
}

/* 1) Ensure lists stay inside the rich-text box */
.rich-text-editor ul,
.rich-text-editor ol {
  margin: 0 0 1em 1.2em;  /* indent list items inside the editor */
  padding-left: 0;        /* let the margin handle the indent */
}

/* 2) Style for active toolbar buttons */
.editor-toolbar button.active {
  border-color: #007bff;
  background: #e6f0ff;
  color: #007bff;
}

@media (max-width: 480px) {
  .editor-toolbar {
    gap: 0.3em;
  }
  .editor-toolbar button {
    flex: 1 1 30%;
    font-size: 0.9em;
    padding: 0.3em 0.4em;
  }
}

/* Social Media Grid */
.profile-page .form-section:nth-of-type(2) .field-group {
  display: flex;
  flex-direction: column;
}
@media (min-width: 600px) {
  .profile-page .form-section:nth-of-type(2) .field-group {
    flex-direction: row;
    align-items: center;
  }
  .profile-page .form-section:nth-of-type(2) .field-group label {
    flex: 0 0 120px;
  }
  .profile-page .form-section:nth-of-type(2) .field-group .text-input {
    flex: 1;
  }
}

/* Currency Selection */
.profile-page select[name="currency"] {
  max-width: 200px;
}

/* Change Password Section */
.profile-page .form-section:nth-of-type(4) .field-group {
  max-width: 300px;
}

/* Delete Account */
.profile-page .form-section:last-of-type {
  text-align: center;
}

/* Public Profile Page Styles */

/* Container */
.public-profile-page {
  padding: 2em 0;
}

/* Section Titles */
.section-title {
  font-size: 1.5em;
  margin-bottom: 1em;
  color: #333;
}

/* Profile Header Card */
.profile-card {
  background: #fafafa;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 1.5em;
  text-align: center;
  margin-bottom: 2em;
}
.profile-username {
  font-size: 2em;
  margin-bottom: 0.75em;
  color: #444;
}
.profile-actions {
  display: flex;
  justify-content: center;
  gap: 1em;
  margin-bottom: 1em;
}
.profile-card .btn {
  padding: 0.6em 1.2em;
  border-radius: 4px;
  font-size: 1em;
  cursor: pointer;
}
.profile-card .btn.primary {
  background: #007bff;
  color: #fff;
  border: none;
}
.profile-card .btn.primary:hover {
  background: #0056b3;
}
.profile-card .btn.secondary {
  background: #fff;
  color: #333;
  border: 1px solid #ccc;
}
.profile-card .btn.secondary:hover {
  background: #f4f4f4;
}

/* Email Popup */
.email-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 90%;
  max-width: 400px;
  transform: translate(-50%, -50%);
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 1.5em;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  z-index: 1000;
}
.email-popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1em;
}
.email-popup-header span {
  font-weight: bold;
  color: #333;
  font-size: 1.1em;
}
.close-btn {
  background: none;
  border: none;
  font-size: 1.5em;
  line-height: 1;
  cursor: pointer;
  color: #666;
}
.close-btn:hover {
  color: #000;
}
.email-form .field-group {
  margin-bottom: 1em;
}
.email-form label {
  display: block;
  margin-bottom: 0.3em;
  font-weight: bold;
  color: #444;
}
.email-form .text-input,
.email-form select,
.email-form textarea {
  width: 100%;
  padding: 0.6em;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1em;
}
.email-form .text-input:focus,
.email-form select:focus,
.email-form textarea:focus {
  outline: none;
  border-color: #007bff;
}
.email-form textarea {
  resize: vertical;
}
.terms-note {
  font-size: 0.9em;
  margin: 0.75em 0;
}
.terms-note .link {
  color: #007bff;
  text-decoration: none;
}
.terms-note .link:hover {
  text-decoration: underline;
}
.email-form .btn.primary {
  width: 100%;
  padding: 0.75em;
  background: #007bff;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 1em;
  cursor: pointer;
}
.email-form .btn.primary:hover {
  background: #0056b3;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 1em;
  margin-bottom: 1.5em;
  border-bottom: 1px solid #ddd;
}
.tab-btn {
  background: none;
  border: none;
  padding: 0.5em 1em;
  font-size: 1em;
  cursor: pointer;
  color: #555;
  border-bottom: 3px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.tab-btn.active {
  color: #007bff;
  border-color: #007bff;
}
.tab-btn:hover {
  color: #0056b3;
}

/* Tab Content */
.tab-content {
  margin-bottom: 2em;
}
.sort-group {
  margin-bottom: 1em;
}
.sort-group label {
  margin-right: 0.5em;
  font-weight: bold;
  color: #444;
}
.sort-group .text-input {
  width: auto;
  display: inline-block;
}
.listings-container,
.reviews-container {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 1em;
  min-height: 100px;
}
.leave-review-button {
  margin-bottom: 1em;
}

/* Review Form Popup */
.review-form-popup {
  background: #fafafa;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 1.5em;
  margin-bottom: 1.5em;
}
.review-form-popup h3 {
  margin-bottom: 1em;
  color: #333;
}
.review-form .field-group {
  margin-bottom: 1em;
}
.review-form label {
  display: block;
  margin-bottom: 0.3em;
  font-weight: bold;
  color: #444;
}
.review-form .text-input,
.review-form textarea,
.review-form select {
  width: 100%;
  padding: 0.6em;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1em;
}
.review-form .text-input:focus,
.review-form textarea:focus,
.review-form select:focus {
  outline: none;
  border-color: #007bff;
}
.review-form textarea {
  resize: vertical;
}
.review-form .btn.primary {
  padding: 0.6em 1.2em;
  background: #007bff;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 1em;
  cursor: pointer;
}
.review-form .btn.primary:hover {
  background: #0056b3;
}

/* Reviews Container */
.reviews-container p,
.listings-container p {
  color: #666;
  font-style: italic;
}

/* Contact Section */
.contact-section {
  background: #fafafa;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 1.5em;
  margin-bottom: 2em;
}
.contact-item {
  margin-bottom: 0.75em;
}
.contact-item strong {
  color: #444;
}
.contact-item a {
  color: #007bff;
  text-decoration: none;
  margin-left: 0.5em;
}
.contact-item a:hover {
  text-decoration: underline;
}

/* Responsive Adjustments */
@media (max-width: 600px) {
  .profile-actions {
    flex-direction: column;
  }
  .profile-actions .btn {
    width: 100%;
  }
  .tabs {
    flex-wrap: wrap;
    gap: 0.5em;
  }
}

/* Board (Dashboard) Page Styles */

/* Container Padding */
.board-page {
  padding: 2em 0;
}

/* 1. Welcome Banner */
.welcome-banner {
  text-align: center;
  margin-bottom: 2em;
}
.welcome-banner h1 {
  font-size: 2em;
  color: #333;
  margin-bottom: 0.5em;
}
.welcome-banner p {
  font-size: 1em;
  color: #555;
}

/* 2. Key Stats Cards */
.dashboard-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5em;
  margin-bottom: 2em;
}
.stat-card {
  flex: 1 1 200px;
  background: #fafafa;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 1.5em;
  text-align: center;
  transition: box-shadow 0.15s;
}
.stat-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.stat-card h2 {
  font-size: 1.1em;
  color: #444;
  margin-bottom: 0.75em;
}
.stat-value {
  font-size: 2em;
  color: #007bff;
}

/* 3. Quick Actions */
.dashboard-shortcuts {
  margin-bottom: 2em;
}
.dashboard-shortcuts h2 {
  font-size: 1.3em;
  color: #333;
  margin-bottom: 1em;
}
.shortcut-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1em;
}
.shortcut-buttons .btn {
  flex: 1 1 200px;
  text-align: center;
  padding: 0.75em 1.2em;
  border-radius: 4px;
  font-size: 1em;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.shortcut-buttons .btn.primary {
  background: #007bff;
  color: #fff;
  border: none;
}
.shortcut-buttons .btn.primary:hover {
  background: #0056b3;
}
.shortcut-buttons .btn.secondary {
  background: #fff;
  color: #333;
  border: 1px solid #ccc;
}
.shortcut-buttons .btn.secondary:hover {
  background: #f4f4f4;
}

/* 4. Recent Activity Feed */
.recent-activity h2 {
  font-size: 1.3em;
  color: #333;
  margin-bottom: 1em;
}
.activity-list {
  list-style: none;
  padding: 0;
  margin: 0;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  min-height: 100px;
}
.activity-list li {
  padding: 0.75em 1em;
  border-bottom: 1px solid #eee;
  color: #555;
}
.activity-list li:last-child {
  border-bottom: none;
}
.activity-list li:first-child {
  font-style: italic;
  color: #666;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .dashboard-stats {
    flex-direction: column;
  }
  .shortcut-buttons {
    flex-direction: column;
  }
  .shortcut-buttons .btn {
    width: 100%;
  }
}

/* properties-page Styles */

/* Container Padding */
.properties-page {
  padding: 2em 0;
}
.properties-page h1 {
  font-size: 2em;
  margin-bottom: 1em;
  color: #333;
  text-align: center;
}

/* Listings Grid */
.properties-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5em;
  margin-bottom: 2em;
}
.property-card {
  background: #fafafa;
  border: 1px solid #ddd;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.card-image img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.card-content {
  padding: 1em;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.property-title {
  font-size: 1.2em;
  margin-bottom: 0.5em;
  color: #444;
}
.property-price {
  font-size: 1em;
  color: #007bff;
  margin-bottom: 0.5em;
}
.property-status {
  font-size: 0.9em;
  color: #666;
  margin-bottom: 1em;
}

/* Card Actions */
.card-actions {
  margin-top: auto;
  display: flex;
  gap: 0.5em;
}
.card-actions .btn {
  flex: 1;
  padding: 0.5em;
  border-radius: 4px;
  font-size: 0.95em;
  cursor: pointer;
  transition: background 0.15s;
}
.card-actions .btn.secondary {
  background: #fff;
  color: #333;
  border: 1px solid #ccc;
}
.card-actions .btn.secondary:hover {
  background: #f4f4f4;
}
.card-actions .btn.danger {
  background: #dc3545;
  color: #fff;
  border: none;
}
.card-actions .btn.danger:hover {
  background: #a71d2a;
}

/* Empty State */
.empty-state {
  text-align: center;
  margin: 2em 0;
}
.empty-state p {
  font-size: 1.1em;
  color: #555;
}
.empty-state .btn.primary {
  margin-top: 0.5em;
  padding: 0.6em 1.2em;
  background: #007bff;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.empty-state .btn.primary:hover {
  background: #0056b3;
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
.modal-content {
  background: #fff;
  border-radius: 6px;
  padding: 1.5em;
  max-width: 400px;
  width: 90%;
  text-align: left;
}
.modal-content h3 {
  margin-bottom: 0.75em;
  color: #333;
}
.modal-content p {
  margin-bottom: 1em;
  color: #555;
}
.field-group {
  margin-bottom: 1em;
}
.field-group label {
  display: block;
  margin-bottom: 0.3em;
  font-weight: bold;
  color: #444;
}
.field-group .text-input,
.field-group textarea {
  width: 100%;
  padding: 0.6em;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1em;
}
.field-group .text-input:focus,
.field-group textarea:focus {
  outline: none;
  border-color: #007bff;
}

/* Modal Actions */
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5em;
}
.modal-actions .btn {
  padding: 0.5em 1em;
  border-radius: 4px;
  font-size: 0.95em;
  cursor: pointer;
}
.modal-actions .btn.secondary {
  background: #fff;
  color: #333;
  border: 1px solid #ccc;
}
.modal-actions .btn.secondary:hover {
  background: #f4f4f4;
}
.modal-actions .btn.primary {
  background: #007bff;
  color: #fff;
  border: none;
}
.modal-actions .btn.primary:hover {
  background: #0056b3;
}
.modal-actions .btn.danger {
  background: #dc3545;
  color: #fff;
  border: none;
}
.modal-actions .btn.danger:hover {
  background: #a71d2a;
}

/* Responsive */
@media (max-width: 600px) {
  .properties-grid {
    grid-template-columns: 1fr;
  }
  .modal-actions {
    flex-direction: column-reverse;
    gap: 0.75em;
  }
}

/* saved-searches-page Styles */

/* Container Padding */
.saved-searches-page {
  padding: 2em 0;
}
.saved-searches-page h1 {
  font-size: 2em;
  margin-bottom: 1em;
  color: #333;
  text-align: center;
}

/* Searches List */
.searches-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5em;
  margin-bottom: 2em;
}
.search-card {
  background: #fafafa;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 1em;
  display: flex;
  flex-direction: column;
}
.search-name {
  font-size: 1.2em;
  color: #444;
  margin-bottom: 0.5em;
}
.search-criteria {
  font-size: 0.95em;
  color: #666;
  margin-bottom: 1em;
}
.search-actions {
  margin-top: auto;
  display: flex;
  gap: 0.5em;
}
.search-actions .btn {
  flex: 1;
  padding: 0.5em;
  border-radius: 4px;
  font-size: 0.95em;
  cursor: pointer;
  transition: background 0.15s;
}
.search-actions .btn.secondary {
  background: #fff;
  color: #333;
  border: 1px solid #ccc;
}
.search-actions .btn.secondary:hover {
  background: #f4f4f4;
}
.search-actions .btn.danger {
  background: #dc3545;
  color: #fff;
  border: none;
}
.search-actions .btn.danger:hover {
  background: #a71d2a;
}

/* Empty State */
.empty-state {
  text-align: center;
  margin: 2em 0;
}
.empty-state p {
  font-size: 1.1em;
  color: #555;
}
.empty-state .link {
  color: #007bff;
  text-decoration: none;
}
.empty-state .link:hover {
  text-decoration: underline;
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
.modal-content {
  background: #fff;
  border-radius: 6px;
  padding: 1.5em;
  max-width: 400px;
  width: 90%;
  text-align: left;
}
.modal-content h3 {
  margin-bottom: 0.75em;
  color: #333;
}
.modal-content p {
  margin-bottom: 1em;
  color: #555;
}

/* Modal Actions */
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5em;
}
.modal-actions .btn {
  padding: 0.5em 1em;
  border-radius: 4px;
  font-size: 0.95em;
  cursor: pointer;
}
.modal-actions .btn.secondary {
  background: #fff;
  color: #333;
  border: 1px solid #ccc;
}
.modal-actions .btn.secondary:hover {
  background: #f4f4f4;
}
.modal-actions .btn.primary {
  background: #007bff;
  color: #fff;
  border: none;
}
.modal-actions .btn.primary:hover {
  background: #0056b3;
}
.modal-actions .btn.danger {
  background: #dc3545;
  color: #fff;
  border: none;
}
.modal-actions .btn.danger:hover {
  background: #a71d2a;
}

/* Responsive */
@media (max-width: 600px) {
  .searches-list {
    grid-template-columns: 1fr;
  }
  .modal-actions {
    flex-direction: column-reverse;
    gap: 0.75em;
  }
}

/* messages-page Styles */

/* Container Padding */
.messages-page {
  padding: 2em 0;
}
.messages-page h1 {
  font-size: 2em;
  margin-bottom: 1em;
  color: #333;
  text-align: center;
}

/* Messages List */
.messages-list {
  display: flex;
  flex-direction: column;
  gap: 1em;
  margin-bottom: 2em;
}
.message-card {
  background: #fafafa;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 1em;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.message-summary {
  display: flex;
  flex-direction: column;
}
.message-sender {
  font-weight: bold;
  color: #444;
}
.message-subject {
  color: #333;
  margin: 0.3em 0;
}
.message-date {
  font-size: 0.9em;
  color: #666;
}
.message-card .btn.secondary {
  padding: 0.4em 0.8em;
  background: #fff;
  color: #333;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s;
}
.message-card .btn.secondary:hover {
  background: #f4f4f4;
}

/* Empty State */
.empty-state {
  text-align: center;
  margin: 2em 0;
}
.empty-state p {
  font-size: 1.1em;
  color: #555;
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
.modal-content {
  background: #fff;
  border-radius: 6px;
  padding: 1.5em;
  max-width: 500px;
  width: 90%;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1em;
}
.modal-header h3 {
  margin: 0;
  color: #333;
}
.close-btn {
  background: none;
  border: none;
  font-size: 1.5em;
  line-height: 1;
  cursor: pointer;
  color: #666;
}
.close-btn:hover {
  color: #000;
}
.modal-body p {
  margin: 0.5em 0;
  color: #444;
}
.modal-body hr {
  margin: 1em 0;
  border-color: #ddd;
}

/* Responsive */
@media (max-width: 600px) {
  .message-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5em;
  }
  .message-card .btn.secondary {
    align-self: flex-end;
  }
}

.intro {
  text-align: center;
  margin-bottom: 2em;
}

.intro h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  color: #333;
}

.intro p {
  font-size: 1.2rem;
  color: #555;
  text-align: justify;
}

/* ----------------------------------------------------------------------
 2. CATEGORY GRID
---------------------------------------------------------------------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}

/* Each clickable card */
.category-card {
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  background: #fff;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Image portion */
.card-image {
  width: 100%;
  height: 140px;
  background-size: cover;
  background-position: center;
}

/* Label area at bottom of each card */
.card-label {
  padding: 1rem;
  background: #fafafa;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Category name styling */
.category-name {
  font-size: 1.1rem;
  font-weight: bold;
  color: #333;
  margin-bottom: 0.25rem;
}

/* Count styling */
.category-count {
  font-size: 0.9rem;
  color: #777;
}

/* ----------------------------------------------------------------------
 3. RESPONSIVENESS (if you need smaller tweaks)
---------------------------------------------------------------------- */
@media (max-width: 600px) {
  .intro h1 {
    font-size: 2rem;
  }

  .intro p {
    font-size: 1rem;
  }

  .category-card:hover {
    transform: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  }
}

/* apartments.css */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

.apartments-list h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}


.controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.sort-by label {
  margin-right: 0.5rem;
}

#sort-select {
  padding: 0.4rem;
}

#property-count {
  font-weight: bold;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.property-card {
  display: block;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow .2s;
}

.property-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.image-slider img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.image-slider .prev,
.image-slider .next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.8);
  border: none;
  font-size: 1.2rem;
  padding: 0.3rem 0.5rem;
  cursor: pointer;
}

.image-slider .prev { left: 0.5rem; }
.image-slider .next { right: 0.5rem; }

.overlay {
  position: absolute;
  padding: 0.5rem;
}

.top-left { top: 0.5rem; left: 0.5rem; }
.top-right {
  top: 0.5rem; right: 0.5rem;
  display: flex;
  gap: 0.3rem;
}

.price-tag {
  background: #007BFF;
  color: #fff;
  font-weight: bold;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
}

.icon-btn {
  background: rgba(255,255,255,0.9);
  border: none;
  padding: 0.3rem;
  border-radius: 4px;
  cursor: pointer;
}

.card-title {
  padding: 0.8rem;
  font-size: 1.1rem;
  color: #333;
  margin: 0;
}

.container.property-detail {
  max-width: 800px;
  margin: 0 auto;
  padding: 1rem;
}

.image-slider img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.prev, .next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.8);
  border: none;
  padding: 0.5rem;
  cursor: pointer;
}

.prev { left: 1rem; }
.next { right: 1rem; }

.filter-buttons, .action-buttons {
  position: absolute;
  display: flex;
  gap: 0.5rem;
}

.filter-buttons {
  bottom: 1rem;
  left: 1rem;
}

.action-buttons {
  bottom: 1rem;
  right: 1rem;
}

.share-options {
  display: none;
  flex-direction: column;
  background: #fff;
  border: 1px solid #ccc;
  position: absolute;
  top: -5rem;
  right: 0;
  padding: 0.5rem;
  border-radius: 4px;
}

.icon-btn {
  background: rgba(255,255,255,0.9);
  border: none;
  padding: 0.6rem;
  border-radius: 4px;
  cursor: pointer;
}

.status {
  display: inline-block;
  margin: 0.5rem 0;
  padding: 0.3rem 0.6rem;
  background: #28a745;
  color: #fff;
  border-radius: 4px;
  font-weight: bold;
}

.property-detail .title {
  font-size: 2rem;
  margin: 0.5rem 0;
}

.location {
  color: #555;
  margin-bottom: 1rem;
}

.details, .address, .contact-info, .enquiry-form, .review-form {
  margin-top: 2rem;
}

.card table {
  width: 100%;
  border-collapse: collapse;
}

.card th, .card td {
  padding: 0.5rem;
  border: 1px solid #eee;
  text-align: left;
}

.agent-card {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.agent-card img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
}

.enquiry-form form, .review-form form {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.enquiry-form input,
.enquiry-form select,
.enquiry-form textarea,
.review-form input,
.review-form select,
.review-form textarea {
  padding: 0.6rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.enquiry-form button,
.review-form button {
  align-self: flex-start;
  padding: 0.6rem 1.2rem;
  border: none;
  background: #007BFF;
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
}


/* blog.css */
.blog-detail .post-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 0.5rem;
}
.blog-detail .post-meta {
  text-align: center;
  color: #777;
  margin-bottom: 1.5rem;
}
.blog-detail .post-image {
  display: block;
  max-width: 800px;
  margin: 0 auto 1.5rem;
  width: 100%;
  height: auto;
  border-radius: 6px;
}
.blog-detail .post-content {
  line-height: 1.7;
  margin-bottom: 2rem;
  color: #333;
}
.blog-detail .post-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  position: relative;
}
/* =============================================
   IMPROVED BLOG POST SHARE MENU
   ============================================= */

.blog-detail .share-options {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px; /* A little space from the button */
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  z-index: 100;
  overflow: hidden; /* Ensures child elements conform to border-radius */
  flex-direction: column;
  width: 180px; /* Give it a consistent width */
  border: 1px solid #eee;
}

.blog-detail .share-options a {
  display: flex;
  align-items: center;
  gap: 12px; /* Space between icon and text */
  padding: 12px 15px;
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: background-color 0.2s ease-in-out;
}

.blog-detail .share-options a:hover {
  background-color: #f5f5f5;
  color: #007bff;
}

.blog-detail .share-options a .fab,
.blog-detail .share-options a .fas {
  font-size: 1.1em;
  width: 20px; /* Ensures text aligns even with different icon widths */
  text-align: center;
  color: #555;
}

/* Optional: Add specific hover colors */
.blog-detail .share-options a:hover .fa-whatsapp { color: #25D366; }
.blog-detail .share-options a:hover .fa-facebook-f { color: #1877F2; }
.blog-detail .share-options a:hover .fa-twitter { color: #1DA1F2; }
.blog-detail .share-options a:hover .fa-envelope { color: #c71610; }


.blog-detail .share-options .close-btn {
  position: absolute;
  top: 5px;
  right: 8px;
  background: none;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  color: #aaa;
  cursor: pointer;
  padding: 0;
}

.blog-detail .share-options .close-btn:hover {
  color: #333;
}
.blog-detail .comments {
  margin-top: 3rem;
}
.blog-detail .comment {
  border-bottom: 1px solid #eee;
  padding: 1rem 0;
}
.blog-detail .comment-author {
  font-weight: bold;
  margin-bottom: 0.2rem;
}
.blog-detail #comment-form {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 1.5rem;
}
.blog-detail #comment-form input,
.blog-detail #comment-form textarea {
  padding: 0.6rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}
.blog-detail #comment-form button {
  width: fit-content;
  padding: 0.6rem 1.2rem;
  border: none;
  background: #007BFF;
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
}

/* —————————————————————— Author (Super-Admin) Dashboard —————————————————————— */



/* User menu */
.user-menu {
  position: relative;
  display: inline-block;
}
.user-menu .dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  background: #fff;
  min-width: 160px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  z-index: 100;
}
.user-menu.open .dropdown {
  display: block;
}
.profile-toggle {
  cursor: pointer;
}

.profile-dropdown .admin-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}
.profile-dropdown .admin-menu li {
  margin: 0.5rem 0;
}
.profile-dropdown .admin-menu a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #f2eded;
  text-decoration: none;
}
.profile-dropdown .admin-menu a:hover {
  color: #007BFF;
}

/* Main dashboard area */
.board-page {
  padding: 2rem 1rem;
}
.welcome-banner {
  text-align: center;
  margin-bottom: 2rem;
}
.welcome-banner h1 {
  margin-bottom: 0.5rem;
}
.welcome-banner p {
  color: #555;
}

/* Key stats */
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.stat-card {
  background: #fff;
  border-radius: 6px;
  padding: 1rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  text-align: center;
}
.stat-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  color: #555;
}
.stat-card .stat-value {
  font-size: 2rem;
  font-weight: bold;
  color: #333;
}

/* Quick shortcuts */
.dashboard-shortcuts {
  margin-bottom: 2rem;
}
.dashboard-shortcuts h2 {
  text-align: center;
  margin-bottom: 1rem;
}
.shortcut-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}
.shortcut-buttons .btn {
  flex: 1 1 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  text-align: center;
  font-size: 0.9rem;
  gap: 0.5rem;
}

/* Tab sections */
.tab-content {
  background: #fff;
  padding: 1rem;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  margin-bottom: 2rem;
}
.hidden {
  display: none;
}

/* Lists */
.activity-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.activity-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #eee;
}
.activity-list li:last-child {
  border-bottom: none;
}
.empty-state {
  text-align: center;
  color: #777;
  padding: 1rem;
}

/* Forms */
.email-form {
  max-width: 400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.field-group {
  display: flex;
  flex-direction: column;
}
.field-group label {
  margin-bottom: 0.25rem;
  font-weight: 500;
}
.text-input {
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font: inherit;
}

/* Footer */
.site-footer {
  background: #f8f9fa;
  padding: 1rem 0;
  text-align: center;
}
.site-footer p {
  margin: 0;
  color: #777;
  font-size: 0.9rem;
}

/* — Admin Tables & Buttons — */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}
.admin-table th,
.admin-table td {
  border: 1px solid #eee;
  padding: 0.75rem;
  text-align: left;
  font-size: 0.95rem;
}
.admin-table th {
  background: #f8f8f8;
  font-weight: 600;
}
.admin-table .empty-state {
  color: #777;
  text-align: center;
}

/* Reuse your .btn/.primary/.secondary/.danger classes */

/* ——— Logout Confirmation Page ——— */
.logout-page {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 1rem;
}
.logout-box {
  background: #fff;
  padding: 2rem;
  max-width: 360px;
  width: 100%;
  text-align: center;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.logout-icon {
  color: #e74c3c;
  margin-bottom: 1rem;
}
.logout-box h1 {
  margin: 0.5rem 0;
  font-size: 1.75rem;
}
.logout-box p {
  color: #555;
  margin-bottom: 1.5rem;
}
.logout-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}
.logout-buttons .btn {
  flex: 1;
}


/* ————— Admin Dashboard Specific ————— */
.shortcut-buttons .btn {
  flex: 1 1 160px;
  min-width: 140px;
}


/* --- blog-detail page tweaks --- */
.blog-detail h1 {
  font-size: 2em;
  margin: 1em 0;
  color: #333;
}
.blog-detail .form-section {
  margin-bottom: 2em;
}
.blog-detail .form-section h2 {
  font-size: 1.2em;
  margin-bottom: 0.5em;
  color: #444;
}
.blog-detail input[type="file"] {
  font-size: 1em;
  padding: 0.5em 0;
}
.blog-detail .rich-editor {
  min-height: 300px;
}
.blog-detail .actions {
  display: flex;
  gap: 1em;
  justify-content: flex-start;
}

/* Add to your style.css or merge with your existing styles */

/* Blog List Styles */
.blog-list-title {
  text-align: center;
  margin: 2rem 0 1rem 0;
  font-size: 2.2rem;
  font-weight: bold;
}

.blog-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
}

.blog-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  overflow: hidden;
  width: 340px;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s;
}

.blog-card:hover {
  box-shadow: 0 4px 24px rgba(0,0,0,0.13);
}

.blog-hero {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.blog-card-content {
  padding: 1.2rem 1.2rem 1.5rem 1.2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-title {
  font-size: 1.3rem;
  margin: 0 0 0.5rem 0;
  font-weight: bold;
}

.post-meta {
  font-size: 0.95rem;
  color: #888;
  margin-bottom: 0.7rem;
}

.post-excerpt {
  font-size: 1.05rem;
  color: #444;
  margin-bottom: 1.2rem;
  flex: 1;
}

.read-more-btn {
  align-self: flex-start;
  background: #99d4fe;
  color: #fff;
  padding: 0.5rem 1.2rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s;
}

.read-more-btn:hover {
  background: #005fa3;
}

/* Responsive */
@media (max-width: 900px) {
  .blog-cards {
    gap: 1rem;
  }
  .blog-card {
    width: 95vw;
    max-width: 420px;
  }
}

/* Add these styles to the end of your style.css file */

/* --- GENERAL ADMIN STYLES --- */
.admin-body {
    background-color: #f4f7fa; /* Light grey background for admin areas */
}

.admin-header {
    background: #ffffff;
    border-bottom: 1px solid #dee2e6;
    padding: 0.75rem 0;
}

.admin-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header .logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #333;
    font-weight: 600;
}

.admin-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* --- ADMIN LISTING TABLE (admin-listings.html) --- */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border-radius: 8px;
    overflow: hidden;
}

.admin-table th, .admin-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.admin-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
    text-transform: uppercase;
    font-size: 0.85em;
}

.admin-table tbody tr:hover {
    background-color: #f1f3f5;
}

.admin-table .btn {
    padding: 5px 10px;
    font-size: 0.85em;
    margin-right: 5px;
}


/* --- ADMIN LISTING DETAIL PAGE (admin-listing-detail.html) --- */
.admin-listing-detail-page {
    padding: 2rem 0;
}

.detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr; /* 2/3 for content, 1/3 for sidebar */
    gap: 2rem;
}

/* Left Panel: Content */
.listing-content-panel {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    padding: 1.5rem;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.content-header h1 {
    font-size: 1.8rem;
    margin: 0;
}

.location-info {
    color: #6c757d;
    margin-bottom: 1.5rem;
}

.detail-section {
    margin-bottom: 2rem;
}

.detail-section h2 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    color: #343a40;
}

.description-content {
    line-height: 1.6;
}

.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
}
.gallery-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.floor-plans-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.floor-plan-card {
    display: flex;
    gap: 1rem;
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 6px;
}
.floor-plan-card img {
    width: 100px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}
.fp-details strong {
    display: block;
    margin-bottom: 0.25rem;
}

/* Right Panel: Sidebar */
.listing-sidebar-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    padding: 1.25rem;
}

.sidebar-card h3 {
    font-size: 1.1rem;
    margin-top: 0;
    margin-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 0.75rem;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.btn.full-width {
    width: 100%;
    padding: 10px;
    font-size: 1em;
}

.key-details-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.key-details-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f3f5;
    font-size: 0.9em;
}
.key-details-list li:last-child {
    border-bottom: none;
}
.key-details-list li strong {
    color: #495057;
}
.key-details-list li span {
    color: #212529;
    text-align: right;
}

.features-list-tags {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.features-list-tags li {
    background: #e9ecef;
    color: #495057;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.85em;
}

.private-notes {
    background: #fffbf0;
    border-left: 3px solid #ffc107;
    padding: 1rem;
    font-style: italic;
    color: #666;
    border-radius: 4px;
}

/* Status Tags */
.status-tag {
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85em;
    text-transform: capitalize;
}
.status-tag.status-pending { background-color: #fff0c2; color: #7a5a00; }
.status-tag.status-approved { background-color: #cce5d4; color: #0f5132; }
.status-tag.status-rejected { background-color: #f8d7da; color: #842029; }

/* --- My Properties Page status badge --- */
.property-card .card-image {
    position: relative;
}
.status-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85em;
    text-transform: capitalize;
    background-color: rgba(0,0,0,0.5);
    color: #fff;
}
.property-card.status-pending .status-badge { background-color: #ffc107; color: #333; }
.property-card.status-approved .status-badge { background-color: #28a745; color: #fff; }
.property-card.status-rejected .status-badge { background-color: #dc3545; color: #fff; }


/* Responsive Grid for Admin Detail */
@media (max-width: 992px) {
    .detail-grid {
        grid-template-columns: 1fr; /* Stack columns on smaller screens */
    }
}


/* =============================================
   PROPERTY DETAIL - AGENT CONTACT CARD
   ============================================= */

/* Main card container */
.agent-card {
  background-color: #f9f9f9; /* A light grey background to stand out */
  border: 1px solid #e0e0e0;   /* A subtle border */
  border-radius: 8px;          /* Rounded corners */
  padding: 24px;               /* Ample spacing inside the card */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); /* Soft shadow for depth */
}

/* Heading for the card */
.agent-card h4 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 1.25rem;
  font-weight: 600;
  text-align: center;
  color: #333;
}

/* Agent info section (image and name) */
.agent-card .agent-info {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e0e0e0;
}

/* Agent's profile picture */
.agent-card .agent-info img {
  width: 60px;
  height: 60px;
  border-radius: 50%; /* Makes the image circular */
  object-fit: cover;    /* Prevents the image from being distorted */
  margin-right: 16px;
  border: 2px solid #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Agent's name */
.agent-card .agent-info strong {
  font-size: 1.1rem;
  font-weight: 500;
  color: #444;
}

/* Styling for the form elements */
.agent-card form {
  display: flex;
  flex-direction: column;
  gap: 16px; /* Adds space between form elements */
}

.agent-card form textarea,
.agent-card form input[type="text"] {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-family: inherit; /* Use the website's default font */
  font-size: 1rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.agent-card form textarea:focus,
.agent-card form input[type="text"]:focus {
  outline: none;
  border-color: #007bff; /* Highlight color on focus */
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
}

/* The primary submit button */
.agent-card form .btn.primary {
  padding: 14px;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
}

.agent-card form .btn.primary:hover {
    transform: translateY(-2px); /* Slight lift on hover */
}

/* =============================================
   AGENTS PAGE STYLING
   ============================================= */

/* --- Search Bar --- */
.agent-controls {
  margin-bottom: 40px;
}

.search-bar {
  max-width: 500px;
  margin: 0 auto;
  position: relative;
}

.search-bar input[type="search"] {
  width: 100%;
  padding: 15px 20px;
  border-radius: 30px;
  border: 1px solid #ddd;
  font-size: 1rem;
  padding-right: 50px; /* Make space for the icon */
}

.search-bar .fa-search {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
}


/* --- Grid Container --- */
/* This creates a responsive grid for the agent cards */
.agents-grid {
  display: grid;
  /* This creates columns that are at least 280px wide, and they'll wrap automatically */
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px; /* This creates space between the cards */
}


/* --- Individual Agent Card --- */
.agent-card {
  background-color: #fff;
  border: 1px solid #e9e9e9;
  border-radius: 8px; /* Softer, rounded corners */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); /* Subtle shadow for depth */
  text-align: center;
  overflow: hidden; /* Ensures the image respects the rounded corners */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.agent-card:hover {
  transform: translateY(-5px); /* Lifts the card slightly on hover */
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}


/* --- Agent Card Image --- */
.agent-card-image {
  width: 100%;
  height: 220px; /* Fixed height for a uniform look */
  border-bottom: 1px solid #eee;
}

.agent-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Prevents images from being stretched or squished */
}


/* --- Agent Card Content --- */
.agent-card-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1; /* Allows the content area to grow, pushing the button down */
}

.agent-name {
  font-size: 1.25rem;
  margin-top: 0;
  margin-bottom: 10px;
  color: #333;
}

.agent-contact-info {
  font-size: 0.95rem;
  color: #666;
  margin: 4px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px; /* Space between icon and text */
}

.agent-contact-info a {
  color: #007bff;
  text-decoration: none;
  transition: color 0.2s;
}

.agent-contact-info a:hover {
  color: #0056b3;
}


/* --- Button within the card --- */
.agent-card .btn {
  margin-top: auto; /* Pushes the button to the bottom of the card */
  padding: 10px 20px;
}

/* ADD THIS TO style.css */

.property-card .icon-btn.like.saved {
  color: #e74c3c; /* A nice red color */
  opacity: 1;
}

/* =============================================
   MESSAGES PAGE STYLING
   ============================================= */

/* =============================================
   IMPROVED MESSAGING PAGE STYLES
   ============================================= */

/* --- Main Layout & View Panel --- */
.messaging-layout {
  height: 75vh; /* Give the layout a bit more vertical space */
  border: 1px solid #dee2e6;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 0; /* Remove gap for a seamless look */
  overflow: hidden;
}

.conversation-list-panel {
  border-right: 1px solid #dee2e6;
  display: flex;
  flex-direction: column;
}

.message-view-panel {
  display: flex;
  flex-direction: column; /* This ensures elements stack vertically */
  height: 100%;
  background-color: #ffffff;
}

.panel-header {
  padding: 15px;
  border-bottom: 1px solid #dee2e6;
  background-color: #f9f9f9;
}

.conversation-list {
  overflow-y: auto;
  flex-grow: 1;
}

.conversation-item {
  padding: 15px;
  cursor: pointer;
  border-bottom: 1px solid #eee;
  transition: background-color 0.2s;
}

.conversation-item:hover {
  background-color: #f5f5f5;
}

.conversation-item.active {
  background-color: #e9f5ff;
}

.conversation-item.unread strong {
  font-weight: 800;
  color: #000;
}

.last-message {
  font-size: 0.9em;
  color: #666;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.message-view-panel .initial-state {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  color: #aaa;
  text-align: center;
}

.message-view-panel .initial-state .fa-comments {
  font-size: 4em;
  margin-bottom: 20px;
}

/* --- Message Bubbles --- */
.message-list {
  flex-grow: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.message-bubble {
  max-width: 65%;
  padding: 12px 18px;
  border-radius: 18px;
  line-height: 1.5;
}

.message-bubble.sent {
  background-color: #007bff;
  color: white;
  align-self: flex-end;
  border-radius: 20px 20px 4px 20px; /* Modern rounded shape */
}

.message-bubble.received {
  background-color: #f1f3f5; /* Lighter grey for received messages */
  color: #333;
  align-self: flex-start;
  border-radius: 20px 20px 20px 4px; /* Modern rounded shape */
}


/* --- Reply Form & Text Area --- */
.reply-form {
  flex-shrink: 0;
  display: flex;
  align-items: center; /* Vertically align items in the middle */
  gap: 10px;
  padding: 12px;
  border-top: 1px solid #dee2e6;
  background-color: #f9f9f9;
}

.reply-form textarea {
  flex-grow: 1; /* Allow textarea to take up all available space */
  border: 1px solid #ced4da;
  border-radius: 22px; /* Pill shape */
  padding: 10px 18px;
  resize: none;
  height: 44px; /* Set a fixed initial height */
  font-size: 1rem;
  font-family: inherit;
  line-height: 1.4;
  transition: border-color 0.2s;
}

.reply-form textarea:focus {
  outline: none;
  border-color: #80bdff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
}


/* --- Send Button --- */
.reply-form button {
  flex-shrink: 0; /* Prevent the button from shrinking */
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 50%; /* Make it a perfect circle */
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
  padding: 0; /* Remove default button padding */
}

.reply-form button .fa-paper-plane {
  font-size: 1.1rem;
  margin-left: 2px; /* Slight offset for better visual centering */
}

.reply-form button:hover {
  background-color: #0056b3;
}

.reply-form button:active {
  transform: scale(0.95);
}

/* --- Notification Badge (from your old code, kept for consistency) --- */
.notification-badge {
  display: inline-block;
  background-color: #e74c3c;
  color: white;
  font-size: 0.75em;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: 5px;
  vertical-align: top;
}
/* ADD THIS to style.css for the Report Modal */

/* General styles for all modals */
.modal-content {
  width: 90%;
  max-width: 500px;
}
.modal-content h3 {
  margin-top: 0;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

/* Specific styles for the report form */
#reportForm {
  margin-top: 20px;
}
#reportForm label {
  display: block;
  font-weight: 600;
  margin-bottom: 5px;
}
#reportForm select,
#reportForm textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin-bottom: 15px;
  font-family: inherit;
  font-size: 1rem;
}

/* ADD THIS to style.css for the Media Viewer */

.media-viewer {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 30px;
}

.media-viewer-nav {
  display: flex;
  background-color: #f9f9f9;
  border-bottom: 1px solid #e0e0e0;
}

.media-tab-btn {
  padding: 15px 20px;
  border: none;
  background-color: transparent;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  color: #555;
  transition: all 0.2s ease-in-out;
  border-bottom: 3px solid transparent;
}

.media-tab-btn:hover {
  background-color: #efefef;
  color: #000;
}

.media-tab-btn.active {
  color: #007bff;
  border-bottom-color: #007bff;
}

.media-tab-btn .fas {
  margin-right: 8px;
}

.media-pane {
  display: none; /* Hide all panes by default */
  padding: 0;
  min-height: 450px;
}

.media-pane.active {
  display: block; /* Show only the active one */
}

/* Style for text when no media is available */
.no-media-text {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 450px;
  font-size: 1.2rem;
  color: #888;
}

/* --- POLISHED FLOOR PLAN STYLES --- */

.floor-plans-container-detail {
  padding: 2rem;
  display: grid;
  /* Create a responsive grid for the floor plan items */
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.floor-plan-item {
  text-align: center;
}

.floor-plan-item img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #ddd;
  margin-bottom: 0.75rem;
  transition: box-shadow 0.2s;
}

.floor-plan-item img:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.floor-plan-title {
  font-weight: 600;
  color: #333;
}

/* --- RESPONSIVE VIDEO EMBED --- */

.video-embed-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  /* This sets a 16:9 aspect ratio, perfect for most videos */
  aspect-ratio: 16 / 9;
}

.video-embed-container iframe {
  /* This makes the iframe fill the container completely */
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* === NEW LIGHTBOX & FULLSCREEN BUTTON STYLES === */

/* 1. The new fullscreen button on the main slider */
.fullscreen-btn {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  background: rgba(0, 0, 0, 0.4);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1rem;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}
.fullscreen-btn:hover {
  background: rgba(0, 0, 0, 0.7);
}


/* 2. The hidden lightbox popup styles */


/* This rule keeps the lightbox hidden by default */
/* This rule ONLY handles the hidden state of the lightbox */
.lightbox {
  display: none; 
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
}

/* This rule is toggled by JavaScript to both SHOW the lightbox
   AND perfectly center the content. */
.lightbox.active {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* This styles the image itself to be a reasonable size on ALL screens */
.lightbox-content {
  display: block;
  width: auto;
  height: auto;
  /* This ensures the image is large but always fits comfortably on the screen */
  max-width: 90vw;   /* Not wider than 90% of the screen's width */
  max-height: 90vh;  /* Not taller than 90% of the screen's height */
}

/* --- Lightbox Controls (Unchanged) --- */
.lightbox-close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}
.lightbox-close:hover {
  color: #bbb;
}
.lightbox-prev,
.lightbox-next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: auto;
  padding: 16px;
  color: white;
  font-weight: bold;
  font-size: 20px;
  user-select: none;
}
.lightbox-prev {
  left: 0;
}
.lightbox-next {
  right: 0;
}
.lightbox-prev:hover,
.lightbox-next:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

@media (max-width: 768px) {
  /* This targets screens 768px or narrower (tablets and phones) */

  /* --- 1. Set a Stable Shape for the Slider Frame --- */
  .image-slider {
    aspect-ratio: 4 / 3;
  }

  /* --- 2. Make the Image Fill the Frame (The Main Fix) --- */
  .slide img {
    /* This forces the image to cover its parent container perfectly */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Fills the frame without stretching */
  }


  /* --- 3. Your Other Mobile Styles (Icons & Buttons) --- */

  /* Prepares the panes to contain the icon */
  #gallery-pane,
  #video-pane,
  #floorplan-pane {
    position: relative;
  }

  /* Adjusts your buttons and floorplan spacing */
  .slider-btn {
    width: 35px;
    height: 35px;
  }
  .slider-btn.prev {
    left: 0.5rem;
  }
  .slider-btn.next {
    right: 0.5rem;
  }
  .floor-plans-container-detail {
    padding: 1.5rem;
    gap: 1rem;
  }
  .media-pane {
    /* This removes the fixed minimum height on mobile */
    min-height: unset;
  }

}
/* ADD THIS to style.css for flashed messages */

.flashed-messages-container {
  margin-bottom: 20px;
}
.alert {
  padding: 15px;
  border-radius: 6px;
  border: 1px solid transparent;
  margin-bottom: 10px;
  font-weight: 500;
}
.alert-success {
  background-color: #d4edda;
  border-color: #c3e6cb;
  color: #155724;
}
.alert-danger {
  background-color: #f8d7da;
  border-color: #f5c6cb;
  color: #721c24;
}
.alert-warning {
  background-color: #fff3cd;
  border-color: #ffeeba;
  color: #856404;
}
.alert-info {
  background-color: #d1ecf1;
  border-color: #bee5eb;
  color: #0c5460;
}

/* =============================================
   MOBILE & TABLET RESPONSIVE STYLES
   ============================================= */

/* --- General Adjustments for Smaller Screens --- */
@media (max-width: 992px) {
  .container {
    width: 95%; /* Use a bit more screen space */
  }

  .features-grid,
  .agents-grid,
  .properties-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
  }
  
  .detail-grid {
    grid-template-columns: 1fr; /* Stack listing detail content on mobile */
  }

  .hero-content h1 {
    font-size: 2em;
  }
}


/* --- Tablet & Mobile Navigation (Hamburger Menu) --- */
/* =============================================
   FINAL & CORRECTED - 2-ROW MOBILE HEADER
   ============================================= */

@media (max-width: 768px) {
  /* 1. Allow header items to wrap and create space between rows */
  .site-header .container {
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    row-gap: 1rem; /* This creates space between the top row and the nav links */
  }

  /* 2. Make the main navigation bar a full-width row */
  .site-header .main-nav {
    display: flex; /* Make it a flex container */
    justify-content: center; /* Center its contents */
    flex-basis: 100%; /* Force it to take the full width */
    order: 3; /* Ensure it appears below the logo and profile icon */
  }

  /* 3. Style the list of links to be a horizontal row */
  .main-nav > ul {
    display: flex;
    flex-direction: row; /* THIS IS THE KEY CHANGE to make links appear on one line */
    align-items: center;
    gap: 1.25rem; /* Adjust space between links as needed */
    padding: 0;
    width: auto; /* Allow the ul to size to its content */
  }
  
  /* 4. Ensure individual links and the hamburger button are visible */
  .main-nav > ul > li {
      display: block; /* Make sure list items are visible */
      width: auto; /* Allow items to size to their content */
  }

  .main-nav > ul > li > a {
    border-bottom: none; /* Remove the underline from previous versions */
    padding: 0.25em;
  }
  
  /* This ensures the hamburger LI and the button inside it are visible */
  .main-nav li.dropdown,
  .main-nav .dropdown-toggle {
    display: block !important;
  }

  /* 5. Position the dropdown menus correctly for mobile */
  
  /* The menu that opens from the hamburger button */
  .main-nav .dropdown-menu {
      left: 50%;
      transform: translateX(-50%); /* Center the dropdown menu */
      margin-top: 0.5rem;
  }
  
  /* The menu that opens from the profile icon */
  .user-menu .profile-dropdown {
    min-width: 250px;
    margin-top: 10px;
  }
}

/* --- Mobile Phone Specific Adjustments --- */
@media (max-width: 480px) {
  html {
    font-size: 95%; /* Slightly reduce all rem-based sizes */
  }

  .features-grid,
  .agents-grid,
  .properties-grid,
  .blog-cards {
    grid-template-columns: 1fr; /* Force single column for all grids */
  }
  
  .dashboard-stats,
  .shortcut-buttons,
  .modal-actions {
      flex-direction: column;
  }

  .login-form, .register-form {
    padding: 1.5em;
  }

  .footer-links, .state-list {
    flex-direction: column;
    gap: 0.8rem;
  }
  
  .messaging-layout {
      grid-template-columns: 1fr; /* Stack conversation list on top of messages */
      height: 80vh;
  }
  .conversation-list-panel {
      border-right: none;
      border-bottom: 1px solid #dee2e6;
      max-height: 200px; /* Make the conversation list smaller */
  }
}

/* =============================================
   IMPROVED MESSAGING PAGE STYLES
   ============================================= */

/* --- Main Layout & View Panel --- */
.messaging-layout {
  height: 75vh; /* Give the layout a bit more vertical space */
  border: 1px solid #dee2e6;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 0; /* Remove gap for a seamless look */
  overflow: hidden;
}

.conversation-list-panel {
  border-right: 1px solid #dee2e6;
  display: flex;
  flex-direction: column;
}

.message-view-panel .active-state {
  display: flex;
  flex-direction: column; /* This ensures elements stack vertically */
  height: 100%;
  background-color: #ffffff;
}

.panel-header {
  padding: 15px;
  border-bottom: 1px solid #dee2e6;
  background-color: #f9f9f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0; /* Prevent header from shrinking */
}

.conversation-list {
  overflow-y: auto;
  flex-grow: 1;
}

.conversation-item {
  padding: 15px;
  cursor: pointer;
  border-bottom: 1px solid #eee;
  transition: background-color 0.2s;
}

.conversation-item:hover {
  background-color: #f5f5f5;
}

.conversation-item.active {
  background-color: #e9f5ff;
}

.conversation-item.unread strong {
  font-weight: 800;
  color: #000;
}

.last-message {
  font-size: 0.9em;
  color: #666;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.message-view-panel .initial-state {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  color: #aaa;
  text-align: center;
}

.message-view-panel .initial-state .fa-comments {
  font-size: 4em;
  margin-bottom: 20px;
}

/* --- Message Bubbles --- */
.message-list {
  flex-grow: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.message-bubble {
  max-width: 65%;
  padding: 12px 18px;
  border-radius: 18px;
  line-height: 1.5;
}

.message-bubble.sent {
  background-color: #007bff;
  color: white;
  align-self: flex-end;
  border-radius: 20px 20px 4px 20px; /* Modern rounded shape */
}

.message-bubble.received {
  background-color: #f1f3f5; /* Lighter grey for received messages */
  color: #333;
  align-self: flex-start;
  border-radius: 20px 20px 20px 4px; /* Modern rounded shape */
}


/* --- Reply Form & Text Area --- */
.reply-form {
  flex-shrink: 0; /* Prevent form from shrinking */
  display: flex;
  align-items: center; /* Vertically align items in the middle */
  gap: 10px;
  padding: 12px;
  border-top: 1px solid #dee2e6;
  background-color: #f9f9f9;
}

.reply-form textarea {
  flex-grow: 1; /* Allow textarea to take up all available space */
  border: 1px solid #ced4da;
  border-radius: 22px; /* Pill shape */
  padding: 10px 18px;
  resize: none;
  height: 44px; /* Set a fixed initial height */
  font-size: 1rem;
  font-family: inherit;
  line-height: 1.4;
  transition: border-color 0.2s;
}

.reply-form textarea:focus {
  outline: none;
  border-color: #80bdff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
}


/* --- Send Button --- */
.reply-form button {
  flex-shrink: 0; /* Prevent the button from shrinking */
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 50%; /* Make it a perfect circle */
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
  padding: 0; /* Remove default button padding */
}

.reply-form button .fa-paper-plane {
  font-size: 1.1rem;
  margin-left: 2px; /* Slight offset for better visual centering */
}

.reply-form button:hover {
  background-color: #0056b3;
}

.reply-form button:active {
  transform: scale(0.95);
}

/* =============================================
   ADMIN - CREATE BLOG POST PAGE
   ============================================= */

.blog-create-page {
  max-width: 850px; /* Constrain width for a cleaner look */
  margin: 2rem auto 4rem; /* Center the form on the page */
}

.blog-create-page h1 {
  text-align: center;
  font-size: 2.2rem;
  margin-bottom: 2rem;
  color: #333;
}

/* Style form sections as "cards" */
.blog-create-page .form-section {
  background: #ffffff;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  margin-bottom: 2rem;
  padding: 2rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.blog-create-page .form-section h2 {
  font-size: 1.4rem;
  margin-top: 0;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e9ecef;
  color: #343a40;
}

/* Modern styling for input fields */
.blog-create-page input[type="text"],
.blog-create-page input[type="file"] {
  width: 100%;
  padding: 12px 15px;
  font-size: 1rem;
  font-family: inherit;
  color: #495057;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.blog-create-page input[type="text"]:focus,
.blog-create-page input[type="file"]:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
}

/* Polish the rich text editor to match */
.blog-create-page .editor-toolbar {
    border: 1px solid #dee2e6;
    border-bottom: none;
    padding: 0.75rem;
    background-color: #f8f9fa;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
}

.blog-create-page .rich-editor {
    border: 1px solid #dee2e6;
    padding: 1rem;
    min-height: 250px;
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
    background-color: #fff;
}

.blog-create-page .rich-editor:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15) inset;
}

/* Style the checkbox area */
.blog-create-page .checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 500;
  padding: 0.5rem;
}

/* Improve button styling and spacing */
.blog-create-page .actions .btn {
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 6px;
}
/* Add this to the end of your style.css file */

/* === FINAL SLIDER STYLES (Replace old slider styles with this) === */

/* The main container for the slider and buttons */
.image-slider {
  position: relative; /* Establishes the positioning context for buttons */
  width: 100%;
  aspect-ratio: 16 / 9; /* Sets a responsive height for the whole component */
  background-color: #f0f0f0; /* The "ash" color, shows while loading */
  border-radius: 8px; /* Optional: adds nice rounded corners */
  overflow: hidden; /* Keeps slides and buttons inside the rounded corners */
}

/* We don't need a separate rule for .slides-container anymore */
/* The slides will now be positioned relative to .image-slider */

/* Each individual slide */
.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
  display: none; /* Hide by default */
}

.slide.active {
  display: block; /* Show the active slide */
  opacity: 1;
}

/* The Next/Previous buttons */
.slider-btn {
  position: absolute; /* Positioned relative to .image-slider */
  top: 50%; /* Center vertically */
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1rem;
  cursor: pointer;
  display: flex; /* For centering the icon inside */
  align-items: center;
  justify-content: center;
  z-index: 10; /* Ensure buttons are on top of the slides */
  transition: background-color 0.2s;
}

.slider-btn:hover {
  background-color: #fff;
}

.slider-btn.prev {
  left: 1rem;
}

.slider-btn.next {
  right: 1rem;
}

/* --- STYLES FOR INPUT WITH ICON (e.g., Year Built) --- */

/* 1. The wrapper for the label, icon, and input */
.field-group-icon {
  position: relative; /* Creates a positioning context for the icon */
}

/* 2. The icon itself */
.input-icon {
  position: absolute;
  /* Position it from the bottom to align with the input box, not the label */
  bottom: 15px;
  left: 15px;
  color: #888; /* A subtle grey color for the icon */
  pointer-events: none; /* Allows clicks to go through to the input field */
}

/* 3. The input field that has an icon */
.input-with-icon {
  padding-left: 40px !important; /* Adds space on the left for the icon */
}

/* 4. Ensure the dropdown arrow for the datalist is always visible */
input[list] {
  appearance: auto !important;
  -webkit-appearance: auto !important;
  -moz-appearance: auto !important;
}

/* =============================================
   NEW: DISCLAIMER STYLES
   ============================================= */

/* --- 1. Sticky Banner --- */
.sticky-disclaimer-banner {
  position: sticky;
  top: 0;
  background-color: #fffbe6;
  color: #856404;
  text-align: center;
  padding: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  border-bottom: 1px solid #ffeeba;
  z-index: 999;
  /* Add this line to apply the animation */
  animation: blink-warning 2.5s infinite;
}

/* --- 2. Disclaimer Popup Modal --- */

/* The dark overlay */
.disclaimer-overlay {
  display: none; /* Hidden by default */
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  justify-content: center;
  align-items: center;
}

/* This class is added by JS to show the popup */
.disclaimer-overlay.visible {
  display: flex;
}

/* The white content box */
.disclaimer-content {
  background-color: #fff;
  padding: 30px;
  border-radius: 8px;
  width: 90%;
  max-width: 600px;
  position: relative;
  box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.disclaimer-content h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: #333;
}

.disclaimer-content p {
  margin-bottom: 1rem;
  line-height: 1.6;
  color: #555;
}

/* The close "X" button */
.disclaimer-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 2rem;
  font-weight: bold;
  color: #aaa;
  background: none;
  border: none;
  cursor: pointer;
}
.disclaimer-close:hover {
  color: #333;
}

@keyframes blink-warning {
  50% {
    background-color: #dc3545; /* A stronger, darker red */
    color: #fff;             /* White text for better contrast */
    border-color: #c82333;   /* A matching darker border */
  }
}