/* Footer Section Styles */
.footer {
  background: var(--color-text);
  color: var(--color-white);
  position: relative;
  overflow: hidden;
}






.footer::before {
  /*
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 80%, rgba(197, 75, 116, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 80% 20%, rgba(107, 70, 193, 0.1) 0%, transparent 50%);
  pointer-events: none;
*/}

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



/* Footer branding (logo + title + description) — footer-only classes */
.footer .footer-branding {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  margin-bottom: var(--spacing-lg);
}
.footer .footer-logo { /* image element */
  max-height: 120px;
  width: auto;
  display: block;
}
.footer .footer-site-title {
  margin: 2px 0 0;
  font-family: var(--font-secondary);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  line-height: 1.2;
}
.footer .footer-site-title a { color: var(--color-primary); text-decoration: none; }
.footer .footer-site-title a:hover { color: var(--color-primary); }
.footer .footer-site-description {
  margin: 0;
  font-family: var(--font-primary);
  font-size: var(--font-size-sm);
  color: rgba(255,255,255,0.85);
  line-height: 1.2;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--spacing-3xl);
  padding: var(--spacing-5xl) 0 var(--spacing-3xl);
}

.footer-section h3 {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-white);
  margin-bottom: var(--spacing-lg);
}

.footer-section h4 {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--color-white);
  margin-bottom: var(--spacing-md);
}

.footer-section p {
  color: rgba(255, 255, 255, 0.8);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--spacing-lg);
  font-size: var(--font-size-sm);
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section ul li {
  margin-bottom: var(--spacing-sm);
}

.footer-section ul li a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: var(--font-size-sm);
  transition: color var(--transition-fast);
  position: relative;
}

.footer-section ul li a:hover {
  color: var(--color-primary-light);
}

.footer-section ul li a::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--color-primary-light);
  transition: width var(--transition-fast);
}

.footer-section ul li a:hover::before {
  width: 100%;
}

/* Contact Info Styling */
.footer-section:last-child ul li {
  color: rgba(255, 255, 255, 0.8);
  font-size: var(--font-size-sm);
}

/* Social Links */
.social-links {
  display: flex;
  gap: var(--spacing-md);
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  color: rgba(255, 255, 255, 0.8);
  transition: all var(--transition-normal);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-links a:hover {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.social-links a svg {
  width: 20px;
  height: 20px;
}

/* footer custom section */
.footer-about {
  color: var(--color-white);
  max-width: 300px;
  line-height: 1.6;
  margin: 0;
  text-align: left;
}

.footer-about h4 {
  font-size: var(--font-size-lg);
  margin-bottom: var(--spacing-sm);
  color: var(--color-white);
  font-weight: var(--font-weight-semibold);
}

.footer-about p {
  font-size: var(--font-size-sm);
  margin-bottom: var(--spacing-sm);
  color: rgba(255, 255, 255, 0.8);
}

.footer-signature {
  font-size: var(--font-size-sm);
  color: rgba(255, 255, 255, 0.6);
}

.footer-btn {
  display: inline-block;
  margin-top: var(--spacing-sm);
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-lg);
  background-color: var(--color-primary);
  color: var(--color-white);
  text-decoration: none;
  font-weight: var(--font-weight-semibold);
  transition: background 0.3s;
}

.footer-btn:hover {
  background-color: var(--color-primary-light);
  color: var(--color-white);
}

@media (max-width: 768px) {
  .footer-about {
    margin: 0 auto;
    text-align: center;
    justify-self: center;
  }

  .footer-about p,
  .footer-signature {
    text-align: inherit;
  }
}

/* Footer chips: unified contact + social (for jt_child_render_global_footer_chips) */
.footer .footer-contact .jt-mobile-menu__meta {
  margin-top: var(--spacing-sm);
}
.footer .footer-contact .jt-mobile-menu__social {
  display: flex;
  flex-wrap: wrap;
  gap: var(--chip-gap-footer);
}
.footer .footer-contact .jt-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--chip-size-footer);
  height: var(--chip-size-footer);
  border-radius: var(--chip-radius-footer);
  flex: 0 0 var(--chip-size-footer); /* lock width in flex rows */
  color: var(--color-white);
  background: var(--chip-bg-footer);
  border: var(--chip-border-footer);
  text-decoration: none;
  transition: background var(--transition-fast), transform var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
  box-sizing: border-box;
  line-height: 0; /* keep anchors perfectly square */
}
.footer .footer-contact .jt-chip i {
  font-size: var(--chip-icon-size-footer);
  line-height: 1;
  display: block; /* avoid inline baseline quirks */
}
.footer .footer-contact .jt-chip:hover,
.footer .footer-contact .jt-chip:focus-visible {
  background: var(--color-primary);
  color: var(--color-white);
  transform: translateY(-2px);
}
.footer .footer-contact .jt-chip:hover i,
.footer .footer-contact .jt-chip:focus-visible i {
  color: var(--color-white);
}

/* Center the entire footer icon row and add spacing above copyright line */
.footer .footer-contact {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  margin: var(--spacing-2xl) 0 var(--spacing-4xl);
}
.footer .footer-contact .jt-mobile-menu__social {
  justify-content: center;
}

/* Footer Bottom */
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: var(--spacing-xl) 0;
  text-align: center;
}

