/**
 * Footer Styles
 * Site footer, footer widgets, and copyright
 */

/* Site Footer */
.hvn-theme-site-footer {
  background: var(--hvn-theme-footer-bg);
  color: var(--hvn-theme-footer-color);
  margin-top: var(--hvn-theme-space-4xl);
  padding: var(--hvn-theme-space-3xl) 0 var(--hvn-theme-space-xl);
}

/* Footer Widgets Area */
.hvn-theme-footer-widgets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--hvn-theme-space-2xl);
  margin-bottom: var(--hvn-theme-space-2xl);
  padding-bottom: var(--hvn-theme-space-2xl);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Footer Widget */
.hvn-theme-footer-widget {
  margin-bottom: var(--hvn-theme-space-lg);
}

.hvn-theme-footer-widget:last-child {
  margin-bottom: 0;
}

/* Footer Widget Title */
.hvn-theme-footer-widget-title {
  color: var(--hvn-theme-color-white);
  font-size: var(--hvn-theme-font-size-lg);
  font-weight: var(--hvn-theme-font-weight-semibold);
  margin-bottom: var(--hvn-theme-space-lg);
  padding-bottom: var(--hvn-theme-space-sm);
  position: relative;
}

.hvn-theme-footer-widget-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--hvn-theme-brand-primary);
}

/* Footer Widget Content */
.hvn-theme-footer-widget ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hvn-theme-footer-widget li {
  margin-bottom: var(--hvn-theme-space-sm);
}

.hvn-theme-footer-widget a {
  color: var(--hvn-theme-footer-link-color);
  text-decoration: none;
  transition: color var(--hvn-theme-transition-fast);
}

.hvn-theme-footer-widget a:hover,
.hvn-theme-footer-widget a:focus {
  color: var(--hvn-theme-footer-link-hover);
}

/* Footer Widget - Recent Posts */
.hvn-theme-footer-widget .recent-posts li {
  display: flex;
  gap: var(--hvn-theme-space-md);
  margin-bottom: var(--hvn-theme-space-md);
}

.hvn-theme-footer-widget .recent-posts .post-title {
  font-size: var(--hvn-theme-font-size-sm);
  line-height: 1.4;
}

/* Footer Widget - Tags Cloud */
.hvn-theme-footer-widget .tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: var(--hvn-theme-space-sm);
}

.hvn-theme-footer-widget .tag-cloud a {
  display: inline-block;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.25rem 0.75rem;
  border-radius: var(--hvn-theme-border-radius-full);
  font-size: var(--hvn-theme-font-size-xs);
  transition: all var(--hvn-theme-transition-fast);
}

.hvn-theme-footer-widget .tag-cloud a:hover,
.hvn-theme-footer-widget .tag-cloud a:focus {
  background: var(--hvn-theme-brand-primary);
  color: var(--hvn-theme-color-white);
}

/* Site Info / Copyright */
.hvn-theme-site-info {
  text-align: center;
  font-size: var(--hvn-theme-font-size-sm);
  padding-top: var(--hvn-theme-space-lg);
}

.hvn-theme-site-info a {
  color: var(--hvn-theme-footer-link-color);
  text-decoration: none;
  transition: color var(--hvn-theme-transition-fast);
}

.hvn-theme-site-info a:hover,
.hvn-theme-site-info a:focus {
  color: var(--hvn-theme-footer-link-hover);
  text-decoration: underline;
}

.hvn-theme-site-info .sep {
  margin: 0 var(--hvn-theme-space-sm);
  color: rgba(255, 255, 255, 0.3);
}

/* Footer Social Links */
.hvn-theme-footer-social {
  display: flex;
  gap: var(--hvn-theme-space-md);
  margin-top: var(--hvn-theme-space-lg);
}

.hvn-theme-footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--hvn-theme-border-radius-full);
  transition: all var(--hvn-theme-transition-fast);
}

