html {
  scroll-behavior: smooth;
}

html,
body {
  overflow-x: hidden;
  width: 100%;
  position: relative;
}

:root {
  /* The Primary Greens */
  --primary-deep: #064e3b; /* Titles/Headers */
  --primary-brand: #059669; /* Buttons/Links */
  --primary-light: #ecfdf5; /* Background accents */

  /* Complementary Colors */
  --accent-gold: #fbbf24; /* Featured tags or icons */
  --accent-soft: #f3f4f6; /* Secondary sections */

  /* Functional Colors */
  --dark-text: #064e3b; /* Text color */
  --light-bg: #f9fafb;
  --white: #ffffff;
  --border-color: #d1fae5; /* Light green-tinted borders */

  /* Utils */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow: 0 4px 20px rgba(6, 78, 59, 0.08); /* Greenish shadow */
}
section {
  /* Adjust the 80px to match the actual height of your header */
  scroll-margin-top: 80px;
}
body {
  font-family:
    'Inter',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    sans-serif;
  background-color: var(--light-bg);
  color: var(--dark-text);
  line-height: 1.6;
}
main {
  padding-top: 6.25rem; /* 100px -> 6.25rem */
  min-height: calc(100vh - 6.25rem); /* Ensures footer sticks to bottom */
}

.container.section-padding {
  padding-top: 6.5rem;
}

.settings-container {
  padding-top: 6.5rem;
  max-width: 800px;
  margin: 0 auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

@media (max-width: 480px) {
  main,
  .settings-container,
  .container.section-padding {
    padding-top: 5.5rem;
  }
}

/* -------------------- GATEWAY  PAGE STYLES------------------------ */
.gateway-body {
  background-color: var(--light-bg);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 1rem;
  box-sizing: border-box;
}

.gateway-container {
  width: 100%;
  max-width: 800px; /* Limits width on desktop */
  text-align: center;
  padding: 0 1rem;
  box-sizing: border-box;
}

.gateway-header .gateway-logo {
  width: clamp(120px, 15vw, 180px); /* Responsive logo size */
  margin-bottom: 0.5rem;
}

.gateway-container h2 {
  color: var(--primary-deep);
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  margin-bottom: 0.5rem;
}

.gateway-container p {
  color: var(--dark-text);
  opacity: 0.8;
  font-size: clamp(1rem, 2vw, 1.1rem);
  margin-bottom: 3rem;
}

.gateway-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  padding: 0.5rem;
  width: auto;
  box-sizing: border-box;
}

.gateway-card {
  background: var(--white);
  border: 1px solid var(--border-color);
  padding: 1.5rem 1rem;
  border-radius: 1rem;
  cursor: pointer;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.gateway-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 25px rgba(5, 150, 105, 0.1);
  border-color: var(--primary-brand);
}

.gateway-card .icon {
  font-size: 3rem;
  margin-bottom: 1.2rem;
  background: var(--primary-light);
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.gateway-card h3 {
  color: var(--primary-deep);
  margin-bottom: 0.8rem;
}

.gateway-card p {
  font-size: 0.95rem;
  margin-bottom: 0;
}

.gateway-footer {
  margin-top: 3rem;
}

.gateway-footer a {
  color: var(--primary-brand);
  text-decoration: none;
  font-weight: 600;
}

/* Mobile Tweak */
@media (max-width: 480px) {
  .gateway-card .icon {
    width: 50px;
    height: 50px;
    font-size: 1.8rem;
  }

  .gateway-card h3 {
    font-size: 1rem;
  }

  .gateway-card p {
    font-size: 0.8rem;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-clamp: 3;
    line-height: 1.4;
  }
}

/* ------------------------ HEADER REDESIGN --------------------------- */
.site-header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px); /* Modern glass effect */
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding: 0.75rem 0;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 75rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------------------- NAVIGATION ITEMS ------------------------ */

.nav-list {
  display: flex;
  list-style: none;
  gap: 8px; /* Control gap manually per item type */
  align-items: center;
}

.nav-item {
  position: relative;
}

/* The actual link styling */
.nav-link {
  text-decoration: none;
  color: #4b5563; /* Subtle gray-black */
  font-weight: 600;
  font-size: 0.9rem;
  padding: 8px 0.75rem;
  border-radius: 6px;
  transition: all 0.3s ease;
  display: block;
}

/* Hover effect: Background change */
.nav-link:hover {
  color: var(--primary-brand);
  background: var(--primary-light);
}

/* The "Active" indicator (The line under the link) */
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary-brand);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover::after {
  width: 60%;
}

/* ---------------------- AUTH & CTA BUTTONS ---------------------- */
.nav-divider {
  width: 1px;
  height: 1.5rem;
  background-color: #e5e7eb;
  margin: 0 1rem;
}

.auth-link-bold {
  text-decoration: none;
  color: var(--primary-deep);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  transition: color 0.3s;
}

.auth-link-bold:hover {
  color: var(--primary-brand);
}

.cta-button {
  background: var(--primary-brand);
  color: white;
  padding: 0.625rem 1.25rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: 0 0.25rem 0.625rem rgba(5, 150, 105, 0.2);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  white-space: nowrap;
}

.cta-button:hover {
  transform: scale(1.05);
  box-shadow: 0 0.375rem 0.9375rem rgba(5, 150, 105, 0.3);
  background: var(--primary-deep);
}

/* Logo specific fix */
.site-logo {
  height: 6.25rem; /* More standard size */
  width: auto;
  transition: transform 0.3s ease;
  cursor: pointer;
}
.site-logo:hover {
  transform: scale(2);
}

/* This hides the checkbox while keeping the menu functional */
.menu-checkbox {
  display: none;
  visibility: hidden;
  position: absolute;
}

/* ---------------------- HERO SEARCH SECTION --------------------- */
.hero-search {
  background-position: center;
  background-attachment: fixed; /* Creates a parallax effect */
  padding: 5rem 0; /* 80px -> 5rem */
  color: var(--white);
  text-align: center;
}

.home-page .hero-search {
  background:
    linear-gradient(rgba(6, 78, 59, 0.6), rgba(6, 78, 59, 0.8)),
    url('skyscraper.jpg');
  background-size: cover;
}

.marketplace-page .hero-search {
  background:
    linear-gradient(rgba(6, 78, 59, 0.2), rgba(6, 78, 59, 0.3)), url('mall.jpg');
  background-size: cover;
}

.services-page .hero-search {
  background: linear-gradient(
    135deg,
    var(--primary-brand),
    var(--primary-deep)
  );
}

@media (max-width: 1024px) {
  .hero-search {
    background-attachment: scroll; /* Disables parallax on mobile for better performance */
  }
}

.hero-search h1 {
  font-size: 2.5rem;
  color: var(--white); /* Overriding the default dark green for the hero */
  margin-bottom: 0.625rem; /* 10px -> 0.625rem */
}

.hero-search p {
  font-size: 1.1rem;
  margin-bottom: 1.875rem; /* 30px -> 1.875rem */
  opacity: 0.9;
}
.filter-box {
  background: var(--white);
  padding: 1.875rem; /* 30px -> 1.875rem */
  border-radius: 0.75rem;
  box-shadow: 0 0.625rem 1.5625rem rgba(0, 0, 0, 0.2); /* 10px 25px -> 0.625rem 1.5625rem */
  max-width: 62.5rem; /* 1000px -> 62.5rem */
  margin: 0 auto;
  color: var(--dark-text); /* Black/Dark Green text inside the white box */
  text-align: left;
}

.filter-grid {
  display: grid;
  /* This creates 4 columns on desktop and 1 on mobile automatically */
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 1.2rem;
  margin-bottom: 1.25rem;
}

.filter-group label {
  display: block;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 0.3125rem; /* 5px -> 0.3125rem */
  color: var(--primary-deep);
}

.filter-group input,
.filter-group select {
  width: 95%;
  padding: 0.8rem; /* 10px -> 0.625rem */
  border: 1px solid #ddd;
  border-radius: 0.375rem; /* 6px -> 0.375rem */
  background-color: #fcfcfc;
}