.footer-bottom p {
  color: rgba(255, 255, 255, 0.6);
  font-size: var(--font-size-sm);
  margin: 0;
}

/* Hover Effects */
.footer-section:first-child:hover h3 {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}


/* Decorative Elements */
.footer::after {
  /*
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-primary), var(--color-primary-light), var(--color-secondary), var(--color-accent), transparent);
*/}


/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 100px;
  right: 20px;
  width: 40px;
  height: 40px;
  background-color: var(--color-primary);
  color: var(--color-white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1150; /* above contact FAB (1100), below modal (>=1200) */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: var(--color-black);
  color: var(--color-white);
  transform: translateY(-3px);
}

.back-to-top .arrow-up {
  font-size: var(--lubinik-footer-back-to-top-font-size);
  line-height: 1;
}


/* Responsive Design */
@media (max-width: 1024px) {
  .footer-content {
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--spacing-2xl);
  }
  
  .footer-section:last-child {
    grid-column: 1 / -1;
    margin-top: var(--spacing-lg);
  }
}

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    padding: var(--spacing-4xl) 0 var(--spacing-2xl);
  }
  
  .footer-section:first-child {
    grid-column: 1 / -1;
    text-align: center;
    margin-bottom: var(--spacing-lg);
  }
  
  .footer-section:last-child {
    grid-column: 1 / -1;
    text-align: center;
    margin-top: var(--spacing-lg);
  }
  
  .social-links {
    justify-content: center;
  }



  /* Footer icon chips – mobile sizing using footer mobile vars */
  .footer .footer-contact { margin: var(--spacing-xl) 0 var(--spacing-3xl); }
  .footer .footer-contact .jt-mobile-menu__social { gap: var(--chip-gap-footer-mobile); justify-content: center; }
  .footer .footer-contact .jt-chip {
    width: var(--chip-size-footer-mobile);
    height: var(--chip-size-footer-mobile);
    border-radius: var(--chip-radius-footer-mobile);
    background: var(--chip-bg-footer-mobile);
    border: var(--chip-border-footer-mobile);
    flex: 0 0 var(--chip-size-footer-mobile);
    line-height: 0; /* ensure square */
    box-shadow: none !important; /* remove mobile chip shadow */
  }
  .footer .footer-contact .jt-chip:hover,
  .footer .footer-contact .jt-chip:focus-visible { box-shadow: none !important; }
  .footer .footer-contact .jt-chip i { font-size: var(--chip-icon-size-footer-mobile); }


}

@media (max-width: 480px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    padding: var(--spacing-3xl) 0 var(--spacing-xl);
    text-align: center;
  }
  
  .footer-section {
    grid-column: 1;
  }
  
  .footer-section h3 {
    font-size: var(--font-size-lg);
  }
  
  .footer-section h4 {
    font-size: var(--font-size-base);
  }
  
  .footer-section p,
  .footer-section ul li a,
  .footer-section ul li {
    font-size: var(--font-size-xs);
  }
  
  .social-links a {
    width: 36px;
    height: 36px;
  }
  
  .social-links a svg {
    width: 18px;
    height: 18px;
  }
  
  .footer-bottom {
    padding: var(--spacing-md) 0;
  }



}

/* Desktop: place back-to-top above the contact FAB when collapsed */
@media (min-width: 1281px) {
  body.toolbar-collapsed .back-to-top {
    /* Center horizontally over the FAB using variables */
    right: calc(var(--fab-right-desktop) + (var(--fab-size-desktop) - var(--backtotop-size)) / 2);
    /* Place above FAB with consistent gap relative to FAB bottom */
    bottom: calc(var(--fab-bottom-desktop) + var(--fab-size-desktop) + var(--backtotop-gap-desktop));
  }
}

/* Mobile/tablet: align Back-to-Top center over the 80px FAB */
@media (max-width: 1280px) {
  .back-to-top {
    right: calc(var(--fab-right-mobile) + (var(--fab-size-mobile) - var(--backtotop-size)) / 2);
    bottom: calc(var(--fab-bottom-mobile) + var(--fab-size-mobile) + var(--backtotop-gap-mobile));
  }
  /* Reserve space below footer content for FAB/Back-to-Top and device safe area */
  .footer {
    padding-bottom: calc(
      env(safe-area-inset-bottom) +
      var(--fab-bottom-mobile) +
      max(var(--fab-size-mobile), var(--backtotop-size)) +
      var(--spacing-lg)
    );
  }
  .footer-bottom {
    /* Also add extra bottom padding so copyright never sits under FAB */
    padding-bottom: calc(
      var(--spacing-xl) +
      env(safe-area-inset-bottom) +
      var(--fab-bottom-mobile) +
      max(var(--fab-size-mobile), var(--backtotop-size))
    );
  }
}

@media (max-width: 1280px) {
  /* One centered column track */
  .footer-content {
    grid-template-columns: min(720px, 92vw); /* pick width you like */
    justify-content: center;                 /* center the track */
    gap: var(--spacing-xl);
    padding: var(--spacing-4xl) 0 var(--spacing-2xl);
    /* you can remove justify-items/align-items; not needed */
  }

  /* Center content inside each section */
  .footer-section { 
    text-align: center;
  }

  /* About block needs explicit centering (it was left on desktop) */
  .footer-about {
    margin: 0 auto;
    text-align: center;
  }

  /* Center social row */
  .social-links { justify-content: center; }
}
