/* ==========================================
   河南新唯思教育官网 - 全局通用样式
   配色方案A：活力橙系
   ========================================== */

/* ========== CSS 变量定义 ========== */
:root {
  /* 主色调 */
  --primary-color: #FF6B35;
  --secondary-color: #FFA62B;
  --accent-color: #00D4AA;
  
  /* 背景色 */
  --bg-color: #F7F9FC;
  --white: #FFFFFF;
  
  /* 文字颜色 */
  --text-dark: #2D3748;
  --text-light: #718096;
  --text-muted: #A0AEC0;
  
  /* 渐变 */
  --gradient-primary: linear-gradient(135deg, #FF6B35 0%, #FFA62B 100%);
  --gradient-accent: linear-gradient(135deg, #00D4AA 0%, #00B894 100%);
  
  /* 阴影 */
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.15);
  --shadow-hover: 0 12px 32px rgba(255,107,53,0.2);
  
  /* 圆角 */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-full: 999px;
  
  /* 过渡 */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.6s ease;
  
  /* 字体 */
  --font-family: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-family-number: "DIN Condensed", Arial, sans-serif;
}

/* ========== 全局重置与基础样式 ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-dark);
  background-color: var(--bg-color);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  outline: none;
  background: none;
  font-family: inherit;
}

/* ========== 容器 ========== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.container-fluid {
  width: 100%;
  padding: 0 40px;
}

/* ========== 顶部导航栏 ========== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: all var(--transition-base);
  background-color: transparent;
}

.header.scrolled {
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* 首页顶部导航增强（未滚动时也有背景） */
.header {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(255, 255, 255, 0.85) 100%
  );
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  padding: 0 40px;
}

/* Logo */
.header-logo {
  display: flex;
  align-items: center;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-dark);
  gap: 10px;
}

.header-logo-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 导航菜单 */
.header-nav {
  display: flex;
  align-items: center;
  gap: 40px;
  height: 100%;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 40px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-link {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-dark);
  padding: 0;
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 40px;
  line-height: 1;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width var(--transition-base);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link:hover {
  color: var(--primary-color);
}

.nav-link.active {
  color: var(--primary-color);
}

/* 用户操作区 */
.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* 登录按钮 */
.auth-buttons {
  display: flex;
  align-items: center;
}

.btn-login {
  padding: 0 28px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  color: var(--white);
  font-weight: 600;
  font-size: 15px;
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* 用户菜单 */
.user-menu {
  position: relative;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-base);
}

.user-info:hover {
  background-color: rgba(255, 107, 53, 0.05);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary-color);
}

.user-name {
  font-weight: 500;
  font-size: 15px;
  color: var(--text-dark);
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-info .fa-angle-down {
  color: var(--text-light);
  font-size: 14px;
  transition: transform var(--transition-base);
}

.user-menu:hover .fa-angle-down {
  transform: rotate(180deg);
}

/* 用户下拉菜单 */
.user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 200px;
  background-color: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--transition-base);
  z-index: 100;
}

.user-menu:hover .user-dropdown,
.user-menu.active .user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: var(--text-dark);
  font-size: 14px;
  transition: all var(--transition-fast);
}

.dropdown-item:hover {
  background-color: var(--bg-color);
  color: var(--primary-color);
}

.dropdown-item i {
  width: 16px;
  font-size: 16px;
  color: var(--text-light);
}

.dropdown-item:hover i {
  color: var(--primary-color);
}

.dropdown-divider {
  height: 1px;
  background-color: var(--bg-color);
  margin: 8px 0;
}

/* CTA按钮 */
.header-cta {
  padding: 0 28px;
  background: var(--gradient-primary);
  color: var(--white);
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 15px;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  line-height: 1;
}

.header-cta:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

/* 移动端菜单按钮 */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 10px;
}

.mobile-menu-toggle span {
  width: 24px;
  height: 2px;
  background-color: var(--text-dark);
  transition: all var(--transition-base);
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* 移动端导航 */
.mobile-nav {
  display: none;
  position: fixed;
  top: 80px;
  left: 0;
  width: 100%;
  height: calc(100vh - 80px);
  background-color: var(--white);
  padding: 30px;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform var(--transition-base);
}

.mobile-nav.active {
  transform: translateX(0);
}

/* 移动端登录 */
.mobile-auth {
  margin: 20px 0;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--bg-color);
}

