/* ==========================================
   MARKETS WE SERVE - PAGE STYLES
   ========================================== */

/* ==========================================
   HERO SECTION
   ========================================== */
.markets-hero {
  background: linear-gradient(135deg, #1a1512 0%, #2d251f 50%, #3d322a 100%);
  padding: clamp(80px, 12vw, 140px) var(--space-lg);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.markets-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 40%, rgba(107, 68, 35, 0.4) 0%, transparent 50%),
              radial-gradient(circle at 70% 60%, rgba(107, 68, 35, 0.3) 0%, transparent 40%);
  pointer-events: none;
}

.markets-hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
}

.markets-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  color: white;
  margin-bottom: var(--space-xl);
}

.markets-hero h1 {
  color: white;
  font-size: clamp(36px, 6vw, 58px);
  line-height: 1.1;
  margin-bottom: var(--space-lg);
  letter-spacing: -0.02em;
}

.markets-hero h1 .highlight {
  color: #d4a574;
}

.markets-hero-subtitle {
  color: rgba(255, 255, 255, 0.85);
  font-size: clamp(17px, 2.5vw, 20px);
  line-height: 1.7;
  max-width: 700px;
  margin: 0 auto var(--space-xl);
}

.markets-hero-ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-bottom: var(--space-2xl);
}

.markets-hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xl);
  flex-wrap: wrap;
}

.hero-stat {
  text-align: center;
}

.hero-stat-value {
  display: block;
  font-family: var(--font-heading);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  color: #d4a574;
  line-height: 1;
}

.hero-stat-label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 6px;
}

.hero-stat-divider {
  width: 1px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
}

@media (max-width: 768px) {
  .markets-hero {
    padding: 60px var(--space-md) 80px;
  }

  .markets-hero-ctas {
    flex-direction: column;
  }

  .markets-hero-ctas .btn-hero-primary,
  .markets-hero-ctas .btn-hero-secondary {
    width: 100%;
    max-width: 320px;
    justify-content: center;
  }

  .markets-hero-stats {
    gap: var(--space-lg);
  }

  .hero-stat-divider {
    display: none;
  }
}

@media (max-width: 480px) {
  .markets-hero-stats {
    flex-direction: row;
    justify-content: space-around;
    width: 100%;
  }

  .hero-stat-value {
    font-size: 28px;
  }

  .hero-stat-label {
    font-size: 11px;
  }
}

/* ==========================================
   TRUST BAR
   ========================================== */
.markets-trust-bar {
  background: white;
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--border);
}

.trust-items {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xl);
  flex-wrap: wrap;
}

.trust-items .trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.trust-items .trust-item svg {
  color: var(--primary);
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .trust-items {
    gap: var(--space-md);
  }

  .trust-items .trust-item {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .trust-items {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
  }

  .trust-items .trust-item {
    justify-content: center;
    font-size: 12px;
  }
}

/* ==========================================
   FEATURED MARKETS SECTION
   ========================================== */
.featured-markets {
  background: var(--bg);
}

.featured-markets-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.featured-market-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-decoration: none;
  text-align: center;
  transition: var(--transition);
  position: relative;
}

.featured-market-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.featured-market-card.primary-market {
  border: 2px solid var(--primary);
}

.featured-market-card.primary-market::before {
  content: 'Top Market';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: white;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.featured-market-abbr {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  border-radius: 50%;
  margin: 0 auto var(--space-md);
}

.featured-market-card h3 {
  font-size: 18px;
  color: var(--text);
  margin-bottom: 6px;
}

.featured-market-cities {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: var(--space-md);
}

.featured-market-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
}

.featured-market-link svg {
  transition: transform 0.2s;
}

.featured-market-card:hover .featured-market-link svg {
  transform: translateX(4px);
}

@media (max-width: 1200px) {
  .featured-markets-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .featured-markets-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }

  .featured-market-card {
    padding: var(--space-lg);
  }
}

