/* ==========================================================
   Yaquan Components — Tech-Style Theme
   Glassmorphism nav, animated gradients, sci-fi hover effects
   ========================================================== */

/* ── Page Load Fade-In ──────────────────────────────────── */
.yq-fade-in {
  animation: yqFadeIn 0.6s ease-out forwards;
}

@keyframes yqFadeIn {
  0%   { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ── Glassmorphism Nav ──────────────────────────────────── */
.yq-glass {
  background: rgba(255, 255, 255, 0.88) !important;
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: none !important;
  box-shadow: 0 4px 30px rgba(10, 49, 143, 0.08);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

/* Animated gradient border at bottom of nav */
.yq-glass::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    #0A318F 20%,
    #4A90D9 50%,
    #0A318F 80%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: yqGradientSlide 3s ease-in-out infinite;
}

@keyframes yqGradientSlide {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ── Scroll Shrink ──────────────────────────────────────── */
.yq-header-scrolled {
  position: fixed !important;
  top: 0 !important;
  padding: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
  border-radius: 0 !important;
  box-shadow: 0 4px 30px rgba(10, 49, 143, 0.15) !important;
}

.yq-header-scrolled header>article {
  max-width: 1500px;
  margin: 0 auto;
  width: 96%;
}

.yq-header-scrolled h1 a {
  padding: 8px 0 !important;
  transition: padding 0.3s ease;
}

.yq-header-scrolled .menuList ul li>a {
  padding: 14px 6px !important;
  transition: padding 0.3s ease;
}

/* ── Nav Item Tech Hover ────────────────────────────────── */
.menuList ul li > a {
  position: relative;
  display: block;
  padding: 22px 8px;
  color: #0A318F;
  font-size: 14px;
  letter-spacing: 0.5px;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

.menuList ul li > a::before {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #0A318F, #4A90D9);
  transform: translateX(-50%);
  transition: width 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(74, 144, 217, 0.4);
}

.menuList ul li > a:hover::before,
.menuList ul li.on > a::before {
  width: 70%;
}

.menuList ul li > a:hover {
  color: #0A318F;
  text-shadow: 0 0 12px rgba(10, 49, 143, 0.15);
  transform: translateY(-1px);
}

.menuList ul li.on > a {
  color: #0A318F;
  text-shadow: 0 0 12px rgba(10, 49, 143, 0.12);
}

/* Remove old :after style for the underline */
.menuList ul li>a:after {
  display: none !important;
}

/* ── Tech Dropdown ──────────────────────────────────────── */
.menuList ul li dl {
  top: 64px;
  min-width: 520px;
  width: auto;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 8px 32px rgba(10, 49, 143, 0.12);
  opacity: 0;
  transform: translateY(8px) scaleY(0.96);
  transition: opacity 0.2s ease, transform 0.2s ease;
  display: block !important;
  pointer-events: none;
  transform-origin: top center;
}
.menuList ul li dl::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #0A318F, #4A90D9);
  border-radius: 0 0 8px 8px;
}

.menuList ul li:hover dl {
  opacity: 1;
  transform: translateY(0) scaleY(1);
  pointer-events: auto;
}

.menuList ul li dl dd a {
  position: relative;
  overflow: hidden;
  transition: all 0.25s ease;
}

.menuList ul li dl dd a:hover {
  color: #0A318F;
  padding-left: 8px;
  transform: translateX(2px);
}

/* ── Language Switcher Hover ────────────────────────────── */
.language a {
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
  border-radius: 4px;
  font-weight: 600;
  letter-spacing: 1px;
}

.language a:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(10, 49, 143, 0.15);
}

.language a.on {
  background: linear-gradient(135deg, #0A318F, #4A90D9) !important;
  color: #fff !important;
  box-shadow: 0 2px 12px rgba(74, 144, 217, 0.3);
}

/* ── Mobile Menu Button ─────────────────────────────────── */
.mobmenu span {
  background: linear-gradient(90deg, #0A318F, #4A90D9) !important;
  border-radius: 2px;
  height: 2px !important;
}

/* ── Footer — Modern Redesign ──────────────────────────── */
footer {
  position: relative;
  overflow: hidden;
  padding: 0 !important;
  width: 100% !important;
  background: linear-gradient(135deg, #0a1633 0%, #152a4e 40%, #1a3d66 100%) !important;
}

/* Top accent ribbon — clean gradient, no animation clutter */
.yq-footer-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg,
    #0A318F 0%,
    #3467CE 30%,
    #6BA3E8 50%,
    #3467CE 70%,
    #0A318F 100%
  );
  opacity: 0.7;
}

/* Inner container */
.yq-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px 0;
  width: calc(100% - 48px);
  box-sizing: border-box;
}

/* Grid: 3 col links + 1 col QR */
.yq-footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1.5fr 1fr 1.3fr;
  gap: 32px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Column titles */
.yq-fcol-title {
  font-size: 14px;
  font-weight: 600;
  color: #a0c8f0;
  margin: 0 0 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  position: relative;
  padding-bottom: 8px;
}

.yq-fcol-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 28px;
  height: 2px;
  background: #4A90D9;
  border-radius: 1px;
}

/* Link lists */
.yq-fcol-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
/* 超过5行换两列 */
.yq-fcol-links-grid {
  display: block;
  column-count: 2;
  column-gap: 24px;
}
.yq-fcol-links-grid a {
  break-inside: avoid;
  margin-bottom: 4px;
}

.yq-fcol-links a {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  transition: all 0.25s ease;
  line-height: 1.7;
  position: relative;
  padding-left: 0;
}

.yq-fcol-links a:hover {
  color: #fff;
  padding-left: 6px;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.15);
}

/* QR column */
.yq-fcol-qr {
  text-align: center;
}

.yq-fcol-qr .yq-fcol-title::after {
  left: 50%;
  transform: translateX(-50%);
}

.yq-fcol-qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.yq-fcol-qr-img {
  width: 100px;
  height: 100px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 10px;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.yq-fcol-qr-img:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 28px rgba(74, 144, 217, 0.3);
}

.yq-fcol-qr-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 6px;
  display: block;
}

.yq-fcol-qr-slogan {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 2px;
}

.yq-fcol-contact {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.5px;
  margin-top: 2px;
}

/* Bottom bar */
.yq-footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0 28px;
  flex-wrap: wrap;
  gap: 8px;
}

.yq-fb-copy,
.yq-fb-icp {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 0.5px;
}

.yq-fb-copy:hover,
.yq-fb-icp:hover {
  color: rgba(255, 255, 255, 0.55);
}

/* ── Responsive ────────────────────────────────────────── */
@media only screen and (max-width: 900px) {
  .yq-footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px 24px;
  }
  .yq-fcol-qr {
    grid-column: 1 / -1;
    text-align: center;
  }
  .yq-fcol-qr .yq-fcol-title::after {
    left: 50%;
    transform: translateX(-50%);
  }
}

@media only screen and (max-width: 540px) {
  .yq-footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .yq-footer-inner {
    padding: 32px 16px 0;
    width: calc(100% - 32px);
  }
  .yq-footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 4px;
  }
}

/* ── Responsive tweaks ──────────────────────────────────── */
@media only screen and (max-width: 768px) {
  .yq-glass::after {
    height: 1px;
    animation: none;
    background: linear-gradient(90deg, transparent, #4A90D9, transparent);
  }
  .yq-footer-glow {
    height: 2px;
  }
}
