@import url("https://fonts.googleapis.com/css?family=Playfair+Display:700|Roboto:400");

:root {
  --primary-color: #41228e;
  --primary-dark: #2d1a5c;
  --secondary-color: #5657b1;
  --accent-color: #542cb7;
  --text-dark: #222222;
  --text-gray: #5a5a5a;
  --text-gray-light: #8a8a8a;
  --text-white: #f4f0f0;
  --bg-light: #f8f9fa;
  --bg-white: #ffffff;
  --border-color: #e9ecef;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 60px; /* 全局滚动padding */
}

#home {
  scroll-margin-top: 120px; /* 首页需要更大的padding */
}

body {
  font-family: "Roboto", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--bg-light);
  overflow-x: hidden;
}

::-moz-selection, ::selection {
  background: var(--accent-color);
  color: #fff;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Playfair Display", serif;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.8rem; }
h4 { font-size: 1.4rem; }

p {
  color: var(--text-gray);
  margin-bottom: 1rem;
}

.container {
  width: 100%;
  padding: 0 15px;
  margin: 0 auto;
}

@media (min-width: 576px) {
  .container { max-width: 540px; }
}

@media (min-width: 768px) {
  .container { max-width: 720px; }
}

@media (min-width: 992px) {
  .container { max-width: 960px; }
}

@media (min-width: 1200px) {
  .container { max-width: 1140px; }
}

.btn {
  display: inline-block;
  padding: 12px 30px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 50px;
  transition: all 0.3s ease;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: #fff;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 15px 40px rgba(65, 34, 142, 0.4);
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(135deg, rgba(65, 34, 142, 0.95) 0%, rgba(86, 87, 177, 0.95) 100%);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.navbar .container {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 22px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #fff;
  gap: 12px;
}

.logo {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  background: rgba(255,255,255,0.06);
  padding: 4px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, width 0.25s ease, height 0.25s ease;
}

.logo:hover {
  transform: translateY(-3px) rotate(-3deg);
  box-shadow: 0 14px 30px rgba(65,34,142,0.25);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
  justify-content: center;
}

.brand-name {
  font-family: "Playfair Display", serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 0 rgba(0,0,0,0.15);
  transition: font-size 0.2s ease, transform 0.2s ease;
}

.navbar-nav {
  display: flex;
  list-style: none;
  gap: 22px;
  align-items: center;
}

.nav-link {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.95);
  padding: 8px 6px;
  font-weight: 600;
  transition: color 0.18s ease;
  position: relative;
  font-size: 0.98rem;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  width: 60%;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent-color), var(--secondary-color));
  transition: transform 0.25s cubic-bezier(.2,.9,.2,1);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: translateX(-50%) scaleX(1);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background: rgba(255,255,255,0.95);
  margin: 3px 0;
  transition: all 0.3s ease;
}

@media (max-width: 768px) {
  .navbar-nav {
    position: absolute;
    top: 100%;
    /* 基于菜单按钮（在容器内靠右）的内边距对齐 */
    right: 22px;
    left: auto;
    width: 130px;
    background: linear-gradient(135deg, rgba(65, 34, 142, 0.98) 0%, rgba(86, 87, 177, 0.98) 100%);
    background-origin: content-box;
    flex-direction: column;
    align-items: flex-end;
    padding: 20px;
    display: none;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  }

  .navbar-nav.active {
    display: flex;
  }

  .nav-link {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: right;
    width: 100%;
    box-sizing: border-box;
    font-size: 0.95rem;
  }

  .nav-link:last-child {
    border-bottom: none;
  }

  .menu-toggle {
    display: flex;
  }
}

.navbar h1 {
  font-size: 1.25rem;
  margin: 0;
  color: #fff;
  line-height: 1;
}

.navbar-subtitle {
  font-size: 0.85rem;
  margin: 12px 0 0 0;
  color: rgba(255,255,255,0.85);
  opacity: 0.9;
  font-weight: 400;
}

/* 小屏幕时缩小 logo 和文字 */
@media (max-width: 480px) {
  .logo { width: 48px; height: 48px; }
  .brand-name { font-size: 1rem; }
  .navbar-subtitle { font-size: 0.75rem; }
}

/* 导航滚动时的收缩效果 */
.navbar--scrolled {
  box-shadow: 0 6px 26px rgba(0,0,0,0.12);
  background: linear-gradient(135deg, rgba(65, 34, 142, 1) 0%, rgba(86, 87, 177, 1) 100%);
}

.navbar--scrolled .container {
  padding: 8px 15px;
}

.navbar--scrolled .logo {
  width: 48px;
  height: 48px;
}

.navbar--scrolled .brand-name {
  font-size: 1rem;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%) rotate(45deg);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translateX(100%) rotate(45deg);
    opacity: 0;
  }
}
/* Hero Section Styles */
.hero {
  position: relative;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-top: 110px; /* 避开固定导航栏 */
}

.hero-slider {
  position: relative;
  width: 100%;
  height: 300px;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: all 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slider-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(65, 34, 142, 0.7) 0%, rgba(86, 87, 177, 0.5) 100%);
  z-index: 1;
}

.slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 30px;
  z-index: 3;
}

.prev-btn,
.next-btn {
  width: 50px;
  height: 50px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.prev-btn:hover,
.next-btn:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: scale(1.1);
}

.slider-dots {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 15px;
  z-index: 3;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
}

.dot.active {
  width: 30px;
  border-radius: 6px;
  background: #fff;
}

@media (max-width: 768px) {
  .slider-nav {
    padding: 0 15px;
  }

  .prev-btn,
  .next-btn {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
}

@media (max-width: 576px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.8rem; }
  h3 { font-size: 1.4rem; }

  .services, .about, .contact {
    padding: 50px 0;
  }

  .slider-dots {
    bottom: 25px;
  }

  .dot {
    width: 10px;
    height: 10px;
  }

  .dot.active {
    width: 25px;
  }

  .about-stats {
    flex-direction: column;
    gap: 15px;
  }
}

.services {
  padding: 50px 0;
  background: var(--bg-light);
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
  position: relative;
}

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 15px;
  color: var(--primary-dark);
  letter-spacing: 0.6px;
  font-weight: 700;
  display: inline-block;
  position: relative;
}

.section-header h2::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -16px;
  width: 160px;
  height: 6px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--accent-color), var(--secondary-color));
  box-shadow: 0 8px 24px rgba(84,44,183,0.16);
}

.section-header p {
  font-size: 1.05rem;
  color: var(--text-gray);
  max-width: 760px;
  margin: 12px auto 0 auto;
}

@media (max-width: 768px) {
  .section-header h2 { font-size: 2rem; }
  .section-header h2::after { width: 110px; bottom: -12px; height: 5px; }
  .section-header p { font-size: 0.98rem; padding: 0 18px; }
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.service-card {
  background: var(--bg-white);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
  transition: all 0.45s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
}

.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
  transform: scaleX(0);
  transition: transform 0.45s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-card::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(65, 34, 142, 0.03), transparent);
  transform: rotate(45deg);
  transition: all 0.6s ease;
  opacity: 0;
}

.service-card:hover::after {
  animation: shimmer 0.6s ease;
}

.service-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 25px 60px rgba(65, 34, 142, 0.18);
}

.service-icon {
  overflow: hidden;
  position: relative;
}

.service-icon::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(65, 34, 142, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.service-card:hover .service-icon::before {
  opacity: 1;
}

.service-icon img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.service-card:hover .service-icon img {
  transform: scale(1.1);
}

.service-info {
  padding: 25px;
}

.service-info h3 {
  color: var(--primary-color);
  margin-bottom: 15px;
}

.service-info ul {
  list-style: none;
}

.service-info li {
  padding: 8px 0;
  padding-left: 25px;
  position: relative;
  color: var(--text-gray);
}

.service-info li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: bold;
}

.about {
  padding: 50px 0;
  background: var(--bg-white);
}

.about-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 50px;
  align-items: center;
}

.about-icon {
  width: 220px;
  height: 220px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    0 20px 50px rgba(65, 34, 142, 0.35),
    inset 0 2px 10px rgba(255, 255, 255, 0.15);
  margin: 0 auto;
  position: relative;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.about-icon::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  opacity: 0.3;
  filter: blur(15px);
}

.about-icon:hover {
  transform: scale(1.05);
  box-shadow: 
    0 30px 60px rgba(65, 34, 142, 0.45),
    inset 0 2px 10px rgba(255, 255, 255, 0.2);
}

.icon-text {
  font-family: "Playfair Display", serif;
  font-size: 3.5rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.about-text h2 {
  color: var(--primary-color);
}

.about-text p {
  font-size: 1.1rem;
  line-height: 1.8;
  text-indent: 2ch;
  text-align: left;
}

.about-stats {
  display: flex;
  gap: 30px;
  margin-top: 30px;
}

.stat-item {
  text-align: center;
  padding: 22px 28px;
  background: var(--bg-light);
  border-radius: 14px;
  transition: all 0.3s ease;
}

.stat-item:hover {
  transform: translateY(-4px);
  background: linear-gradient(135deg, rgba(65, 34, 142, 0.08), rgba(86, 87, 177, 0.08));
}

.stat-number {
  display: block;
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 6px;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-gray);
  font-weight: 500;
}

@media (max-width: 768px) {
  .about-content {
    text-align: center;
  }

  .about-stats {
    justify-content: center;
  }
}

.contact {
  padding: 50px 0;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.contact .section-header h2,
.contact .section-header p {
  color: #fff;
}

.contact-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.08);
  padding: 30px;
  border-radius: 16px;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.contact-item:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.contact-icon {
  font-size: 2.5rem;
  margin-right: 20px;
}

.contact-content h4 {
  color: #fff;
  margin-bottom: 5px;
}

.contact-content p {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0;
}

.footer {
  padding: 35px 0;
  background: linear-gradient(135deg, #1a1a1a 0%, #222222 100%);
  text-align: center;
  position: relative;
}

.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
}

.footer p,
.footer p a{
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 0;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  text-decoration: none;
  transition: color 0.2s ease; 
}