@media (max-width: 480px) {
  .featured-markets-grid {
    grid-template-columns: 1fr;
  }

  .featured-market-card {
    display: flex;
    align-items: center;
    text-align: left;
    gap: var(--space-md);
    padding: var(--space-md);
  }

  .featured-market-abbr {
    margin: 0;
    width: 48px;
    height: 48px;
    font-size: 16px;
    flex-shrink: 0;
  }

  .featured-market-card h3 {
    margin-bottom: 2px;
  }

  .featured-market-cities {
    margin-bottom: 0;
  }

  .featured-market-link {
    display: none;
  }
}

/* ==========================================
   MAP SECTION
   ========================================== */
.map-section {
  background: var(--bg-secondary);
}

.markets-search-wrapper {
  max-width: 500px;
  margin: 0 auto var(--space-xl);
}

.markets-search {
  position: relative;
  display: flex;
  align-items: center;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 12px 20px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.markets-search:focus-within {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg), 0 0 0 3px rgba(107, 68, 35, 0.1);
}

.markets-search svg {
  color: var(--text-muted);
  flex-shrink: 0;
  margin-right: 12px;
}

.markets-search input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 16px;
  color: var(--text);
  outline: none;
  padding: 0;
}

.markets-search input::placeholder {
  color: var(--text-muted);
}

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  max-height: 300px;
  overflow-y: auto;
  z-index: 100;
  display: none;
}

.search-results.active {
  display: block;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  text-decoration: none;
  color: var(--text);
  transition: background 0.15s;
  border-bottom: 1px solid var(--border-light);
}

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

.search-result-item:hover {
  background: var(--bg-secondary);
}

.search-result-abbr {
  width: 36px;
  height: 36px;
  background: var(--bg-secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  color: var(--primary);
  flex-shrink: 0;
}

.search-result-info {
  flex: 1;
}

.search-result-name {
  font-weight: 600;
  font-size: 15px;
}

.search-result-cities {
  font-size: 12px;
  color: var(--text-muted);
}

/* US Map */
.us-map-container {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: var(--space-lg);
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

#usMap {
  width: 100%;
  height: auto;
}

#usMap path {
  fill: #e5e0db;
  stroke: white;
  stroke-width: 1.5;
  cursor: pointer;
  transition: fill 0.2s, transform 0.2s;
}

#usMap path:hover {
  fill: var(--primary-light);
}

#usMap path.primary-state {
  fill: var(--primary);
}

#usMap path.primary-state:hover {
  fill: var(--primary-dark);
}

#usMap path.active {
  fill: var(--primary);
}

/* State Tooltip */
.state-tooltip {
  position: absolute;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-xl);
  min-width: 280px;
  max-width: 320px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  pointer-events: none;
}

.state-tooltip.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.tooltip-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border-light);
}

.tooltip-abbr {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
}

.tooltip-title h4 {
  font-size: 18px;
  color: var(--text);
  margin: 0 0 2px;
}

.tooltip-title span {
  font-size: 13px;
  color: var(--text-muted);
}

.tooltip-cities {
  margin-bottom: var(--space-md);
}

.tooltip-cities-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.tooltip-cities-list {
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
}

.tooltip-cta {
  display: block;
  text-align: center;
  padding: 12px 20px;
  background: var(--primary);
  color: white;
  text-decoration: none;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
  transition: background 0.2s;
}

.tooltip-cta:hover {
  background: var(--primary-dark);
}

.mobile-map-notice {
  display: none;
  text-align: center;
  padding: var(--space-lg);
  background: white;
  border-radius: var(--radius-lg);
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .us-map-container {
    display: none;
  }

  .mobile-map-notice {
    display: block;
  }
}

/* ==========================================
   TRUST IMAGE SECTION
   ========================================== */
.markets-trust-section {
  background: var(--bg-secondary);
}

.trust-content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: center;
}

.trust-image-wrapper {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.trust-image-wrapper img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  aspect-ratio: 4/3;
}

.trust-content .section-label {
  margin-bottom: var(--space-sm);
}

.trust-content h2 {
  font-size: clamp(28px, 4vw, 38px);
  color: var(--text);
  margin-bottom: var(--space-lg);
  line-height: 1.2;
}

.trust-content > p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: var(--space-xl);
}

.trust-benefits-list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-xl);
}

