/* Mobile-First Card-Based Advisor List Styles */

.advisor-list-page {
  min-height: 100vh;
  background: #f8f9fa;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Page Header */
.page-header {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  padding: 2rem 0;
  border-bottom: 1px solid #e9ecef;
}

.page-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #212529;
  margin-bottom: 0.5rem;
  text-align: center;
}

.page-subtitle {
  font-size: 1.1rem;
  color: #6c757d;
  text-align: center;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Search Section */
.search-section {
  max-width: 800px;
  margin: 0 auto;
}

.search-container {
  margin-bottom: 1.5rem;
}

.search-box {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
}

.search-box input {
  width: 100%;
  padding: 16px 24px;
  padding-right: 60px;
  font-size: 1.1rem;
  border: 2px solid #e9ecef;
  border-radius: 50px;
  outline: none;
  background: white;
  transition: all 0.3s ease;
  color: #212529;
}

.search-box input:focus {
  border-color: #187aba;
  box-shadow: 0 0 0 3px rgba(24, 122, 186, 0.1);
}

.search-box button {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: #187aba;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
}

.search-box button:hover {
  background: #0f6ca7;
}

/* Results Summary */
.results-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

#results-count {
  font-size: 1rem;
  color: #6c757d;
  font-weight: 500;
}

.view-controls {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* Sort Dropdown */
.sort-dropdown-container {
  position: relative;
}

.sort-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  min-width: 180px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
}

.sort-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  padding: 12px 16px;
  cursor: pointer;
  color: #495057;
  font-size: 0.9rem;
  border-bottom: 1px solid #f1f3f4;
  transition: background-color 0.2s ease;
}

.dropdown-item:last-child {
  border-bottom: none;
}

.dropdown-item:hover {
  background-color: #f8f9fa;
  color: #187aba;
}

.dropdown-item:first-child {
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.dropdown-item:last-child {
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

.sort-btn {
  background: white;
  border: 1px solid #dee2e6;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.sort-btn:hover {
  border-color: #187aba;
  color: #187aba;
}

/* Filter Section */
.filter-section {
  background: white;
  border-bottom: 1px solid #e9ecef;
  padding: 1rem 0;
}

.filter-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.filter-toggle {
  background: #187aba;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  position: relative;
}

.filter-toggle:hover {
  background: #0f6ca7;
}

.active-filters-count {
  background: rgba(255, 255, 255, 0.3);
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  min-width: 20px;
  text-align: center;
  display: none;
}

.active-filters-count.show {
  display: inline-block;
}

.quick-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  flex: 1;
}

.quick-filter-tag {
  background: #e3f2fd;
  color: #187aba;
  border: 1px solid #187aba;
  padding: 6px 12px;
  border-radius: 15px;
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quick-filter-tag .remove {
  color: #187aba;
  font-weight: bold;
  cursor: pointer;
}

.quick-filter-tag:hover .remove {
  color: #dc3545;
}

.clear-filters {
  background: transparent;
  color: #dc3545;
  border: 1px solid #dc3545;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.clear-filters:hover {
  background: #dc3545;
  color: white;
}

/* Filter Panel */
.filter-panel {
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
  background: #f8f9fa;
  border-radius: 8px;
  margin-top: 1rem;
}

.filter-panel.open {
  max-height: 500px;
  padding: 1.5rem;
}

.filter-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.filter-group h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #212529;
  margin-bottom: 0.75rem;
}

.filter-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.filter-tag {
  background: white;
  border: 1px solid #dee2e6;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #495057;
}

.filter-tag:hover {
  border-color: #187aba;
  color: #187aba;
}

.filter-tag.active {
  background: #187aba;
  border-color: #187aba;
  color: white;
}

.filter-tag.show-more {
  background: #e9ecef;
  color: #6c757d;
  font-style: italic;
}

.slider-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.slider-container label {
  font-size: 0.9rem;
  color: #495057;
  font-weight: 500;
  white-space: nowrap;
}

.slider-container input[type="range"] {
  flex: 1;
  min-width: 150px;
}

/* AUM Slider specific styles */
#aum-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: #187aba;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

#aum-slider::-webkit-slider-thumb:hover {
  background: #0f6ca7;
  transform: scale(1.1);
}

#aum-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: #187aba;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

#aum-slider::-moz-range-thumb:hover {
  background: #0f6ca7;
  transform: scale(1.1);
}

.slider-container span {
  font-weight: 600;
  color: #187aba;
  min-width: 60px;
}

.additional-states {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid #dee2e6;
  animation: slideDown 0.3s ease-out;
  max-height: 200px;
  overflow-y: auto;
  padding-right: 10px;
}

.additional-states .filter-tag {
  pointer-events: auto;
  position: relative;
  z-index: 10;
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
  }
  to {
    opacity: 1;
    max-height: 500px;
  }
}

