/* ===== Variables ===== */
:root {
  --color-primary: #6b2d7b;
  --color-primary-light: #8e44ad;
  --color-primary-dark: #4a1a56;
  --color-text: #333;
  --color-text-muted: #666;
  --color-text-light: #999;
  --color-bg: #fff;
  --color-bg-alt: #f7f5f9;
  --color-border: #e8e4ec;
  --header-height: 72px;
  --container-max: 1140px;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(107, 45, 123, 0.08);
  --transition: 0.3s ease;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-primary-light);
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  scroll-margin-top: var(--header-height);
}

/* ===== Header ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow var(--transition);
}

.site-header.scrolled {
  box-shadow: var(--shadow);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.logo-link {
  flex-shrink: 0;
}

.logo {
  height: 48px;
  width: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 8px 20px;
  font-size: 15px;
  color: var(--color-text);
  border-radius: 8px;
  transition: background var(--transition), color var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-primary);
  background: rgba(107, 45, 123, 0.08);
}

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  height: calc(100vh - var(--header-height));
  min-height: 480px;
  max-height: 720px;
  margin-top: var(--header-height);
  overflow: hidden;
}

.hero-slider {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.hero-slide.active {
  opacity: 1;
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(74, 26, 86, 0.75) 0%,
    rgba(107, 45, 123, 0.45) 50%,
    rgba(0, 0, 0, 0.3) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  color: #fff;
  max-width: 680px;
}

.hero-tag {
  display: inline-block;
  padding: 4px 14px;
  margin-bottom: 16px;
  font-size: 13px;
  letter-spacing: 0.05em;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  backdrop-filter: blur(4px);
  width: fit-content;
}

.hero-content h1 {
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 16px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.hero-content p {
  font-size: clamp(15px, 2.5vw, 18px);
  line-height: 1.8;
  opacity: 0.92;
  max-width: 540px;
}

.hero-dots {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  border: none;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  padding: 0;
}

.hero-dot.active {
  background: #fff;
  transform: scale(1.2);
}

/* ===== Section Header ===== */
.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 8px;
}

.section-header h2::after {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  background: var(--color-primary);
  margin: 16px auto 0;
  border-radius: 2px;
}

.section-desc {
  font-size: 16px;
  color: var(--color-text-muted);
}

/* ===== About ===== */
.about {
  padding: 80px 0;
  background: var(--color-bg);
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(220px, 360px) 1fr;
  gap: 40px;
  align-items: stretch;
  margin-bottom: 64px;
}

.about-image {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  align-self: stretch;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.about-text p {
  color: var(--color-text-muted);
  margin-bottom: 16px;
  text-align: justify;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.partners-block h3 {
  font-size: 20px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 32px;
  color: var(--color-text);
}

.partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 24px;
  align-items: center;
  justify-items: center;
  padding: 32px;
  background: var(--color-bg-alt);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

.partner-item img {
  max-height: 56px;
  max-width: 140px;
  object-fit: contain;
  filter: grayscale(20%);
  opacity: 0.85;
  transition: filter var(--transition), opacity var(--transition);
}

.partner-item:hover img {
  filter: none;
  opacity: 1;
}

/* ===== Contact ===== */
.contact {
  padding: 80px 0;
  background: var(--color-bg-alt);
}

.contact-grid {
  max-width: 880px;
  margin: 0 auto;
}

.contact-card {
  background: var(--color-bg);
  border-radius: var(--radius);
  padding: 36px 40px;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow);
}

.contact-items {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px 48px;
}

.contact-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-item-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-primary-dark);
}

.contact-icon {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
}

.contact-item-value {
  margin: 0;
  padding-left: 28px;
  font-size: 15px;
  line-height: 1.75;
  color: var(--color-text-muted);
}

.contact-item-value a {
  color: var(--color-text-muted);
  transition: color var(--transition);
}

.contact-item-value a:hover {
  color: var(--color-primary);
}

/* ===== Footer ===== */
.site-footer {
  padding: 32px 0;
  background: var(--color-primary-dark);
  color: rgba(255, 255, 255, 0.75);
  text-align: center;
  font-size: 14px;
}

.site-footer p + p {
  margin-top: 6px;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.85);
}

.site-footer a:hover {
  color: #fff;
}

/* ===== Responsive: Tablet ===== */
@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .about-image {
    max-width: 480px;
    margin: 0 auto;
    align-self: auto;
  }

  .about-image img {
    height: auto;
    aspect-ratio: 4 / 3;
  }
}

/* ===== Responsive: Mobile ===== */
@media (max-width: 768px) {
  :root {
    --header-height: 60px;
  }

  .logo {
    height: 36px;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    padding: 12px 16px 20px;
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--transition), opacity var(--transition);
  }

  .site-nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-link {
    display: block;
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    border-radius: 8px;
  }

  .hero {
    min-height: 420px;
    max-height: none;
    height: calc(100svh - var(--header-height));
  }

  .hero-content {
    padding-bottom: 48px;
  }

  .hero-dots {
    bottom: 24px;
  }

  .about,
  .contact {
    padding: 56px 0;
  }

  .section-header {
    margin-bottom: 32px;
  }

  .partners-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 24px 16px;
  }

  .contact-card {
    padding: 24px 20px;
  }

  .contact-items {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .contact-item-value {
    padding-left: 28px;
  }

  .partner-item img {
    max-height: 44px;
    max-width: 120px;
  }
}

@media (max-width: 380px) {
  .container {
    padding: 0 16px;
  }

  .partners-grid {
    grid-template-columns: 1fr 1fr;
  }
}
