/* ============================================================
   footer.css — Footer override & optimization
   Overrides main.css footer styles for better spacing and
   readability, matching the reference design.
   ============================================================ */

/* ---- Footer container ---- */
.footer .container {
  max-width: 1800px;
  padding-left: clamp(32px, 4vw, 80px);
  padding-right: clamp(32px, 4vw, 80px);
}

/* ---- Footer inner grid: brand (fixed) + nav (flex remainder) ---- */
.footer-inner {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: clamp(32px, 4vw, 64px);
  padding-top: 72px;
  padding-bottom: 64px;
  /* 防止内容溢出容器边框 */
  overflow: hidden;
}

/* ---- Brand description ---- */
.footer-desc {
  font-size: 13.5px;
  line-height: 1.9;
  max-width: 260px;
  color: rgba(255, 255, 255, 0.62);
  /* 俄文长词允许换行 */
  word-break: normal;
  overflow-wrap: break-word;
  hyphens: auto;
  -webkit-hyphens: auto;
}

/* ---- Social icons ---- */
.footer-social,
.social-icons {
  gap: 14px;
  margin-top: 20px;
}

/* ---- Nav grid: 6 columns
   关键修正：使用 minmax(0, 1fr) 让每列等分可用空间，
   不再使用固定 minmax(px, px)，彻底防止溢出 ---- */
.footer-nav {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0 clamp(12px, 1.6vw, 32px);
  align-items: start;
  /* 防止子列撑破容器 */
  min-width: 0;
  overflow: hidden;
}

/* ---- Column base ---- */
.footer-col {
  padding: 0;
  /* 每列不得超出自身 grid 单元格 */
  min-width: 0;
  overflow: hidden;
}

/* ---- Column heading: separator line ---- */
.footer-col h4 {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.97);
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  /* 俄文标题允许换行，不溢出 */
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
  hyphens: auto;
  -webkit-hyphens: auto;
  line-height: 1.35;
  gap: 8px;
}

/* ---- Link list ---- */
.footer-col ul {
  gap: 12px;
}

/* ---- Links ---- */
.footer-col a {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.58);
  line-height: 1.55;
  /* 俄文链接文字允许换行，不截断 */
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
  hyphens: auto;
  -webkit-hyphens: auto;
  transition: color 0.2s ease;
  display: block;
}

.footer-col a:hover {
  color: rgba(255, 255, 255, 0.95);
}

/* ---- List items ---- */
.footer-col li {
  white-space: normal;
  line-height: 1.55;
  min-width: 0;
}

/* ---- Contact Us column: card style with border ---- */
.footer-contact {
  min-width: 0;
}

.footer-contact ul {
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 14px 14px;
  gap: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.footer-contact li {
  white-space: normal;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.65;
  min-width: 0;
}

.footer-contact li a {
  white-space: normal;
  line-height: 1.65;
  font-size: 13px;
  overflow-wrap: break-word;
  word-break: break-all;
}

.footer-contact .contact-icon {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.5);
  flex-shrink: 0;
}

.footer-contact .contact-icon svg {
  width: 14px;
  height: 14px;
}

.footer-contact .contact-text {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.62);
  /* 不限制 max-width，让 grid 单元格自然约束 */
  max-width: 100%;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: break-word;
  line-height: 1.65;
  min-width: 0;
}

.footer-contact .contact-text a {
  color: rgba(255, 255, 255, 0.62);
  word-break: break-all;
}

.footer-contact li:hover .contact-text,
.footer-contact li:hover .contact-text a {
  color: rgba(255, 255, 255, 0.97);
}

/* ---- Footer bottom bar ---- */
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px 0;
}

.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-bottom span,
.footer-bottom p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.42);
}

.footer-bottom p a {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.42);
}

.footer-bottom p a:hover {
  color: rgba(255, 255, 255, 0.8);
}

.footer-links {
  gap: 28px;
}

.footer-links a {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.42);
}

.footer-links a:hover {
  color: rgba(255, 255, 255, 0.8);
}

/* ============================================================
   RESPONSIVE OVERRIDES
   ============================================================ */

/* 1400px+: 适当放宽列间距 */
@media (min-width: 1400px) {
  .footer-inner {
    grid-template-columns: 280px 1fr;
    gap: clamp(40px, 5vw, 72px);
  }
  .footer-nav {
    gap: 0 clamp(16px, 2vw, 40px);
  }
}

/* 1200px–1399px */
@media (max-width: 1399px) {
  .footer-inner {
    grid-template-columns: 240px 1fr;
    gap: 32px;
  }
  .footer-nav {
    gap: 0 clamp(10px, 1.4vw, 24px);
  }
  .footer-col h4 {
    font-size: 13.5px;
  }
  .footer-col a {
    font-size: 12.5px;
  }
}

/* 1100px–1199px: 降为 3 列 */
@media (max-width: 1199px) {
  .footer-inner {
    grid-template-columns: 220px 1fr;
    gap: 28px;
  }
  .footer-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px 24px;
  }
}

/* 900px–1099px */
@media (max-width: 1099px) {
  .footer-inner {
    grid-template-columns: 200px 1fr;
    gap: 24px;
  }
  .footer-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px 20px;
  }
}

/* Below 900px: brand 上方，nav 下方 */
@media (max-width: 899px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-top: 44px;
    padding-bottom: 36px;
  }
  .footer-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px 20px;
  }
  .footer-desc {
    max-width: 100%;
  }
}

/* Mobile: 2 列 */
@media (max-width: 599px) {
  .footer-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 16px;
  }
  .footer .container {
    padding-left: 20px;
    padding-right: 20px;
  }
}

/* Very small: 单列 */
@media (max-width: 399px) {
  .footer-nav {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}
