/* ================================ */
/* FOOTER - Sistema de Rodapé */
/* ================================ */

/* Reset adicional para garantir */
html,
body {
  margin: 0 !important;
  padding: 0 !important;
  width: 100%;
  overflow-x: hidden;
}

/* Variáveis CSS para o Footer */
:root {
  /* Footer Colors */
  --footer-bg: #1a1a1a;
  --footer-bg-gradient: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  --footer-text: #e0e0e0;
  --footer-text-muted: #a0a0a0;
  --footer-border: rgba(255, 255, 255, 0.1);

  /* Footer Links */
  --footer-link-color: #e0e0e0;
  --footer-link-hover: #ffffff;
  --footer-title-color: #ffffff;

  /* Social Colors */
  --whatsapp-color: #25d366;
  --whatsapp-hover: #1da851;
  --instagram-color: #e4405f;
  --facebook-color: #1877f2;
  --linkedin-color: #0077b5;

  /* WhatsApp Float */
  --whatsapp-float-bg: var(--whatsapp-color);
  --whatsapp-float-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  --whatsapp-pulse-color: rgba(37, 211, 102, 0.3);

  /* Spacing */
  --footer-padding: 4rem 0 2rem;
  --footer-gap: 2rem;
  --section-gap: 1.5rem;

  /* Transitions */
  --footer-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ================== */
/* Base Footer Styles */
/* ================== */
.footer {
  background: var(--footer-bg);
  background: var(--footer-bg-gradient);
  color: var(--footer-text);
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--footer-border);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--footer-padding);
}

/* ================= */
/* Footer Main Grid */
/* ================= */
.footer-main {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: var(--footer-gap);
  margin-bottom: 3rem;
}

.footer-section {
  display: flex;
  flex-direction: column;
  gap: var(--section-gap);
}

.footer-title {
  color: var(--footer-title-color);
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
  position: relative;
}

.footer-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--color-primary, #1a3a6b);
}

/* =================== */
/* Company Section */
/* =================== */
.footer-company {
  max-width: 350px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.footer-logo-img {
  width: 160px;
  height: 80px;
  display: block;
}

.logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.footer-brand {
  color: var(--footer-title-color);
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

.footer-description {
  line-height: 1.6;
  color: var(--footer-text-muted);
  margin: 0 0 1.5rem 0;
}

/* Credentials */
.footer-credentials {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.credential-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--footer-text);
}

.credential-icon {
  color: var(--color-accent, #c2995e);
  flex-shrink: 0;
}

/* =================== */
/* Navigation & Services */
/* =================== */
.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-link {
  color: var(--footer-link-color);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--footer-transition);
  position: relative;
}

.footer-link:hover {
  color: var(--footer-link-hover);
  transform: translateX(4px);
}

.footer-link::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 1px;
  background: var(--color-primary, #1a3a6b);
  transition: var(--footer-transition);
}

.footer-link:hover::before {
  width: 8px;
}

/* =================== */
/* Contact Section */
/* =================== */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.contact-icon {
  color: var(--color-primary, #1a3a6b);
  flex-shrink: 0;
  margin-top: 2px;
}

.contact-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.9rem;
  line-height: 1.4;
}

.contact-link {
  color: var(--footer-text);
  text-decoration: none;
  transition: var(--footer-transition);
}

.contact-link:hover {
  color: var(--footer-link-hover);
}

/* Social Links */
.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--footer-text);
  text-decoration: none;
  transition: var(--footer-transition);
  backdrop-filter: blur(10px);
}

.social-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.social-link.whatsapp:hover {
  background: var(--whatsapp-color);
  color: white;
}

.social-link.instagram:hover {
  background: var(--instagram-color);
  color: white;
}

.social-link.facebook:hover {
  background: var(--facebook-color);
  color: white;
}

.social-link.linkedin:hover {
  background: var(--linkedin-color);
  color: white;
}

/* =================== */
/* Footer Bottom */
/* =================== */
.footer-bottom {
  border-top: 1px solid var(--footer-border);
  padding-top: 2rem;
}

.footer-bottom-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.copyright {
  color: var(--footer-text-muted);
  font-size: 0.875rem;
}

.copyright p {
  margin: 0;
}

.footer-legal {
  display: flex;
  gap: 2rem;
}

