/* ========================================
   LOCATIONS PAGE STYLES
   ======================================== */

/* Hero Section */
.locations-hero {
  background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%);
  color: white;
  padding: 60px 20px;
  text-align: center;
}

.locations-hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 15px;
  line-height: 1.2;
}

.locations-hero .subtitle {
  font-size: 1.25rem;
  margin-bottom: 10px;
  opacity: 0.95;
}

.locations-hero p {
  font-size: 1rem;
  opacity: 0.9;
}

/* Interactive Map Section */
.interactive-map-section {
  padding: 80px 20px;
  background: #f7fafc;
}

.interactive-map-section h2 {
  text-align: center;
  font-size: 2rem;
  color: #2d3748;
  margin-bottom: 10px;
}

.map-instruction {
  text-align: center;
  color: #718096;
  font-size: 1.1rem;
  margin-bottom: 40px;
}

.map-container {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
}

/* SVG Map Styles */
#usa-map {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.state {
  cursor: pointer;
  transition: all 0.3s ease;
}

.state:not(.active) {
  fill: #e2e8f0;
  opacity: 0.6;
}

.state.active {
  fill: #3182ce;
}

.state.active:hover {
  fill: #2c5282;
  transform: scale(1.02);
  transform-origin: center;
  filter: drop-shadow(0 0 8px rgba(49, 130, 206, 0.6));
}

.state-label {
  pointer-events: none;
  font-weight: 600;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Map Legend */
.map-legend {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 30px;
  padding: 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  color: #4a5568;
}

.legend-color {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: 2px solid #e2e8f0;
}

.legend-color.active-state {
  background: #3182ce;
}

.legend-color.inactive-state {
  background: #e2e8f0;
}

/* State Modal */
.state-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.state-modal-content {
  background: white;
  border-radius: 12px;
  padding: 40px;
  max-width: 600px;
  width: 100%;
  position: relative;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 2rem;
  color: #718096;
  cursor: pointer;
  padding: 5px 10px;
  line-height: 1;
  transition: color 0.2s;
}

.close-modal:hover {
  color: #2d3748;
}

.state-modal-content h3 {
  font-size: 1.75rem;
  color: #2d3748;
  margin-bottom: 15px;
}

.state-modal-content p {
  color: #4a5568;
  line-height: 1.6;
  margin-bottom: 20px;
}

#modal-cities-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin: 20px 0;
}

#modal-cities-list a {
  display: block;
  padding: 10px 15px;
  background: #ebf8ff;
  color: #2c5282;
  text-decoration: none;
  border-radius: 6px;
  text-align: center;
  transition: all 0.2s;
  font-weight: 500;
}

#modal-cities-list a:hover {
  background: #3182ce;
  color: white;
  transform: translateY(-2px);
}

#modal-state-link {
  display: inline-block;
  margin-top: 20px;
}

/* Location Directory Section */
.location-directory {
  padding: 80px 20px;
  background: white;
}

.location-directory h2 {
  text-align: center;
  font-size: 2rem;
  color: #2d3748;
  margin-bottom: 15px;
}

.directory-intro {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 60px;
  color: #4a5568;
  font-size: 1.1rem;
  line-height: 1.6;
}

/* Scroll anchor for fixed header offset */
.scroll-anchor {
  display: block;
  position: relative;
  top: -180px;
  visibility: hidden;
}

.state-group {
  margin-bottom: 50px;
  padding: 30px;
  background: #f7fafc;
  border-radius: 12px;
  border-left: 5px solid #3182ce;
  transition: box-shadow 0.3s ease;
  position: relative;
}

.state-group:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.state-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
  flex-wrap: wrap;
  gap: 15px;
}

.state-header h3 {
  font-size: 1.75rem;
  margin: 0;
}

.state-header h3 a {
  color: #2c5282;
  text-decoration: none;
  transition: color 0.2s;
}

.state-header h3 a:hover {
  color: #3182ce;
  text-decoration: underline;
}

.city-count {
  background: #3182ce;
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
}

.state-description {
  color: #4a5568;
  line-height: 1.7;
  margin-bottom: 25px;
  font-size: 1rem;
}

.city-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.city-links li a {
  display: block;
  padding: 14px 20px;
  background: white;
  color: #2c5282;
  text-decoration: none;
  border-radius: 8px;
  border: 2px solid #e2e8f0;
  transition: all 0.2s ease;
  font-weight: 500;
  text-align: center;
}

.city-links li a:hover {
  background: #ebf8ff;
  border-color: #3182ce;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(49, 130, 206, 0.2);
}

/* Featured Cities Section */
.featured-cities {
  padding: 80px 20px;
  background: linear-gradient(180deg, #f7fafc 0%, white 100%);
}

.featured-cities h2 {
  text-align: center;
  font-size: 2rem;
  color: #2d3748;
  margin-bottom: 15px;
}

.section-intro {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 50px;
  color: #4a5568;
  font-size: 1.1rem;
}

.city-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.city-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.city-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.city-image {
  height: 200px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.city-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.5) 100%);
  display: flex;
  align-items: flex-end;
  padding: 15px;
}

.city-badge {
  background: #3182ce;
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.city-content {
  padding: 25px;
}

.city-content h3 {
  font-size: 1.5rem;
  color: #2d3748;
  margin-bottom: 12px;
}

.city-content p {
  color: #4a5568;
  line-height: 1.6;
  margin-bottom: 15px;
}

.city-stats {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
  color: #718096;
  font-size: 0.95rem;
}

.city-stats li {
  margin-bottom: 6px;
}

.btn-link {
  color: #3182ce;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.btn-link:hover {
  color: #2c5282;
  text-decoration: underline;
}

/* CTA Section */
.locations-cta {
  padding: 60px 20px;
  background: #f7fafc;
  color: #2d3748;
  text-align: center;
  border-top: 3px solid #3182ce;
}

.locations-cta h2 {
  font-size: 2rem;
  margin-bottom: 15px;
  color: #2d3748;
}

.locations-cta p {
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 30px;
  color: #4a5568;
}

.cta-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
  display: inline-block;
  padding: 16px 32px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
  transition: all 0.3s ease;
}

.btn-primary {
  background: #3182ce;
  color: white;
  border: 2px solid #3182ce;
}

.btn-primary:hover {
  background: #2c5282;
  border-color: #2c5282;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
  background: white;
  color: #2c5282;
  border: 2px solid #2c5282;
}

.btn-secondary:hover {
  background: #2c5282;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
  .locations-hero h1 {
    font-size: 1.75rem;
  }

  .locations-hero .subtitle {
    font-size: 1rem;
  }

  .interactive-map-section h2,
  .location-directory h2,
  .featured-cities h2 {
    font-size: 1.5rem;
  }

  .state-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .city-links {
    grid-template-columns: 1fr;
  }

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

  .state-modal-content {
    padding: 25px;
  }

  #modal-cities-list {
    grid-template-columns: 1fr;
  }

  .map-legend {
    flex-direction: column;
    gap: 15px;
  }
}

@media (max-width: 480px) {
  .locations-hero {
    padding: 40px 15px;
  }

  .interactive-map-section,
  .location-directory,
  .featured-cities {
    padding: 50px 15px;
  }

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

  .btn-primary, .btn-secondary {
    width: 100%;
  }
}
