/* ========================================
   重庆云会雅信息技术咨询有限公司 - 官网样式
   ======================================== */

/* ---------- CSS 变量 ---------- */
:root {
  --primary: #1a6df5;
  --primary-dark: #1558c9;
  --primary-light: #e8f1ff;
  --secondary: #0f2b5e;
  --accent: #00c9a7;
  --text: #333333;
  --text-light: #666666;
  --text-muted: #999999;
  --bg: #ffffff;
  --bg-gray: #f7f9fc;
  --bg-dark: #0a1628;
  --border: #e5e9f0;
  --shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --container-width: 1200px;
  --header-height: 72px;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul {
  list-style: none;
}

/* ---------- Container ---------- */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Section ---------- */
.section {
  padding: 100px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-title {
  font-size: 36px;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 12px;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--primary);
  border-radius: 2px;
}

.section-desc {
  font-size: 18px;
  color: var(--text-light);
  margin-top: 16px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(26, 109, 245, 0.35);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.6);
}

.btn-outline:hover {
  background: #fff;
  color: var(--primary);
  border-color: #fff;
  transform: translateY(-2px);
}

.btn-block {
  width: 100%;
}

/* ========================================
   Header / 导航
   ======================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  z-index: 1000;
  transition: all var(--transition);
}

.header.scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 700;
  color: var(--secondary);
  text-decoration: none;
}

.logo i {
  font-size: 28px;
  color: var(--primary);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  display: block;
  padding: 8px 18px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
  background: var(--primary-light);
}

/* Mobile Nav Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 2.5px;
  background: var(--secondary);
  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 / 首页 Banner
   ======================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a1628;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
}

.hero::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(26, 109, 245, 0.25), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 201, 167, 0.15), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10, 22, 40, 0.92) 0%, rgba(15, 43, 94, 0.75) 50%, rgba(10, 22, 40, 0.9) 100%);
  pointer-events: none;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  color: #fff;
  padding-top: var(--header-height);
}

.hero-title {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 20px;
  letter-spacing: 2px;
}

.hero-subtitle {
  font-size: 22px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 16px;
  letter-spacing: 4px;
}

.hero-desc {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.8;
  margin-bottom: 40px;
}

.hero-btns {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  animation: bounce 2s infinite;
  z-index: 3;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ========================================
   About / 关于我们
   ======================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  align-items: center;
}

.about-image {
  display: flex;
  justify-content: center;
}

.about-img-wrapper {
  width: 100%;
  max-width: 480px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.about-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4/3;
  display: block;
  transition: transform 0.5s ease;
}

.about-img-wrapper:hover img {
  transform: scale(1.05);
}

.about-content h3 {
  font-size: 28px;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 20px;
}

.about-content p {
  color: var(--text-light);
  margin-bottom: 16px;
  text-indent: 2em;
  font-size: 15px;
}

.about-content p strong {
  color: var(--primary);
}

.about-info {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.info-item i {
  font-size: 20px;
  color: var(--primary);
  margin-top: 2px;
  flex-shrink: 0;
}

.info-item div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info-item span {
  font-size: 13px;
  color: var(--text-muted);
}

.info-item strong {
  font-size: 15px;
  color: var(--secondary);
}

/* ========================================
   Services / 业务范围
   ======================================== */
.services {
  background: var(--bg-gray);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.service-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: all var(--transition);
  border: 1px solid transparent;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.service-card-img {
  width: 100%;
  height: 180px;
  overflow: hidden;
}

.service-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.service-card:hover .service-card-img img {
  transform: scale(1.08);
}

.service-card-body {
  padding: 24px 28px 32px;
  flex: 1;
}

.service-icon {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.service-icon i {
  font-size: 26px;
  color: var(--primary);
}

.service-card h3 {
  font-size: 19px;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 12px;
}

.service-card p {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.8;
}

/* ========================================
   Ad Service / 广告制作
   ======================================== */
.ad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.ad-card {
  text-align: center;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: all var(--transition);
  border: 1px solid transparent;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.ad-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.ad-card-img {
  width: 100%;
  height: 170px;
  overflow: hidden;
}

.ad-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.ad-card:hover .ad-card-img img {
  transform: scale(1.08);
}

.ad-card-body {
  padding: 28px 24px 36px;
  flex: 1;
}

.ad-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e6faf5, #d0f5e9);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.ad-icon i {
  font-size: 30px;
  color: var(--accent);
}

.ad-card h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 12px;
}

.ad-card p {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.8;
}

/* ========================================
   Advantages / 核心优势
   ======================================== */
.advantages {
  background: var(--bg-gray);
}

.advantages-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

.advantage-item {
  background: #fff;
  border-radius: var(--radius);
  padding: 36px 28px;
  box-shadow: var(--shadow);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.advantage-item:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.advantage-num {
  font-size: 48px;
  font-weight: 800;
  color: var(--primary-light);
  line-height: 1;
  margin-bottom: 16px;
  transition: color var(--transition);
}

.advantage-item:hover .advantage-num {
  color: var(--primary);
}

.advantage-item h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 12px;
}

.advantage-item p {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.8;
}

/* ========================================
   Contact / 联系我们
   ======================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.contact-info h3,
.contact-form h3 {
  font-size: 26px;
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 28px;
}

.contact-items {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.contact-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-icon i {
  font-size: 20px;
  color: var(--primary);
}

.contact-item div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-item span {
  font-size: 13px;
  color: var(--text-muted);
}

.contact-item strong {
  font-size: 16px;
  color: var(--secondary);
  font-weight: 600;
}

.contact-item a {
  color: var(--secondary);
}

.contact-item a:hover {
  color: var(--primary);
}

/* Form */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--secondary);
  margin-bottom: 8px;
}

