/* ============================================
   西藏圻锦工程档案技术服务有限公司 - 官网样式
   Design: Professional / Clean / Responsive
   ============================================ */

/* --- CSS Variables --- */
:root {
  --primary: #1a365d;       /* 深蓝 - 专业可信 */
  --primary-light: #2c5282;
  --primary-dark: #0f2440;
  --accent: #c9a227;        /* 金色 - 品质 */
  --accent-light: #d4af37;
  --bg-white: #ffffff;
  --bg-light: #f7fafc;
  --bg-gray: #edf2f7;
  --text-dark: #1a202c;
  --text-medium: #4a5568;
  --text-light: #718096;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.12);
  --radius: 8px;
  --radius-lg: 12px;
  --transition: 0.3s ease;
  --max-width: 1200px;
  --nav-height: 70px;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0; padding: 0; box-sizing: border-box;
}
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif;
  color: var(--text-dark);
  background: var(--bg-white);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
h1, h2, h3, h4 { line-height: 1.4; font-weight: 700; }
h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }

/* --- Utility --- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section-gray { background: var(--bg-light); }
.section-title {
  text-align: center; margin-bottom: 48px;
}
.section-title h2 {
  color: var(--primary);
  position: relative;
  display: inline-block;
  padding-bottom: 12px;
}
.section-title h2::after {
  content: '';
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 60px; height: 3px; background: var(--accent);
  border-radius: 2px;
}
.section-title p {
  color: var(--text-medium); margin-top: 12px; font-size: 1rem;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 32px; border-radius: var(--radius);
  font-size: 1rem; font-weight: 600;
  cursor: pointer; transition: all var(--transition);
  border: none; gap: 8px;
}
.btn-primary {
  background: var(--primary); color: #fff;
}
.btn-primary:hover { background: var(--primary-light); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-outline {
  background: transparent; color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-accent {
  background: var(--accent); color: var(--primary-dark);
}
.btn-accent:hover { background: var(--accent-light); transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* --- Navigation --- */
.navbar {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  transition: all var(--transition);
}
.navbar.scrolled { box-shadow: var(--shadow-md); }
.navbar .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 100%;
}
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.15rem; font-weight: 700; color: var(--primary);
}
.nav-brand .brand-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.1rem; font-weight: 900;
}
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-links a {
  padding: 8px 16px; border-radius: var(--radius);
  color: var(--text-medium); font-size: 0.95rem; font-weight: 500;
  transition: all var(--transition);
}
.nav-links a:hover,
.nav-links a.active { color: var(--primary); background: var(--bg-gray); }
.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; padding: 8px; background: none; border: none;
}
.nav-toggle span {
  width: 24px; height: 2.5px; background: var(--text-dark);
  border-radius: 2px; transition: all var(--transition);
}
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* --- Hero Section --- */
.hero {
  min-height: 100vh; display: flex; align-items: center;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  color: #fff; position: relative; overflow: hidden;
  padding-top: var(--nav-height);
}
.hero::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}
.hero-content {
  position: relative; z-index: 1; max-width: 720px;
}
.hero-badge {
  display: inline-block; padding: 6px 16px;
  background: rgba(201,162,39,0.2); border: 1px solid var(--accent);
  border-radius: 20px; font-size: 0.85rem; color: var(--accent);
  margin-bottom: 24px;
}
.hero h1 {
  font-size: 2.75rem; font-weight: 800; margin-bottom: 20px;
  letter-spacing: -0.5px; line-height: 1.2;
}
.hero h1 span { color: var(--accent); }
.hero p {
  font-size: 1.15rem; opacity: 0.9; margin-bottom: 36px;
  line-height: 1.8; max-width: 600px;
}
.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-stats {
  display: flex; gap: 48px; margin-top: 64px; padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.15);
}
.hero-stat h3 { font-size: 2rem; color: var(--accent); }
.hero-stat p { font-size: 0.9rem; opacity: 0.7; margin: 0; }

/* --- Page Hero (sub-pages) --- */
.page-hero {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff; padding: 140px 0 60px; text-align: center;
}
.page-hero h1 { font-size: 2.25rem; margin-bottom: 12px; }
.page-hero p { opacity: 0.8; font-size: 1.05rem; }
.breadcrumb {
  display: flex; justify-content: center; gap: 8px;
  margin-top: 20px; font-size: 0.9rem; opacity: 0.7;
}
.breadcrumb a { color: #fff; }
.breadcrumb a:hover { color: var(--accent); }

/* --- Services Grid --- */
.services-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
}
.service-card {
  background: var(--bg-white); border-radius: var(--radius-lg);
  padding: 36px 28px; box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: all var(--transition); position: relative;
  overflow: hidden;
}
.service-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 4px; background: var(--accent);
  transform: scaleX(0); transition: transform var(--transition);
}
.service-card:hover {
  transform: translateY(-6px); box-shadow: var(--shadow-lg);
}
.service-card:hover::before { transform: scaleX(1); }
.service-icon {
  width: 56px; height: 56px; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; margin-bottom: 20px; color: #fff;
}
.service-card h3 { color: var(--primary); margin-bottom: 12px; }
.service-card p { color: var(--text-medium); font-size: 0.95rem; }
.service-list { margin-top: 16px; }
.service-list li {
  padding: 4px 0; padding-left: 18px; position: relative;
  color: var(--text-medium); font-size: 0.9rem;
}
.service-list li::before {
  content: '✓'; position: absolute; left: 0;
  color: var(--accent); font-weight: 700;
}

