/* Footer Styles */
.footer {
    background-color: #7C6553;
    color: #ffffff;
    padding: 40px 0 0;
    font-family: 'Arial', sans-serif;
    border-top-left-radius: 25px;
    border-top-right-radius: 25px;
    overflow: hidden;
    position: relative; /* 参与层叠上下文，才能应用 z-index */
    z-index: 4000;      /* 高于 .ground(900) 和场景导航(2000) */
}

.footer-container {
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    gap: 40px; /* 设置section之间的间隔 */
}

.footer-section {
    flex: 1;
    margin: 0; 
    width: 300px;
}

.footer-title {
    font-size: 24px;
    margin-bottom: 20px;
    position: relative;
    font-weight: bold;
    text-align: left;
}

.footer-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -10px;
    width: 70px;
    height: 3px;
    background-color: #E4F3BA;
}

.footer-about-text {
    color: #fff5f5;
    line-height: 1.6;
    margin-top: 20px;
    text-align: left;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin-top: 20px;
    text-align: left;
}

.footer-links li {
    margin-bottom: 15px !important; /* 强制应用间隔 */
    text-align: left;
}

.footer-links a {
    color: #aaaaaa;
    text-decoration: none;
    transition: color 0.3s ease;
    text-align: left;
}

.footer-links a:hover {
    color: #ffffff;
}

.footer-contact-info {
    margin-top: 20px;
    text-align: left;
}

.footer-contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    color: #fff;
    text-align: left;
}

.footer-icon {
    margin-right: 10px;
    font-size: 20px;
}

.footer-social {
    display: flex;
    margin-top: 10px;
}

.footer-social-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background-color: #333;
    border-radius: 3px;
    margin-right: 10px;
    margin-bottom: 10px;
    transition: background-color 0.3s ease;
}

.footer-social-icon:hover {
    background-color: #fff;
}

.footer-social-icon a {
    color: #ffffff;
    font-size: 18px;
}

.footer-social-icon {
  padding: 0.5rem;
  background-color: #333;
  position: relative;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  border-radius: 5px;
  box-shadow: 0 5px 15px 0 rgba(0, 0, 0, 0.1);
  transition: width 0.5s ease;
  width: 50px;
  height: 50px;
  cursor: pointer;
}

.footer-social-icon:hover {
  width: 160px;
  background-color: #9c4040; /* Changed hover color */
}

.footer-social-icon a {
  display: flex;
  align-items: center;
  color: white;
  text-decoration: none;
  width: 100%;
}

.footer-social-icon svg {
  min-width: 24px;
  height: 24px;
}

.footer-social-text {
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.7s ease;
  font-size: 13px;
  margin-left: 10px;
  font-weight: bold;
}

.footer-social-icon:hover .footer-social-text {
  opacity: 1;
  transform: translateX(0);
}


.footer-bottom {
    background-color: #6b5841;
    padding: 15px 0;
    text-align: center; /* 保持版权信息居中 */
    color: #aaaaaa;
    font-size: 14px;
    border-top: none; /* 删除边框 */
}

.footer-bottom a {
    color: #aaaaaa;
    text-decoration: none;
}

.footer-bottom a:hover {
    color: #ffffff;
}

/* 修改分割线样式，使其变短且粗一些 */
.footer-divider {
    width: 2px;
    height: 200px; /* 设置分割线高度为 200px */
    background-color: #fff; /* 设置分割线颜色 */
    margin: 20px auto; /* 设置分割线居中并添加上下间距 */
    opacity: 0.5; /* 设置分割线透明度 */
}

/* Team logo + team name (side-by-side) */

.footer-teamlogo,
.footer-teamname {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    height: 150px;
    width: auto;
}

.footer-teamlogo { margin-right: 12px; }

.footer-teamlogo img {
    height: 100px; /* keep consistent height */
    width: auto;
    display: block;
}

.footer-teamname img {
    height: 60px; /* keep consistent height */
    width: auto;
    display: block;
}

@media (max-width: 768px) {
    .footer-teamlogo img,
    .footer-teamname img {
        height: 36px;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
    }
    
    .footer-section {
        margin-bottom: 30px;
    }
}

/* QR Code Popup */
.qr-code-container {
    position: relative;
}

.qr-code-popup {
    position: absolute;
    bottom: 110%; /* Position it above the icon */
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 150px;
    padding: 5px;
    background-color: #fff;
    border: 2px solid #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-align: center;
    color: #333;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    z-index: 1000000;
}

.qr-code-popup img {
    display: block;
    margin: 0 auto 5px;
}

.qr-code-popup p {
    margin: 0;
    font-size: 12px;
    font-weight: bold;
}

.qr-code-container:hover .qr-code-popup {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(-10px); /* Add a slight upward movement */
}

/* Arrow for the popup */
.qr-code-popup::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 8px 12px 0 12px;
    border-style: solid;
    border-color: #fff transparent transparent transparent;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
    }
    
    .footer-section {
        margin-bottom: 30px;
    }
}