.filter-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #eee;
  padding-top: 1.25rem; /* 20px -> 1.25rem */
}
.btn-search {
  background-color: var(--accent-gold);
  color: #000; /* Dark text on gold looks better */
  padding: 0.75rem 2.5rem; /* 40px -> 2.5rem */
  border: none;
  border-radius: 0.375rem; /* 6px -> 0.375rem */
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.btn-search:hover {
  background-color: #eab308; /* A slightly darker gold */
  transform: scale(1.05);
}

.more-options {
  background: none;
  border: none;
  color: var(--primary-brand);
  cursor: pointer;
  font-weight: 600;
}

.loader {
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--primary-color, #2563eb);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto 15px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* --- More Options Toggle Logic --- */
/* 1. By default, hide everything after the first 4 filter groups */
.filter-grid .filter-group:nth-child(n + 5) {
  display: none;
}

/* 2. When 'is-active' class is added to the grid, show all groups */
.filter-grid.is-active .filter-group:nth-child(n + 5) {
  display: none;
}
.filter-grid.show-all .filter-group {
  display: block;
}

/* 3. Optional: Make the button look a bit more interactive */
.more-options:hover {
  text-decoration: underline;
}

/* --------------------- LISTINGS SECTION ------------------------- */
.listings-section {
  padding: 3.75rem 0; /* 60px -> 3.75rem */
}

.listings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap; /* Good for mobile */
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.sort-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.sort-container select {
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  background: var(--white);
  color: var(--dark-text);
  cursor: pointer;
}

.section-title {
  font-size: 1.8rem;
  color: var(--primary-deep);
  margin-bottom: 1.875rem; /* 30px -> 1.875rem */
  font-weight: 800;
}

/* The Grid System */
.listings-grid {
  display: grid;
  /* This creates a responsive grid that fits as many 260px cards as possible */
  grid-template-columns: repeat(
    auto-fill,
    minmax(14rem, 1fr)
  ); /* 260px -> 16.25rem */
  gap: 1.25rem; /* 20px -> 1.25rem */
}

/* Individual Property Card */
.property-card {
  position: relative;
  background: var(--white);
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.property-card:hover {
  transform: translateY(-0.5rem); /* 8px -> 0.5rem */
  box-shadow: var(--shadow);
  border-color: var(--primary-brand);
}

/* Image & Badges */
.card-image-wrapper {
  position: relative;
  height: 12.5rem; /* 200px -> 12.5rem */
  overflow: hidden;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.property-card:hover .card-img {
  transform: scale(1.1); /* Slight zoom on hover */
}

.badge {
  position: absolute;
  top: 0.75rem;
  padding: 0.3125rem 0.75rem; /* 5px -> 0.3125rem */
  border-radius: 3.125rem; /* 50px -> 3.125rem */
  font-size: 0.75rem;
  font-weight: 700;
  z-index: 2;
}

/* Guest-specific styling */
.locked-text {
  color: #94a3b8;
  font-size: 0.85rem;
  font-style: italic;
}

/* Optional: style the chat button slightly differently when it's a 'login' prompt */
.btn-whatsapp {
  cursor: pointer;
  transition: background 0.3s ease;
}

.btn-whatsapp:hover {
  filter: brightness(0.9);
}

/* Badge Color Coding */
.gender-female {
  background: #fdf2f8;
  color: #be185d;
  left: 0.75rem;
}
.gender-male {
  background: #eff6ff;
  color: #1d4ed8;
  left: 0.75rem;
}
.status-badge {
  background: var(--accent-gold);
  color: var(--primary-deep);
  left: 0.75rem;
}
.price-tag {
  background: var(--primary-deep);
  color: var(--white);
  right: 0.75rem;
}

/* Card Body */
.card-content {
  padding: 1.5rem; /* 18px -> 1.125rem */
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-size: 1.1rem;
  color: var(--primary-deep);
  margin-bottom: 0.2rem; /* 5px -> 0.3125rem */
  line-height: 1.3;
}

.card-location {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 0.75rem;
  text-transform: capitalize;
}

/* Tighten the card content */
.card-content {
  padding: 12px; /* Reduces overall internal space */
}

.card-content h3 {
  margin-bottom: 4px; /* Space between Title and Price */
  font-size: 1.1rem;
}

.card-content .price {
  margin-bottom: 4px; /* Space between Price and Location */
  color: var(--primary-color);
  font-weight: bold;
}

.card-content .location {
  margin-bottom: 10px; /* Space between Location and Button */
  font-size: 0.9rem;
  color: #666;
}

/* Specs & Tags */
.card-specs,
.card-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem; /* 10px -> 0.625rem */
  font-size: 0.8rem;
  margin-bottom: 0.6rem; /* 15px -> 0.9375rem */
}

.pref-tag,
.feature {
  background: var(--primary-light);
  color: var(--primary-brand);
  padding: 0.25rem 0.625rem; /* 4px 10px -> 0.25rem 0.625rem */
  border-radius: 0.25rem; /* 4px -> 0.25rem */
  font-weight: 600;
}

.total-package,
.roommate-note {
  font-size: 0.9rem;
  background: #f9fafb;
  padding: 0.625rem; /* 10px -> 0.625rem */
  border-radius: 0.5rem; /* 8px -> 0.5rem */
  margin-bottom: 0.9375rem; /* 15px -> 0.9375rem */
  border-left: 0.1875rem solid var(--primary-brand); /* 3px -> 0.1875rem */
}

/* Card Buttons */
.card-footer {
  margin-top: auto;
  padding: 0.9 1rem; /* 15px 18px -> 0.9375rem 1.125rem */
  display: grid;
  grid-template-columns: 1fr 1fr; /* Split buttons 50/50 */
  gap: 0.625rem; /* 10px -> 0.625rem */
  border-top: 1px solid var(--white);
}

.btn-whatsapp {
  background: #25d366; /* Official WhatsApp Color */
  color: var(--white);
  border: none;
  border-radius: 0.375rem; /* 6px -> 0.375rem */
  padding: 0.625rem; /* 10px -> 0.625rem */
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
  position: relative;
  z-index: 2;
}

.btn-details {
  background: var(--primary-brand);
  color: var(--white);
  text-decoration: none;
  text-align: center;
  border-radius: 0.375rem; /* 6px -> 0.375rem */
  padding: 0.625rem; /* 10px -> 0.625rem */
  font-size: 0.8rem;
  font-weight: 700;
}

/* 2. Make the link cover the whole card area */
.btn-details::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1; /* This puts the invisible layer over everything */
}

.btn-whatsapp:hover,
.btn-details:hover {
  opacity: 0.9;
}

/* --- Bookmark Button (on property/item cards) --- */
.bookmark-btn {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  z-index: 5;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease;
}

.bookmark-btn:hover {
  transform: scale(1.12);
}

.bookmark-btn .bookmark-icon {
  filter: grayscale(1);
  opacity: 0.55;
  transition: all 0.2s ease;
}

.bookmark-btn.active .bookmark-icon {
  filter: none;
  opacity: 1;
}

body.dark-theme .bookmark-btn {
  background: rgba(6, 38, 29, 0.85);
}

/* Skeleton Base */
.skeleton {
  background: #e2e8f0;
  background: linear-gradient(110deg, #ececec 8%, #f5f5f5 18%, #ececec 33%);
  background-size: 200% 100%;
  animation: 1.5s shine linear infinite;
  border-radius: 4px;
}

@keyframes shine {
  to {
    background-position-x: -200%;
  }
}

/* Skeleton Specific Shapes */
.skeleton-img {
  width: 100%;
  height: 400px;
  border-radius: 12px;
}
.skeleton-title {
  width: 60%;
  height: 2rem;
  margin: 1rem 0;
}
.skeleton-text {
  width: 100%;
  height: 1rem;
  margin-bottom: 0.5rem;
}

/* Responsive Empty State */
#no-results {
  grid-column: 1 / -1; /* This stops it from being "thin" */
  width: 90%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.no-results-content {
  width: 80%;
  max-width: 40rem; /* Keeps it from being too wide on desktop */
  background: var(--card-bg);
  padding: 4rem 2rem;
  border-radius: 1rem;
  border: 2px dashed var(--primary-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.no-results-content h3 {
  margin: 1rem 0;
  font-size: 1.5rem;
  color: var(--text-main);
}

.no-results-content p {
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.6;
  font-size: 1rem;
}

/* Make it responsive for mobile */
@media (max-width: 48rem) {
  .no-results-content {
    margin: 1rem;
    padding: 2rem 1rem;
    width: 90%;
  }
}

.secondary-cta {
  background-color: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  font-weight: bold;
}

.secondary-cta:hover {
  background-color: var(--primary-color);
  color: white;
}

/* ------------------ FLOATING NOTIFICATION BUTTON ---------------- */
/* --- Floating Notification Button --- */
.fab-notify {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--primary-brand); /* Your #059669 */
  color: var(--white);
  border: none;
  padding: 1rem 1.5rem;
  border-radius: 3rem;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow); /* Using your greenish shadow */
  cursor: pointer;
  z-index: 999;
  font-weight: 600;
  transition: var(--transition);
}

.fab-notify:hover {
  transform: translateY(-5px); /* Lift effect */
  background: var(--primary-deep); /* Darken on hover */
}

/* --- Modal Overlay --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(6, 78, 59, 0.6); /* Tinted background to match your theme */
  display: none;
  align-items: flex-start;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px); /* Modern blur effect */
  overflow-y: auto;
  padding: 4vh 1rem;
  box-sizing: border-box;
}

.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr; /* Two columns */
  gap: 0.9rem;
  text-align: left;
  margin: 1.5rem 0;
}

.modal-content {
  background: var(--white);
  padding: 2rem;
  border-radius: 1rem;
  width: 90%;
  max-width: 400px;
  border: 1px solid var(--border-color);
  text-align: center;
}

body.dark-theme .modal-content {
  background: #064e3b; /* Using your primary-deep for dark mode modal */
  color: var(--white);
  border-color: var(--primary-brand);
}

.modal-content h3 {
  color: var(--primary-deep);
  margin-bottom: 0.5rem;
}

body.dark-theme .modal-content h3,
body.dark-theme .input-group label {
  color: var(--dark-text);
}

/* --- Form Elements --- */
.input-group label {
  color: var(--dark-text);
  font-weight: 500;
}

.input-group input,
.input-group select {
  border: 1px solid var(--border-color);
  padding: 0.75rem;
  background: var(--light-bg);
  color: var(--primary-deep);
  outline: none;
}

.input-group input:focus {
  border-color: var(--primary-brand);
  box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.2);
}

/* --- Modal Buttons --- */
.btn-primary {
  background: var(--primary-brand);
  color: white;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 0.5rem;
  cursor: pointer;
  flex: 1;
  font-weight: 600;
}

.btn-secondary {
  background: transparent;
  color: var(--primary-brand);
  border: 1px solid var(--primary-brand);
  padding: 0.8rem 1.5rem;
  border-radius: 0.5rem;
  cursor: pointer;
  flex: 1;
}

/* ------------------ SIGN UP/LOGIN PAGE ---------------------------*/
/* 1. Auth Container - Centers the box on the page */
.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 5rem 1.25rem; /* 80px 20px -> 5rem 1.25rem */
  min-height: calc(100vh - 12.5rem); /* 200px -> 12.5rem */
}

/* 2. The Auth Box (The Card) */
.auth-box {
  background: var(--white);
  padding: 2.5rem; /* 40px -> 2.5rem */
  border-radius: 1rem; /* 16px -> 1rem */
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 30rem; /* 480px -> 30rem */
  text-align: center;
  border: 1px solid var(--border-color);
}

.auth-box h2 {
  color: var(--primary-deep);
  font-size: 1.8rem;
  margin-bottom: 0.5rem; /* 8px -> 0.5rem */
}

.auth-box p {
  color: #666;
  margin-bottom: 1.875rem; /* 30px -> 1.875rem */
}

/* 3. Form Group Alignment */
.auth-form {
  text-align: left; /* Keep labels and inputs left-aligned */
}

.form-group {
  margin-bottom: 1.25rem; /* 20px -> 1.25rem */
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.25rem; /* 8px -> 0.5rem */
  color: var(--primary-deep);
  font-size: 0.9rem;
}

.form-group input,
.form-group select {
  width: 95%;
  padding: 1rem 1rem; /* 15px -> 0.9375rem */
  border: 1.5px solid var(--border-color);
  border-radius: 0.5rem; /* 8px -> 0.5rem */
  font-size: 1rem;
  transition: var(--transition);
  background-color: #fcfdfd;
}
/* Border turns red on invalid input */
.form-group input:invalid:not(:placeholder-shown) {
  border-color: #ef4444; /* Soft red */
}

.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.password-toggle {
  position: absolute;
  right: 0.75rem; /* 12px -> 0.75rem */
  cursor: pointer;
  color: var(--primary-deep);
  display: flex;
  align-items: center;
}
.password-toggle:hover {
  color: var(--accent-title);
}
/* Adjust the input padding so text doesn't hide under the eye */
.password-wrapper input {
  padding-right: 2.8125rem !important; /* 45px -> 2.8125rem */
}

/* 4. Input Focus Effect - Makes it glow Havena Green */
.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-brand);
  box-shadow: 0 0 0 0.25rem rgba(5, 150, 105, 0.1); /* 4px -> 0.25rem */
  background-color: var(--white);
}

/* 5. Submit Button */
.btn-auth-submit {
  width: 100%;
  background: linear-gradient(
    135deg,
    var(--primary-brand),
    var(--primary-deep)
  );
  color: var(--white);
  padding: 0.875rem; /* 14px -> 0.875rem */
  border: none;
  border-radius: 0.5rem; /* 8px -> 0.5rem */
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 0.625rem; /* 10px -> 0.625rem */
  transition: var(--transition);
}

.btn-auth-submit:hover {
  transform: translateY(-0.125rem); /* 2px -> 0.125rem */
  filter: brightness(1.1);
  box-shadow: 0 0.3125rem 0.9375rem rgba(6, 78, 59, 0.2); /* 5px 15px -> 0.3125rem 0.9375rem */
}
/* Small spinner for buttons */
.small-loader {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.8s ease-in-out infinite;
  margin: 0 auto;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.btn-auth-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 45px; /* Keeps button same size when text disappears */
}

/* 6. Footer Link in Auth Box */
.auth-switch {
  margin-top: 1.5625rem; /* 25px -> 1.5625rem */
  font-size: 0.95rem;
}

.auth-switch a {
  color: var(--primary-brand);
  text-decoration: none;
  font-weight: 700;
}

.auth-switch a:hover {
  text-decoration: underline;
}
.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: #94a3b8;
  font-size: 0.85rem;
  margin: 1.25rem 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-color);
}

.auth-divider span {
  padding: 0 0.75rem;
}

.g_id_signin {
  display: flex;
  justify-content: center;
  margin-bottom: 0.5rem;
}
::selection {
  background-color: var(--primary-brand);
  color: var(--white);
}
/* Add this to your styles.css */

.forgot-password {
  display: block;
  text-align: right;
  font-size: 0.85rem;
  margin-top: -0.625rem; /* -10px -> -0.625rem */
  margin-bottom: 1.25rem; /* 20px -> 1.25rem */
  color: var(--primary-brand);
  text-decoration: none;
  font-weight: 500;
}

.forgot-password:hover {
  text-decoration: underline;
}

/* ------------------------- PROPERTY FORM LAYOUT ----------------- */
.container {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1rem;
}

#property-form {
  background: var(--white);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--dark-text);
}

/* Grouping with Fieldsets */
fieldset {
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 1rem 1.25rem 1.25rem;
  margin-bottom: 1.25rem;
}

legend {
  font-weight: 700;
  padding: 0 0.5rem;
  color: var(--primary-deep);
  font-size: 1.1rem;
}

/* Labels and Inputs */
label {
  display: block;
  margin-bottom: 0.3rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--primary-deep);
  margin-top: 0.6rem;
}

input,
select,
textarea {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  font-size: 1rem;
  background-color: var(--light-bg);
  color: var(--dark-text);
  transition: var(--transition);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary-brand);
  background-color: var(--white);
  box-shadow: 0 0 0 0.25rem rgba(5, 150, 105, 0.1);
}

textarea {
  min-height: 5rem;
  resize: vertical;
}

/* Side-by-Side Row */
.form-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.form-row > div {
  flex: 1 1 12.5rem; /* 200px -> 12.5rem */
}

/* --- SELECTION CARDS --- */
.selection-box {
  text-align: center;
  margin-bottom: 3rem;
}

.selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.select-card {
  background: var(--white);
  border: 2px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 2rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--primary-deep);
}

.select-card:hover {
  border-color: var(--primary-brand);
  background-color: var(--primary-light);
  transform: translateY(-0.3rem);
  box-shadow: var(--shadow);
}

.select-card .icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.select-card h3 {
  margin: 0;
  font-size: 1.2rem;
}

/* Utility Buttons */
.btn-back,
.btn-link {
  background: none;
  border: none;
  color: var(--primary-brand);
  cursor: pointer;
  margin-bottom: 1rem;
  font-weight: 600;
}

.btn-back,
.btn-link:hover {
  color: var(--primary-deep);
  text-decoration: underline;
}

