/* ========================================
   组件 —— 跨页面共用
   ======================================== */

/* 按钮 */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  text-align: center;
}

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

.btn-primary:hover {
  background-color: #333333;
}

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

.btn-accent:hover {
  background-color: var(--accent-dark);
  transform: translateY(-2px);
}

.btn-outline {
  background-color: transparent;
  color: var(--primarys);
  border: 2px solid var(--primary);
}

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

/* 卡片 */
.card {
  background: white;
  border-radius: 0.5rem;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

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

.card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}

/* 区块 */
.section {
  padding: 4rem 0;
}

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

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

.bg-light {
  background-color: #f9f9f9;
}

@media (max-width: 768px) {
  .section {
    padding: 2rem 0;
  }
}

/* ========================================
   导航栏
   ======================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: var(--primary);
  color: white;
}

.navbar-banner {
  background-color: var(--accent);
  color: var(--primary);
  text-align: center;
  padding: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.navbar-main {
  background-color: var(--primary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1rem 0;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: white;
  transition: color 0.3s ease;
  overflow: hidden;
}

.navbar-logo:hover {
  color: var(--accent);
}

.logo-icon {
  font-size: 1.5rem;
}

.navbar-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  color: white;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--accent);
}

.menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.5rem;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background-color: white;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

@media (max-width: 768px) {
  .navbar-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--primary);
    flex-direction: column;
    gap: 0;
    padding: 1rem 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .navbar-menu.active {
    max-height: 300px;
  }

  .navbar-menu li {
    width: 100%;
    text-align: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .navbar-main {
    padding: 0.75rem 0;
  }
}

/* ========================================
   页脚
   ======================================== */
.footer {
  background-color: var(--primary);
  color: white;
  margin-top: 4rem;
}

.footer-content {
  padding: 3rem 0 1rem;
}

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

.footer-section h3,
.footer-section h4 {
  color: var(--accent);
  margin-bottom: 1rem;
}

.footer-section p {
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

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

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: var(--accent);
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.social-links a:hover {
  background-color: var(--accent);
  color: var(--primary);
}

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    padding: 2rem 0 1rem;
  }
}

/* ========================================
   语言切换器
   ======================================== */
.language-switcher {
  position: fixed;
  top: 130px;
  right: 20px;
  z-index: 999;
}

.language-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 0.4rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.language-toggle:hover {
  background: var(--accent);
  color: var(--primary);
  transform: translateY(-2px);
}

.lang-icon {
  font-size: 1.1rem;
  width: 1.1rem;
  height: 1.1rem;
  vertical-align: middle;
}

.lang-flag {
  width: 1.1rem;
  height: 1.1rem;
  vertical-align: middle;
  margin-right: 0.3rem;
}

.language-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border: 2px solid var(--primary);
  border-radius: 0.4rem;
  margin-top: 0.5rem;
  min-width: 150px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  display: none;
  overflow: hidden;
}

.language-menu.active {
  display: block;
}

.lang-option {
  width: 100%;
  padding: 0.75rem 1rem;
  background: white;
  border: none;
  text-align: left;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lang-option:hover {
  background: var(--accent);
  color: var(--primary);
  font-weight: 600;
}

.lang-option span:first-child {
  font-size: 1.2rem;
}

@media (max-width: 768px) {
  .language-switcher {
    top: 100px;
    right: 10px;
  }

  .language-toggle {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }

  .lang-label {
    display: none;
  }
}

/* ========================================
   App 下载横幅
   ======================================== */
.app-download-banner {
  background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
  color: white;
  padding: 3rem 2rem;
  margin: 3rem 0 0 0;
  border-radius: 0;
  box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.3);
  border-top: 3px solid var(--accent);
}

.app-download-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 3rem;
}

.app-download-text h3 {
  font-size: 1.8rem;
  margin-bottom: 0.75rem;
  color: var(--accent);
  font-weight: 700;
}

.app-download-text p {
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
  font-size: 1rem;
}