.btn-login-mobile {
  width: 100%;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  color: var(--white);
  font-weight: 600;
  font-size: 16px;
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.btn-login-mobile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* 移动端用户信息 */
.mobile-user {
  padding: 20px 0;
  border-bottom: 1px solid var(--bg-color);
  margin-bottom: 20px;
}

.mobile-user-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  cursor: pointer;
}

.mobile-user-header .user-avatar {
  width: 48px;
  height: 48px;
}

.mobile-user-header .user-name {
  font-size: 16px;
  font-weight: 600;
  flex: 1;
}

.mobile-user-header .fa-angle-down {
  color: var(--text-light);
  font-size: 14px;
  transition: transform var(--transition-base);
}

.mobile-user-header .fa-angle-up {
  transform: rotate(180deg);
}

.mobile-user-links {
  display: none;
  flex-direction: column;
  gap: 4px;
  margin-top: 12px;
}

.mobile-user-links.active {
  display: flex;
}

.mobile-user-links a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-md);
  color: var(--text-dark);
  font-size: 15px;
  transition: all var(--transition-fast);
}

.mobile-user-links a:hover {
  background-color: var(--bg-color);
  color: var(--primary-color);
}

.mobile-user-links a i {
  width: 20px;
  font-size: 16px;
  color: var(--text-light);
}

.mobile-nav .nav-menu {
  flex-direction: column;
  gap: 20px;
  align-items: flex-start;
}

.mobile-nav .nav-link {
  font-size: 18px;
  padding: 0;
  width: 100%;
  height: 50px;
  display: flex;
  align-items: center;
}

.mobile-nav .header-cta {
  margin-top: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  width: auto;
  min-width: 200px;
  line-height: 1;
}

/* ========== 底部信息栏 ========== */
.footer {
  background-color: #1a202c;
  color: var(--white);
  padding: 60px 0 30px;
  margin-top: 80px;
}

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

/* 公司信息区 */
.footer-info {
  max-width: 350px;
}

.footer-logo {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-slogan {
  font-size: 15px;
  color: #cbd5e0;
  margin-bottom: 16px;
  font-weight: 500;
}

.footer-desc {
  font-size: 14px;
  line-height: 1.8;
  color: #a0aec0;
}

/* 友情链接区 */
.footer-links {
  text-align: left;
}

.footer-links h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--white);
  text-align: left;
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-left: 0;
  margin-left: 0;
  list-style: none;
}

.footer-links li {
  text-align: left;
}

.footer-links a {
  font-size: 14px;
  color: #a0aec0;
  transition: all var(--transition-fast);
  display: block;
  text-align: left;
}

.footer-links a:hover {
  color: var(--primary-color);
  padding-left: 5px;
}

/* 联系方式区 */
.footer-contact h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--white);
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 14px;
  color: #a0aec0;
}

.footer-contact-item i {
  color: var(--primary-color);
  margin-top: 3px;
}

/* 关注我们区域 */
.footer-social {
  text-align: center;
}

.footer-social h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--white);
}

.social-qr-group {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.social-qr-item {
  position: relative;
  text-align: center;
}

.social-icon-btn {
  width: 50px;
  height: 50px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--white);
  cursor: pointer;
  transition: all var(--transition-base);
  border: 2px solid rgba(255,255,255,0.2);
}

.social-icon-btn:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(255,107,53,0.3);
}

.social-name {
  font-size: 12px;
  color: #a0aec0;
  margin-top: 8px;
}

/* 二维码弹出层 */
.qr-popup {
  position: absolute;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--white);
  padding: 16px;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
  z-index: 10;
  min-width: 160px;
}

.qr-popup::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid var(--white);
}

.social-qr-item:hover .qr-popup {
  opacity: 1;
  visibility: visible;
  bottom: 75px;
}

.qr-popup img {
  width: 140px;
  height: 140px;
  display: block;
  border-radius: var(--radius-sm);
}

.qr-popup-title {
  font-size: 13px;
  color: var(--text-dark);
  margin-top: 10px;
  font-weight: 600;
  text-align: center;
}

/* 底部版权 */
.footer-bottom {
  border-top: 1px solid #2d3748;
  padding-top: 30px;
  text-align: center;
}

