/* =============================================  
 * 简游网 - 主样式
 * JianYou Travel - Main CSS
 * ============================================= */

/* CSS Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #1d72b3;
  --primary-dark: #155a91;
  --primary-light: #5ba4e8;
  --secondary-color: #ff6b6b;
  --accent-color: #ffd93d;
  
  --text-primary: #2c3e50;
  --text-secondary: #7f8c8d;
  --text-light: #bdc3c7;
  
  --bg-primary: #ffffff;
  --bg-secondary: #f7f9fa;
  --bg-dark: #2c3e50;
  
  --border-color: #e1e8ed;
  --border-light: #f0f3f5;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
  
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  
  --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

body {
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-secondary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

/* Links */
a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--primary-dark);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 500;
  text-align: center;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: white;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
  background-color: var(--primary-color);
  color: white;
}

.btn-link {
  background: none;
  color: var(--primary-color);
  padding: 0;
  border: none;
  cursor: pointer;
}

.btn-link:hover {
  text-decoration: underline;
}

/* Forms */
input,
textarea,
select {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: border-color 0.3s ease;
  background-color: white;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(29, 114, 179, 0.1);
}

/* =============================================  
 * Navigation
 * ============================================= */

.main-nav {
  background-color: white;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.main-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  gap: 20px;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
  white-space: nowrap;
}

.nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 8px;
}

.nav-menu a {
  color: var(--text-primary);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
  white-space: nowrap;
}

.nav-menu a:hover {
  background-color: var(--bg-secondary);
  color: var(--primary-color);
}

.nav-menu .dropdown {
  position: relative;
}

.nav-menu .dropdown:hover .dropdown-menu {
  display: block;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: white;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  padding: 8px 0;
  z-index: 100;
}

.dropdown-menu a {
  display: block;
  padding: 12px 20px;
  color: var(--text-primary);
  white-space: nowrap;
}

.dropdown-menu a:hover {
  background-color: var(--bg-secondary);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-trigger {
  padding: 8px;
  cursor: pointer;
  color: var(--text-primary);
  transition: color 0.3s ease;
}

.search-trigger:hover {
  color: var(--primary-color);
}

.lang-selector {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background-color: white;
  cursor: pointer;
  font-size: 14px;
}

/* =============================================  
 * Search Overlay
 * ============================================= */

.search-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 2000;
  justify-content: center;
  align-items: flex-start;
  padding-top: 100px;
}

.search-overlay.active {
  display: flex;
}

.search-container {
  width: 100%;
  max-width: 600px;
  margin: 0 20px;
}

.search-header {
  display: flex;
  gap: 12px;
  align-items: center;
  background: white;
  padding: 16px 20px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.search-header input {
  flex: 1;
  border: none;
  font-size: 18px;
  padding: 0;
}

.search-header input:focus {
  box-shadow: none;
}

.search-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 0;
}

.search-results {
  background: white;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  max-height: 500px;
  overflow-y: auto;
  padding: 20px;
}

.search-suggestions p {
  margin-bottom: 12px;
  color: var(--text-secondary);
  font-size: 14px;
}

.suggestion-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.suggestion-tags span {
  padding: 6px 12px;
  background-color: var(--bg-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  color: var(--primary-color);
  transition: all 0.3s ease;
}

.suggestion-tags span:hover {
  background-color: var(--primary-color);
  color: white;
}

.search-result-item {
  display: block;
  padding: 16px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
  transition: background-color 0.3s ease;
}

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

.result-type {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.result-name {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 4px;
}

.result-desc {
  font-size: 14px;
  color: var(--text-secondary);
}

/* =============================================  
 * Banner
 * ============================================= */

.banner {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: white;
  text-align: center;
  padding: 80px 20px;
  margin-bottom: 40px;
}

.banner h1 {
  font-size: 48px;
  font-weight: bold;
  margin-bottom: 16px;
  line-height: 1.2;
}

.banner p {
  font-size: 20px;
  opacity: 0.9;
  max-width: 800px;
  margin: 0 auto;
}

/* =============================================  
 * Cards
 * ============================================= */

.card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  transition: box-shadow 0.3s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card h3 {
  color: var(--primary-color);
  margin-bottom: 12px;
  font-size: 20px;
}

.card p {
  color: var(--text-secondary);
  margin-bottom: 16px;
}

/* City Cards */
.city-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  padding: 40px 0;
}

.city-card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all 0.3s ease;
}