/* --- About Section --- */
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center;
}
.about-text h3 { color: var(--primary); margin-bottom: 16px; }
.about-text p { color: var(--text-medium); margin-bottom: 16px; }
.about-highlights {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px;
}
.highlight-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; background: var(--bg-light); border-radius: var(--radius);
}
.highlight-icon {
  width: 40px; height: 40px; min-width: 40px;
  background: var(--primary); color: #fff;
  border-radius: var(--radius); display: flex;
  align-items: center; justify-content: center; font-size: 1.1rem;
}
.highlight-item span { font-weight: 600; font-size: 0.95rem; }

/* --- Values / Advantages --- */
.values-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
}
.value-card {
  text-align: center; padding: 32px 20px;
  background: var(--bg-white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
  transition: all var(--transition);
}
.value-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.value-icon {
  width: 64px; height: 64px; margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--bg-light), var(--bg-gray));
  border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 1.8rem;
}
.value-card h4 { color: var(--primary); margin-bottom: 8px; }
.value-card p { color: var(--text-light); font-size: 0.88rem; }

/* --- Cases / Projects --- */
.cases-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px;
}
.case-card {
  background: var(--bg-white); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.case-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.case-image {
  height: 200px; background: linear-gradient(135deg, var(--primary-light), var(--primary));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 2.5rem; position: relative; overflow: hidden;
}
.case-image::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0;
  height: 60px; background: linear-gradient(transparent, rgba(0,0,0,0.3));
}
.case-body { padding: 24px 28px; }
.case-tag {
  display: inline-block; padding: 4px 12px; background: var(--bg-gray);
  border-radius: 20px; font-size: 0.8rem; color: var(--primary);
  font-weight: 600; margin-bottom: 10px;
}
.case-body h3 { color: var(--primary); margin-bottom: 8px; font-size: 1.1rem; }
.case-body p { color: var(--text-medium); font-size: 0.92rem; }
.case-meta {
  display: flex; gap: 20px; margin-top: 14px;
  padding-top: 14px; border-top: 1px solid var(--border);
  font-size: 0.85rem; color: var(--text-light);
}
.case-meta span { display: flex; align-items: center; gap: 4px; }

/* 案例配图：真实现场照片覆盖在底色之上，缺图时回退到 emoji */
.case-photo {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 2;
}
.case-emoji { position: relative; z-index: 1; }

/* 内网登录窗口 */
.login-card {
  max-width: 420px; margin: 0 auto; background: #fff;
  border-radius: var(--radius-lg); padding: 34px 32px; box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.login-field { margin-bottom: 16px; }
.login-field label { display: block; font-weight: 600; margin-bottom: 6px; color: var(--text-dark); }
.login-field input {
  width: 100%; padding: 11px 14px; border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 1rem; font-family: inherit;
}
.login-field input[readonly] { background: var(--bg-gray); color: var(--text-medium); }
.login-msg { margin-top: 12px; text-align: center; font-size: 0.9rem; min-height: 18px; }

/* 右上角浮动内网登录 */
.intranet-float { position: fixed; top: 72px; right: 20px; z-index: 9999; }
.intranet-toggle {
  background: var(--primary); color: #fff; border: none;
  padding: 8px 18px; border-radius: 8px; cursor: pointer;
  font-size: 0.88rem; font-weight: 600; box-shadow: 0 4px 14px rgba(26,54,93,.25);
  transition: background .2s;
}
.intranet-toggle:hover { background: var(--primary-dark); }
.intranet-dropdown {
  display: none; position: absolute; top: 100%; right: 0; margin-top: 6px;
  background: #fff; border-radius: 10px; box-shadow: 0 12px 36px rgba(0,0,0,.15);
  border: 1px solid var(--border); padding: 20px; width: 260px;
}
.intranet-dropdown.open { display: block; animation: fadeDown .2s ease; }
@keyframes fadeDown { from{opacity:0;transform:translateY(-6px)} to{opacity:1;transform:translateY(0)} }
.intranet-dropdown label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text-dark); margin-bottom: 5px; }
.intranet-dropdown input {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 0.95rem; margin-bottom: 8px; box-sizing: border-box;
}
.intranet-dropdown p { font-size: 0.82rem; text-align: center; min-height: 16px; margin-top: 4px; }

