/* ============================================================
   HVAC Exam Master — 全站共用外壳样式
   设计变量 / reset / 容器 / 按钮 / 头部 / 导航 / 下拉菜单

   由全站页面共同引用。子页面另需引用 article-base.css 以获取
   正文排版 / Footer / 移动端导航 / 基础响应式等公共样式。
   页面自身的 <style> 在外部样式之后加载，可用于覆盖定义。
   ============================================================ */

/* ================= 核心变量 & 通用样式 ================= */
:root {
  --primary-dark: #0f172a;
  --primary-blue: #0056b3;
  --accent: #ff6600;
  --accent-hover: #e65c00;
  --bg-body: #ffffff;
  --bg-light: #f8fafc;
  --bg-accent-light: #fff7ed;
  --text-main: #333333;
  --text-light: #555555;
  --border: #e2e8f0;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--text-main);
  background-color: var(--bg-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
  transition: 0.3s;
}

ul {
  list-style: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* 按钮 */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  text-align: center;
  transition: all 0.3s ease;
}

.btn-primary {
  background-color: var(--accent);
  color: white;
  border: 1px solid var(--accent);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(255, 102, 0, 0.2);
}

/* ================= 标准化 Header & 导航栏 CSS ================= */
header {
  background: #0f172a;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  height: 80px;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.logo {
  flex: 0 1 auto;
  display: flex;
  align-items: center;
}

.logo a {
  font-size: 20px;
  font-weight: 900;
  color: white !important;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo img {
  height: 40px;
  width: auto;
  border-radius: 4px;
}

.nav-menu {
  display: flex;
  gap: 32px;
  align-items: center;
  justify-content: center;
  flex: 1;
  margin: 0;
  padding: 0;
}

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

.nav-link {
  color: #cbd5e1 !important;
  font-weight: 600;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: 0.3s;
}

.nav-link:hover {
  color: white !important;
}

.dropdown {
  position: absolute;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: white;
  width: 240px;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  padding: 10px 0;
  border-top: 3px solid #ff6600;
}

.nav-item:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown a {
  display: block;
  padding: 12px 24px;
  color: #333333 !important;
  font-size: 14px;
  border-bottom: 1px solid #f5f5f5;
  text-align: left;
}

.dropdown a:hover {
  background: #f8fafc;
  color: #ff6600 !important;
  padding-left: 28px;
}

.nav-actions {
  flex: 0 1 auto;
  display: flex;
  justify-content: flex-end;
}

.btn-header {
  background-color: #ff6600;
  color: white !important;
  padding: 12px 24px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: 0.3s;
  box-shadow: 0 4px 14px rgba(249, 115, 22, 0.4);
}

.btn-header:hover {
  background-color: #ea580c;
  transform: translateY(-2px);
}

/* ================= 标准化 Footer CSS ================= */
footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 60px 0 0;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  gap: 60px;
  margin-bottom: 60px;
}

.footer-left {
  flex: 1;
  min-width: 300px;
}

.footer-right {
  flex: 0 0 200px;
}

.footer-logo {
  font-size: 20px;
  color: white;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.footer-desc {
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 24px;
  max-width: 100%;
}

.contact-box h5 {
  color: #64748b;
  font-size: 12px;
  text-transform: uppercase;
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.contact-box a {
  color: var(--accent);
  font-weight: 600;
  font-size: 16px;
}

.footer-links h4 {
  color: white;
  font-size: 14px;
  text-transform: uppercase;
  margin-bottom: 20px;
  letter-spacing: 1px;
}

.footer-links ul {
  padding-left: 0;
}

.footer-links ul li {
  margin-bottom: 12px;
}

.footer-links a {
  font-size: 14px;
}

.footer-links a:hover {
  color: white;
}

.copyright {
  border-top: 1px solid #1e293b;
  padding: 20px 0;
  text-align: center;
  font-size: 13px;
  background: #0b1120;
}

/* ================= 移动端 Header & 菜单适配 ================= */
/* 默认在 PC 端隐藏移动端特有的元素 */
.mobile-nav-controls,
.mobile-menu-overlay {
  display: none;
}

/* 导航断点：桌面导航最小需要约 1172px，低于 1200px 一律切换为移动版头部 */
@media (max-width: 1199px) {
  /* 强制 Header 高度与垂直居中 */
  header {
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
  }

  header .container {
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
  }

  header nav {
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
  }

  nav {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 0 15px !important;
    height: 70px;
  }

  .logo {
    flex: 1 !important;
    min-width: 0;
    display: flex !important;
    align-items: center;
    margin-right: 10px;
    height: 100% !important;
  }

  .logo a {
    font-size: 16px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  .logo img {
    height: 32px !important;
    width: auto;
  }

  /* 微调文字位置（字体自带行高可能导致视觉偏上） */
  .logo span {
    position: relative;
    top: 1px;
  }

  .mobile-nav-controls {
    display: flex !important;
    align-items: center !important;
    gap: 12px;
    height: 100%;
    flex-shrink: 0 !important;
  }

  .nav-menu,
  .nav-actions {
    display: none !important;
  }

  /* Start App 按钮 */
  .mobile-start-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    background-color: #ffa500 !important;
    color: #000 !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    text-transform: uppercase;
    text-decoration: none !important;
    padding: 6px 12px !important;
    border-radius: 4px !important;
    line-height: 1 !important;
    height: auto !important;
    white-space: nowrap !important;
    margin: 0 !important;
  }

  /* 汉堡菜单图标 */
  .hamburger-menu {
    display: flex !important;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 18px;
    cursor: pointer;
    z-index: 1002;
    margin-left: 5px;
  }

  .hamburger-menu span {
    display: block !important;
    width: 100%;
    height: 2px;
    background-color: #ffffff !important;
    border-radius: 2px;
  }

  /* 下拉菜单容器 */
  .mobile-menu-overlay {
    display: block;
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    background-color: #0f172a;
    height: 0;
    overflow: hidden;
    transition: height 0.3s ease;
    z-index: 999;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .mobile-menu-overlay.active {
    height: 100vh;
    overflow-y: auto;
  }

  .mobile-menu-list {
    list-style: none;
    padding: 20px 30px !important;
    margin: 0;
  }

  /* 一级菜单组容器（用于 blog 等多级菜单场景） */
  .mobile-menu-group {
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 10px;
  }

  /* 一级菜单标题（不可点击，仅作分类标签） */
  .mobile-group-title {
    display: block;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
  }

  /* 二级菜单列表 */
  .mobile-sub-menu {
    list-style: none;
    padding-left: 0;
  }

  .mobile-sub-menu li a {
    display: block;
    color: #ffffff !important;
    font-size: 16px;
    font-weight: 500;
    padding: 8px 0;
    text-decoration: none;
    padding-left: 10px;
    border-left: 2px solid transparent;
  }

  .mobile-sub-menu li a:hover {
    color: #ffa500 !important;
    border-left: 2px solid #ffa500;
  }

  /* 独立的一级链接 */
  .mobile-menu-item {
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 10px;
  }

  .mobile-menu-item a {
    display: block;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
  }

  /* 底部 CTA 按钮 */
  .mobile-menu-cta {
    margin-top: 30px;
    margin-bottom: 50px;
  }

  .mobile-menu-cta a {
    display: block;
    background: #ffa500;
    color: #000 !important;
    text-align: center;
    border-radius: 6px;
    padding: 12px;
    font-weight: 800;
    text-decoration: none;
  }
}
