/**
 * Frontend styles for SM Footer Builder
 * With specific selectors to avoid conflicts
 */

/* Reset minimal and specific selectors */
#sm-footer-root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue",
    sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #333333;
  box-sizing: border-box;
  position: relative;
  z-index: 100;
  display: block;
  width: 100%;
}

#sm-footer-root * {
  box-sizing: border-box;
}

/* Screen reader text */
#sm-footer-root .sm-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Base footer styles */
#sm-footer-root .sm-footer {
  position: relative;
  width: 100%;
  background-color: #ffffff;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 100;
  display: block;
  padding: 3rem 0 1rem;
}

#sm-footer-root .sm-footer-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
}

#sm-footer-root .sm-footer-background {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  padding: 3rem 0 1rem;
}

#sm-footer-root .sm-footer-background::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1;
}

#sm-footer-root .sm-footer-background > * {
  position: relative;
  z-index: 2;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

#sm-footer-root .sm-footer-background .sm-footer-title,
#sm-footer-root .sm-footer-background .sm-footer-menu-link,
#sm-footer-root .sm-footer-background .sm-footer-copyright,
#sm-footer-root .sm-footer-background .sm-footer-social-link,
#sm-footer-root .sm-footer-background .sm-footer-back-to-top {
  color: #ffffff;
}

/* Footer style variations */
#sm-footer-root .sm-footer-curved {
  position: relative;
  overflow: hidden;
}

#sm-footer-root .sm-footer-curved::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(106, 27, 154, 0.1), rgba(57, 73, 171, 0.1));
  z-index: -1;
}

#sm-footer-root .sm-footer-curved::after {
  content: "";
  position: absolute;
  top: -50px;
  left: 0;
  width: 100%;
  height: 60px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

#sm-footer-root .sm-footer-wave {
  position: relative;
  overflow: hidden;
}

#sm-footer-root .sm-footer-wave::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(106, 27, 154, 0.1), rgba(57, 73, 171, 0.1));
  z-index: -1;
}

#sm-footer-root .sm-footer-wave::after {
  content: "";
  position: absolute;
  top: -20px;
  left: 0;
  width: 100%;
  height: 20px;
  background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 1200 120" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none"><path d="M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z" opacity=".25" fill="%23FFFFFF" /></svg>');
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

#sm-footer-root .sm-footer-angled {
  position: relative;
  overflow: hidden;
  padding-top: 80px;
}

#sm-footer-root .sm-footer-angled::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(106, 27, 154, 0.1), rgba(57, 73, 171, 0.1));
  z-index: -1;
  clip-path: polygon(0 30%, 100% 0, 100% 100%, 0 100%);
}

/* Gradient border */
#sm-footer-root .sm-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #6a1b9a, #3949ab, #6a1b9a);
  z-index: 2;
}

/* Footer content */
#sm-footer-root .sm-footer-content {
  margin-bottom: 2rem;
}

#sm-footer-root .sm-footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 2rem;
}

#sm-footer-root .sm-footer-column {
  flex: 1;
  min-width: 200px;
}

/* Logo styles */
#sm-footer-root .sm-footer-logo-column {
  flex: 0 0 auto;
  margin-right: 2rem;
}

#sm-footer-root .sm-footer-logo {
  display: block;
  text-decoration: none;
}

#sm-footer-root .sm-footer-logo img {
  max-height: 60px;
  width: auto;
  display: block;
  transition: transform 0.3s ease;
}

#sm-footer-root .sm-footer-logo:hover img {
  transform: scale(1.05);
}

/* Menu styles */
#sm-footer-root .sm-footer-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #333333;
  position: relative;
  padding-bottom: 0.5rem;
}

#sm-footer-root .sm-footer-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 2px;
  background: linear-gradient(90deg, #6a1b9a, #3949ab);
}

#sm-footer-root .sm-footer-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

#sm-footer-root .sm-footer-menu-item {
  margin-bottom: 0.5rem;
}

#sm-footer-root .sm-footer-menu-link {
  text-decoration: none;
  color: #555555;
  transition: all 0.3s ease;
  display: inline-block;
  position: relative;
  padding-left: 1rem;
}

#sm-footer-root .sm-footer-menu-link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #6a1b9a;
  transition: all 0.3s ease;
}

#sm-footer-root .sm-footer-menu-link:hover {
  color: #6a1b9a;
  transform: translateX(3px);
}

#sm-footer-root .sm-footer-menu-link:hover::before {
  background: #3949ab;
  width: 7px;
  height: 7px;
}

#sm-footer-root .sm-footer-menu-link:focus {
  outline: 2px solid #6a1b9a;
  outline-offset: 2px;
}

/* Sitemap styles */
#sm-footer-root .sm-footer-sitemap {
  list-style: none;
  padding: 0;
  margin: 0;
}

#sm-footer-root .sm-footer-sitemap li {
  margin-bottom: 0.5rem;
}

#sm-footer-root .sm-footer-sitemap a {
  text-decoration: none;
  color: #555555;
  transition: all 0.3s ease;
  display: inline-block;
  position: relative;
  padding-left: 1rem;
}