form .cta-button {
  background-color: var(--primary-brand);
  color: var(--white);
  border: none;
  border-radius: 0.4rem;
  transition: var(--transition);
  width: 100%;
  padding: 1rem;
  font-size: 1.1rem;
  font-weight: bold;
  margin-top: 1rem;
}

form .cta-button:hover {
  background-color: var(--primary-deep);
  transform: translateY(-1px);
}

/* --- Image Preview Grid --- */
.preview-grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fill,
    minmax(6.25rem, 1fr)
  ); /* 100px -> 6.25rem */
  gap: 0.9rem; /* 15px -> 0.9375rem */
  margin-top: 0.9rem;
}

.preview-item {
  position: relative;
  aspect-ratio: 1 / 1; /* Ensures a perfect square */
  border-radius: 0.5rem; /* 8px -> 0.5rem */
  border: 2px solid var(--border-color);
  box-shadow: 0 0.125rem 0.3125rem rgba(0, 0, 0, 0.1); /* 2px 5px -> 0.125rem 0.3125rem */
}

.preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* This crops the image to fill the square perfectly */
  display: block;
}

/* --- Remove Button Styles --- */
.remove-img-btn {
  position: absolute;
  top: -0.3125rem; /* -5px -> -0.3125rem */
  right: -0.3125rem;
  background: #ef4444; /* Red color */
  color: white;
  border: none;
  border-radius: 50%;
  width: 1.375rem; /* 22px -> 1.375rem */
  height: 1.375rem;
  font-size: 1rem; /* 16px -> 1rem */
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
  z-index: 10;
}

.remove-img-btn:hover {
  background: #dc2626;
  transform: scale(1.1);
}

/* Submit Section */
.form-footer {
  text-align: center;
  border-top: 1px solid #eee;
  padding-top: 1.875rem; /* 30px -> 1.875rem */
}

.form-footer .cta-button {
  width: 100%;
  max-width: 18.75rem; /* 300px -> 18.75rem */
  padding: 0.9375rem; /* 15px -> 0.9375rem */
  font-size: 1.1rem;
  border: none;
  cursor: pointer;
}

/* -------------------- LOADING OVERLAY STYLES ------------------- */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9); /* White with transparency */
  display: none; /* Hidden by default */
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999; /* Stay on top of everything */
}

/* Show the overlay when this class is added via JS */
.loading-overlay.is-active {
  display: flex;
}

/* The actual spinner circle */
.loader {
  border: 5px solid #f3f3f3;
  border-top: 5px solid #007bff; /* Use your primary Havena color */
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Dark Mode adjustment for Loader */
.dark-theme .loading-overlay {
  background: rgba(18, 18, 18, 0.9);
  color: white;
}

/* ---------------------- DETAILS STYLES ------------------------- */
.details-grid {
  display: grid;
  grid-template-columns: 1fr minmax(15rem, 20rem);
  gap: 1.25rem;
  align-items: start;
}

/* Gallery - Much more compact */
.main-gallery {
  margin-bottom: 0.9375rem; /* 15px -> 0.9375rem */
}

/* Gallery Slider Styling */
.gallery-slider {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  aspect-ratio: 4 / 5;
  scroll-behavior: smooth;
  border-radius: 0.75rem;
  background: var(--light-bg);
  -webkit-overflow-scrolling: touch; /* Smooth swipe for iOS */
}

.gallery-slider::-webkit-scrollbar {
  display: none; /* Hide scrollbar for clean look */
}

.gallery-slider img {
  flex-shrink: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  scroll-snap-align: start;
}

.slider-image {
  flex: 0 0 100%;
  width: 100%;
  object-fit: contain;
}

.gallery-slider .featured-image {
  flex: 0 0 100%; /* Each image takes full width */
  width: 100%;
  height: 400px; /* Adjust height as needed */
  object-fit: cover;
  scroll-snap-align: start;
}

@media (max-width: 48rem) {
  .gallery-slider .featured-image {
    height: 18.75rem;
    aspect-ratio: 3 / 4;
  }
}

.featured-image {
  width: 100%;
  height: 20rem; /* 320px -> 20rem */
  object-fit: cover;
  border-radius: 0.75rem;
}

.image-thumbnails {
  display: flex;
  gap: 0.5rem; /* 8px -> 0.5rem */
  margin-top: 0.5rem;
}

.image-thumbnails img {
  width: 3.75rem; /* 60px -> 3.75rem */
  height: 2.8125rem; /* 45px -> 2.8125rem */
  object-fit: cover;
  border-radius: 0.375rem; /* 6px -> 0.375rem */
  cursor: pointer;
}

/* Header & Description - Tightened text */
.details-header h1 {
  font-size: 1.6rem; /* Already using relative units */
  margin: 0.3125rem 0; /* 5px -> 0.3125rem */
}

.location-text {
  font-size: 0.9rem;
  margin-bottom: 0.9375rem; /* 15px -> 0.9375rem */
}

.details-description h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem; /* 8px -> 0.5rem */
}

.details-description p {
  font-size: 0.9rem;
  line-height: 1.4;
}

/* Share button (details page) */
.title-share-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.share-icon-btn {
  background: var(--light-bg);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: 0.3s;
}

.share-icon-btn:hover {
  background: var(--primary-light);
  color: var(--dark-text);
}

/* Amenities - Smaller blocks */
.amenities-grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(7.5rem, 1fr)
  ); /* 120px -> 7.5rem */
  gap: 0.625rem; /* 10px -> 0.625rem */
  margin-top: 0.9375rem;
}

.amenity {
  background: var(--white);
  padding: 0.5rem 0.75rem; /* 8px -> 0.5rem */
  border-radius: 0.5rem; /* 8px -> 0.5rem */
  border: 1px solid var(--border-color);
  font-size: 0.8rem;
}

/* Sidebar Card - Focused & Small */
.sticky-card {
  background: var(--white);
  padding: 1.25rem; /* 20px -> 1.25rem */
  border-radius: 0.9375rem; /* 15px -> 0.9375rem */
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
}

.price-header {
  margin-bottom: 0.9375rem;
  padding-bottom: 0.625rem; /* 10px -> 0.625rem */
  border-bottom: 1px solid #eee;
}

.price-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: #666;
}

.price-value {
  font-size: 1.6rem;
  color: var(--primary-brand);
  margin: 0;
}

.agent-info {
  margin-bottom: 0.9375rem;
}

.agent-info p {
  font-size: 0.9rem;
  margin: 0;
}

.verified-tag {
  font-size: 0.7rem;
  color: var(--primary-brand);
  font-weight: 700;
}

/* Contact Buttons - Smashed down */
.contact-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem; /* 8px -> 0.5rem */
}

.contact-actions .cta-button {
  padding: 0.625rem; /* 10px -> 0.625rem */
  font-size: 0.85rem;
  text-align: center;
}

.whatsapp-btn {
  background: #25d366;
  border: none;
}
.call-btn {
  background: var(--primary-deep);
}

.view-more-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  margin: 0.5rem 0 0 auto;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--white);
  background: var(--primary-brand);
  border: none;
  border-radius: 20px;
  text-decoration: none;
  animation: view-more-pulse 1.4s infinite;
}

.view-more-btn:hover {
  background: var(--primary-deep);
}

@keyframes view-more-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.7);
    transform: scale(1);
  }
  50% {
    transform: scale(1.06);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(5, 150, 105, 0);
    transform: scale(1);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(5, 150, 105, 0);
    transform: scale(1);
  }
}

.safety-tip {
  font-size: 0.95rem;
  font-weight: 700;
  margin-top: 0.75rem;
  color: #dc2626;
}

.report-container {
  margin-top: 15px;
  text-align: center;
  border-top: 1px solid #eee;
  padding-top: 10px;
}

.report-link {
  background: none;
  border: none;
  color: #888;
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: underline;
}

.report-link:hover {
  color: #ff4d4d;
}

/* -------------------- DASHBOARD STYLES --------------------- */
.dashboard-header {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid #eee;
  padding-bottom: 1rem;
}

.dashboard-header h1 {
  overflow-wrap: anywhere;
}

.dashboard-header .post-property-btn {
  width: 100%;
  min-width: 0;
  position: static;
  padding: 0.8rem 1rem;
  font-size: 0.95rem;
}

.dashboard-header,
.dashboard-grid {
  max-width: 50rem; /* Keeps it from getting too wide */
  margin-left: auto;
  margin-right: auto;
}

.stats-row {
  display: grid;
  justify-content: center;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  background: var(--primary-light);
  padding: 0.55rem 0.5rem;
  border-radius: 0.6rem;
  text-align: center;
  border: 1px solid var(--border-color);
}

.stat-card strong {
  display: block;
  font-size: 1.15rem;
  line-height: 1.2;
  color: var(--primary-deep);
}

.stat-card span {
  font-size: 0.7rem;
  color: #666;
}

.manage-card {
  display: flex;
  align-items: center;
  background: var(--white);
  padding: 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border-color);
  margin-bottom: 0.625rem; /* 10px -> 0.625rem */
  gap: 0.9375rem; /* 15px -> 0.9375rem */
}

.manage-card img {
  width: 3.75rem; /* 60px -> 3.75rem */
  height: 3.75rem; /* 60px -> 3.75rem */
  object-fit: cover;
  border-radius: 0.5rem; /* 8px -> 0.5rem */
}

.manage-info {
  flex-grow: 1;
}
.manage-info h4 {
  font-size: 0.95rem;
  margin: 0;
}
.manage-info p {
  font-size: 0.8rem;
  color: #666;
  margin: 0;
}

.manage-actions {
  display: flex;
  gap: 0.5rem; /* 8px -> 0.5rem */
}

/* Post Property Button Base Styles */
.post-property-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    135deg,
    var(--primary-brand),
    var(--primary-deep)
  );
  color: var(--white);
  padding: 1rem 1.25rem;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  width: 25%; /* Takes up roughly 1/4 of the container width */
  min-width: 200px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(22, 163, 74, 0.3);

  /* Sticky Logic */
  position: sticky;
  top: 1rem; /* Adjust this based on your header's actual height */
  z-index: 99;

  /* Glowing Animation */
  animation: pulse-glow 2s infinite;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

/* Hover Effects */
.post-property-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 6px 20px rgba(var(--primary-brand), 0.5);
  background: linear-gradient(
    135deg,
    var(--primary-brand),
    var(--primary-deep)
  );
}

/* The Glowing Keyframes */
@keyframes pulse-glow {
  0% {
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.7);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(22, 163, 74, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0);
  }
}

/* Responsive: On small screens, let it take more space so it's tappable */
@media (max-width: 768px) {
  .post-property-btn {
    width: 80%;
    position: sticky; /* Sticky often feels 'cramped' on small mobile headers */
    top: 0.5rem; /* Less offset for smaller headers */
    right: 0;
  }
}
.edit-btn,
.delete-btn {
  padding: 0.375rem 0.75rem; /* 6px -> 0.375rem */
  font-size: 0.75rem;
  border-radius: 0.375rem; /* 6px -> 0.375rem */
  cursor: pointer;
  border: 1px solid #ddd;
  font-weight: 600;
}

.edit-btn {
  background: var(--white);
  color: var(--primary-deep);
}
.delete-btn {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fecaca;
}

/* Dashboard Toggle Buttons */
.status-btn {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: 0.2s;
}

.status-btn-taken {
  background-color: #fef2f2;
  color: #dc2626; /* Red text */
  border: 1px solid #fee2e2;
}

.status-btn-available {
  background-color: #f0fdf4;
  color: #16a34a; /* Green text */
  border: 1px solid #dcfce7;
}

/* Diagonal Taken Banner */
.diagonal-taken {
  position: absolute;
  top: 20px;
  left: -35px;
  background: #dc2626; /* Bright Red */
  color: white;
  width: 150px;
  padding: 5px 0;
  text-align: center;
  font-weight: 900;
  font-size: 0.9rem;
  transform: rotate(-45deg);
  z-index: 10;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  letter-spacing: 1px;
}

.card-taken-mode {
  pointer-events: none; /* Disables all clicks on the card */
  filter: saturate(0.5);
}

.card-taken-mode .btn-details {
  pointer-events: none;
}

/* Grayscale for the image */
.grayscale {
  filter: grayscale(100%);
  opacity: 0.7;
}

/* Spinner Loader */
.loader-container {
  grid-column: 1 / -1;
  text-align: center;
  padding: 50px;
}
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 15px;
}
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.manage-card img {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
}

/* Dashboard Discovery Card */
.discovery-card {
  background: var(--card-bg);
  border: 2px solid var(--white);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-bottom: 1.875rem;
  box-shadow: var(--shadow);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.2rem;
}

.discovery-content h3 {
  margin-bottom: 5px;
  font-size: 1.15rem;
  color: var(--text-main);
}

.discovery-content p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.view-listings-wrapper {
  position: relative;
  width: 60%;
}