.form-group label span {
  color: #e74c3c;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  transition: all var(--transition);
  font-family: inherit;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 109, 245, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #c0c4cc;
}

/* ========================================
   Footer / 页脚
   ======================================== */
.footer {
  background: var(--bg-dark);
  color: rgba(255, 255, 255, 0.7);
  padding-top: 60px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
}

.footer-logo i {
  font-size: 26px;
  color: var(--primary);
}

.footer-brand p {
  font-size: 14px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.5);
}

.footer-links h4,
.footer-contact h4 {
  font-size: 17px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 18px;
}

.footer-links ul,
.footer-contact ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  transition: color var(--transition);
}

.footer-links a:hover {
  color: #fff;
}

.footer-contact ul li {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-contact ul li i {
  width: 16px;
  color: var(--primary);
  font-size: 13px;
}

.footer-bottom {
  padding: 24px 0;
  text-align: center;
}

.footer-bottom p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.35);
  line-height: 2;
}

.beian-link {
  color: rgba(255, 255, 255, 0.35);
  transition: color var(--transition);
}

.beian-link:hover {
  color: rgba(255, 255, 255, 0.65);
}

/* ========================================
   Back to Top
   ======================================== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition);
  z-index: 999;
  box-shadow: 0 4px 16px rgba(26, 109, 245, 0.35);
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
}

/* ========================================
   Animations
   ======================================== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   Responsive / 响应式
   ======================================== */

/* Tablet (≤1024px) */
@media (max-width: 1024px) {
  .section {
    padding: 80px 0;
  }

  .section-title {
    font-size: 30px;
  }

  .hero-title {
    font-size: 36px;
  }

  .hero-subtitle {
    font-size: 18px;
  }

  .hero-desc {
    font-size: 15px;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .advantages-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-info {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
}

/* Small Tablet (≤768px) */
@media (max-width: 768px) {
  :root {
    --header-height: 64px;
  }

  .section {
    padding: 60px 0;
  }

  .section-header {
    margin-bottom: 40px;
  }

  .section-title {
    font-size: 26px;
  }

  .section-desc {
    font-size: 15px;
  }

  /* Mobile Nav */
  .nav-toggle {
    display: flex;
  }

  .nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: #fff;
    padding: 100px 30px 30px;
    box-shadow: -4px 0 30px rgba(0, 0, 0, 0.1);
    transition: right var(--transition);
    z-index: 1000;
  }

  .nav.active {
    right: 0;
  }

  .nav-list {
    flex-direction: column;
    gap: 6px;
  }

  .nav-link {
    font-size: 16px;
    padding: 12px 16px;
  }

  /* Hero */
  .hero {
    min-height: 90vh;
  }

  .hero-title {
    font-size: 28px;
  }

  .hero-subtitle {
    font-size: 16px;
    letter-spacing: 2px;
  }

  .hero-desc {
    font-size: 14px;
  }

  .hero-desc br {
    display: none;
  }

  /* About */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-image {
    order: -1;
  }

  .about-img-wrapper {
    max-width: 100%;
  }

  .about-img-wrapper img {
    aspect-ratio: 16/9;
  }

  .about-content h3 {
    font-size: 22px;
  }

  .about-info {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  /* Services */
  .services-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .ad-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Advantages */
  .advantages-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Contact */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  /* Footer */
  .footer-top {
    grid-template-columns: 1fr;
    gap: 30px;
    text-align: center;
  }

  .footer-logo {
    justify-content: center;
  }

  .footer-contact ul li {
    justify-content: center;
  }
}

/* Mobile (≤480px) */
@media (max-width: 480px) {
  .section-title {
    font-size: 22px;
  }

  .hero-title {
    font-size: 24px;
  }

  .hero-btns {
    flex-direction: column;
    align-items: center;
  }

  .hero-btns .btn {
    width: 100%;
    max-width: 260px;
  }

  .about-info {
    grid-template-columns: 1fr;
  }

  .service-card-body {
    padding: 20px 16px 24px;
  }

  .service-card-img {
    height: 160px;
  }

  .ad-card-body {
    padding: 20px 16px 24px;
  }

  .ad-card-img {
    height: 140px;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
  }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
  .header,
  .back-to-top,
  .hero-scroll {
    display: none;
  }

  .hero {
    min-height: auto;
    padding: 40px 0;
  }

  .section {
    padding: 30px 0;
  }
}