#sm-footer-root .sm-footer-sitemap a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #6a1b9a;
  transition: all 0.3s ease;
}

#sm-footer-root .sm-footer-sitemap a:hover {
  color: #6a1b9a;
  transform: translateX(3px);
}

#sm-footer-root .sm-footer-sitemap a:hover::before {
  background: #3949ab;
  width: 7px;
  height: 7px;
}

#sm-footer-root .sm-footer-sitemap a:focus {
  outline: 2px solid #6a1b9a;
  outline-offset: 2px;
}

#sm-footer-root .sm-footer-sitemap ul {
  list-style: none;
  padding-left: 1.5rem;
  margin: 0.5rem 0;
}

/* Info content styles */
#sm-footer-root .sm-footer-info-content {
  color: #555555;
}

#sm-footer-root .sm-footer-info-content a {
  color: #6a1b9a;
  text-decoration: none;
  transition: all 0.3s ease;
}

#sm-footer-root .sm-footer-info-content a:hover {
  color: #3949ab;
  text-decoration: underline;
}

#sm-footer-root .sm-footer-info-content a:focus {
  outline: 2px solid #6a1b9a;
  outline-offset: 2px;
}

/* Social icons */
#sm-footer-root .sm-footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  justify-content: center;
}

#sm-footer-root .sm-footer-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.05);
  color: #333333;
  text-decoration: none;
  transition: all 0.3s ease;
}

#sm-footer-root .sm-footer-social-link:hover {
  background: #6a1b9a;
  color: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

#sm-footer-root .sm-footer-social-link:focus {
  outline: 2px solid #6a1b9a;
  outline-offset: 2px;
}

#sm-footer-root .sm-footer-social-link i {
  font-size: 1.2rem;
}

/* Footer bottom */
#sm-footer-root .sm-footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* Copyright */
#sm-footer-root .sm-footer-copyright {
  font-size: 0.9rem;
  color: #777777;
}

/* Back to top button */
#sm-footer-root .sm-footer-back-to-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(0, 0, 0, 0.05);
  border: none;
  border-radius: 30px;
  color: #333333;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

#sm-footer-root .sm-footer-back-to-top:hover {
  background: #6a1b9a;
  color: #ffffff;
}

#sm-footer-root .sm-footer-back-to-top:focus {
  outline: 2px solid #6a1b9a;
  outline-offset: 2px;
}

#sm-footer-root .sm-footer-back-to-top.sm-hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
}

/* Force Font Awesome icons */
#sm-footer-root .sm-footer-social-link i::before,
#sm-footer-root .sm-footer-back-to-top i::before {
  display: inline-block !important;
  font-style: normal !important;
  font-variant: normal !important;
  text-rendering: auto !important;
  -webkit-font-smoothing: antialiased !important;
}

#sm-footer-root .fas::before {
  font-family: "Font Awesome 5 Free" !important;
  font-weight: 900 !important;
}

#sm-footer-root .far::before {
  font-family: "Font Awesome 5 Free" !important;
  font-weight: 400 !important;
}

#sm-footer-root .fab::before {
  font-family: "Font Awesome 5 Brands" !important;
}

/* Responsive styles */
@media (max-width: 1024px) {
  #sm-footer-root .sm-footer-row {
    gap: 1.5rem;
  }

  #sm-footer-root .sm-footer-column {
    flex: 1 0 calc(33.333% - 1.5rem);
  }
}

@media (max-width: 768px) {
  #sm-footer-root .sm-footer-column {
    flex: 1 0 calc(50% - 1.5rem);
  }

  #sm-footer-root .sm-footer-logo-column {
    flex: 1 0 100%;
    margin-right: 0;
    text-align: center;
    margin-bottom: 1rem;
  }

  #sm-footer-root .sm-footer-logo {
    display: inline-block;
  }

  #sm-footer-root .sm-footer-logo img {
    margin: 0 auto;
  }
}

@media (max-width: 480px) {
  #sm-footer-root .sm-footer-column {
    flex: 1 0 100%;
  }

  #sm-footer-root .sm-footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  #sm-footer-root .sm-footer-copyright {
    order: 2;
  }

  #sm-footer-root .sm-footer-back-to-top {
    order: 1;
  }
}

/* Accessibility enhancements */
@media (prefers-reduced-motion: reduce) {
  #sm-footer-root * {
    transition: none !important;
    animation: none !important;
  }
}

/* High contrast mode support */
@media (forced-colors: active) {
  #sm-footer-root .sm-footer-title::after,
  #sm-footer-root .sm-footer-menu-link::before,
  #sm-footer-root .sm-footer-sitemap a::before {
    background-color: CanvasText;
  }

  #sm-footer-root .sm-footer-social-link {
    border: 1px solid CanvasText;
  }

  #sm-footer-root .sm-footer-back-to-top {
    border: 1px solid CanvasText;
  }

  #sm-footer-root .sm-footer-bottom {
    border-top: 1px solid CanvasText;
  }
}
