

/* ========== 0. 基础与重置（Base & Reset）============================
   作用：统一默认外观，去除浏览器差异；设置全站主字体颜色
   ================================================================== */
html, body {
  margin: 0;
  padding: 0;
  /* 禁止横向滚动，避免内容超出导致的水平滚动条 */
  overflow-x: hidden;
}

body {
  /* 全站主文字色，与你 logo 的配色一致 */
  color: #424961;
  /* 让内容不被固定导航栏遮住：实际高度通过 JS 动态设置更准确。
     若未使用 JS，可先给一个保守值（例如 120px）。 */
  padding-top: 120px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}


/* ========== 1. 头部导航（Header / Navigation）======================
   作用：站点顶部固定导航栏、Logo、导航链接基础外观
   页面：全部页面
   ================================================================== */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #f1f1f1;
  padding: 10px 200px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
}

/* 左侧 Logo 容器（图片 + 文字） */
.header-logo {
  display: flex;
  align-items: center;
}

/* Logo 图片尺寸（桌面端）*/
.header-logo img {
  height: 100px;
}

/* 桌面端的品牌文字（有的页面用 .logo-text，有的直接 span） */
.logo-text {               /* index.html 使用 */
  display: flex;
  flex-direction: column;
  align-items: flex-start;   /* ✅ 新增，保证中文和英文左对齐 */
  margin-left: 30px;
  line-height: 1.2;
}


.logo-text .sub-text {
  font-size: 20px;
  color: #424961;
}

/* 其它页面使用的文字版本：.header-logo 下的 span */
.header-logo span {
  margin-left: 30px;
  font-size: 36px;
  font-weight: bold;
  color: #424961;
}

.logo-text span {
  margin-left: 0;            /* 覆盖通用规则，保证与英文左对齐 */
  font-size: 36px;
  font-weight: bold;
  color: #424961;
}



/* 顶部导航链接横向布局（桌面端） */
.nav-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  font-size: 20px;
  font-weight: bold;
}
.nav-links li { margin-left: 20px; }
.nav-links a {
  text-decoration: none;
  color: #424961;
}
.nav-links a:hover {
  color: #5E1214;   /* 悬停高亮 */
}

/* 汉堡按钮（仅在移动端显示，见媒体查询） */
.menu-toggle {
  display: none;
  font-size: 28px;
  cursor: pointer;
  user-select: none;
}

/* ========== 2. 响应式导航（Mobile Menu）===========================
   作用：在宽度较小时把导航改为折叠菜单；汉堡按钮出现
   页面：全部页面
   触发：屏幕宽度 <= 1200px
   ================================================================== */

    /* ======= 移动端响应式 ======= */
    @media (max-width: 1200px) {   
      .header {
            /* 改动1：把右侧 padding 去掉，只保留左边 */
        padding: 10px 0 10px 20px;
      }

      .header-logo img {
        height: 60px;
      }

      .logo-text {
        margin-left: 10px;
      }

      .logo-text span {
        font-size: 20px;
      }

      .logo-text .sub-text {
        font-size: 12px;
      }

      .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        right: 0;                           /* 改动2：保持 right:0，去掉 -20px */
        width: 220px;
        background: #f1f1f1;
        border-radius: 0 0 8px 8px;
        box-shadow: 0 6px 12px rgba(0,0,0,0.15);
        overflow-y: auto;                /* ✅ 改为可滚动 */
        max-height: 90vh;                /* ✅ 不写死 600px，改成屏幕 90% */
        -webkit-overflow-scrolling: touch;
        transition: max-height 0.3s ease;
        z-index: 1001;                      /* 改动3：提高层级，确保浮在内容之上 */
        padding-bottom: env(safe-area-inset-bottom); /* ✅ 兼容 iPhone 底部 */
      }

      .nav-links.show {
        display: flex;
      }

      .nav-links li {
        text-align: left;
        padding: 6px 20px;               /* ✅ 原来 12px 18px → 压缩 */
        border-bottom: 1px solid #ddd;
      }

      .nav-links a {
        font-size: 20px;                 /* ✅ 原来默认较大，缩小一点 */
        line-height: 1.2;                /* ✅ 让栏位更矮 */
        color: #424961;
        text-decoration: none;
        display: block;
      }

      .menu-toggle {
        display: block;
        font-size: 32px;
        cursor: pointer;
        margin-left: auto;
        margin-right: 15px;
      }
    }









/* ========== 3. 版心与常用区块（Containers / Sections）============
   作用：控制内容区常见宽度与标题风格；统一留白与风格
   页面：program / edu* / mig / studytour / index 等
   ================================================================== */