.trust-benefits-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  font-size: 16px;
  color: var(--text);
}

.trust-benefits-list li svg {
  flex-shrink: 0;
  color: #22c55e;
  margin-top: 2px;
}

.trust-content .btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 900px) {
  .trust-content-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .trust-image-wrapper {
    max-width: 500px;
    margin: 0 auto;
  }

  .trust-content {
    text-align: center;
  }

  .trust-benefits-list li {
    justify-content: center;
  }

  .trust-content .btn-primary {
    margin: 0 auto;
  }
}

@media (max-width: 480px) {
  .trust-benefits-list li {
    font-size: 14px;
    text-align: left;
    justify-content: flex-start;
  }

  .trust-content {
    text-align: left;
  }

  .trust-content .btn-primary {
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================
   REGIONAL DIRECTORY
   ========================================== */
.regional-directory {
  background: var(--bg);
}

.region-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: var(--space-xl);
}

.region-tab {
  padding: 12px 24px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: var(--transition);
}

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

.region-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.region-info-banner {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, white 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-xl);
  margin-bottom: var(--space-xl);
  text-align: center;
}

.region-info-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

.region-name {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
}

.region-investor-count {
  font-size: 14px;
  color: var(--text-muted);
}

.states-directory {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-md);
}

.state-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-md);
  text-decoration: none;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 12px;
}

.state-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.state-card.primary-state {
  border-color: var(--primary);
  background: linear-gradient(135deg, #fdfcfb 0%, #f8f5f2 100%);
}

.state-card-abbr {
  width: 36px;
  height: 36px;
  background: var(--bg-secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  color: var(--primary);
  flex-shrink: 0;
}

.state-card.primary-state .state-card-abbr {
  background: var(--primary);
  color: white;
}

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

.state-card-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.state-card-cities {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 1200px) {
  .states-directory {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 900px) {
  .states-directory {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 600px) {
  .states-directory {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
  }

  .state-card {
    padding: var(--space-sm);
    gap: 8px;
  }

  .state-card-abbr {
    width: 32px;
    height: 32px;
    font-size: 11px;
  }

  .state-card-name {
    font-size: 13px;
  }

  .state-card-cities {
    display: none;
  }

  .region-tabs {
    gap: 6px;
  }

  .region-tab {
    padding: 10px 16px;
    font-size: 12px;
  }
}

@media (max-width: 400px) {
  .states-directory {
    grid-template-columns: 1fr 1fr;
  }
}

/* ==========================================
   COMPARISON SECTION
   ========================================== */
.markets-comparison {
  background: var(--bg-secondary);
}

/* ==========================================
   FINAL CTA SECTION
   ========================================== */
.markets-cta {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  padding: var(--space-3xl) var(--space-lg);
  text-align: center;
}

.markets-cta h2 {
  color: white;
  font-size: clamp(28px, 5vw, 40px);
  margin-bottom: var(--space-md);
}

.markets-cta > .container > p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
  max-width: 600px;
  margin: 0 auto var(--space-xl);
}

.markets-cta .cta-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-bottom: var(--space-md);
}

.markets-cta .cta-subtext {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  margin: 0;
}

@media (max-width: 768px) {
  .markets-cta {
    padding: var(--space-2xl) var(--space-md);
  }

  .markets-cta .cta-buttons {
    flex-direction: column;
  }

  .markets-cta .cta-buttons .btn-primary,
  .markets-cta .cta-buttons .btn-secondary {
    width: 100%;
    max-width: 320px;
    justify-content: center;
  }
}

/* ==========================================
   ANIMATIONS
   ========================================== */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5);
  }
  50% {
    opacity: 0.8;
  }
  100% {
    box-shadow: 0 0 0 8px rgba(52, 211, 153, 0);
  }
}

.pulse-dot {
  width: 10px;
  height: 10px;
  background: #34d399;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

/* ==========================================
   UTILITY: HIDE ON SPECIFIC BREAKPOINTS
   ========================================== */
@media (max-width: 768px) {
  .hide-mobile {
    display: none !important;
  }
}

@media (min-width: 769px) {
  .hide-desktop {
    display: none !important;
  }
}