/* 备案信息区 */
.footer-beian {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.beian-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #718096;
  transition: color var(--transition-fast);
}

.beian-link i {
  font-size: 14px;
  color: var(--primary-color);
}

.beian-link:hover {
  color: var(--primary-color);
}

.police-icon {
  width: 16px;
  height: 16px;
  display: inline-block;
  vertical-align: middle;
}

.footer-copyright {
  font-size: 14px;
  color: #718096;
  line-height: 1.8;
}

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

.footer-copyright a:hover {
  text-decoration: underline;
}

/* ========== 公共组件 ========== */

/* 按钮 */
.btn {
  display: inline-block;
  padding: 12px 32px;
  border-radius: var(--radius-full);
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  transition: all var(--transition-base);
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.btn-secondary {
  background: var(--gradient-accent);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0,212,170,0.2);
}

.btn-outline {
  background: transparent;
  border-color: var(--primary-color);
  color: var(--primary-color);
}

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

.btn-lg {
  padding: 16px 48px;
  font-size: 17px;
}

.btn-sm {
  padding: 8px 20px;
  font-size: 14px;
}

/* 标签 */
.tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  background-color: rgba(255,107,53,0.1);
  color: var(--primary-color);
}

.tag-accent {
  background-color: rgba(0,212,170,0.1);
  color: var(--accent-color);
}

.tag-secondary {
  background-color: rgba(255,166,43,0.1);
  color: var(--secondary-color);
}

/* 卡片 */
.card {
  background-color: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all var(--transition-base);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

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

.card-body {
  padding: 24px;
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 12px;
  line-height: 1.4;
}

.card-text {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.8;
}

/* 分节标题 */
.section-title {
  text-align: center;
  margin-bottom: 60px;
}

.section-title-main {
  font-size: 40px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 16px;
  line-height: 1.3;
}

.section-title-sub {
  font-size: 18px;
  color: var(--text-light);
  font-weight: 400;
}

/* 面包屑导航 */
.breadcrumb {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 30px;
  padding: 0;
  background: none;
  list-style: none;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
}

/* 移除Bootstrap默认的分隔符 */
.breadcrumb-item + .breadcrumb-item::before {
  content: none !important;
  display: none !important;
}

/* 使用我们自己的分隔符 */
.breadcrumb-item:not(:last-child)::after {
  content: '/';
  color: var(--text-muted);
  margin: 0 8px;
}

.breadcrumb-item a {
  color: var(--text-light);
  text-decoration: none;
}

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

/* 加载动画 */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--primary-color);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ========== 响应式设计 ========== */

/* 移动端社交二维码 */
@media (max-width: 767px) {
  .social-qr-group {
    gap: 16px;
  }
  
  /* 移动端点击显示，而非悬停 */
  .social-qr-item.active .qr-popup {
    opacity: 1;
    visibility: visible;
    bottom: 75px;
  }
}

/* 平板 */
@media (max-width: 1023px) {
  .container {
    padding: 0 20px;
  }
  
  .header-inner {
    padding: 0 20px;
  }
  
  .header-nav .nav-menu {
    gap: 24px;
  }
  
  .footer-main {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
}

/* 移动端 */
@media (max-width: 767px) {
  html {
    font-size: 14px;
  }
  
  .header-inner {
    height: 60px;
    padding: 0 15px;
  }
  
  .header-logo {
    font-size: 20px;
  }
  
  .header-nav .nav-menu,
  .header-cta {
    display: none;
  }
  
  /* 隐藏桌面端的用户菜单和登录按钮 */
  .header-actions {
    display: none !important;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  .mobile-nav {
    display: block;
    top: 60px;
    height: calc(100vh - 60px);
  }
  
  .footer {
    padding: 40px 0 20px;
  }
  
  .footer-main {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .footer-info {
    max-width: 100%;
  }
  
  .footer-beian {
    flex-direction: column;
    gap: 12px;
  }
  
  .beian-link {
    font-size: 12px;
  }
  
  .section-title-main {
    font-size: 28px;
  }
  
  .section-title-sub {
    font-size: 16px;
  }
  
  .btn {
    padding: 10px 24px;
    font-size: 14px;
  }
  
  .btn-lg {
    padding: 14px 36px;
    font-size: 16px;
  }
}

