/* map.css - 案例轮播样式 - 特斯拉风格 */

.tesla-cases-carousel {
  background-color: white;
  padding: 100px var(--container-padding);
  overflow: hidden;
}

.tesla-cases-carousel .section-subtitle {
  text-align: center;
  font-size: 1.125rem;
  color: var(--color-text-secondary);
  margin-bottom: 60px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* 轮播容器 */
.cases-carousel-wrapper {
  position: relative;
  max-width: 1400px;
  margin: 0 auto 40px;
  padding: 0 60px;
}

.cases-carousel {
  overflow: hidden;
  position: relative;
}

.cases-carousel-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  gap: 20px;
}

/* 案例卡片 */
.case-carousel-card {
  flex: 0 0 calc(33.333% - 14px);
  min-width: 0;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  opacity: 0.6;
  transform: scale(0.95);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.case-carousel-card.active {
  opacity: 1;
  transform: scale(1);
  z-index: 2;
}

.case-card-image {
  width: 100%;
  height: 500px;
  position: relative;
  overflow: hidden;
}

.case-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.case-carousel-card:hover .case-card-image img {
  transform: scale(1.05);
}

.case-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 50%, transparent 100%);
  padding: 40px 32px 32px;
  color: white;
}

.case-card-label {
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
  opacity: 0.9;
}

.case-card-title {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 12px 0;
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.case-card-description {
  font-size: 1rem;
  line-height: 1.6;
  margin: 0 0 24px 0;
  opacity: 0.95;
}

.case-card-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.case-card-buttons .btn-primary {
  background-color: #3E6AE1;
  color: white;
  padding: 12px 32px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.case-card-buttons .btn-primary:hover {
  background-color: #3457B8;
  transform: translateY(-1px);
}

.case-card-buttons .btn-secondary {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  padding: 12px 32px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border-radius: 4px;
  border: 2px solid white;
  transition: all 0.3s ease;
  cursor: pointer;
}

.case-card-buttons .btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

/* 导航按钮 */
.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--color-border-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
  color: var(--color-text-primary);
}

.carousel-nav:hover {
  background: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-50%) scale(1.1);
}

.carousel-prev {
  left: 0;
}

.carousel-next {
  right: 0;
}

.carousel-nav svg {
  width: 20px;
  height: 20px;
}

/* 指示器 */
.carousel-indicators {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 40px;
}

.indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background-color: var(--color-border-medium);
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.indicator.active {
  background-color: var(--color-text-primary);
  width: 24px;
  border-radius: 5px;
}

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

/* Leaflet地图自定义样式 */
.leaflet-container {
  font-family: inherit;
}

.leaflet-popup-content-wrapper {
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.leaflet-popup-content {
  margin: 16px;
  font-size: 14px;
}

.leaflet-popup-content h4 {
  margin: 0 0 8px 0;
  font-weight: 600;
  color: var(--color-text-primary);
}

.leaflet-popup-content p {
  margin: 0;
  color: var(--color-text-secondary);
  font-size: 13px;
}

/* 自定义标记图标 */
.custom-marker {
  background-color: #E31E24;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.custom-marker:hover {
  transform: scale(1.3);
}

.custom-marker.active {
  background-color: #3E6AE1;
  transform: scale(1.4);
}

/* 响应式设计 */
@media (max-width: 1024px) {
  .cases-carousel-wrapper {
    padding: 0 40px;
  }
  
  .case-carousel-card {
    flex: 0 0 calc(50% - 10px);
  }
  
  .case-card-image {
    height: 400px;
  }
  
  .case-card-title {
    font-size: 1.75rem;
  }
}

@media (max-width: 768px) {
  .tesla-cases-carousel {
    padding: 60px 24px;
  }
  
  .cases-carousel-wrapper {
    padding: 0 20px;
  }
  
  .case-carousel-card {
    flex: 0 0 100%;
  }
  
  .case-card-image {
    height: 350px;
  }
  
  .case-card-overlay {
    padding: 32px 24px 24px;
  }
  
  .case-card-title {
    font-size: 1.5rem;
  }
  
  .case-card-buttons {
    flex-direction: column;
  }
  
  .case-card-buttons .btn-primary,
  .case-card-buttons .btn-secondary {
    width: 100%;
    text-align: center;
  }
  
  .carousel-nav {
    width: 40px;
    height: 40px;
  }
  
  .carousel-nav svg {
    width: 16px;
    height: 16px;
  }
}

/* ========== 全球销售和办事处地图 ========== */
.tesla-global-map {
  padding: 100px var(--container-padding);
  background-color: var(--color-bg-primary);
}

.tesla-global-map .section-subtitle {
  text-align: center;
  font-size: 1.125rem;
  color: var(--color-text-secondary);
  margin-bottom: 60px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

#global-map {
  width: 100%;
  height: 600px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin-bottom: 40px;
  background-color: var(--color-bg-secondary);
}

/* 静态地图标记样式 */
.static-marker {
  position: absolute;
  transform: translate(-50%, -50%);
  cursor: pointer;
  z-index: 10;
}

.marker-dot-static {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease;
}

.static-marker:hover .marker-dot-static {
  transform: scale(1.3);
}

.static-marker-red .marker-dot-static {
  background-color: #E31E24;
}

.static-marker-blue .marker-dot-static {
  background-color: #3E6AE1;
}

.marker-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 8px;
  background: white;
  padding: 12px 16px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
  z-index: 20;
}

