/**
 * Design Tokens and Shared Utilities
 */
:root {
  --primary-color: #0b1139;
  --secondary-color: #e39635;
  --success-color: #28a745;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #0d6efd;
  --light-color: #ecf0f1;
  --bg-color: #f3f5fa;
  --dark-color: #3d3d3e;
  --grey-color: #e6e7e8;

  --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  --card-shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.15);
  --border-radius: 8px;
  --transition: all 0.3s ease;
  --border-color: #cfcfcf;
}

.italic {
  font-style: italic;
}

.text-dark {
  color: var(--dark-color);
}

.text-primary {
  color: var(--primary-color);
}

.text-secondary {
  color: var(--secondary-color);
}

.text-success {
  color: var(--success-color);
}

.text-danger {
  color: var(--danger-color);
}

.text-warning {
  color: var(--warning-color);
}

.text-info {
  color: var(--info-color);
}

.text-light {
  color: var(--light-color);
}

/* Background Colors */
.bg-light {
  background-color: var(--light-color);
}

.bg-dark {
  background-color: var(--dark-color);
}

.bg-primary {
  background-color: var(--primary-color);
}

.bg-secondary {
  background-color: var(--secondary-color);
}

.bg-grey {
  background-color: var(--grey-color) !important;
}

/* Borders */
.border {
  border: 1px solid var(--border-color);
}

.border-primary {
  border-color: var(--primary-color);
}

.border-secondary {
  border-color: var(--secondary-color);
}

.border-dark {
  border-color: var(--dark-color);
}

.border-light {
  border-color: var(--light-color);
}

/* Base Layout Utilities */
/* .communities-archive {
    background-color: var(--light-color);
} */

.page-header {
  border-bottom: 1px solid #dee2e6;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.4s ease-out;
}

/* Loading state */
.loading-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  background: rgba(255, 255, 255, 0.95);
  width: 100%;
  border-radius: var(--border-radius);
}

.loading-overlay {
  opacity: 0.5;
  pointer-events: none;
}

/* ===============================================
   Read More Component
   =============================================== */

/* Read More Wrapper */
.bh-read-more-wrapper {
  position: relative;
}

/* Content Container */
.bh-read-more-content {
  position: relative;
  max-height: 400px;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Remove overflow when content is short enough */
.bh-read-more-content.bh-no-overflow {
  overflow: visible;
}

/* Fade gradient overlay when collapsed */
.bh-read-more-content::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.85) 70%,
      rgba(255, 255, 255, 1) 100%);
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.3s ease;
}

/* Remove gradient when expanded or when content is short */
.bh-read-more-content.bh-no-overflow::after,
.bh-read-more-btn.expanded~.bh-read-more-content::after {
  opacity: 0;
}

/* Read More Button */
.bh-read-more-btn {
  display: inline-block;
  margin-top: 0;
  padding: 0.5rem 1.25rem;
  background-color: transparent;
  border: 2px solid currentColor;
  border-radius: 4px;
  color: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.bh-read-more-btn:hover {
  background-color: rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.bh-read-more-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.bh-read-more-btn:focus {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* Button icon/arrow styles */
.bh-read-more-btn::after {
  content: "↓";
  display: inline-block;
  margin-left: 0.5rem;
  transition: transform 0.3s ease;
}

.bh-read-more-btn.expanded::after {
  transform: rotate(180deg);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .bh-read-more-content {
    max-height: 180px;
  }

  .bh-read-more-btn {
    width: 100%;
    display: block;
  }
}

@media (max-width: 480px) {
  .bh-read-more-content {
    max-height: 150px;
  }

  .bh-read-more-content::after {
    height: 60px;
  }
}

/* Archive Map */

.map-container {
  z-index: 10 !important;
}

.locationLink {
  text-decoration: none;
  color: var(--dark-color);
  transition: all 0.3s ease;
}

.locationLink:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

.bh-address-line,
.bh-location-line {
  display: block;
}

.bh-address-line {
  margin-bottom: 4px;
  /* adjust freely */
}


/* // Scroll Spy Navbar */

.navbar-subnav .nav-item.active {
  background-color: var(--secondary-color) !important;

  a {
    color: var(--light-color) !important;
  }
}

/* figCaption */
.figCaption {
  position: absolute;
  bottom: 0;
  left: 0;
  /* background-color: var(--dark-color); */
  color: #ffffff;
  padding: 10px;
  box-sizing: border-box;
  z-index: 1;
  font-size: 14px;
}

/* ==========================================================================
   Split Scroll Layout - Pure CSS Solution
   ========================================================================== */

.bh-split-scroll-wrapper {
  position: relative;
}

.bh-split-section {
  position: relative;
}



/**
 * Left column - scrollable
 */
.bh-listings-column {
  overflow-y: scroll;
  overflow-x: hidden;
  scroll-behavior: smooth;

  /* Hide scrollbar by default */
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE/Edge */

}

.bh-listings-grid {}

/* Hide scrollbar for Chrome/Safari/Opera */
.bh-listings-grid::-webkit-scrollbar {
  width: 0;
  background: transparent;
}

/* Show scrollbar on hover or while scrolling */
.bh-listings-grid:hover,
.bh-listings-grid:focus-within {
  scrollbar-width: thin;
  /* Firefox */
}

.bh-listings-grid:hover::-webkit-scrollbar,
.bh-listings-grid:focus-within::-webkit-scrollbar {
  width: 8px;
}

.bh-listings-grid::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.bh-listings-grid::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

.bh-listings-grid::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/**
 * Right column - fixed map
 */

.bh-map-column {
  display: block;
  width: 100%;
  min-height: 300px;
}

@media (min-width: 992px) {

  .bh-map-column,
  .bh-listings-column {
    height: 64rem;
    max-height: 85vh;
  }
}

#communities-map {
  height: 100%;
  width: 100%;
  background: #e9ecef;
}

/* ==========================================================================
   Mobile Responsive
   ========================================================================== */

@media (max-width: 991.98px) {

  .bh-listings-column,
  .bh-map-column {
    position: static;
    height: auto;
  }

  .bh-listings-grid {
    height: auto;
    overflow: visible;
  }

  #communities-map {
    height: 300px;
    margin-top: 1rem;
  }
}