/* 项目现场轮播 */
.cases-carousel-section .section-title { margin-bottom: 28px; }
.cases-carousel { position: relative; max-width: 960px; margin: 0 auto; }
.carousel-viewport { overflow: hidden; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.carousel-track { display: flex; transition: transform 0.6s ease; }
.carousel-slide { min-width: 100%; position: relative; background: linear-gradient(135deg,#1a365d,#2c5282); }
.carousel-slide img { width: 100%; height: 460px; object-fit: cover; display: block; background: #1a365d; }
.carousel-caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 30px 28px 22px; color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,0.65));
}
.carousel-caption .c-tag {
  display: inline-block; padding: 3px 12px; margin-bottom: 8px;
  background: rgba(255,255,255,0.18); border-radius: 20px; font-size: 0.8rem;
}
.carousel-caption h3 { color: #fff; font-size: 1.3rem; margin: 0; }
.carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border: none; border-radius: 50%;
  background: rgba(0,0,0,0.45); color: #fff; font-size: 1.6rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center; z-index: 3;
}
.carousel-btn:hover { background: rgba(0,0,0,0.7); }
.carousel-prev { left: 14px; }
.carousel-next { right: 14px; }
.carousel-dots { display: flex; gap: 8px; justify-content: center; margin-top: 16px; }
.carousel-dot { width: 10px; height: 10px; border-radius: 50%; border: none; padding: 0; background: rgba(0,0,0,0.2); cursor: pointer; }
.carousel-dot.active { background: var(--primary); }
@media (max-width: 768px) {
  .carousel-slide img { height: 300px; }
}

/* 办公环境画廊 */
.office-gallery {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.office-photo { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); aspect-ratio: 4/3; }
.office-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.office-photo:hover img { transform: scale(1.04); }
@media (max-width: 768px) {
  .office-gallery { grid-template-columns: repeat(2, 1fr); }
}

/* 案例卡片内照片展示（点击放大） */
.case-photo-gallery {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border);
}
.case-thumb {
  height: 90px; border-radius: 8px; overflow: hidden; cursor: pointer;
  position: relative;
}
.case-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.case-thumb::after {
  content: '🔍'; position: absolute; inset: 0; background: rgba(0,0,0,.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; opacity: 0; transition: opacity .2s;
}
.case-thumb:hover::after { opacity: 1; }

/* 照片放大查看器 */
.photo-viewer {
  position: fixed; inset: 0; z-index: 99999; background: rgba(0,0,0,.82);
  display: none; align-items: center; justify-content: center;
}
.photo-viewer.open { display: flex; }
.photo-viewer img { max-width: 92vw; max-height: 92vh; object-fit: contain; border-radius: 6px; }
.photo-viewer-close {
  position: absolute; top: 20px; right: 24px; color: #fff; font-size: 2rem;
  background: none; border: none; cursor: pointer; line-height: 1;
}

/* --- CTA Section --- */
.cta-section {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff; text-align: center; padding: 80px 0;
}
.cta-section h2 { color: #fff; margin-bottom: 16px; }
.cta-section p { opacity: 0.85; margin-bottom: 32px; max-width: 600px; margin-left: auto; margin-right: auto; }

/* --- Footer --- */
.footer {
  background: var(--primary-dark); color: #fff; padding: 48px 0 24px;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
  margin-bottom: 36px;
}
.footer-brand { font-size: 1.1rem; font-weight: 700; margin-bottom: 12px; }
.footer-desc { opacity: 0.7; font-size: 0.9rem; line-height: 1.7; }
.footer-col h4 { font-size: 1rem; margin-bottom: 16px; color: var(--accent); }
.footer-col a {
  display: block; padding: 4px 0; color: rgba(255,255,255,0.7);
  font-size: 0.9rem; transition: color var(--transition);
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px; text-align: center;
  font-size: 0.85rem; opacity: 0.6;
}

/* 公安联网备案占位（审核通过后替换为平台提供的备案编号HTML代码） */
.gov-beian { margin-top: 6px; font-size: 0.78rem; opacity: 0.6; }
.gov-beian a { color: inherit; text-decoration: none; }
.gov-beian a:hover { text-decoration: underline; }

/* --- Responsive --- */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .values-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  html { font-size: 15px; }
  .nav-links {
    display: none; position: absolute; top: var(--nav-height);
    left: 0; right: 0; background: var(--bg-white);
    flex-direction: column; padding: 16px;
    box-shadow: var(--shadow-lg);
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
  .hero { min-height: auto; padding: 120px 0 80px; }
  .hero h1 { font-size: 2rem; }
  .hero-stats { flex-wrap: wrap; gap: 24px; }
  .hero-stat { flex: 1; min-width: 120px; }
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .services-grid { grid-template-columns: 1fr; }
  .cases-grid { grid-template-columns: 1fr; }
  .values-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .section { padding: 56px 0; }
  .hero-buttons { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
}
@media (max-width: 480px) {
  .hero h1 { font-size: 1.65rem; }
  .section-title h2 { font-size: 1.5rem; }
  .values-grid { grid-template-columns: 1fr; }
  .about-highlights { grid-template-columns: 1fr; }
}

/* --- Animations --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