.legal-link {
  color: var(--footer-text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  transition: var(--footer-transition);
}

.legal-link:hover {
  color: var(--footer-link-hover);
}

/* =================== */
/* WhatsApp Flutuante */
/* =================== */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  animation: whatsappFadeIn 0.5s ease-out 2s forwards;
}

.whatsapp-float-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: var(--whatsapp-float-bg);
  border-radius: 50%;
  color: white;
  text-decoration: none;
  box-shadow: var(--whatsapp-float-shadow);
  transition: var(--footer-transition);
  position: relative;
  overflow: hidden;
}

.whatsapp-float-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 25px rgba(37, 211, 102, 0.5);
}

.whatsapp-float-btn:active {
  transform: scale(0.95);
}

.whatsapp-icon {
  z-index: 2;
  position: relative;
}

/* WhatsApp Pulse Animation */
.whatsapp-pulse {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--whatsapp-pulse-color);
  animation: whatsappPulse 2s infinite;
}

@keyframes whatsappPulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  100% {
    transform: scale(1.4);
    opacity: 0;
  }
}

@keyframes whatsappFadeIn {
  from {
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}

/* WhatsApp Tooltip */
.whatsapp-tooltip {
  position: absolute;
  right: 70px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: var(--footer-transition);
  backdrop-filter: blur(10px);
}

.whatsapp-tooltip::after {
  content: '';
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-left-color: rgba(0, 0, 0, 0.8);
}

.whatsapp-float:hover .whatsapp-tooltip {
  opacity: 1;
  visibility: visible;
}

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

/* Large Desktop */
@media (max-width: 1200px) {
  .footer-container {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/* Tablet */
@media (max-width: 1024px) {
  .footer-main {
    grid-template-columns: 1fr 1fr;
    gap: 3rem 2rem;
  }

  .footer-company {
    max-width: none;
  }

  .footer-credentials {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

/* Small Tablet */
@media (max-width: 768px) {
  :root {
    --footer-padding: 3rem 0 1.5rem;
    --footer-gap: 2rem;
  }

  .footer-main {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

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

  .footer-legal {
    justify-content: center;
  }

  .whatsapp-float {
    bottom: 20px;
    right: 20px;
  }

  .whatsapp-float-btn {
    width: 56px;
    height: 56px;
  }

  .whatsapp-tooltip {
    display: none;
  }
}

/* Mobile */
@media (max-width: 480px) {
  :root {
    --footer-padding: 2rem 0 1rem;
  }

  .footer-container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .footer-logo {
    justify-content: center;
    text-align: center;
  }

  .footer-description {
    text-align: center;
  }

  .footer-credentials {
    justify-content: center;
  }

  .social-links {
    justify-content: center;
  }

  .contact-item {
    align-items: center;
  }

  .footer-legal {
    flex-direction: column;
    gap: 1rem;
  }

  .whatsapp-float {
    bottom: 16px;
    right: 16px;
  }

  .whatsapp-float-btn {
    width: 52px;
    height: 52px;
  }
}

/* =================== */
/* Accessibility */
/* =================== */
@media (prefers-reduced-motion: reduce) {
  .whatsapp-pulse {
    animation: none;
  }

  .whatsapp-float {
    animation: none;
    opacity: 1;
    visibility: visible;
  }

  * {
    transition: none !important;
  }
}

/* Focus States */
.footer-link:focus,
.contact-link:focus,
.social-link:focus,
.legal-link:focus,
.whatsapp-float-btn:focus {
  outline: 2px solid var(--color-primary, #1a3a6b);
  outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .footer {
    background: #000000;
    color: #ffffff;
  }

  .footer-border,
  .footer::before {
    background: #ffffff;
  }

  .social-link {
    background: #333333;
    border: 1px solid #ffffff;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  :root {
    --footer-bg: #0a0a0a;
    --footer-text: #f0f0f0;
    --footer-text-muted: #b0b0b0;
  }
}

/* =================== */
/* Performance */
/* =================== */
.footer {
  will-change: auto;
}

.whatsapp-float-btn {
  will-change: transform;
}

.footer-link:hover {
  will-change: transform;
}

/* Print Styles */
@media print {
  .whatsapp-float {
    display: none;
  }

  .footer {
    background: white !important;
    color: black !important;
  }

  .footer-link,
  .contact-link {
    color: black !important;
  }
}