.range-slider-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Dual Range Slider Styles */
.dual-range-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.dual-range-container label {
  font-size: 0.9rem;
  color: #495057;
  font-weight: 500;
}

.dual-range-wrapper {
  position: relative;
  height: 40px;
  background: #f8f9fa;
  border-radius: 20px;
  padding: 0 20px;
  display: flex;
  align-items: center;
}

.dual-range-track {
  position: absolute;
  top: 50%;
  left: 20px;
  right: 20px;
  height: 6px;
  background: #dee2e6;
  border-radius: 3px;
  transform: translateY(-50%);
  z-index: 1;
}

.dual-range-progress {
  position: absolute;
  top: 50%;
  height: 6px;
  background: linear-gradient(90deg, #187aba 0%, #0f6ca7 100%);
  border-radius: 3px;
  transform: translateY(-50%);
  transition: all 0.1s ease;
  left: 0;
  width: 0;
  z-index: 2;
}

.range-min, .range-max {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  z-index: 3;
}

.range-min::-webkit-slider-thumb,
.range-max::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: #187aba;
  border-radius: 50%;
  cursor: pointer;
  pointer-events: auto;
  border: 2px solid white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
  z-index: 4;
}

.range-min::-webkit-slider-thumb:hover,
.range-max::-webkit-slider-thumb:hover {
  background: #0f6ca7;
  transform: scale(1.1);
}

.range-min::-moz-range-thumb,
.range-max::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: #187aba;
  border-radius: 50%;
  cursor: pointer;
  pointer-events: auto;
  border: 2px solid white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
  z-index: 4;
}

.range-min::-moz-range-thumb:hover,
.range-max::-moz-range-thumb:hover {
  background: #0f6ca7;
  transform: scale(1.1);
}

.dual-range-values {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.dual-range-values span {
  color: #187aba;
}

.range-separator {
  color: #6c757d !important;
  font-weight: 400 !important;
}

.filter-tag.show-more {
  transition: all 0.2s ease;
}

.filter-tag.show-more:hover {
  background: #187aba;
  color: white;
  border-color: #187aba;
}

/* Advisors Section */
.advisors-section {
  padding: 2rem 0;
}

/* Loading State */
.loading-state {
  margin-bottom: 2rem;
}

.loading-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.advisor-card-skeleton {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
}

.advisor-card-skeleton::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Advisors Grid */
.advisors-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* Advisor Card */
.advisor-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: 1px solid #e9ecef;
  position: relative;
  overflow: hidden;
}

.advisor-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
  border-color: #187aba;
}

.advisor-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  gap: 1rem;
}

.advisor-info h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #212529;
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.advisor-info h3 a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.advisor-info h3 a:hover {
  color: #187aba;
}

.advisor-location {
  font-size: 0.9rem;
  color: #6c757d;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.advisor-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-end;
}

.view-profile-btn {
  background: #187aba;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.view-profile-btn:hover {
  background: #0f6ca7;
  color: white;
  text-decoration: none;
}

.bookmark-btn {
  background: transparent;
  border: 1px solid #dee2e6;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #6c757d;
}

.bookmark-btn:hover {
  border-color: #187aba;
  color: #187aba;
}

.advisor-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.metric {
  text-align: center;
  padding: 0.75rem;
  background: #f8f9fa;
  border-radius: 8px;
}

.metric-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: #187aba;
  margin-bottom: 0.25rem;
}

.metric-label {
  font-size: 0.8rem;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.advisor-specialties {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.specialty-tag {
  background: rgba(24, 122, 186, 0.1);
  color: #187aba;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
}

/* Load More Section */
.load-more-section {
  text-align: center;
  padding: 2rem 0;
}

.load-more-btn {
  background: #187aba;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.load-more-btn:hover {
  background: #0f6ca7;
  transform: translateY(-1px);
}

/* No Results */
.no-results {
  text-align: center;
  padding: 4rem 2rem;
}

.no-results-content {
  max-width: 400px;
  margin: 0 auto;
}

.no-results svg {
  color: #dee2e6;
  margin-bottom: 1rem;
}

.no-results h3 {
  font-size: 1.5rem;
  color: #495057;
  margin-bottom: 0.5rem;
}

.no-results p {
  color: #6c757d;
  margin-bottom: 1.5rem;
}

.clear-filters-btn {
  background: #187aba;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 20px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.clear-filters-btn:hover {
  background: #0f6ca7;
}

/* Tablet Styles */
@media (min-width: 768px) {
  .page-header h1 {
    font-size: 3rem;
  }
  
  .advisors-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .loading-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .filter-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .advisor-card-header {
    flex-direction: row;
    align-items: flex-start;
  }
  
  .advisor-actions {
    flex-direction: row;
    align-items: center;
  }
}

/* Desktop Styles */
@media (min-width: 1024px) {
  .advisors-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .loading-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .filter-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Large Desktop */
@media (min-width: 1400px) {
  .advisors-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .loading-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}