/* Mobile-First CSS for Dashboard Hub Homepage */

/* Reset and Base Styles */
* {
  box-sizing: border-box;
}

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

/* Hero Section */
.hero-section {
  position: relative;
  height: 100vh;
  min-height: 600px;
  max-height: 800px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

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

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.4) 100%);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  color: white;
  max-width: 600px;
  padding: 0 20px;
}

.hero-text h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.95;
  font-weight: 300;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Search Container */
.search-container {
  margin-bottom: 2rem;
  position: relative;
}

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

.search-box input {
  width: 100%;
  padding: 16px 24px;
  padding-right: 60px;
  font-size: 1.1rem;
  border: none;
  border-radius: 50px;
  outline: none;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  color: #212529;
  font-weight: 400;
}

.search-box input::placeholder {
  color: #6c757d;
  opacity: 0.8;
}

.search-box input:focus {
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.search-box button {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: #187aba;
  border: none;
  width: 40px;
  height: 40px;
  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;
}

/* Hero CTAs */
.hero-ctas {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-primary, .cta-secondary {
  padding: 14px 28px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  min-width: 180px;
  text-align: center;
}

.cta-primary {
  background: #187aba;
  color: white;
  border: 2px solid #187aba;
}

.cta-primary:hover {
  background: #0f6ca7;
  border-color: #0f6ca7;
  color: white;
  text-decoration: none;
}

.cta-secondary {
  background: transparent;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.8);
}

.cta-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: white;
  color: white;
  text-decoration: none;
}

/* Stats Banner */
.stats-banner {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 2rem 0;
  border-bottom: 1px solid #dee2e6;
}

