/**
 * Footer Component System
 * Complete footer rebuild with modern design
 *
 * @package Quhe_Theme
 * @since 1.0.0
 */

/* ==========================================================================
   Footer Main Container
   ========================================================================== */

.quhe-section-footer {
  background-color: var(--color-footer-bg);
  color: var(--text-white);
  margin-top: var(--spacing-2xl);
  position: relative;
  overflow: hidden;
}

.quhe-footer-background {
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   Footer Top Section
   ========================================================================== */

.quhe-footer-top {
  padding: var(--spacing-2xl) 0;
  border-bottom: var(--border-width) solid rgba(255, 255, 255, 0.1);
}

.quhe-footer-top-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-xl);
}

/* ==========================================================================
   Footer Widgets
   ========================================================================== */

.quhe-footer-widget {
  position: relative;
}

.quhe-footer-widget-title {
  font-size: 26px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-white);
  margin-bottom: var(--spacing-md);
  position: relative;
  padding-bottom: var(--spacing-sm);
}

/* ==========================================================================
   Footer About Widget
   ========================================================================== */

.quhe-footer-widget-about {
  max-width: 400px;
}

.quhe-footer-brand {
  margin-bottom: var(--spacing-md);
}

.quhe-footer-logo-link {
  display: inline-block;
  text-decoration: none;
}

.quhe-footer-site-title {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--text-white);
  transition: color var(--transition-base);
}

.quhe-footer-logo-link:hover .quhe-footer-site-title {
  color: var(--color-accent);
}

.quhe-footer-brand .custom-logo {
  max-height: 80px !important;
  width: auto !important;
  height: auto !important;
  display: block !important;
  object-fit: contain !important;
}

.quhe-footer-about-text {
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.8;
  margin: 0;
}

/* ==========================================================================
   Footer Navigation Widgets
   ========================================================================== */

.quhe-footer-row-mobile {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-xl);
}

.quhe-footer-nav {
  margin-bottom: var(--spacing-md);
}

.quhe-footer-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.quhe-footer-menu li {
  position: relative;
  padding-left: 0;
}

.quhe-footer-menu a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 20px;
  font-weight: 400;
  line-height: 1.4em;
  text-align: left;
  transition: all var(--transition-base);
  display: inline-block;
  position: relative;
}

.quhe-footer-menu a:hover,
.quhe-footer-menu a:focus {
  color: rgba(255, 255, 255, 1);
}

.quhe-footer-menu a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #ffffff;
  transition: width var(--transition-base);
}

.quhe-footer-menu a:hover::after,
.quhe-footer-menu a:focus::after {
  width: 100%;
}

/* ==========================================================================
   Footer Contact Widget
   ========================================================================== */

.quhe-footer-contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.quhe-footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-sm);
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
}

.quhe-footer-contact-item .quhe-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 0.2rem;
  fill: var(--color-accent);
}

.quhe-footer-contact-item address {
  font-style: normal;
  margin: 0;
}

.quhe-footer-contact-item a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all var(--transition-base);
  display: inline-block;
  position: relative;
}

.quhe-footer-contact-item a:hover,
.quhe-footer-contact-item a:focus {
  color: rgba(255, 255, 255, 1);
}

.quhe-footer-contact-item a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #ffffff;
  transition: width var(--transition-base);
}

.quhe-footer-contact-item a:hover::after,
.quhe-footer-contact-item a:focus::after {
  width: 100%;
}

/* ==========================================================================
   Footer Bottom Section
   ========================================================================== */

.quhe-footer-bottom {
  padding: var(--spacing-sm) 0;
  background-color: rgba(0, 0, 0, 0.2);
}

.quhe-footer-bottom-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--spacing-md);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.quhe-footer-copyright,
.quhe-icp-number {
  margin: 0;
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.6;
  flex-shrink: 0;
}

.quhe-footer-copyright a,
.quhe-icp-number a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: color var(--transition-base);
}

.quhe-footer-copyright a:hover,
.quhe-icp-number a:hover {
  color: var(--color-accent);
}

/* ==========================================================================
   Back to Top Button
   ========================================================================== */

.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background-color: var(--color-primary);
  color: var(--text-white);
  border: none;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--transition-smooth);
  z-index: 999;
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover,
.back-to-top:focus {
  background-color: var(--color-primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.back-to-top:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.back-to-top svg {
  width: 24px;
  height: 24px;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

/* Desktop - Large screens (≥1200px) */
@media (min-width: 1200px) {
  .quhe-footer-top-content {
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
  }

  .quhe-footer-row-mobile {
    display: contents;
  }
}

/* Tablet - Medium screens (769px - 1199px) */
@media (min-width: 769px) and (max-width: 1199px) {
  .quhe-footer-top-content {
    grid-template-columns: 1fr 1fr;
  }

  .quhe-footer-row-mobile {
    grid-column: span 2;
  }
}

/* Mobile - Small screens (≤768px) */
@media (max-width: 768px) {
  .quhe-section-footer {
    margin-top: var(--spacing-xl);
  }

  .quhe-footer-top {
    padding: var(--spacing-xl) 0;
  }

  .quhe-footer-top-content {
    gap: var(--spacing-lg);
  }

  .quhe-footer-widget-about {
    max-width: 100%;
  }

  .quhe-footer-row-mobile {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }


  .quhe-footer-bottom-content {
    flex-direction: column;
    text-align: center;
  }

  .back-to-top {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
  }

  .back-to-top svg {
    width: 20px;
    height: 20px;
  }
}

/* Extra small devices (≤480px) */
@media (max-width: 480px) {
  .quhe-footer-top {
    padding: var(--spacing-lg) 0;
  }

  .back-to-top {
    bottom: 1rem;
    right: 1rem;
  }
}

/* ==========================================================================
   Dark Mode Support (Optional)
   ========================================================================== */

@media (prefers-color-scheme: dark) {
  /* Already dark by default, but you can add variations if needed */
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {

  .quhe-section-footer,
  .back-to-top {
    display: none;
  }
}

/* ==========================================================================
   Social Media Section Overrides
   ========================================================================== */

.quhe-footer-social-links .naibabiji-gch-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  justify-content: flex-start;
  margin: 0;
  padding: 0;
  list-style: none;
}

.quhe-footer-social-links .naibabiji-gch-item {
  margin: 0;
  transition: all 0.3s ease;
}

.quhe-footer-social-links .naibabiji-gch-link {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: 0;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-family: var(--font-chinese);
  font-size: 14px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.quhe-footer-social-links .naibabiji-gch-link:hover {
  color: var(--color-accent);
  background-color: rgba(14, 165, 233, 0.1);
  transform: translateY(-2px);
}

.quhe-footer-social-links .naibabiji-gch-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  transition: all 0.3s ease;
}

.quhe-footer-social-links .naibabiji-gch-icon {
  color: unset;
}

.quhe-footer-social-links .naibabiji-gch-link:hover .naibabiji-gch-icon svg {
  transform: scale(1.2);
}

.quhe-footer-social-links .naibabiji-gch-label {
  font-weight: 500;
}