.hvn-theme-footer-social a:hover,
.hvn-theme-footer-social a:focus {
  background: var(--hvn-theme-brand-primary);
  transform: translateY(-3px);
}

.hvn-theme-footer-social svg {
  width: 18px;
  height: 18px;
  color: var(--hvn-theme-color-white);
}

/* Responsive Footer */
@media (max-width: 768px) {
  .hvn-theme-site-footer {
    padding: var(--hvn-theme-space-2xl) 0 var(--hvn-theme-space-lg);
    margin-top: var(--hvn-theme-space-2xl);
  }
  
  .hvn-theme-footer-widgets {
    grid-template-columns: 1fr;
    gap: var(--hvn-theme-space-xl);
    margin-bottom: var(--hvn-theme-space-xl);
    padding-bottom: var(--hvn-theme-space-xl);
  }
  
  .hvn-theme-footer-widget-title {
    margin-bottom: var(--hvn-theme-space-md);
  }
}

/* ============================================
   SCROLL TO TOP BUTTON - Enhanced Design
   ============================================ */

.hvn-scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--hvn-theme-brand-primary) 0%, var(--hvn-theme-brand-primary-dark) 100%);
  color: var(--hvn-theme-color-white);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 999;
  box-shadow: 0 4px 20px rgba(108, 96, 254, 0.4);
  overflow: hidden;
}

/* Pulse Animation */
.hvn-scroll-top.show {
  opacity: 1;
  visibility: visible;
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0% {
    box-shadow: 0 4px 20px rgba(108, 96, 254, 0.4);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 8px 30px rgba(108, 96, 254, 0.6);
    transform: scale(1.05);
  }
  100% {
    box-shadow: 0 4px 20px rgba(108, 96, 254, 0.4);
    transform: scale(1);
  }
}

/* Ripple effect on hover */
.hvn-scroll-top::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.4s ease, height 0.4s ease;
}

.hvn-scroll-top:hover::before {
  width: 100%;
  height: 100%;
}

.hvn-scroll-top:hover {
  background: linear-gradient(135deg, var(--hvn-theme-brand-primary-dark) 0%, var(--hvn-theme-brand-primary) 100%);
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 8px 30px rgba(108, 96, 254, 0.5);
  animation: none;
}

.hvn-scroll-top:focus {
  outline: 2px solid var(--hvn-theme-brand-primary);
  outline-offset: 2px;
  background: linear-gradient(135deg, var(--hvn-theme-brand-primary-dark) 0%, var(--hvn-theme-brand-primary) 100%);
  animation: none;
}

.hvn-scroll-top svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
  stroke-width: 2.5;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 1;
}

.hvn-scroll-top:hover svg {
  transform: translateY(-3px);
}

.hvn-scroll-top:active svg {
  transform: translateY(0px);
}

/* Keyboard focus style */
.keyboard-user .hvn-scroll-top:focus {
  outline: 3px solid var(--hvn-theme-brand-primary);
  outline-offset: 3px;
  animation: none;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .hvn-scroll-top {
    bottom: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
  }
  
  .hvn-scroll-top svg {
    width: 24px;
    height: 24px;
    stroke-width: 2.5;
  }
  
  @keyframes pulse-glow {
    0% {
      box-shadow: 0 3px 15px rgba(108, 96, 254, 0.4);
      transform: scale(1);
    }
    50% {
      box-shadow: 0 6px 25px rgba(108, 96, 254, 0.6);
      transform: scale(1.04);
    }
    100% {
      box-shadow: 0 3px 15px rgba(108, 96, 254, 0.4);
      transform: scale(1);
    }
  }
}

@media (max-width: 480px) {
  .hvn-scroll-top {
    bottom: 15px;
    right: 15px;
    width: 44px;
    height: 44px;
  }
  
  .hvn-scroll-top svg {
    width: 22px;
    height: 22px;
    stroke-width: 2.5;
  }
}