/* 常规内容容器（正文段落） */
.content {
  width: 60%;
  margin: 20px auto;
  line-height: 1.6;
}
/* 首页有更宽的场景，这里提供一个 80% 的工具类（可选用） */
.container-80 { max-width: 80%; margin: 0 auto; }
.container-60 { max-width: 60%; margin: 0 auto; }

/* 通用标题区块：左侧竖线 + 标题（和你页面里的 service-title 一致） */
.service-title {
  width: 60%;       /* 首页默认更宽；其它页若需 60% 可配合 .container-60 使用 */
  margin: 50px auto 20px;
}
.service-title h1 {
  font-size: 32px;
  color: #333;
  font-weight: bold;
  position: relative;
  padding-left: 12px;   /* 给左侧竖线留位置 */
}
.service-title h1::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background-color: #424961;
  border-radius: 2px;
}

/* 全宽横幅图（首页顶部大图） */
.full-width-image {
  width: 100%;
  height: auto;
  display: block;
}


/* ========== 4. 首页服务卡片（Home Cards / Sections）===============
   作用：index.html 中的三列卡片区、微信区统一外观
   页面：index.html（可被其它页面复用）
   ================================================================== */
.service-section {
  display: flex;
  max-width: 60%;
  justify-content: space-between;
  align-items: stretch;
  padding: 30px;
  margin: 20px auto;
  background-color: #f1f1f1;
  gap: 40px;
}
.service {
  display: flex;
  flex-direction: column;   /* 图片在上，文字在下 */
  text-decoration: none;
  color: inherit;
  border-radius: 10px;
  transition: background-color 0.3s ease-in-out;
  flex: 1;
  box-sizing: border-box;
  background: transparent;
}
.service:hover {
  background-color: #e0f7ff;   /* 悬停高亮 */
}
.service img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 5px;
  margin-bottom: 10px;
}
/* 微信区的图片保持原尺寸展示 */
.service-section.wechat-section img {
  width: auto;
  height: auto;
  max-width: 100%;
  object-fit: contain;
}


/* 微信板块新文章 */
.new-tag {
  background-color: rgb(248, 5, 5);
  color: white;
  font-size: 10px;
  font-weight: bold;
  padding: 2px 4px;
  border-radius: 4px;
  margin-right: 5px;
}

.service h3 { font-weight: normal; }

/* 小屏改为纵向堆叠 */
@media (max-width: 600px) {
  .service-section { flex-direction: column; }
}




/* ========== 4. Contactme 联系信息卡片===============
   作用：index.html 中的三列卡片区、微信区统一外观
   页面：contactme
   ================================================================== */


/* Contactme 页面卡片样式 */
.contactme-page .service {
  background: #f9f9f9;
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s ease-in-out;
}

/* 图片保持居中 */
.contactme-page .service img {
  width: 80px;
  height: auto;
  margin: 0 auto 10px; /* 图片水平居中 */
  display: block;
}

/* 标题居中 */
.contactme-page .service h3 {
  text-align: center;
  color: #424961;
  font-weight: bold;   /* 加粗文字 */
  margin-bottom: 15px;
}

/* 文字内容靠左 */
.contactme-page .service p {
  text-align: left;
  margin: 5px 0;
}




/* ========== 5. 提示/文章列表（Tips List）===========================
   作用：首页“澳华留学Tips/福利/快讯”的卡片与链接列表样式
   页面：index.html（可被其它页面复用）
   ================================================================== */
.tips-container {
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 20px;
  margin: 20px auto;
  width: 80%;
  max-width: 800px;
}
.tips-container h2 {
  font-size: 24px;
  border-bottom: 1px solid #ddd;
  padding-bottom: 10px;
  margin-bottom: 0;
}
.tips-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}
.tips-list li {
  padding: 10px 0;
  border-top: 1px solid #ddd;
}
.tips-list li:first-child { border-top: none; }
.tips-list a {
  text-decoration: none;
  color: #007bff;
}
.tips-list a:hover { text-decoration: underline; }


/* ========== 6. Study Tour 幻灯片（Slideshows / Galleries）=====================
   作用：studytour.html 中多组图片轮播的统一样式
   页面：studytour.html（可被其它页面复用）
   ================================================================== */
/* 幻灯片容器（宽度与标题区一致：60%） */
.slideshow-container {
  width: 60%;
  position: relative;
  margin: auto;
}

.mySlides { display: none; width: 100%; }

/* ✅ 新增：首张/当前激活的幻灯片显示 */
.mySlides.active {
  display: block;
}



.mySlides img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 覆盖在图片上的半透明描述条 */
.image-caption {
  position: absolute;
  bottom: 25px;      /* 避开下方圆点指示器 */
  left: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  padding: 10px;
  text-align: left;
  box-sizing: border-box;
}