.stats-container {
  display: flex;
  justify-content: space-around;
  align-items: center;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

.stat-item {
  text-align: center;
  flex: 1;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: #187aba;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.9rem;
  color: #6c757d;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Dashboard Section */
.dashboard-section {
  padding: 4rem 0;
  background: white;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

.dashboard-card {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
  border: 1px solid #e9ecef;
  transition: all 0.3s ease;
  position: relative;
}

.dashboard-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.card-icon {
  margin-bottom: 1.5rem;
  color: #187aba;
}

.dashboard-card h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #212529;
}

.dashboard-card p {
  color: #6c757d;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.card-link {
  color: #187aba;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.card-link:hover {
  color: #0f6ca7;
  text-decoration: none;
}

/* Featured Card Special Styling */
.featured-card {
  background: linear-gradient(135deg, #187aba 0%, #0f6ca7 100%);
  color: white;
}

.featured-card h3,
.featured-card p {
  color: white;
}

.featured-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.featured-header .card-icon {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 0;
}

.featured-firm {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.featured-stats {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.featured-stats span {
  background: rgba(255, 255, 255, 0.2);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
}

.featured-card .card-link {
  color: white;
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}

.featured-card .card-link:hover {
  color: white;
  border-bottom-color: white;
}

/* Rankings Preview Section */
.rankings-preview-section {
  background: #f8f9fa;
  padding: 4rem 0;
  border-top: 1px solid #dee2e6;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: 2.5rem;
  font-weight: 600;
  color: #212529;
  margin-bottom: 1rem;
}

.section-header p {
  font-size: 1.2rem;
  color: #6c757d;
  max-width: 600px;
  margin: 0 auto;
}

.rankings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.ranking-card {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
  border: 1px solid #e9ecef;
  transition: all 0.3s ease;
}

.ranking-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.ranking-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #f8f9fa;
}

.ranking-header h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #212529;
  margin: 0;
}

.ranking-badge {
  background: linear-gradient(135deg, #187aba 0%, #0f6ca7 100%);
  color: white;
  padding: 0.4rem 0.8rem;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ranking-list {
  margin-bottom: 1.5rem;
}

.ranking-item {
  display: flex;
  align-items: center;
  padding: 0.8rem 0;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s ease;
}

.ranking-item:hover {
  background: #f8f9fa;
  margin: 0 -1rem;
  padding-left: 1rem;
  padding-right: 1rem;
  border-radius: 6px;
}

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

.rank-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, #187aba 0%, #0f6ca7 100%);
  color: white;
  border-radius: 50%;
  font-weight: 600;
  font-size: 0.9rem;
  margin-right: 1rem;
  flex-shrink: 0;
}

.firm-name {
  font-weight: 500;
  color: #212529;
  flex: 1;
  cursor: pointer;
  transition: color 0.2s ease;
}

.ranking-item:hover .firm-name {
  color: #187aba;
}

.ranking-link {
  color: #187aba;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.ranking-link:hover {
  color: #0f6ca7;
  text-decoration: none;
  transform: translateX(3px);
}

/* CTA Section */
.cta-section {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 4rem 0;
  text-align: center;
}

.cta-section h2 {
  font-size: 2.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #212529;
}

.cta-section p {
  font-size: 1.2rem;
  color: #6c757d;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-large {
  display: inline-block;
  background: #187aba;
  color: white;
  padding: 18px 36px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.cta-large:hover {
  background: #0f6ca7;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(24, 122, 186, 0.3);
  color: white;
  text-decoration: none;
}

/* Tablet Styles */
@media (min-width: 768px) {
  .hero-text h1 {
    font-size: 3.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.4rem;
  }
  
  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .stats-container {
    padding: 0 40px;
  }
  
  .stat-number {
    font-size: 3rem;
  }
  
  .cta-section h2 {
    font-size: 3rem;
  }
}

/* Large Desktop Styles */
@media (min-width: 1024px) {
  .hero-text h1 {
    font-size: 4rem;
  }
  
  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
  }
  
  .dashboard-card {
    padding: 3rem;
  }
  
  /* Desktop rankings layout */
  .rankings-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
  }
}

/* Search Suggestions */
.search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border-radius: 0 0 20px 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  max-height: 400px;
  overflow-y: auto;
  z-index: 10;
  display: none;
  margin-top: 2px;
}

.search-suggestion {
  padding: 16px 24px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  transition: all 0.2s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.search-suggestion:hover,
.search-suggestion.active {
  background: #f8f9fa;
  border-left: 3px solid #187aba;
  padding-left: 21px;
}

.search-suggestion:last-child {
  border-bottom: none;
  border-radius: 0 0 20px 20px;
}

.suggestion-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.suggestion-main strong {
  font-size: 1rem;
  color: #212529;
  font-weight: 600;
}

.suggestion-location {
  font-size: 0.85rem;
  color: #6c757d;
  margin-left: 8px;
}

.suggestion-details {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  text-align: right;
  min-width: 120px;
}

.suggestion-aum {
  font-size: 0.9rem;
  font-weight: 600;
  color: #187aba;
}

.suggestion-clients {
  font-size: 0.8rem;
  color: #6c757d;
}

/* Highlight matching text */
.search-suggestion mark {
  background: rgba(24, 122, 186, 0.2);
  color: #187aba;
  padding: 0;
  font-weight: 600;
}

/* Mobile responsive suggestions */
@media (max-width: 768px) {
  .search-suggestion {
    padding: 14px 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .suggestion-details {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    min-width: auto;
    align-self: stretch;
    justify-content: space-between;
  }
  
  .suggestion-location {
    margin-left: 0;
    margin-top: 2px;
  }
  
  /* Mobile rankings adjustments */
  .rankings-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .section-header h2 {
    font-size: 2rem;
  }
  
  .section-header p {
    font-size: 1rem;
  }
  
  .ranking-card {
    padding: 1.5rem;
  }
  
  .ranking-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .ranking-badge {
    align-self: flex-end;
  }
}

/* Loading States */
.loading {
  opacity: 0.7;
  pointer-events: none;
}

.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #187aba;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
}

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