/* --- CSS 变量定义 --- */
:root {
  --footer-bg: #323232;
  --footer-bg-darker: #2a2a2a;
  --footer-text-primary: #ffffff;
  --footer-text-secondary: #a8a8a8;
  --footer-border-color: #474747;
  --footer-font-family: "Microsoft Yahei", sans-serif;
}

/* --- 全局页脚样式 --- */
.site-footer {
  width: 100%;
  background-color: var(--footer-bg);
  color: var(--footer-text-secondary);
  font-family: var(--footer-font-family);
  font-size: 12px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  /* 在小屏幕上提供左右边距 */
}

/* --- 1. 顶部课程链接 --- */
.footer-courses {
  border-bottom: 1px solid var(--footer-border-color);
}

.courses-list {
  display: flex;
  justify-content: center;
  /* 水平居中 */
  align-items: center;
  flex-wrap: wrap;
  /* 在小屏幕上换行 */
  gap: 80px;
  /* 链接之间的间距 */
  list-style: none;
  padding: 0;
  margin: 0;
  height: 100px;
}

.course-link {
  display: flex;
  align-items: center;
  gap: 15px;
  /* 图标和文字的间距 */
  color: var(--footer-text-primary)!important;
  text-decoration: none;
  font-size: 18px;
  transition: color 0.3s;
}

.course-link:hover {
  color: #e0e0e0;
  /* 悬停时颜色变浅 */
}

.course-link::before {
  content: '';
  display: inline-block;
  width: 60px;
  height: 60px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* 课程图标 */
.course-link--java::before {
  background-image: url(https://www.atguigu.com/images/footer/java.png);
}

.course-link--iot::before {
  background-image: url(https://www.atguigu.com/images/footer/iot.png);
}

.course-link--ai::before {
  background-image: url(https://www.atguigu.com/images/footer/ai.png);
}

.course-link--linux::before {
  background-image: url(https://www.atguigu.com/images/footer/linux.png);
}

/* --- 2. 中部导航链接 --- */
.footer-nav {
  width: 1000px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  /* 允许换行 */
  gap: 30px;
  /* 列表之间的间距 */
  padding: 30px 0;
}

.nav-list {
  width: 130px;
  /* 固定宽度 */
  margin: 0;
  border-right: 1px solid var(--footer-border-color);
}

.nav-list:last-of-type {
  border-right: none;
}

.nav-list dt {
  font-size: 20px;
  color: var(--footer-text-primary);
  margin-bottom: 15px;
}

.nav-list dd {
  margin: 0 0 10px 0;
  line-height: 1.6;
}

.nav-list dd a {
  color: var(--footer-text-secondary);
  text-decoration: none;
  transition: color 0.3s;
}

.nav-list dd a:hover {
  color: var(--footer-text-primary);
}

.nav-list--contact {
  flex-grow: 1;
  /* 让联系我们部分占据更多空间 */
  min-width: 250px;
}

.nav-list--contact a {
  font-size: 20px;
  color: var(--footer-text-primary);
  margin-bottom: 15px;
}

.contact-address span {
  display: block;
  line-height: 1.8;
}

.nav-qr {
  text-align: center;
  padding-left: 20px;
}

.nav-qr img {
  width: 120px;
  height: 120px;
}

.nav-qr p {
  margin: 0;
  line-height: 1.5;
  font-size: 12px;
  color: var(--footer-text-primary);
}

/* --- 3. 底部版权信息 --- */
.footer-copyright {
  background-color: var(--footer-bg-darker);
  padding: 15px 0;
  font-size: 12px;
}

.copyright-content {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  /* 允许换行 */
  gap: 15px 25px;
  /* 行间距 和 列间距 */
}

.copyright-content a,
.copyright-content span {
  color: var(--footer-text-secondary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  /* 图标和文字的间距 */
}

.copyright-content a:hover {
  color: var(--footer-text-primary);
}

.copyright-content img {
  vertical-align: middle;
  height: 24px;
  /* 统一图标高度 */
  width: auto;
}

