/* ============================================
   成都御展展览展示服务有限公司 - 主样式表
   SEO优化：语义化、加载快、移动端友好
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
  --primary: #1a365d;
  --primary-light: #2a4a7f;
  --accent: #d4a574;
  --accent-dark: #b8895a;
  --white: #ffffff;
  --light: #f7f8fa;
  --gray: #666666;
  --gray-light: #e0e0e0;
  --dark: #1a1a1a;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --radius: 8px;
  --transition: all 0.3s ease;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: "Microsoft YaHei", "PingFang SC", -apple-system, sans-serif;
  color: var(--dark);
  line-height: 1.7;
  background: var(--white);
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul { list-style: none; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
}

.section-title h2 {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 10px;
}

.section-title p {
  color: var(--gray);
  font-size: 1.05rem;
}

/* ---------- Header & Nav ---------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(255,255,255,0.97);
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
  z-index: 1000;
  transition: var(--transition);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo img {
  height: 38px;
  width: auto;
  object-fit: contain;
}

.logo-text {
  color: var(--primary);
  font-size: 1.5rem;
  font-weight: 700;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .logo img { height: 36px; }
}

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

.nav a {
  padding: 8px 10px;
  font-size: 0.88rem;
  color: var(--dark);
  border-radius: 6px;
  position: relative;
  white-space: nowrap;
}

.nav a:hover,
.nav a.active {
  color: var(--primary);
  background: rgba(26,54,93,0.06);
}

.nav .dropdown {
  position: relative;
}

.nav .dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  min-width: 200px;
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: var(--transition);
  z-index: 100;
}

.nav .dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(4px);
}

.dropdown-menu a {
  display: block;
  padding: 10px 20px;
  font-size: 0.9rem;
  border-radius: 0;
}

.dropdown-menu a:hover {
  background: var(--light);
}

.header-cta {
  background: var(--accent);
  color: var(--white) !important;
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.85rem;
}

.header-cta:hover {
  background: var(--accent-dark);
}

/* Mobile menu */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--dark);
  border-radius: 2px;
  transition: var(--transition);
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  color: var(--white);
  padding-top: 70px;
  overflow: hidden;
}

/* 幻灯片背景 */
.hero-slides {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
}

.hero-slide {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
  transition: opacity 1.2s ease-in-out, transform 6s ease;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
}

/* 遮罩层，让文字更清晰 */
.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(
    135deg,
    rgba(26,54,93,0.88) 0%,
    rgba(26,54,93,0.65) 40%,
    rgba(26,54,93,0.4) 70%,
    rgba(26,54,93,0.15) 100%
  );
  z-index: 1;
}

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 600px;
}

.hero-content h1 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
}

.hero-content h1 span {
  color: var(--accent);
}

.hero-content p {
  font-size: 1.15rem;
  opacity: 0.85;
  margin-bottom: 35px;
  line-height: 1.8;
}

.hero-btns {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

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

.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(212,165,116,0.3);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.3);
}

.btn-outline:hover {
  border-color: var(--white);
  background: rgba(255,255,255,0.1);
}

.hero-image {
  position: relative;
}

.hero-image img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.3);
}

/* ---------- Services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.service-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}

.service-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.service-card-content {
  padding: 25px;
}

.service-card h3 {
  font-size: 1.2rem;
  color: var(--primary);
  margin-bottom: 10px;
}

.service-card p {
  color: var(--gray);
  font-size: 0.95rem;
  margin-bottom: 15px;
}

.service-card a {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
}

.service-card a:hover { color: var(--accent-dark); }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-image {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.about-text h2 {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 20px;
}

.about-text p {
  color: var(--gray);
  margin-bottom: 20px;
  line-height: 1.9;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 30px;
}

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

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--gray);
  margin-top: 4px;
}

/* ---------- Cases ---------- */
.cases-filter {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 22px;
  border: 2px solid var(--gray-light);
  border-radius: 30px;
  background: transparent;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--gray);
  transition: var(--transition);
}

.filter-btn.active,
.filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(26,54,93,0.05);
}

.cases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

.case-card {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  cursor: pointer;
}

.case-card:hover {
  transform: translateY(-5px);
}

.case-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: var(--transition);
}

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

.case-card-body {
  padding: 20px;
}

.case-card-body h4 {
  font-size: 1.05rem;
  color: var(--dark);
  margin-bottom: 6px;
}

.case-card-body span {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
}

/* ---------- CTA ---------- */
.cta-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: var(--white);
  text-align: center;
  padding: 70px 0;
}

.cta-section h2 {
  font-size: 2rem;
  margin-bottom: 15px;
}

.cta-section p {
  font-size: 1.1rem;
  opacity: 0.85;
  margin-bottom: 30px;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
}

.contact-info h3 {
  font-size: 1.3rem;
  color: var(--primary);
  margin-bottom: 25px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 25px;
}

.contact-icon {
  width: 48px;
  height: 48px;
  background: rgba(26,54,93,0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.contact-item h4 {
  font-size: 1rem;
  color: var(--dark);
  margin-bottom: 4px;
}

.contact-item p {
  color: var(--gray);
  font-size: 0.95rem;
}

.contact-form {
  background: var(--light);
  padding: 35px;
  border-radius: var(--radius);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 8px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--gray-light);
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: var(--transition);
  background: var(--white);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

/* ---------- 获取效果图与报价表单 ---------- */
.qform-tabs {
  display: flex;
  background: var(--light);
  border-bottom: 2px solid var(--gray-light);
}
.qform-tab {
  flex: 1;
  padding: 16px 8px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gray);
  transition: var(--transition);
  position: relative;
  font-family: inherit;
}
.qform-tab:hover {
  color: var(--primary);
  background: rgba(26,54,93,0.04);
}
.qform-tab.active {
  color: var(--primary);
  background: var(--white);
}
.qform-tab.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 20%;
  width: 60%;
  height: 3px;
  background: var(--accent);
  border-radius: 2px 2px 0 0;
}