/* 左右箭头按钮 */
.prev, .next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: auto;
  padding: 16px;
  margin-top: -22px;
  color: white;
  font-weight: bold;
  font-size: 18px;
  transition: 0.6s ease;
  user-select: none;
  background-color: rgba(0,0,0,0.8);
  border-radius: 3px;
}
.prev { left: 0; }
.next { right: 0; }

/* 圆点指示器 */
.dot-container { text-align: center; }
.dot {
  cursor: pointer;
  height: 15px;
  width: 15px;
  margin: 0 2px;
  background-color: #bbb;
  border-radius: 50%;
  display: inline-block;
  transition: background-color 0.6s ease;
}
.dot:hover { background-color: #717171; }


/* ==== 移动端放大幻灯片 & 优化显示 ==== */
@media (max-width: 1200px) {
  /* 平板/小屏桌面：先放宽到 80% */
  .slideshow-container { width: 80%; }
}

@media (max-width: 900px) {
  /* 手机横竖屏：基本占满屏幕 */
  .slideshow-container { width: 85%; }

  /* 图片按宽度自适应高度，避免被压缩变形 */
  .mySlides img { height: auto; }
  
  /* 增大左右箭头的触控面积 */
  .prev, .next { font-size: 22px; padding: 14px; }

  /* 文案条在小屏更紧凑 */
  .image-caption { bottom: 12px; font-size: 14px; padding: 8px; }

  /* 圆点稍微变小，避免换行 */
  .dot { width: 10px; height: 10px; margin: 0 3px; }
}

@media (max-width: 600px) {
  /* 超小屏进一步占满 */
  .slideshow-container { width: 95%; }
}



/* ========== 7. 页脚（Footer）======================================
   作用：在移动端把 footer 的三列改成竖排（你的 footer 目前是内联样式，
         这里提供补丁式选择器，尽量不改你现有 HTML 也能生效）
   页面：全部页面
   ================================================================== */
footer {
  background-color: #f1f1f1;
  color: #424961;
  padding: 40px 80px;
  font-size: 14px;
}
footer a { color: #424961; text-decoration: none; }
footer a:hover { color: #5E1214;   /* 悬停高亮 */ }



/* 三列容器与列 */
.footer-container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
}
.footer-column { flex: 1; min-width: 200px; }
.footer-column h3 { color: #424961; margin-bottom: 10px; }
.footer-column img {
  width: 120px;
  height: auto;
  border: 1px solid #ccc;
  margin-top: 5px;
}
.footer-column p.note {
  font-size: 12px;
  color: #888;
}

/* 版权条 */
.footer-bottom {
  text-align: center;
  margin-top: 40px;
  border-top: 1px solid #ccc;
  padding-top: 20px;
}

/* 返回顶部按钮 */
.back-to-top {
  position: fixed;
  bottom: 40px;
  right: 30px;
  background-color: #424961;
  color: #fff;
  padding: 10px 15px;
  border-radius: 50%;
  font-size: 20px;
  text-align: center;
  text-decoration: none;
  text-decoration: none;   /* ✅ 禁止下划线 */
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  z-index: 1000;
  transition: background-color 0.3s ease;
}

/* 鼠标悬停时：背景变深 */
.back-to-top:hover {
  background-color:#5E1214;
  color: #fff;
  text-decoration: none;
}



/* 移动端排版：三列改竖排 */
@media (max-width: 768px) {
  .footer-container { flex-direction: column; align-items: flex-start; }
  .footer-column { margin-bottom: 30px; }
}



/* ========== 8. 工具类（Utilities，可选）===========================
   作用：一些常用的辅助类，按需使用
   ================================================================== */
/* 居中对齐容器 */
.center { margin-left: auto; margin-right: auto; }
/* 文本颜色快捷 */
.text-primary { color: #5E1214; }
.text-muted  { color: #888; }
/* 间距工具 */
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.p-20  { padding: 20px; }
.rounded { border-radius: 8px; }
.shadow-sm { box-shadow: 0 2px 5px rgba(0,0,0,0.1); }


/* ========== 9. 关于我们页（About Us 专用样式）====================== */
/* 简介区：左图右文 */
.aboutus-intro .intro-container {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  align-items: center;
  width: 100%;   /* 原来是 max-width:60%，改成 100% */
  margin: 0 auto;
}
.aboutus-intro .intro-image img {
  max-width: 300px;
  border-radius: 8px;
}
.aboutus-intro .intro-text {
  flex: 1;
  font-size: 18px;
  line-height: 1.8;
}

/* ========== 时间线（About Us History） ================= */
.timeline {
  border-left: 3px solid #424961;
  margin-left: 80px;
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
}

.timeline-year {
  position: absolute;
  left: -90px;  /* 控制年份距离竖线的位置 */
  top: 0;
  font-size: 30px;
  font-weight: bold;
  color: #5E1214;
  background: #fff;    /* 白底遮住竖线 */
  padding: 2px 5px;    /* 给年份加点内边距 */
}

.timeline-content {
  background: #f9f9f9;
  padding: 15px;
  border-radius: 8px;
}

.timeline-content img {
  max-width: 100%;
  margin-top: 10px;
  border-radius: 6px;
}



/* ==== Fix: Aohua History 在窄屏右侧被遮挡 ==== */
@media (max-width: 1200px) {
  /* 中等屏：让正文更宽一点，避免内容拥挤 */
  .content,
  .service-title {
    width: 80%;
  }
}

@media (max-width: 900px) {
  /* 小屏：时间线不再向右位移，避免整体超出视口 */
  .aboutus-history .timeline {
    margin-left: 0;        /* 原来是 80px，去掉以防超出 */
    padding-left: 16px;    /* 给竖线和内容留一点内边距 */
  }

  /* 年份已在你现有 CSS 里变为 static，这里顺手调小字号行高 */
  .aboutus-history .timeline-year {
    font-size: 22px;
    line-height: 1.2;
    margin-bottom: 6px;    /* 与内容卡片留出间距 */
  }

  /* 内容卡片在小屏占满可用宽度 */
  .aboutus-history .timeline-content {
    width: 100%;
    box-sizing: border-box;
  }
}

/* 超小屏再放宽正文，保证不被裁切 */
@media (max-width: 600px) {
  .content,
  .service-title {
    width: 94% !important;
  }
}




/* 成就卡片 */
.aboutus-achievements .achievements-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 20px;
  width: 100%;   /* 原来是 max-width:60%，改成 100% */
  margin: 0 auto 40px;
}
.aboutus-achievements .achievement-card {
  flex: 1 1 150px;
  background: #f7f7f7;
  text-align: center;
  padding: 25px 20px;
  border-radius: 8px;
}
.aboutus-achievements .achievement-icon {
  width: 80px;
  height: 80px;
  margin-bottom: 12px;
}
.aboutus-achievements .achievement-card h3 {
  font-size: 28px;
  color: #5E1214;
  margin-bottom: 5px;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .aboutus-intro .intro-container,
  .aboutus-history .timeline,
  .aboutus-achievements .achievements-grid {
    width: 100%;    /* 同样保持占满 .content */
    max-width: none;
  }
  .aboutus-history .timeline-year {
    position: static;
    margin-bottom: 8px;
  }
}

/* 移动端适配：全站 content 和 service-title 放宽到 90% */
@media (max-width: 768px) {
  .content,
  .service-title {
    width: 90% !important;
  }
}

.content h1, .content h2, .content h3, .content h4 {
    color: #5E1214;
}

/* 让带 id 的标题在锚点定位时预留出顶部固定导航的高度 */
:root {
  --anchor-offset: 130px;  /* 根据你的导航真实高度微调：120~160px 之间试试 */
}

/* 全站通用：凡是有 id 的标题，都在滚动定位时往下错开一点 */
:where(h1,h2,h3,h4,h5,h6)[id] {
  scroll-margin-top: var(--anchor-offset);
}


/* ========== edu 页面正文链接样式 ========== */
.content a {
  color: #424961;    /* 默认和正文文字同色 */
  text-decoration: none;    /* 去掉下划线 */
}

.content a:hover {
  color: #5E1214;   /* 鼠标悬停时高亮 */
  text-decoration: underline;  /* 悬停时加下划线 */
}


/* ======== mig 页面：签证双列表格（硬边框） ======== */
.aohua-visa-two-col {
  width: 100%;
  margin: 20px auto 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;   /* 两列并排 */
  gap: 12px;
}

.aohua-visa-hard {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
  background: #fff;
}

.aohua-visa-hard th,
.aohua-visa-hard td {
  border: 1px solid #333;    /* 硬边框 */
  padding: 8px 10px;
  line-height: 1.5;
  color: #424961;
}

.aohua-visa-hard .group {
  width: 140px;     /* 左侧“类别”列 */
  text-align: center;
  font-weight: 600;
  background: #f8f8f8;
  vertical-align: middle;     /* 跨行时垂直居中 */
}

/* 链接风格与 edu.html 一致：默认同色，悬停高亮 */
.aohua-visa-hard td a {
  color: inherit;
  text-decoration: none;
}
.aohua-visa-hard td a:hover {
  color: #5E1214;
  text-decoration: underline;
  font-weight: 600;
}

/* 移动端改为单列 */
@media (max-width: 900px) {
  .aohua-visa-two-col { width: 90%; grid-template-columns: 1fr; }
}