.view-listings-btn {
  background-color: var(--primary-brand);
  color: white;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 0.5rem;
  text-decoration: none;
  text-align: center;
  font-weight: 600;
  font-size: 0.95rem;
  width: 100%;
  white-space: normal;
  cursor: pointer;
  transition:
    transform 0.2s,
    background-color 0.2s;
}

.view-listings-btn:hover {
  background-color: var(--primary-deep);
  transform: translateY(-2px);
}

.view-listings-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  box-shadow: var(--shadow);
  overflow: hidden;
  z-index: 50;
}

.view-listings-menu.active {
  display: block;
}

.view-listings-option {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--dark-text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.2s;
}

.view-listings-option:last-child {
  border-bottom: none;
}

.view-listings-option:hover {
  background-color: var(--primary-light);
  color: var(--primary-brand);
}

body.dark-theme .view-listings-menu {
  background: var(--white);
  border-color: var(--border-color);
}

body.dark-theme .view-listings-option {
  color: var(--dark-text);
  border-bottom-color: var(--border-color);
}

/* Mobile Responsive adjustment */
@media (max-width: 600px) {
  .discovery-card {
    flex-direction: column;
    text-align: center;
  }
  .view-listings-wrapper {
    width: 90%;
  }
}

/*-------------------------- FOOTER --------------------------- */
.site-footer {
  background-color: var(--primary-deep);
  background-color: var(--header-footer-bg, var(--primary-deep));
  color: var(--white);
  padding: 1.25rem 0; /* 20px -> 1.25rem (Minimal vertical padding) */
  margin-top: 1.875rem; /* 30px -> 1.875rem */
}

.site-footer .container {
  padding: 0 1.25rem; /* 20px -> 1.25rem */
  max-width: 75rem; /* 1200px -> 75rem */
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  /* Reduced gap and used 'max-content' so columns only take the space they need */
  grid-template-columns: max-content auto;
  gap: 2.5rem; /* 40px -> 2.5rem */
  align-items: start;
}

/* Big Logo Styling */
.footer-logo {
  width: 12.5rem; /* 200px -> 12.5rem (Forced large size) */
  height: auto;
  margin-bottom: 0.3125rem; /* 5px -> 0.3125rem (Extremely tight gap to the text) */
  display: block;
  /* Turns a dark logo into a crisp white logo */
  filter: brightness(0) invert(1);
}

.footer-info p {
  line-height: 1.3;
  font-size: 0.9rem;
  opacity: 0.8;
  max-width: 13.75rem; /* 220px -> 13.75rem */
  margin: 0;
}

.footer-links {
  justify-self: end; /* Aligns the links to the right */
}

.footer-links h4 {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 0.5rem; /* 8px -> 0.5rem */
  text-transform: uppercase;
}

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

.footer-links li {
  margin-bottom: 0.25rem; /* 4px -> 0.25rem (Very tight link list) */
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.85rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 0.625rem; /* 10px -> 0.625rem */
  margin-top: 0.9375rem; /* 15px -> 0.9375rem */
  text-align: left; /* Aligned left to match the logo flow */
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
}

/*------------ CONTACT PAGE STYLES ------------------------ */
/* This centers the wrapper and limits its width like the Signup form */
.contact-wrapper {
  max-width: 31.25rem; /* 500px -> 31.25rem */
  margin: 2.5rem auto; /* 40px -> 2.5rem (Centers it horizontally) */
  background: var(--white);
  padding: 1.875rem; /* 30px -> 1.875rem */
  border-radius: 1.25rem; /* 20px -> 1.25rem */
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 1.875rem; /* 30px -> 1.875rem */
}

.contact-info {
  text-align: center;
}

.contact-info h2 {
  color: var(--primary-deep);
  font-size: 1.8rem;
  margin-bottom: 0.625rem; /* 10px -> 0.625rem */
}

.contact-info p {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 1.25rem; /* 20px -> 1.25rem */
}

/* Compact Social Links Row */
.contact-links {
  display: grid;
  grid-template-columns: 1fr 1fr; /* Two rows of two icons */
  gap: 0.625rem; /* 10px -> 0.625rem */
}

.contact-method {
  display: flex;
  flex-direction: column; /* Stack icon above text */
  align-items: center;
  justify-content: center;
  padding: 0.75rem 0.3125rem;
  background: var(--primary-light);
  border-radius: 0.625rem; /* 10px -> 0.625rem */
  text-decoration: none;
  color: var(--primary-deep);
  transition: var(--transition);
  text-align: center;
  border: 0.0625rem solid transparent;
}

.contact-method:hover {
  transform: translateY(-0.1875rem);
  background: #e0ece9;
}

.contact-method:active,
.contact-method:focus {
  background: var(--primary-deep);
  color: var(--white) !important;
  transform: scale(0.95);
  outline: none;
}

.contact-method .icon {
  font-size: 1.2rem;
  margin-bottom: 0.3125rem; /* 5px -> 0.3125rem */
}

.contact-method strong {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.contact-method p {
  display: none; /* Hide the actual numbers/links to keep it clean */
}

/* Form Container Adjustment */
.contact-form-container {
  padding-top: 1.25rem; /* 20px -> 1.25rem */
  border-top: 1px solid #eee;
}

/* Remove the old side-border since we are now stacked */
.contact-form-container {
  padding-left: 0;
  border-left: none;
}

.contact-form-container label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-deep);
  margin-bottom: 0.3125rem; /* 5px -> 0.3125rem */
  display: block;
}

/* ---------------------- ABOUT PAGE STYLES --------------------- */
.about-hero {
  text-align: center;
  padding: 6.25rem 1.25rem; /* 100px 20px -> 6.25rem 1.25rem */
  background:
    linear-gradient(rgba(166, 206, 195, 0.5), rgba(5, 59, 45, 0.85)),
    url('about.jpg'); /* Ensure this image is in your folder */
  background-size: cover;
  background-position: center;
  border-radius: 1.25rem; /* 20px -> 1.25rem */
  margin-bottom: 3.125rem; /* 50px -> 3.125rem */
  color: var(--white);
}

.about-hero h1 {
  color: var(--white);
  font-size: 2.8rem;
  margin-bottom: 0.9375rem; /* 15px -> 0.9375rem */
  text-shadow: 0 0.125rem 0.625rem rgba(0, 0, 0, 0.3); /* 2px 10px -> 0.125rem 0.625rem */
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(18.75rem, 1fr)
  ); /* 300px -> 18.75rem */
  gap: 1.875rem; /* 30px -> 1.875rem */
  margin-bottom: 3.75rem; /* 60px -> 3.75rem */
}

.about-card {
  padding: 2.5rem; /* 40px -> 2.5rem */
  background: var(--white);
  border-radius: 0.9375rem; /* 15px -> 0.9375rem */
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
}

.about-icon {
  font-size: 2.5rem;
  margin-bottom: 1.25rem; /* 20px -> 1.25rem */
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(15.625rem, 1fr)
  ); /* 250px -> 15.625rem */
  gap: 1.25rem; /* 20px -> 1.25rem */
  margin-top: 1.875rem; /* 30px -> 1.875rem */
}

.service-item {
  background: #fcfdfd;
  padding: 1.5625rem; /* 25px -> 1.5625rem */
  border-left: 0.25rem solid var(--primary-brand); /* 4px -> 0.25rem */
  border-radius: 0.25rem; /* 4px -> 0.25rem */
}

.about-cta {
  text-align: center;
  padding: 3.75rem 0; /* 60px -> 3.75rem */
  border-top: 1px solid #eee;
  margin-top: 2.5rem; /* 40px -> 2.5rem */
}

/* ------------------- SUCCESS PAGE STYLES ----------------- */
.success-card {
  border-top: 0.3125rem solid var(--primary-brand); /* 5px -> 0.3125rem */
  animation: slideUp 0.5s ease-out;
}

.success-icon {
  font-size: 4rem;
  margin-bottom: 1.25rem; /* 20px -> 1.25rem */
  display: inline-block;
  background: var(--primary-light);
  width: 6.25rem; /* 100px -> 6.25rem */
  height: 6.25rem; /* 100px -> 6.25rem */
  line-height: 6.25rem; /* Keeps icon centered vertically */
  border-radius: 50%;
}

/* -------------------- BUSINESS PROFILE STYLES ---------------------- */
.business-profile-wrapper {
  max-width: 37.5rem;
  margin: 0 auto;
  background: var(--white);
  padding: 1.875rem;
  border-radius: 1rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
}

.photo-upload-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
  margin-top: 0.6rem;
}

.photo-upload-box {
  position: relative;
  aspect-ratio: 1 / 1;
  border: 2px dashed var(--border-color);
  border-radius: 0.75rem;
  background: var(--primary-light);
  cursor: pointer;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.photo-upload-box:hover {
  border-color: var(--primary-brand);
}

.photo-upload-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-upload-box .upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--primary-deep);
  text-align: center;
  padding: 0.5rem;
}

.photo-upload-box .upload-icon {
  font-size: 1.5rem;
}

.remote-toggle-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 1rem 0;
}

.remote-toggle-row input[type='checkbox'] {
  width: 1.1em;
  height: 1.1em;
  accent-color: var(--primary-brand);
  cursor: pointer;
}

.remote-toggle-row label {
  margin: 0;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--primary-deep);
  cursor: pointer;
}

/* Dark mode adjustments */
body.dark-theme .business-profile-wrapper {
  background: var(--white);
  border-color: var(--border-color);
}

body.dark-theme .photo-upload-box {
  background: var(--primary-light);
  border-color: var(--border-color);
}

body.dark-theme .photo-upload-box .upload-placeholder {
  color: var(--dark-text);
}

body.dark-theme .photo-upload-box .upload-placeholder {
  color: var(--dark-text);
}

/* -------------- BUSINESS PROFILE DASHBOARD CARD STYLES ------------- */
.business-profile-card-inner {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  background: var(--card-bg, var(--white));
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1.25rem;
  margin-bottom: 1.875rem;
  box-shadow: var(--shadow);
}

.business-card-logo {
  width: 4.375rem;
  height: 4.375rem;
  border-radius: 0.75rem;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border-color);
}

.business-card-logo-placeholder {
  width: 4.375rem;
  height: 4.375rem;
  border-radius: 0.75rem;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  flex-shrink: 0;
}

.business-card-text {
  flex-grow: 1;
  min-width: 0;
}

.business-card-text h3 {
  margin: 0 0 0.2rem;
  font-size: 1.1rem;
  color: var(--primary-deep);
}

.business-card-category {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary-brand);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 1rem;
}

.business-card-location {
  margin: 0.4rem 0 0;
  font-size: 0.8rem;
  color: var(--muted-text, #666);
}

.business-card-edit-btn {
  flex-shrink: 0;
  padding: 0.6rem 1.1rem;
  font-size: 0.85rem;
  white-space: nowrap;
}

.business-profile-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  background: var(--primary-light);
  border: 1px dashed var(--primary-brand);
  border-radius: 0.75rem;
  padding: 1.25rem;
  margin-bottom: 1.875rem;
}

.business-profile-cta h4 {
  margin: 0 0 0.3rem;
  color: var(--primary-deep);
}

.business-profile-cta p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted-text, #666);
  max-width: 26rem;
}

.business-cta-btn {
  flex-shrink: 0;
  width: auto;
  margin-top: 0;
  padding: 0.75rem 1.25rem;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .business-profile-card-inner,
  .business-profile-cta {
    flex-direction: column;
    text-align: center;
  }
}

/* -------------------- PUBLIC PROFILE PAGE STYLES ------------------- */
.profile-business-header {
  margin-bottom: 2rem;
}

.profile-cover {
  position: relative;
  height: 11rem;
  background: linear-gradient(
    135deg,
    var(--primary-brand),
    var(--primary-deep)
  );
  background-size: cover;
  background-position: center;
  border-radius: 1rem 1rem 0 0;
}

.profile-cover-slider {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  width: 100%;
  height: 100%;
  border-radius: 1rem 1rem 0 0;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
}

.profile-cover-slider::-webkit-scrollbar {
  display: none;
}

.profile-cover-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  scroll-snap-align: start;
  cursor: pointer;
}

.profile-cover-dots {
  position: absolute;
  bottom: 0.6rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.375rem;
  z-index: 2;
}

.cover-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transition: background 0.2s ease;
}

.cover-dot.active {
  background: #fff;
}

.profile-avatar-wrapper {
  position: absolute;
  bottom: -3.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 7rem;
  height: 7rem;
  border-radius: 50%;
  border: 0.25rem solid var(--white);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--white);
  z-index: 3;
}

.profile-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: pointer;
}

/* --- IMAGE LIGHTBOX --- */
.image-lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 2rem;
  cursor: zoom-out;
}

