/* Footer + WhatsApp flotante + back-to-top (layout compartido) */

#footer {
  color: #fff;
  font-size: 15px;
  background: linear-gradient(45deg, #086999 0%, #138bc9 55%, #1aa0e0 100%);
  background-size: cover;
}

#footer .footer-top {
  padding: 48px 0 28px;
  position: relative;
}

#footer .footer-grid > [class*="col-"] {
  margin-bottom: 28px;
}

#footer .footer-logo-link {
  display: inline-block;
  margin-bottom: 12px;
}

#footer .footer-logo-link img {
  width: 120px;
  height: auto;
  max-width: 100%;
}

#footer .footer-brand-title {
  margin: 0 0 8px;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.4;
  color: #fff;
}

#footer .footer-brand-text {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.88);
  max-width: 26ch;
}

#footer .footer-top h4 {
  font-size: 1.05rem;
  font-weight: 700;
  position: relative;
  padding-bottom: 10px;
  margin: 0 0 14px;
  color: #fff;
}

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

#footer .footer-links ul li {
  padding: 0;
  margin: 0 0 10px;
}

#footer .footer-links ul a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 0.95rem;
  line-height: 1.4;
  display: inline-block;
  padding: 2px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

#footer .footer-links ul a:hover,
#footer .footer-links ul a:focus-visible {
  color: #fff;
  border-bottom-color: rgba(255, 255, 255, 0.7);
  outline: none;
}

#footer .footer-contact-item {
  color: #fff;
  margin-bottom: 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

#footer .footer-contact-item i {
  color: #fff;
  font-size: 1.1rem;
  margin-top: 3px;
  flex-shrink: 0;
}

#footer .footer-contact-item span {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#footer .footer-contact-item strong {
  color: #fff;
  font-size: 0.9rem;
}

#footer .footer-contact-item a {
  color: rgba(255, 255, 255, 0.95);
  text-decoration: none;
  font-size: 0.95rem;
  line-height: 1.4;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, opacity 0.2s ease;
  width: fit-content;
}

#footer .footer-contact-item a:hover,
#footer .footer-contact-item a:focus-visible {
  border-bottom-color: rgba(255, 255, 255, 0.75);
  outline: none;
}

#footer .footer-whatsapp-link {
  font-size: 0.88rem !important;
  opacity: 0.92;
}

#footer .footer-demo-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  padding: 11px 20px;
  border-radius: 50px;
  background: #f7bf47;
  color: #163a5f !important;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

#footer .footer-demo-cta:hover,
#footer .footer-demo-cta:focus-visible {
  background: #ffd166;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
  outline: none;
}

#footer .footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  padding: 14px 0 18px;
}

#footer .footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

#footer .footer-copy,
#footer .footer-legal-links {
  margin: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.4;
}

#footer .footer-legal-links {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#footer .footer-legal-links a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

#footer .footer-legal-links a:hover,
#footer .footer-legal-links a:focus-visible {
  color: #fff;
  border-bottom-color: rgba(255, 255, 255, 0.7);
  outline: none;
}

/* Back to top — no competir con WhatsApp */
.back-to-top {
  right: 20px !important;
  bottom: 88px !important;
  width: 46px !important;
  height: 46px !important;
  border-radius: 50% !important;
  z-index: 996;
}

.back-to-top i {
  font-size: 26px;
}

/* WhatsApp flotante compacto */
.floating-whatsapp-main {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9998;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 56px;
  min-width: 56px;
  padding: 0 18px;
  border-radius: 50px;
  background: #25D366;
  color: #fff !important;
  text-decoration: none !important;
  font-size: 0.95rem;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, padding 0.2s ease;
}

.floating-whatsapp-main i {
  font-size: 1.45rem;
  line-height: 1;
}

.floating-whatsapp-main .btn-label {
  white-space: nowrap;
}

.floating-whatsapp-main:hover,
.floating-whatsapp-main:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.42);
  color: #fff !important;
  outline: none;
}

.floating-whatsapp-main.is-expanded {
  padding: 0 20px;
}

@media (max-width: 991px) {
  #footer .footer-top {
    padding: 40px 0 24px;
  }

  #footer .footer-brand-text {
    max-width: none;
  }
}

@media (max-width: 768px) {
  #footer .footer-top {
    padding: 36px 20px 24px;
  }

  #footer .footer-grid > [class*="col-"] {
    margin-bottom: 26px;
  }

  #footer .footer-bottom {
    padding: 14px 20px 20px;
  }

  #footer .footer-bottom-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  #footer .footer-demo-cta {
    width: 100%;
  }

  .back-to-top {
    right: 16px !important;
    bottom: 84px !important;
    width: 44px !important;
    height: 44px !important;
  }

  .floating-whatsapp-main {
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    width: 56px;
    height: 56px;
    min-width: 56px;
    padding: 0;
    border-radius: 50%;
  }

  .floating-whatsapp-main .btn-label {
    display: none;
  }

  .floating-whatsapp-main i {
    font-size: 1.55rem;
  }
}

/* Espacio inferior en formularios para no tapar CTA con flotantes */
@media (max-width: 768px) {
  .contact.contact-page .form-submit-wrap,
  .faq-cta-buttons,
  .contact-result-actions {
    padding-bottom: 72px;
  }
}