.marker-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: white;
}

.marker-tooltip.show {
  opacity: 1;
  visibility: visible;
}

.marker-tooltip h4 {
  margin: 0 0 8px 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text-primary);
}

.marker-tooltip p {
  margin: 4px 0;
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

/* 销售统计信息 - Tesla风格 */
.sales-stats {
  display: flex;
  justify-content: center;
  gap: 80px;
  margin-bottom: 60px;
  padding: 40px 0;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
  min-width: 180px;
}

.stat-number {
  font-size: 3rem;
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.2;
  margin-bottom: 8px;
  letter-spacing: -1px;
}

.stat-label {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  font-weight: 500;
  line-height: 1.4;
}

/* 增长统计特殊样式 */
.stat-growth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.growth-arrow {
  font-size: 2.5rem;
  color: #34C759;
  font-weight: 700;
  line-height: 1;
  animation: bounceUp 2s ease-in-out infinite;
}

.growth-percent {
  font-size: 3rem;
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1;
}

@keyframes bounceUp {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

/* 全球地图标记样式 */
.global-office-marker {
  background: transparent;
  border: none;
}

.global-weather-marker {
  background: transparent;
  border: none;
}

.marker-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 4px solid white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  transition: transform 0.2s ease;
  position: relative;
}

/* 红色标记（办事处） */
.marker-dot.marker-red {
  background-color: #E31E24;
}

.marker-dot.marker-red::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background-color: white;
  border-radius: 50%;
}

.global-office-marker:hover .marker-dot.marker-red {
  transform: scale(1.3);
  box-shadow: 0 4px 12px rgba(227, 30, 36, 0.6);
}

/* 蓝色标记（天气预报需求） */
.marker-dot.marker-blue {
  background-color: #3E6AE1;
}

.marker-dot.marker-blue::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background-color: white;
  border-radius: 50%;
}

.global-weather-marker:hover .marker-dot.marker-blue {
  transform: scale(1.3);
  box-shadow: 0 4px 12px rgba(62, 106, 225, 0.6);
}

/* 办事处弹出窗口样式 */
.office-popup {
  min-width: 200px;
}

.office-popup h4 {
  margin: 0 0 8px 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text-primary);
}

.office-popup p {
  margin: 4px 0;
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

/* 办事处列表 */
.offices-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
}

.office-item {
  text-align: center;
  padding: 24px;
  background-color: var(--color-bg-secondary);
  border-radius: var(--radius-md);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.office-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.office-item h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0 0 8px 0;
}

.office-item p {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  margin: 0;
}

/* 全球地图响应式设计 */
@media (max-width: 1024px) {
  #global-map {
    height: 500px;
  }
  
  .offices-list {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .tesla-global-map {
    padding: 60px var(--container-padding);
  }
  
  #global-map {
    height: 400px;
    margin-bottom: 30px;
  }
  
  .sales-stats {
    gap: 40px;
    margin-bottom: 40px;
    padding: 30px 0;
  }
  
  .stat-number {
    font-size: 2.5rem;
  }
  
  .stat-growth .growth-arrow {
    font-size: 2rem;
  }
  
  .stat-growth .growth-percent {
    font-size: 2.5rem;
  }
  
  .stat-label {
    font-size: 0.875rem;
  }
  
  .offices-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 480px) {
  #global-map {
    height: 300px;
  }
  
  .sales-stats {
    gap: 30px;
    flex-direction: column;
    align-items: center;
  }
  
  .stat-item {
    min-width: auto;
    width: 100%;
    max-width: 200px;
  }
  
  .stat-number {
    font-size: 2rem;
  }
  
  .stat-growth .growth-arrow {
    font-size: 1.5rem;
  }
  
  .stat-growth .growth-percent {
    font-size: 2rem;
  }
  
  .offices-list {
    grid-template-columns: 1fr;
  }
}