.image-lightbox-overlay.active {
  display: flex;
}

.image-lightbox-overlay img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 0.5rem;
  box-shadow: 0 0.625rem 2.5rem rgba(0, 0, 0, 0.5);
}

.profile-avatar-initials {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1d4ed8;
  color: white;
  font-size: 2rem;
  font-weight: bold;
}

.profile-business-info {
  text-align: center;
  padding: 4.25rem 1.5rem 1.75rem;
  background: var(--card-bg, var(--white));
  border: 1px solid var(--border-color);
  border-top: none;
  border-radius: 0 0 1rem 1rem;
}

.profile-business-info h2 {
  margin: 0 0 0.2rem;
  color: var(--primary-deep);
  font-size: 1.5rem;
}

.profile-agent-name {
  margin: 0 0 0.75rem;
  color: var(--muted-text, #666);
  font-size: 0.9rem;
}

.profile-badges {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.6rem;
}

.profile-category-badge {
  background: var(--primary-light);
  color: var(--primary-brand);
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
}

.profile-verified-badge {
  color: #2563eb;
  font-weight: 600;
  font-size: 0.8rem;
}

.profile-member-badge {
  color: var(--muted-text, #666);
  font-size: 0.8rem;
}

.profile-location {
  margin: 0.3rem 0;
  font-size: 0.85rem;
  color: var(--muted-text, #666);
}

.profile-description {
  max-width: 34rem;
  margin: 0.8rem auto 0;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--dark-text);
}

.profile-contact-row {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}

.profile-contact-row .cta-button {
  width: auto;
  margin-top: 0;
  padding: 0.7rem 1.4rem;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.profile-listings-title {
  margin: 2rem 0 1.25rem;
  font-size: 1.3rem;
  color: var(--primary-deep);
  font-weight: 800;
}

/* Fallback layout for users without a business profile */
.profile-basic-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--card-bg, var(--white));
  border-radius: 1rem;
  margin-bottom: 2rem;
  border: 1px solid var(--border-color);
}

.profile-avatar-standalone {
  width: 4.375rem;
  height: 4.375rem;
  border-radius: 50%;
  font-size: 1.8rem;
  flex-shrink: 0;
}

.profile-member-since {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted-text, #666);
}

.profile-unavailable {
  text-align: center;
  padding: 3rem;
}

.profile-unavailable p {
  color: var(--muted-text, #666);
}

/* Dark mode */
body.dark-theme .profile-business-info,
body.dark-theme .profile-basic-header {
  background: var(--white);
  border-color: var(--border-color);
}

@media (max-width: 480px) {
  .profile-cover {
    height: 8.5rem;
  }
  .profile-avatar-wrapper {
    width: 5.5rem;
    height: 5.5rem;
    bottom: -2.75rem;
  }
  .profile-business-info {
    padding-top: 3.5rem;
  }
}

/* Specific Dark Mode tweak for the icon background */
body.dark-theme .success-icon {
  background: #0d3b2f;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(1.25rem); /* 20px -> 1.25rem */
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/*---------------------- SETTINGS PAGE STYLES ---------------------*/
.settings-container {
  max-width: 37.5rem;
  margin: 0 auto;
  padding: 6.5rem 1.25rem 0;
}

.settings-card {
  background: var(--white);
  padding: 1.875rem; /* 30px -> 1.875rem */
  border-radius: 1rem; /* 16px -> 1rem */
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
}

.settings-group {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 0; /* 20px -> 1.25rem */
  border-bottom: 1px solid #eee;
}

.settings-group:last-child {
  border-bottom: none;
}

.settings-text h4 {
  margin: 0;
  color: var(--primary-deep);
}
.settings-text p {
  margin: 0.3125rem 0 0; /* 5px -> 0.3125rem */
  font-size: 0.85rem;
  color: #666;
}

/* A simple toggle switch design */
.switch {
  position: relative;
  display: inline-block;
  width: 3.125rem; /* 50px -> 3.125rem */
  height: 1.5rem; /* 24px -> 1.5rem */
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 2.125rem; /* 34px -> 2.125rem */
}

.slider:before {
  position: absolute;
  content: '';
  height: 1.125rem; /* 18px -> 1.125rem */
  width: 1.125rem; /* 18px -> 1.125rem */
  left: 0.1875rem; /* 3px -> 0.1875rem */
  bottom: 0.1875rem;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--primary-brand);
}
input:checked + .slider:before {
  transform: translateX(1.625rem); /* 26px -> 1.625rem */
}

/* -------------------- DANGER ZONE STYLES ------------------------ */
.danger-zone-card {
  margin-top: 2rem;
  padding: 1.5rem;
  background-color: #fff5f5; /* Very light red */
  border: 1px solid #feb2b2; /* Soft red border */
  border-radius: 1rem;
}

.danger-zone-card h3 {
  color: #c53030; /* Strong red title */
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.danger-content {
  display: flex;
  flex-direction: column; /* Stack text and button vertically */
  gap: 1rem;
}

.danger-content p {
  font-size: 0.875rem;
  color: #718096;
  margin: 0;
}

.btn-delete-account {
  background-color: #e53e3e;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  width: fit-content; /* Only as wide as the text */
}

.btn-delete-account:hover {
  background-color: #c53030;
}

/* --------------- MEDIA QUERIES (TABLET & MOBILE) ---------------- */
/* 1. LARGE TABLETS & BELOW (max-width: 62rem / 992px) */
@media (max-width: 62rem) {
  .site-header {
    height: 5rem;
    padding: 0%;
  }

  .site-logo {
    height: 6.25rem; /* 100px */
  }

  .site-logo:hover {
    transform: none;
  }

  /* 1. The Overlay (Hidden by default) */
  .menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5); /* Dim black color */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 10; /* Sit behind the sidebar but above the page content */
  }

  /* 2. Show Overlay when checkbox is checked */
  #mobile-menu-toggle:checked ~ .menu-overlay {
    opacity: 1;
    visibility: visible;
  }

  /* 3. Smooth transition for the main content (Optional) */
  main {
    transition: filter 0.3s ease;
  }

  #mobile-menu-toggle:checked ~ main {
    filter: blur(2px); /* Slight blur to the background content */
  }

  /* Show the hamburger button */
  .menu-toggle-button {
    display: block;
    cursor: pointer;
    z-index: 1001;
  }

  /* Create the 3-line hamburger icon */
  .hamburger-icon,
  .hamburger-icon::before,
  .hamburger-icon::after {
    content: '';
    display: block;
    background: var(--primary-deep);
    height: 3px;
    width: 1.5625rem;
    border-radius: 0.1875rem;
    transition: var(--transition);
  }

  .hamburger-icon::before {
    transform: translateY(-0.5rem);
  }

  .hamburger-icon::after {
    transform: translateY(0.3125rem);
  }

  /* The Navigation Menu overlay */
  .header-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background: var(--light-bg);
    padding: 5rem 1.25rem;
    transition: 0.4s ease-in-out;
    border-left: 1px solid var(--border-color);
    z-index: 1000;
    max-height: 100vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .nav-link,
  .auth-link-bold {
    background: var(--white);
    padding: 0.9375rem;
    border-radius: 0.625rem;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.625rem;
  }

  /* Adding icons using CSS "content" */
  .nav-item:nth-child(1) .nav-link::before {
    content: '🏠';
  }
  .nav-item:nth-child(2) .nav-link::before {
    content: 'ℹ️';
  }
  .nav-item:nth-child(3) .nav-link::before {
    content: '📊';
  }
  .nav-item:nth-child(4) .nav-link::before {
    content: '⚙️';
  }
  .nav-item:nth-child(5) .nav-link::before {
    content: '🔑';
  }
  .nav-item:nth-child(6) .auth-link-bold::before {
    content: '✨';
  }

  .nav-divider {
    width: 100%;
    height: 1px;
    margin: 0.625rem 0;
  }

  /* Show menu when checkbox is checked */
  #mobile-menu-toggle:checked ~ .header-nav {
    right: 0;
  }

  /* Animate Hamburger to an "X" when checked */
  #mobile-menu-toggle:checked + .menu-toggle-button .hamburger-icon {
    background: transparent;
  }

  #mobile-menu-toggle:checked + .menu-toggle-button .hamburger-icon::before {
    transform: rotate(45deg) translateY(0);
  }

  #mobile-menu-toggle:checked + .menu-toggle-button .hamburger-icon::after {
    transform: rotate(-45deg) translateY(-0.1875rem);
  }
}

/* 2. MOBILE PHONES & BELOW (max-width: 48rem / 768px) */
@media (max-width: 48rem) {
  /* Selection Box (Property Page) */
  .selection-box {
    margin: 2rem auto;
  }

  .selection-box h2 {
    font-size: 1.5rem;
  }

  /* Hero & Search Section */
  .hero-search h1 {
    font-size: 1.8rem;
  }

  .filter-box {
    padding: 1.25rem;
  }

  .filter-grid {
    grid-template-columns: 1fr;
  }

  .filter-footer {
    flex-direction: column;
    gap: 0.9375rem;
  }

  .btn-search {
    width: 100%;
  }

  /* Listings Grid - 2 per row on mobile */
  .listings-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
  }

  .card-image-wrapper {
    height: 7rem;
  }

  .card-content {
    padding: 0.55rem;
  }

  .card-title {
    font-size: 0.8rem;
    margin-bottom: 0.15rem;
    line-height: 1.2;
  }

  .card-location {
    font-size: 0.7rem;
    margin-bottom: 0.35rem;
  }

  .card-specs {
    font-size: 0.65rem;
    gap: 0.25rem;
    margin-bottom: 0.35rem;
  }

  .badge.price-tag {
    font-size: 0.65rem;
    padding: 0.2rem 0.5rem;
    top: 0.4rem;
    right: 0.4rem;
  }

  .btn-details {
    padding: 0.45rem;
    font-size: 0.7rem;
  }

  .diagonal-taken {
    width: 100px;
    font-size: 0.7rem;
    top: 12px;
    left: -28px;
  }

  /* Details Page Grid */
  .details-grid {
    grid-template-columns: 1fr;
  }

  .featured-image {
    height: 15.625rem;
  }

  /* Footer Adjustment */
  .footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 2.5rem;
  }

  .footer-logo {
    margin: 0 auto 0.9375rem;
  }

  .footer-info p {
    max-width: 100%;
  }
}

/* ---------------- Enable Alerts Modal Grid Adjustment ----------- */
@media (max-width: 480px) {
  .modal-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .modal-content {
    padding: 1.5rem;
    width: 95%; /* Take up more screen width on small phones */
  }
}

/* ---------------- Role Select Modal — compact on all screens ---------------- */
#role-select-modal .selector-grid {
  gap: 0.75rem;
  margin-top: 1rem;
}

#role-select-modal .select-card {
  padding: 0.9rem 0.75rem;
}

#role-select-modal .select-card .icon {
  font-size: 1.6rem;
  margin-bottom: 0.35rem;
}

#role-select-modal .select-card h3 {
  font-size: 0.9rem;
}

#role-select-modal .select-card p {
  font-size: 0.7rem;
  line-height: 1.3;
  margin-top: 0.2rem !important;
}

@media (max-width: 480px) {
  #role-select-modal .modal-content {
    padding: 1.25rem;
    width: 92%;
  }

  #role-select-modal .selector-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  #role-select-modal .select-card {
    padding: 0.7rem 0.5rem;
  }

  #role-select-modal .select-card .icon {
    font-size: 1.3rem;
    margin-bottom: 0.2rem;
  }

  #role-select-modal .select-card h3 {
    font-size: 0.78rem;
    line-height: 1.2;
  }

  #role-select-modal .select-card p {
    display: none; /* Hide the longer descriptions on small phones — icon + title is enough */
  }
}

/* ----------------------- DARK MODE STYLES ----------------------- */
body.dark-theme {
  --light-bg: #041a14;
  --white: #06261d;
  --dark-text: #e2f3ee; /* This is our light mint-cream */
  --muted-text: #8dafa6; /* New: softer sage for less important text */
  --primary-light: #0d3b2f;
  --border-color: #114d3e;
  --accent-title: #fbbf24;
  --header-footer-bg: #03140f;
}

body.dark-theme h1,
body.dark-theme h2 {
  color: var(--accent-title); /* Gold titles in dark mode */
}
/* Fix text colors for ALL elements in dark mode */
body.dark-theme h3,
body.dark-theme h4,
body.dark-theme p,
body.dark-theme .card-title,
body.dark-theme label {
  color: var(--dark-text);
}

/* --- DARK THEME FORM FIXES --- */

body.dark-theme input,
body.dark-theme select,
body.dark-theme textarea,
body.dark-theme option {
  background-color: var(--white) !important; /* Your #06261d color */
  color: var(--dark-text) !important; /* Your light mint color */
  border: 0.0625rem solid var(--border-color);
}

