/* ========================================
   宁海游泳协会官网 - 公共样式表
   配色：主色#1677C2 / 辅助#42B9FF / 深蓝#125999 / 水绿#36CFC9
   ======================================== */

/* === 基础重置 === */
html { scroll-behavior: smooth; }
body { font-family: 'Noto Sans SC', sans-serif; color: #666666; background: #fff; }

/* === 配色变量 === */
:root {
  --primary: #1677C2;
  --primary-light: #42B9FF;
  --primary-dark: #125999;
  --accent: #36CFC9;
  --bg-light: #F5F8FA;
  --text-body: #666666;
  --text-heading: #111111;
}

/* === 导航栏 === */
.nav-link { position: relative; }
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 100%;
  height: 2px;
  background: var(--primary);
  transition: transform 0.3s ease;
  border-radius: 1px;
}
.nav-link:hover::after,
.nav-link.active::after {
  transform: translateX(-50%) scaleX(1);
}

/* === 关于我们下拉菜单 === */
.dropdown-menu {
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.25s ease;
}
.dropdown-trigger:hover .dropdown-menu,
.dropdown-menu:hover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown-link {
  display: block;
  padding: 10px 20px;
  font-size: 14px;
  color: var(--text-heading);
  white-space: nowrap;
  transition: all 0.2s ease;
}
.dropdown-link:hover {
  background: var(--bg-light);
  color: var(--primary);
}

/* === 移动端菜单 === */
.mobile-menu { max-height: 0; overflow: hidden; transition: max-height 0.4s ease; }
.mobile-menu.open { max-height: 700px; }
.mobile-submenu { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.mobile-submenu.open { max-height: 300px; }

/* === 首页Hero === */
.hero-gradient {
  background: linear-gradient(135deg, rgba(18,89,153,0.92) 0%, rgba(22,119,194,0.88) 40%, rgba(66,185,255,0.78) 100%);
}

/* === 章节标题装饰线 === */
.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  margin: 16px auto 0;
  border-radius: 2px;
}
.section-title-left::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  margin: 16px 0 0;
  border-radius: 2px;
}

/* === 页面顶部Banner（内页通用） === */
.page-banner {
  background: linear-gradient(135deg, rgba(18,89,153,0.94) 0%, rgba(22,119,194,0.9) 50%, rgba(66,185,255,0.82) 100%);
}

/* === 卡片hover === */
.card-hover {
  transition: all 0.3s ease;
}
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(22,119,194,0.12);
}

/* === 滚动渐入动画 === */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* === 悬浮客服 === */
.float-sidebar {
  position: fixed;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
}

/* === 新闻Tab === */
.tab-btn.active { color: var(--primary); border-bottom: 3px solid var(--primary); font-weight: 700; }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* === 面包屑 === */
.breadcrumb a:hover { color: var(--primary); }

/* === 侧边栏子导航（内页） === */
.side-nav a {
  display: block;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--text-body);
  border-left: 3px solid transparent;
  transition: all 0.2s ease;
}
.side-nav a:hover,
.side-nav a.active {
  color: var(--primary);
  background: #eff6ff;
  border-left-color: var(--primary);
  font-weight: 700;
}

/* === 表单 === */
.form-input {
  width: 100%;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  font-size: 14px;
  transition: border-color 0.2s;
  outline: none;
}
.form-input:focus { border-color: var(--primary); }

/* === 文件下载卡片 === */
.download-card:hover .download-icon {
  transform: translateY(-2px);
}

/* === 响应式 === */
@media (max-width: 768px) {
  .hero-title { font-size: 2rem !important; }
  .float-sidebar { display: none; }
}
@media (min-width: 769px) {
  .mobile-bottom-bar { display: none; }
}