.qform-login-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding: 16px;
  background: var(--light);
  border-radius: 8px;
}
.qform-login-icon {
  font-size: 1.6rem;
  width: 48px;
  height: 48px;
  background: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  flex-shrink: 0;
}
.qform-login-header strong {
  display: block;
  font-size: 1rem;
  color: var(--dark);
  margin-bottom: 2px;
}
.qform-login-header small {
  font-size: 0.8rem;
  color: var(--gray);
}

.qform-sms-btn {
  flex-shrink: 0;
  width: 130px;
  height: 46px;
  background: var(--accent);
  color: var(--white);
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  white-space: nowrap;
}
.qform-sms-btn:hover {
  background: var(--accent-dark);
}
.qform-sms-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.qform-phone-error,
.qform-code-error {
  display: block;
  font-size: 0.8rem;
  color: #e74c3c;
  margin-top: 4px;
  min-height: 0;
}

/* 表单复选框标签 */
.qform-check {
  display: inline-flex !important;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: var(--light);
  border: 1.5px solid #e0e0e0;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--dark);
  transition: all 0.2s ease;
  user-select: none;
}

.qform-check:hover {
  border-color: var(--primary);
  background: #fff8f0;
}

.qform-check input[type="checkbox"] {
  accent-color: var(--accent);
  width: 15px;
  height: 15px;
  cursor: pointer;
}

.qform-check:has(input:checked) {
  border-color: var(--accent);
  background: #fff3e0;
  color: var(--dark);
  font-weight: 600;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--primary);
  color: rgba(255,255,255,0.8);
  padding: 60px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand h3 {
  color: var(--white);
  font-size: 1.3rem;
  margin-bottom: 15px;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.8;
}

.footer h4 {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 20px;
}

.footer a {
  display: block;
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  margin-bottom: 10px;
}

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

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

/* ---------- Models Page ---------- */
.models-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
}

.model-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.model-card:hover {
  transform: translateY(-5px);
}

.region-icon {
  font-size: 3rem;
  text-align: center;
  padding: 30px 0 10px;
}

.model-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.model-card-body {
  padding: 18px;
}

.model-card-body h4 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.model-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
}

.model-format {
  background: rgba(26,54,93,0.08);
  color: var(--primary);
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
}

.model-download {
  background: var(--primary);
  color: var(--white);
  padding: 6px 16px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
}

.model-download:hover {
  background: var(--primary-light);
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  background: var(--light);
  padding: 15px 0;
  font-size: 0.9rem;
  color: var(--gray);
}

.breadcrumb a { color: var(--primary); }

/* ---------- Page Hero ---------- */
.page-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: var(--white);
  padding: 120px 0 70px;
  text-align: center;
}

.page-hero h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.page-hero p {
  font-size: 1.1rem;
  opacity: 0.85;
}

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
  .hero-inner { text-align: center; justify-content: center; }
  .hero-content h1 { font-size: 2.2rem; }
  .hero-content { max-width: 100%; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .cases-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .models-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .menu-toggle { display: flex; }
  .nav {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background: var(--white);
    flex-direction: column;
    padding: 20px;
    box-shadow: var(--shadow);
    transform: translateY(-120%);
    transition: var(--transition);
  }
  .nav.open { transform: translateY(0); }
  .nav .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    padding-left: 15px;
    display: none;
  }
  .nav .dropdown.open .dropdown-menu { display: block; }
  .services-grid { grid-template-columns: 1fr; }
  .cases-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .models-grid { grid-template-columns: 1fr; }
  .hero-content h1 { font-size: 1.8rem; }
  .section { padding: 60px 0; }
  .qform-tab { font-size: 0.8rem; padding: 14px 4px; }
  .qform-sms-btn { width: 110px; font-size: 0.8rem; }
}

/* ---------- Loading Animation ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Cases Page Lightbox ---------- */
.lightbox-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.92);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  animation: lbFadeIn 0.25s ease;
}
.lightbox-overlay.active { display: flex; }
@keyframes lbFadeIn { from { opacity: 0; } to { opacity: 1; } }

.lightbox-overlay img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  object-fit: contain;
  cursor: default;
}

.lightbox-close {
  position: absolute;
  top: 20px; right: 24px;
  color: #fff;
  font-size: 2.2rem;
  cursor: pointer;
  width: 44px; height: 44px;
  line-height: 40px;
  text-align: center;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  transition: all 0.25s ease;
  user-select: none;
}
.lightbox-close:hover {
  background: rgba(255,255,255,0.3);
  transform: rotate(90deg);
}

.lightbox-caption {
  position: absolute;
  bottom: 30px;
  left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,0.85);
  font-size: 1rem;
  text-align: center;
  padding: 8px 24px;
  background: rgba(0,0,0,0.5);
  border-radius: 30px;
  max-width: 80vw;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lightbox-nav {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  width: 48px; height: 48px;
  line-height: 46px;
  text-align: center;
  background: rgba(255,255,255,0.12);
  border-radius: 50%;
  transition: all 0.25s ease;
  user-select: none;
}
.lightbox-nav:hover { background: rgba(255,255,255,0.28); }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

/* 案例卡片图片可点击提示 */
.case-card img {
  cursor: zoom-in;
  transition: transform 0.3s ease;
}
.case-card img:hover {
  transform: scale(1.03);
}