/* Fix for the dropdown menu background in Chrome/Safari/Firefox */
body.dark-theme select {
  /* This ensures the arrow and the box stay visible */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23e2f3ee' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 0.75rem;
  appearance: none; /* Removes default browser arrow to use our custom mint-colored one */
  padding-right: 2rem;
}

/* Fix for the "General Enquiry" placeholder or selected state */
body.dark-theme select:focus {
  outline: 0.125rem solid var(--accent-title);
  background-color: var(--primary-light);
}

/* Fix for the password checklist in dark mode */
body.dark-theme #password-checklist {
  background: var(--primary-light) !important;
  border-color: var(--border-color) !important;
}

body.dark-theme #password-checklist p {
  color: var(--accent-title) !important;
}

body.dark-theme #password-checklist li {
  color: var(--muted-text) !important;
}

body.dark-theme .edit-btn {
  background: var(--white);
  color: var(--dark-text);
}

body.dark-theme .filter-group input {
  background-color: var(--white) !important;
  color: var(--dark-text) !important;
}

body.dark-theme .form-group input {
  background-color: var(--white) !important;
  color: var(--dark-text) !important;
}

body.dark-theme .select-card {
  background-color: var(--white) !important;
  color: var(--dark-text) !important;
}

body.dark-theme .stat-card strong {
  color: var(--primary-brand); /* Keep stats in mint */
}

body.dark-theme .stat-card span {
  color: var(--dark-text); /* Lighter text for stats labels */
}

body.dark-theme p,
body.dark-theme .card-location,
body.dark-theme .footer-info p,
body.dark-theme .footer-links a {
  color: var(--muted-text); /* Lighter than before, but clearly secondary */
}

/* Fix Footer specifically - making links pop */
body.dark-theme .site-footer {
  background: var(--header-footer-bg);
  border-top: 1px solid var(--border-color);
}

body.dark-theme .footer-links a:hover {
  color: var(--accent-title); /* Hovering over footer links turns them gold */
}

/* Header & Nav */
body.dark-theme .site-header {
  background: var(--header-footer-bg);
  border-bottom: 1px solid var(--border-color);
}

body.dark-theme .nav-link {
  color: var(--dark-text);
}

/* Box & Card consistency */
body.dark-theme .filter-box,
body.dark-theme .property-card,
body.dark-theme .auth-box,
body.dark-theme .settings-card,
body.dark-theme .manage-card {
  background: var(--white);
  border: 1px solid var(--border-color);
  color: var(--dark-text);
}
body.dark-theme .service-item {
  background: var(--white); /* Using our #06261d dark green */
  border-left: 0.25rem solid var(--primary-brand); /* 4px -> 0.25rem Keeps the emerald stripe */
  border-color: var(--primary-brand);
  color: var(--dark-text);
  box-shadow: 0 0.25rem 0.9375rem rgba(0, 0, 0, 0.2); /* 4px 15px -> 0.25rem 0.9375rem */
}

body.dark-theme select {
  background: white;
  color: var(--white);
  border: 1px solid var(--border-color);
}

body.dark-theme .site-logo {
  /* This turns a dark logo into a crisp, pure white/mint version */
  filter: brightness(0) invert(1) opacity(0.9);
}

body.dark-theme .contact-links strong {
  color: var(--dark-text);
}

body.dark-theme .danger-zone-card {
  background-color: #2d1a1a; /* Dark muted red for dark mode */
  border-color: #822727;
}

/* --- Dark Mode Mobile UI Fixes --- */

/* Fixes the hamburger icon lines so they are visible mint-cream */
body.dark-theme .hamburger-icon,
body.dark-theme .hamburger-icon::before,
body.dark-theme .hamburger-icon::after {
  background: var(--dark-text);
}

/* Dark Mode adjustment for image preview on property.html */
body.dark-theme .preview-item {
  border-color: var(--primary-light);
}
body.dark-theme .remove-img-btn {
  box-shadow: 0 0 0.5rem rgba(239, 68, 68, 0.4); /* 8px -> 0.5rem */
}

/* Fixes the mobile sidebar background and links */
@media (max-width: 62rem) {
  /* Updated to 62rem to match previous query */
  body.dark-theme .header-nav {
    background: var(--header-footer-bg);
    border-left: 1px solid var(--border-color);
  }

  body.dark-theme .nav-link,
  body.dark-theme .auth-link-bold {
    background: var(--white); /* Darker card color for menu items */
    border-color: var(--border-color);
    color: var(--dark-text);
  }

  body.dark-theme .nav-divider {
    background-color: var(--border-color);
  }

  body.dark-theme .upload-label span {
    color: var(--white);
  }

  body.dark-theme .upload-label:hover {
    background: var(--dark-text);
  }

  body.dark-theme .upload-label:hover span {
    color: var(--primary-deep);
  }

  /* Dark mode adjustment for the toggle icon */
  body.dark-theme .password-toggle {
    color: var(--accent-title); /* Uses your gold accent in dark mode */
  }

  body.dark-theme .share-icon-btn {
    color: var(--dark-text);
  }
}
/* -------------------------------------------------------------------
------------------------ ADMIN PAGE STYLES ---------------------------
------------------------------------------------------------------- */
/* --- Admin Specific Layout --- */
.admin-page {
  background-color: var(--light-bg);
  color: var(--dark-text);
  min-height: 100vh;
}

.admin-nav {
  background-color: var(--white);
  border-bottom: 2px solid var(--border-color);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.admin-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 5%;
}

.admin-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: bold;
  font-size: 1.2rem;
  color: var(--primary-deep);
}
.admin-badge {
  font-size: 0.75rem;
  background: var(--accent-gold);
  color: var(--primary-deep);
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: bold;
  margin-left: 10px;
  text-transform: uppercase;
}

.admin-actions {
  display: flex;
  gap: 8px;
}

.btn-remove {
  background-color: #ff4d4d;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

.btn-dismiss {
  background-color: #6c757d;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
}

.btn-approve {
  background-color: #28a745; /* Success Green */
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

.btn-approve:hover {
  background-color: #218838;
}

.admin-view-link {
  color: var(--primary-color);
  font-size: 0.85rem;
  text-decoration: none;
}

.admin-view-link:hover {
  text-decoration: underline;
}

#theme-toggle {
  color: var(--dark-text);
  font-family: inherit;
  font-size: inherit;
  font-weight: 500;
}

#theme-toggle:hover {
  color: var(--primary-brand);
}

/* Ensure the admin-badge stays visible in dark mode */
body.dark-theme .admin-badge {
  background: var(--accent-title);
  color: var(--header-footer-bg);
}

/* Ensure the header on admin stays clean */
.admin-nav .header-container {
  border-bottom: none; /* Let the admin-nav bottom border handle it */
}

/* --- Stats Cards --- */
.stats-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.stat-box {
  background: var(--white);
  padding: 0.9rem 0.5rem;
  border-radius: 0.6rem;
  border: 1px solid var(--border-color);
  text-align: center;
  box-shadow: var(--shadow);
}

.stat-box h3 {
  font-size: 1.4rem;
  color: var(--primary-brand);
  margin-bottom: 0.2rem;
}

.stat-box p {
  font-size: 0.75rem;
  margin: 0;
  line-height: 1.2;
}

/* --- Navigation Tabs --- */
.admin-tabs {
  display: flex;
  gap: 1rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2rem;
  overflow-x: auto; /* For mobile scroll */
  padding-bottom: 0.5rem;
}