.app-download-section {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.app-platform {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.app-qr {
  background: white;
  padding: 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.app-qr svg {
  width: 120px;
  height: 120px;
  display: block;
}

.qr-label {
  margin: 0.75rem 0 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  font-size: 0.9rem;
}

.btn-app {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.8rem 1rem;
  background: transparent;
  color: #fff;
  text-decoration: none;
  border-radius: 0.5rem;
  font-weight: 700;
  transition: all 0.3s ease;
  border: 2px solid rgba(255, 255, 255, 0.4);
  font-size: 1rem;
  white-space: nowrap;
}

.btn-app:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  background: var(--accent);
  color: var(--primary);
  border-color: var(--accent);
}

.btn-app-primary {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.4);
}

.app-icon {
  font-size: 1.3rem;
  width: 1.2rem;
  height: 1.2rem;
  flex-shrink: 0;
  vertical-align: middle;
  position: relative;
  top: -2px;
}

/* 黑色 SVG 图标 → 白色（默认按钮白字）*/
.btn-app .app-icon {
  filter: brightness(0) invert(1);
}

/* hover 黄底黑字 → 图标恢复黑色 */
.btn-app:hover .app-icon {
  filter: none;
}

@media (max-width: 768px) {
  .app-download-content {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }

  .app-download-text {
    text-align: center;
    max-width: 100%;
  }

  .app-download-section {
    justify-content: center;
  }

  .btn-app {
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
  }
}

/* ========================================
   页面头部（子页面）
   ======================================== */
.page-header {
  background-color: var(--primary);
  color: white;
  padding: 4rem 0;
  margin-top: 120px;
  text-align: center;
}

.page-header h1 {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.page-header p {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.9);
}

@media (max-width: 768px) {
  .page-header {
    padding: 2rem 0;
    margin-top: 100px;
  }

  .page-header h1 {
    font-size: 1.75rem;
  }
}

/* ========================================
   表单行（联系页和服务页共用）
   ======================================== */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* ========================================
   为什么选择我们 / 优势列表
   ======================================== */
.why_title {
  padding-top: 20px;
  color: #fff;
  opacity: 0.8;
}

.benefits-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.benefits-list li {
  padding: 0.75rem 0;
  color: #fff;
  opacity: 0.8;
  font-size: 1rem;
  border-bottom: 1px solid var(--border-color);
  margin-right: 18px;
}

.benefits-list li:last-child {
  border-bottom: none;
}

/* ========================================
   号召性用语区域
   ======================================== */
.cta-section {
  background: linear-gradient(135deg, var(--primary) 0%, #0a0a0a 100%);
  color: white;
  text-align: center;
  padding: 4rem 0;
}

.bg-primary + .cta-section {
  margin-top: 2rem;
}

.cta-section h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.cta-subtitle {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.9);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.1rem;
  margin: 0 0.5rem;
  color: #999999;
}

/* ========================================
   工具类
   ======================================== */
.section-subtitle {
  font-size: 1.1rem;
  color: #555;
  margin-bottom: 2rem;
}

.about-fleet-image {
  width: 100%;
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* ========================================
   车辆价格（首页和租赁页共用）
   ======================================== */
.vehicle-price {
  font-size: 1.5rem;
  color: #333333;
  font-weight: 700;
  margin: 1rem 0;
}


/* ========================================
   骨架屏
   ======================================== */
@keyframes skeleton-loading {
  0% { background-position: -200px 0; }
  100% { background-position: calc(200px + 100%) 0; }
}

.vehicle-skeleton {
  background: white;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: var(--shadow);
  padding: 1rem;
}

.skeleton-image {
  width: 100%;
  height: 200px;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200px 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
}

.skeleton-line {
  height: 14px;
  border-radius: 4px;
  margin-bottom: 12px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200px 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
}

.skeleton-line.w-70 { width: 70%; }
.skeleton-line.w-60 { width: 60%; }
.skeleton-line.w-40 { width: 40%; }
.skeleton-line.w-30 { width: 30%; }
.skeleton-line.w-100 { width: 100%; }
.skeleton-line.w-90 { width: 90%; }
.skeleton-line.w-80 { width: 80%; }

/* 提示弹窗 */
.toast-success,
.toast-error,
.toast-info {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  z-index: 9999;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  color: white;
}
.toast-success { background: #4caf50; }
.toast-error { background: #f44336; }
.toast-info { background: #555; }

.testimonial-skeleton {
  min-width: 350px;
  background: white;
  border-radius: 0.5rem;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

/* ========================================
   区块图片
   ======================================== */
.image-container {
  overflow: hidden;
}

.section-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 0.5rem;
}

/* ========================================
   响应式 —— 共用组件
   ======================================== */
@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }

  .cta-section h2 {
    font-size: 1.75rem;
  }

  .btn-lg {
    display: block;
    margin: 0.5rem 0;
  }
}

/* ========================================
   SVG 通用图标（替换页面 emoji）
   ======================================== */
.svg-icon {
  width: 1.2rem;
  height: 1.2rem;
  vertical-align: middle;
  display: inline-block;
  flex-shrink: 0;
  opacity: 0.7;
}

/* 各容器图标尺寸恢复原 emoji 大小 */
.info-icon .svg-icon { width: 2.5rem; height: 2.5rem; opacity: 0.85; }
.value-icon .svg-icon { width: 2rem; height: 2rem; opacity: 0.85; }
.service-icon .svg-icon { width: 2rem; height: 2rem; }
.reason-icon .svg-icon { width: 1.5rem; height: 1.5rem; }
.included-icon .svg-icon { width: 2.5rem; height: 2.5rem; }
.benefits-list .svg-icon { width: 1rem; height: 1rem; }