.city-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.city-link {
  display: block;
  text-decoration: none;
  color: var(--text-primary);
}

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

.city-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.city-rating {
  position: absolute;
  top: 12px;
  right: 12px;
  background: white;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-weight: bold;
  color: var(--accent-color);
  font-size: 14px;
}

.city-info {
  padding: 20px;
}

.city-info h3 {
  font-size: 20px;
  margin-bottom: 8px;
  color: var(--primary-color);
}

.city-name-en {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: normal;
  margin-left: 8px;
}

.city-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.city-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.city-tags .tag,
.city-tags span {
  background: var(--bg-secondary);
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-secondary);
}

.city-stats {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-light);
  padding-top: 12px;
}

/* =============================================  
 * Footer
 * ============================================= */

.main-footer {
  background-color: var(--bg-dark);
  color: white;
  padding: 60px 0 20px;
  margin-top: 60px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section h4 {
  font-size: 18px;
  margin-bottom: 16px;
  color: white;
}

.footer-section p {
  color: var(--text-light);
  line-height: 1.6;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 12px;
}

.footer-section a {
  color: var(--text-light);
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: white;
}

.social-links {
  display: flex;
  gap: 12px;
}

.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  color: white;
}

/* =============================================
   省份区域样式
   ============================================= */

.china-map-section {
  padding: 60px 0;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.china-map-section h2 {
  text-align: center;
  font-size: 2rem;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.china-map-section p {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 40px;
}

.provinces-list {
  max-width: 1200px;
  margin: 0 auto;
}

.provinces-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  padding: 0 20px;
}

.province-region {
  background: white;
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.province-region:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.region-group {
  margin-bottom: 30px;
}

.region-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary-light);
  display: flex;
  align-items: center;
  gap: 8px;
}

.province-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.region-title::before {
  content: '';
  width: 4px;
  height: 20px;
  background: var(--primary-color);
  border-radius: 2px;
}

.region-provinces {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.province-item {
  display: flex;
  flex-direction: column;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.province-item:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(29, 114, 179, 0.3);
}

.province-item .province-name {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.province-item .province-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.province-item:hover .province-name,
.province-item:hover .province-desc {
  color: white;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .provinces-container {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .province-region {
    padding: 16px;
  }
  
  .region-title {
    font-size: 1rem;
  }
  
  .province-item {
    padding: 6px 12px;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .china-map-section {
    padding: 40px 0;
  }
  
  .china-map-section h2 {
    font-size: 1.5rem;
  }
  
  .region-provinces {
    gap: 8px;
  }
  
  .province-item {
    padding: 5px 10px;
    font-size: 0.85rem;
  }
}

.social-icon:hover {
  background-color: var(--primary-color);
  transform: translateY(-2px);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-light);
  font-size: 14px;
}

/* =============================================  
 * Utility Classes
 * ============================================= */

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

.text-primary {
  color: var(--primary-color);
}

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

.mt-20 {
  margin-top: 20px;
}

.mb-20 {
  margin-bottom: 20px;
}

.p-20 {
  padding: 20px;
}

.hidden {
  display: none;
}

/* =============================================  
 * Loading & Error States
 * ============================================= */

.loading {
  text-align: center;
  padding: 40px;
  color: var(--text-secondary);
}

.no-results {
  text-align: center;
  padding: 40px;
  color: var(--text-secondary);
}

.error {
  text-align: center;
  padding: 40px;
  color: var(--secondary-color);
}

/* =============================================  
 * Back to Top Button
 * ============================================= */

.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: var(--primary-color);
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: all 0.3s ease;
  z-index: 999;
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: var(--primary-dark);
  transform: translateY(-4px);
}