.tab-btn {
  padding: 0.75rem 1.5rem;
  border: none;
  background: none;
  color: var(--muted-text);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.tab-btn.active {
  color: var(--primary-brand);
  border-bottom: 3px solid var(--primary-brand);
}

/* --- Table Styles --- */
.admin-section {
  display: none; /* Hidden by default */
  animation: fadeIn 0.4s ease;
}

.admin-section.active {
  display: block;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  background: var(--white);
  border-radius: 1rem;
  border: 1px solid var(--border-color);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 50rem; /* Ensures enough room for data */
}

.admin-table th,
.admin-table td {
  padding: 1.2rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.admin-table th {
  background-color: var(--primary-light);
  color: var(--primary-deep);
  font-weight: bold;
}

/* --- Action Buttons --- */
.btn-verify {
  background-color: var(--primary-brand);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
}

.btn-danger {
  background-color: #ef4444; /* Standard alert red */
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
}

/* --- Dark Mode Overrides (Specific to Admin) --- */
body.dark-theme .admin-nav {
  background-color: var(--header-footer-bg);
}

body.dark-theme .admin-table th {
  background-color: var(--primary-light);
  color: var(--dark-text);
}

/* --- Media Queries --- */
@media (max-width: 48rem) {
  .admin-header-flex {
    flex-direction: column;
    gap: 1rem;
  }

  .stats-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
  }

  .stat-box {
    padding: 0.75rem 0.4rem;
  }

  .stat-box h3 {
    font-size: 1.2rem;
  }

  .stat-box p {
    font-size: 0.7rem;
  }

  .admin-main {
    padding: 1rem;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.search-container {
  margin: 15px 0;
}

.admin-search-field {
  width: 100%;
  max-width: 400px;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.3s;
}

.admin-search-field:focus {
  border-color: #007bff;
  box-shadow: 0 0 5px rgba(0, 123, 255, 0.2);
}

body.dark-theme .admin-search-field {
  background: var(--light-bg);
  border-color: var(--white);
  color: var(--dark-text);
}

/* ------------------ TERMS & CONDITIONS STYLES ------------------ */
/* Legal Page Specific Styles */
.legal-page {
  background-color: var(--light-bg);
  color: var(--dark-text);
  line-height: 1.6;
}

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

.terms-card {
  background: var(--white);
  padding: 2.5rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
}

.terms-header h1 {
  color: var(--primary-deep);
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.last-updated {
  color: var(--primary-brand);
  font-size: 0.9rem;
  margin-bottom: 2rem;
  font-weight: 500;
}

.terms-content h2 {
  color: var(--primary-deep);
  font-size: 1.4rem;
  margin: 2rem 0 1rem;
  border-bottom: 2px solid var(--primary-light);
  padding-bottom: 0.5rem;
}

.terms-content section {
  margin-bottom: 1.5rem;
}

.terms-content ul {
  padding-left: 1.2rem;
  margin-bottom: 1rem;
}

.terms-content li {
  margin-bottom: 0.5rem;
}

/* Specific Highlight Boxes */
.highlight-box,
.safety-section {
  background-color: var(--primary-light);
  padding: 1.5rem;
  border-radius: 8px;
  border-left: 4px solid var(--primary-brand);
}

.terms-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.btn-secondary {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  background-color: var(--primary-brand);
  color: var(--white);
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  transition: var(--transition);
}

.btn-secondary:hover {
  background-color: var(--primary-deep);
  transform: translateY(-2px);
}

/* Terms Checkbox Styling - Responsive & Aligned */
.checkbox-group {
  display: flex;
  align-items: flex-start; /* Keeps items at the top */
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.checkbox-group input[type='checkbox'] {
  /* Scaling the checkbox relative to the text size */
  width: 1.1em;
  height: 1.1em;

  /* This is the secret for alignment: */
  /* It pushes the box down just enough to match the text's cap-height */
  margin-top: 0.2rem;

  cursor: pointer;
  accent-color: var(--primary-brand);
  flex-shrink: 0; /* Prevents the checkbox from squishing on small screens */
}

.checkbox-group label {
  font-size: 0.875rem;
  line-height: 1.4; /* Tighter line height helps with alignment */
  color: var(--dark-text);
  cursor: pointer;
  margin: 0; /* Removes any default browser margins */
}

.checkbox-group label a {
  color: var(--primary-brand);
  font-weight: 600;
  text-decoration: underline;
  transition: var(--transition);
}

.checkbox-group label a:hover {
  color: var(--primary-deep);
}

/* -------------------- PROFILE PIC STYLES ----------------------- */
.profile-pic-wrapper {
  position: relative;
  cursor: pointer;
  width: 4.375rem;
  height: 4.375rem;
  flex-shrink: 0;
}

.profile-initials {
  width: 4.375rem;
  height: 4.375rem;
  background: #1d4ed8;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: bold;
  overflow: hidden;
}

.profile-initials img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.profile-pic-edit-icon {
  position: absolute;
  bottom: 0;
  right: 0;
  background: var(--primary-brand);
  color: white;
  border-radius: 50%;
  width: 1.375rem;
  height: 1.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  border: 2px solid white;
  pointer-events: auto;
  cursor: pointer;
}

.profile-header-section {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* Agent pic on details page */
.agent-pic {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.agent-pic-initials {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: #1d4ed8;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1rem;
  flex-shrink: 0;
}

.agent-info-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.agent-info-text {
  display: flex;
  flex-direction: column;
}

body.dark-theme .profile-initials {
  border: 2px solid var(--border-color);
}

.scroll-to-search-btn {
  display: none;
  position: fixed;
  bottom: 5.5rem;
  right: 1.25rem;
  background: var(--primary-brand);
  color: white;
  border: none;
  border-radius: 3rem;
  padding: 0.75rem 1.125rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 0.25rem 0.9rem rgba(0, 0, 0, 0.2);
  z-index: 999;
  align-items: center;
  gap: 0.375rem;
}

.scroll-to-search-btn.visible {
  display: flex;
}

/* -------------------- POST MODAL STYLES ---------------------- */
.post-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.post-modal-overlay.active {
  display: flex;
}
.post-modal-box {
  background: var(--white);
  border-radius: 16px;
  padding: 2rem;
  max-width: 400px;
  width: 100%;
  position: relative;
  text-align: center;
}
.post-modal-box h3 {
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary-deep);
}
.post-modal-box p {
  color: var(--muted-text, #64748b);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}
.post-modal-choices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
}
.post-modal-choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.25rem 0.5rem;
  border-radius: 12px;
  border: 2px solid var(--border-color);
  text-decoration: none;
  color: var(--primary-deep);
  font-weight: 700;
  font-size: 0.95rem;
  transition: all 0.2s;
}
.post-modal-choice:hover {
  border-color: var(--primary-brand);
  background: var(--primary-light);
}
.post-modal-choice span {
  font-size: 2rem;
}
.post-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--muted-text, #94a3b8);
}

/* ==================== WELCOME PAGE REDESIGN ==================== */
.gateway-body {
  background: linear-gradient(160deg, #ecfdf5 0%, #f9fafb 45%, #ecfdf5 100%);
  flex-direction: column;
}

.welcome-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  max-width: 90%;
  margin-top: 0;
  margin-bottom: -0.5rem;
  padding: 1rem 1rem;
}

.welcome-topbar .gateway-logo {
  width: 2.625rem;
  margin: 0 0.1rem;
}

.welcome-btn {
  padding: 0.45rem 0.9rem;
  border-radius: 2rem;
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  white-space: nowrap;
  transition: var(--transition);
}

.welcome-btn-outline {
  background: transparent;
  color: var(--primary-deep);
  border: 1.5px solid var(--primary-brand);
}

.welcome-btn-outline:hover {
  background: var(--primary-light);
}

.welcome-btn-filled {
  background: var(--primary-brand);
  color: var(--white);
  border: 1.5px solid var(--primary-brand);
}

.welcome-btn-filled:hover {
  background: var(--primary-deep);
  border-color: var(--primary-deep);
}

body.dark-theme .welcome-btn-outline {
  color: var(--dark-text);
}

.gateway-header .gateway-logo {
  filter: drop-shadow(0 4px 10px rgba(5, 150, 105, 0.15));
}

.gateway-container h2 {
  background: linear-gradient(
    135deg,
    var(--primary-deep),
    var(--primary-brand)
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gateway-tagline {
  max-width: 26rem;
  margin: 0 auto 1.75rem;
}

/* --- Live Stats Strip --- */
.stats-live-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin: 0 auto 1.75rem;
  max-width: 34rem;
}

.stats-live-card {
  background: none;
  border: none;
  padding: 0.5rem 0.25rem;
  box-shadow: none;
}

.stats-live-card h3 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-brand);
  margin: 0 0 0.2rem;
}

.stats-live-card p {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--dark-text);
  opacity: 0.75;
  margin: 0;
  line-height: 1.3;
}

.live-dot {
  display: inline-block;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: #22c55e;
  margin-right: 0.3rem;
  animation: live-pulse 1.4s infinite;
}

@keyframes live-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

@media (max-width: 480px) {
  .stats-live-grid {
    gap: 0.5rem;
  }
  .stats-live-card {
    padding: 0.75rem 0.35rem;
  }
  .stats-live-card h3 {
    font-size: 1.2rem;
  }
  .stats-live-card p {
    font-size: 0.62rem;
  }
}

/* --- Compact category cards --- */
.gateway-grid-compact {
  grid-template-columns: repeat(2, 1fr);
  max-width: 26rem;
  margin: 0 auto;
  gap: 0.75rem;
}

.gateway-card-compact {
  padding: 1rem 0.75rem;
}

.gateway-card-compact .icon {
  font-size: 1.8rem;
  width: 3.2rem;
  height: 3.2rem;
  margin-bottom: 0.5rem;
}

.gateway-card-compact h3 {
  font-size: 0.95rem;
  margin-bottom: 0;
}

.gateway-safety-notice {
  max-width: 30rem;
  margin-left: auto;
  margin-right: auto;
}

/* ==================== WELCOME PAGE DARK MODE ==================== */
body.dark-theme.gateway-body {
  background: linear-gradient(160deg, #041a14 0%, #06261d 45%, #041a14 100%);
}

body.dark-theme .gateway-container h2 {
  background: linear-gradient(
    135deg,
    var(--accent-title),
    var(--primary-brand)
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

body.dark-theme .gateway-card h3 {
  color: var(--accent-title);
}

body.dark-theme .gateway-footer a {
  color: var(--accent-title);
}

/* ==================== POST-SERVICE PAGE STYLES ==================== */
.custom-category-wrapper {
  display: none;
  margin-top: 0.6rem;
}

.custom-category-wrapper.active {
  display: block;
}

.custom-category-feedback {
  display: block;
  margin-top: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* ==================== REFERRAL LEADERBOARD PAGE STYLES ==================== */
.lb-wrap {
  max-width: 37.5rem;
  margin: 0 auto;
}

.lb-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

.lb-row:last-child {
  border-bottom: none;
}

.lb-row.lb-me {
  background: var(--primary-light);
  border: 2px solid var(--primary-brand);
  border-radius: 0.6rem;
}

.lb-rank {
  width: 2.5rem;
  text-align: center;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--primary-deep);
  flex-shrink: 0;
}

.lb-name {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  color: var(--dark-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lb-count {
  font-weight: 800;
  color: var(--primary-brand);
  flex-shrink: 0;
}

.lb-count small {
  font-weight: 600;
  color: var(--muted-text, #666);
}

.lb-top1 {
  border-left: 4px solid var(--accent-gold);
}

.lb-me-card {
  text-align: center;
  margin-bottom: 1.5rem;
}

.lb-me-card h4 {
  margin: 0 0 0.3rem;
  color: var(--primary-deep);
}

.lb-me-card p {
  margin: 0;
  font-size: 0.9rem;
}

.lb-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--muted-text, #666);
}

/* ==================== SHARED SITE MENU ==================== */
/* Emojis are now in the link text, so turn off the old position-based icons */
.nav-list.shared-menu .nav-item .nav-link::before,
.nav-list.shared-menu .nav-item .auth-link-bold::before {
  content: none;
}

.nav-hidden-initially {
  display: none;
}

.nav-link.nav-current {
  color: var(--primary-brand);
  font-weight: 700;
}

.nav-link.nav-logout {
  color: #ef4444;
  font-weight: 600;
}

body.dark-theme .nav-link.nav-current {
  color: var(--primary-brand);
}

body.dark-theme .nav-link.nav-logout {
  color: #ef4444;
}

/* ==================== INSTALL PROMPT (all pages) ==================== */
.ios-prompt {
  display: none;
  position: fixed;
  bottom: 1.25rem;
  left: 0.625rem;
  right: 0.625rem;
  background: var(--white);
  padding: 0.9375rem;
  border-radius: 0.75rem;
  box-shadow: 0 0 1.25rem rgba(0, 0, 0, 0.25);
  z-index: 9999;
  border-left: 4px solid var(--primary-brand);
}

.ios-prompt-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.ios-prompt-text {
  flex: 1;
}

.ios-prompt-title {
  margin: 0 0 0.5rem;
  color: var(--dark-text);
  font-size: 0.95rem;
  font-weight: 600;
}

.ios-prompt-body {
  margin: 0;
  color: var(--muted-text, #555);
  font-size: 0.8rem;
  line-height: 1.5;
}

.ios-prompt-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--muted-text, #888);
  margin-left: 0.6rem;
  padding: 0;
  line-height: 1;
}

/* ==================== WELCOME PAGE: COMING SOON CARD ==================== */
.gateway-card-soon {
  position: relative;
  cursor: default;
  opacity: 0.85;
}

.gateway-card-soon:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--border-color);
}

.soon-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: var(--accent-gold);
  color: var(--primary-deep);
  font-size: 0.6rem;
  font-weight: 800;
  padding: 0.15rem 0.5rem;
  border-radius: 3rem;
  text-transform: uppercase;
  letter-spacing: 0.03rem;
}

.gateway-card-soon .soon-text {
  font-size: 0.7rem;
  line-height: 1.3;
  margin: 0.4rem 0 0;
  opacity: 0.8;
}

/* ==================== SERVICES PAGE: COMPACT HERO ==================== */
.services-page .hero-search {
  padding: 1.25rem 0 1.5rem;
}

.services-page .hero-search h1 {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.services-page .hero-search p {
  font-size: 0.9rem;
  margin-bottom: 0.9rem;
}

/* ==================== SERVICES PAGE: SEARCH BAR + CATEGORY CHIPS ==================== */
.services-searchbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 34rem;
  margin: 0 auto;
  background: var(--white);
  border-radius: 3rem;
  padding: 0.3rem 0.35rem 0.3rem 0.9rem;
  box-shadow: 0 0.25rem 0.9rem rgba(0, 0, 0, 0.2);
}

.services-search-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.services-searchbar input[type='text'] {
  flex: 1;
  min-width: 0;
  width: auto;
  border: none;
  background: transparent;
  box-shadow: none;
  padding: 0.55rem 0.25rem;
  font-size: 0.9rem;
  color: var(--dark-text);
}

.services-searchbar input[type='text']:focus {
  border: none;
  background: transparent;
  box-shadow: none;
}

.services-search-btn {
  flex-shrink: 0;
  background: var(--accent-gold);
  color: var(--primary-deep);
  border: none;
  border-radius: 3rem;
  padding: 0.55rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.services-search-btn:hover {
  transform: scale(1.05);
}

.category-chips {
  display: flex;
  gap: 0.5rem;
  max-width: 34rem;
  margin: 0.9rem auto 0;
  padding: 0.15rem 0.1rem 0.4rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: grab;
}

.category-chips::-webkit-scrollbar {
  display: none;
}

.category-chip {
  flex: 0 0 auto;
  background: var(--white);
  color: var(--dark-text);
  border: 1px solid var(--border-color);
  border-radius: 3rem;
  padding: 0.4rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.category-chip.active {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
  color: var(--primary-deep);
}

/* ==================== SERVICES PAGE: LOCATION FILTER ==================== */
.services-filter-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 34rem;
  margin: 0.9rem auto 0;
}

.services-filter-row .category-chips {
  flex: 1;
  min-width: 0;
  max-width: none;
  margin: 0;
}

.location-select {
  flex: 0 0 auto;
  width: auto;
  max-width: 8.5rem;
  background: var(--white);
  color: var(--dark-text);
  border: 1px solid var(--border-color);
  border-radius: 3rem;
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

/* ==================== SERVICE CARD: VIEW BUTTON ==================== */
.service-view-btn {
  grid-column: 1 / -1;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

/* ==================== SERVICE POP-UP ==================== */
body.service-modal-open {
  overflow: hidden;
}

.service-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(6, 78, 59, 0.6);
  backdrop-filter: blur(4px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.service-modal-overlay.active {
  display: flex;
}

.service-modal-box {
  position: relative;
  background: var(--white);
  border-radius: 1rem;
  width: 100%;
  max-width: 30rem;
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.service-modal-top {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.9rem 1rem;
  background: var(--white);
  border-bottom: 1px solid var(--border-color);
  font-weight: 700;
  color: var(--primary-deep);
}

.service-modal-top button {
  position: absolute;
  right: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  width: auto;
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--dark-text);
}

#service-modal-body {
  padding: 1rem 1.25rem 1.5rem;
}

.service-modal-loading,
.service-empty {
  text-align: center;
  padding: 1.5rem 0;
  color: var(--muted-text, #666);
}

/* Header */
.service-modal-header {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.service-modal-avatar {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.service-modal-initials {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-brand);
  color: var(--white);
  font-size: 1.6rem;
  font-weight: 800;
}

.service-modal-header h3 {
  margin: 0 0 0.2rem;
  font-size: 1.25rem;
  color: var(--primary-deep);
}

.service-modal-rating,
.service-modal-location {
  font-size: 0.85rem;
  margin: 0.15rem 0;
  color: var(--muted-text, #666);
}

.star-on {
  color: var(--accent-gold);
  letter-spacing: 0.05rem;
}

.star-off {
  color: var(--border-color);
  letter-spacing: 0.05rem;
}

.service-no-reviews {
  font-style: italic;
}

/* Buttons */
.service-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin: 1rem 0 0.6rem;
}

.service-modal-actions .cta-button {
  text-align: center;
  padding: 0.75rem 0.5rem;
}

.service-share-btn {
  width: 100%;
  background: none;
  border: 1px solid var(--primary-brand);
  color: var(--primary-brand);
  border-radius: 0.5rem;
  padding: 0.6rem;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: inherit;
}

.service-share-btn:hover {
  background: var(--primary-light);
}

/* Tabs */
.service-tabs {
  display: flex;
  margin-top: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.service-tab-btn {
  flex: 1;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.75rem 0.25rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--muted-text, #666);
  cursor: pointer;
  font-family: inherit;
}

.service-tab-btn.active {
  color: var(--primary-brand);
  border-bottom-color: var(--primary-brand);
}

.service-tab-panel {
  display: none;
  padding-top: 1rem;
}

.service-tab-panel.active {
  display: block;
}

.service-tab-panel h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  color: var(--primary-deep);
}

.service-tab-panel h4 {
  margin: 1rem 0 0.3rem;
  font-size: 0.9rem;
  color: var(--primary-deep);
}

.service-tab-panel p {
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0.3rem 0;
}

.service-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.5rem 0;
}

.service-chip {
  background: var(--primary-light);
  color: var(--primary-brand);
  border-radius: 3rem;
  padding: 0.3rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
}

.service-profile-link {
  display: inline-block;
  margin-top: 0.9rem;
  color: var(--primary-brand);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
}

/* Reviews */
.service-review {
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border-color);
}

.service-review:last-child {
  border-bottom: none;
}

.service-review-name {
  font-weight: 700;
  margin: 0.3rem 0 0;
}

.service-review-name span {
  font-weight: 400;
  font-size: 0.78rem;
  color: var(--muted-text, #666);
  margin-left: 0.4rem;
}

/* Gallery */
.service-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
}

.service-gallery-grid img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 0.5rem;
  cursor: pointer;
}

/* ==================== REPORT POP-UP (all pages) ==================== */
.report-modal-overlay {
  display: flex;
  z-index: 10000;
}

.report-modal-content {
  max-width: 26rem;
  text-align: left;
}

.report-modal-content p {
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.report-modal-content .report-error {
  color: #dc2626;
  font-weight: 600;
  min-height: 1.1rem;
  margin: 0.5rem 0 0;
}

.report-modal-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 1rem;
}

.report-btn-cancel,
.report-btn-submit {
  flex: 1;
  border-radius: 0.5rem;
  padding: 0.75rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}

.report-btn-cancel {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--dark-text);
}

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

.report-btn-submit:hover {
  background: var(--primary-deep);
}

/* ==================== SERVICE CARD (browse page) ==================== */
.service-card {
  padding: 0.9rem;
  gap: 0.6rem;
  height: auto;
  align-self: start;
}

.service-card-top {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.service-card-thumb {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 0.6rem;
  object-fit: cover;
  flex-shrink: 0;
}

.service-card-info {
  flex: 1;
  min-width: 0;
}

.service-card-info .card-title {
  font-size: 0.95rem;
  margin: 0 0 0.1rem;
}

.service-card-provider,
.service-card-rating,
.service-card-meta {
  font-size: 0.75rem;
  margin: 0.1rem 0;
  color: var(--muted-text, #666);
}

.service-card-price {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary-brand);
  margin: 0.2rem 0 0;
}

.service-card-desc {
  font-size: 0.8rem;
  line-height: 1.4;
  margin: 0;
  color: var(--dark-text);
}

.service-card-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: auto;
}

.service-card-buttons .cta-button,
.service-card-buttons .btn-secondary {
  width: 100%;
  text-align: center;
  padding: 0.65rem 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 0.5rem;
  cursor: pointer;
  font-family: inherit;
  box-sizing: border-box;
}

.service-card-buttons .whatsapp-btn {
  border: none;
}

.service-card-buttons .btn-secondary {
  background: transparent;
  color: var(--primary-brand);
  border: 1px solid var(--primary-brand);
}

.service-card-buttons .btn-secondary:hover {
  background: var(--primary-light);
  transform: none;
}

/* Services grid: one card per row on phones (cards are text-heavy) */
@media (max-width: 48rem) {
  #services-grid {
    grid-template-columns: 1fr;
  }
}

/* ==================== LONG TEXT PROTECTION (all cards) ==================== */
/* Lets a card shrink inside the grid instead of stretching it */
.property-card {
  min-width: 0;
}

.card-content {
  min-width: 0;
}

/* Titles: max 2 lines, then "..." */
.card-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
}

/* Location: 1 line, then "..." */
.card-location {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Small tags under the title (category, school, phone, etc.) */
.card-specs span {
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Service card description: 1 line, then "..." */
.service-card-desc {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Service card text beside the photo */
.service-card-info .card-title,
.service-card-provider,
.service-card-meta {
  overflow-wrap: anywhere;
}

.service-card-provider,
.service-card-meta {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==================== BOTTOM NAV (app-style) ==================== */
body.has-bottom-nav {
  padding-bottom: calc(4.5rem + env(safe-area-inset-bottom));
}

/* Old hamburger menu is gone */
body.has-bottom-nav .menu-toggle-button,
body.has-bottom-nav .menu-checkbox,
body.has-bottom-nav .menu-overlay,
body.has-bottom-nav .header-nav {
  display: none !important;
}
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  background: var(--white);
  border-top: 1px solid var(--border-color);
  box-shadow: 0 -0.25rem 0.9rem rgba(6, 78, 59, 0.08);
  padding: 0.35rem 0.25rem calc(0.35rem + env(safe-area-inset-bottom));
  z-index: 1000;
}

.bottom-nav-item {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  padding: 0.25rem 0;
  text-decoration: none;
  color: var(--muted-text, #666);
  font-weight: 600;
}

.bottom-nav-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.bottom-nav-label {
  max-width: 100%;
  font-size: 0.6rem;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bottom-nav-item.bottom-nav-current {
  color: var(--primary-brand);
  font-weight: 700;
}

/* The raised + button (centre of the 5-column grid = dead centre) */
.bottom-nav-post {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 2.5rem;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.bottom-nav-post span {
  position: relative;
  top: -0.8rem;
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--primary-brand),
    var(--primary-deep)
  );
  border: 3px solid var(--white);
  box-shadow:
    0 0.3rem 0.8rem rgba(5, 150, 105, 0.45),
    0 0 1rem rgba(5, 150, 105, 0.5);
  animation: bottom-post-pulse 2s ease-in-out infinite;
}

/* The plus sign, drawn with two white bars */
.bottom-nav-post span::before,
.bottom-nav-post span::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  background: #fff;
  border-radius: 0.125rem;
  transform: translate(-50%, -50%);
}

.bottom-nav-post span::before {
  width: 1.1rem;
  height: 0.18rem;
}

.bottom-nav-post span::after {
  width: 0.18rem;
  height: 1.1rem;
}

@keyframes bottom-post-pulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow:
      0 0.35rem 1rem rgba(5, 150, 105, 0.45),
      0 0 0 0 rgba(5, 150, 105, 0.6);
  }
  50% {
    transform: scale(1.07);
    box-shadow:
      0 0.35rem 1.4rem rgba(5, 150, 105, 0.6),
      0 0 0 0.9rem rgba(5, 150, 105, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .bottom-nav-post span {
    animation: none;
  }
}

/* On wide screens keep the bar compact in the middle */
@media (min-width: 48rem) {
  .bottom-nav {
    grid-template-columns: repeat(5, 6rem);
    justify-content: center;
    column-gap: 0.5rem;
  }
}

/* Move floating buttons above the bar */
body.has-bottom-nav .fab-notify {
  bottom: 5.5rem;
}

body.has-bottom-nav .scroll-to-search-btn {
  bottom: 9rem;
}

body.has-bottom-nav .ios-prompt {
  bottom: 5rem;
}

/* ==================== TOP RIGHT BUTTONS ==================== */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.header-pill {
  text-decoration: none;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
  padding: 0.22rem 0.55rem;
  border-radius: 2rem;
  white-space: nowrap;
  border: 1px solid var(--primary-brand);
  transition: var(--transition);
}

.header-pill-outline {
  background: transparent;
  color: var(--dark-text);
}

.header-pill-outline:hover {
  background: var(--primary-light);
}

.header-pill-filled {
  background: var(--primary-brand);
  color: white;
}

.header-pill-filled:hover {
  background: var(--primary-deep);
  border-color: var(--primary-deep);
}

.header-pill-logout {
  background: transparent;
  color: #ef4444;
  border-color: #ef4444;
}

.header-pill-admin {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
  color: var(--primary-deep);
}

/* Tighter header bar on pages with the bottom nav */
body.has-bottom-nav .header-container {
  padding: 0 0.75rem;
}

/* ==================== DASHBOARD SHORTCUTS (Referrals + Saved) ==================== */
.dashboard-shortcuts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.dashboard-shortcut {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  padding: 0.6rem 0.5rem;
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 0.6rem;
  box-shadow: var(--shadow);
  text-decoration: none;
  text-align: center;
  color: var(--primary-deep);
  font-weight: 700;
  font-size: 0.85rem;
  line-height: 1.2;
  transition: var(--transition);
}

.dashboard-shortcut:hover {
  border-color: var(--primary-brand);
  background: var(--primary-light);
  transform: translateY(-0.15rem);
}

.dashboard-shortcut span {
  font-size: 1.3rem;
  line-height: 1;
}

.dashboard-shortcut small {
  display: block;
  text-align: center;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--muted-text, #666);
}

body.dark-theme .dashboard-shortcut {
  color: var(--dark-text);
}

/* ==================== SERVICE REVIEW FORM ==================== */
.review-form-box {
  background: var(--primary-light);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1rem;
  margin-bottom: 1rem;
}

.review-form-box h4 {
  margin: 0 0 0.6rem;
  font-size: 1rem;
  color: var(--primary-deep);
}

.review-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
}

.review-row-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--dark-text);
  margin: 0.4rem 0;
}

.star-input {
  display: flex;
  gap: 0.1rem;
}

.star-btn {
  width: auto;
  background: none;
  border: none;
  padding: 0 0.1rem;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted-text, #94a3b8);
  transition: transform 0.15s ease;
}

.star-btn:active {
  transform: scale(1.25);
}

.star-btn.active {
  color: var(--accent-gold);
}

.review-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.7rem;
}

.review-tag {
  width: auto;
  background: var(--white);
  color: var(--dark-text);
  border: 1px solid var(--border-color);
  border-radius: 3rem;
  padding: 0.3rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.review-tag.active {
  background: var(--primary-brand);
  border-color: var(--primary-brand);
  color: white;
}

.review-form-box textarea {
  min-height: 4.5rem;
  font-size: 0.9rem;
  font-family: inherit;
}

.review-error {
  color: #dc2626;
  font-weight: 600;
  font-size: 0.8rem;
  min-height: 1rem;
  margin: 0.4rem 0;
}

.review-submit-btn {
  width: 100%;
  background: var(--primary-brand);
  color: white;
  border: none;
  border-radius: 0.5rem;
  padding: 0.75rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}

.review-submit-btn:hover {
  background: var(--primary-deep);
}

.review-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.review-note {
  background: var(--primary-light);
  border: 1px dashed var(--primary-brand);
  border-radius: 0.75rem;
  padding: 0.9rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  line-height: 1.5;
}

.review-note a {
  color: var(--primary-brand);
  font-weight: 700;
}

.review-recheck-btn {
  display: block;
  width: auto;
  margin-top: 0.6rem;
  background: none;
  border: 1px solid var(--primary-brand);
  color: var(--primary-brand);
  border-radius: 0.5rem;
  padding: 0.45rem 0.9rem;
  font-weight: 700;
  font-size: 0.8rem;
  font-family: inherit;
  cursor: pointer;
}

.review-form-hidden {
  display: none;
}

.review-edit-btn {
  display: block;
  width: 100%;
  background: var(--white);
  color: var(--primary-brand);
  border: 1px solid var(--primary-brand);
  border-radius: 0.5rem;
  padding: 0.7rem;
  margin-bottom: 1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}

.review-edit-btn:hover {
  background: var(--primary-light);
}

/* ==================== ADMIN PAGE: ROOM FOR BOTTOM NAV ==================== */
body.admin-page {
  padding-bottom: calc(4.5rem + env(safe-area-inset-bottom));
}
