/* =========================================================
   AGROMAQ - Footer + WhatsApp
   Archivo: assets/css/footer.css
========================================================= */

.agx-footer {
  position: relative;
  overflow: hidden;
  padding: 64px 0 46px;
  color: var(--ag-white, #ffffff);
  background:
    linear-gradient(145deg, var(--ag-dark-950, #111315), #0f2218 100%),
    radial-gradient(circle at 90% 0%, rgba(227, 27, 35, 0.22), transparent 34%);
  border-top: 4px solid var(--ag-red-500, #e31b23);
}

.agx-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: 0.42;
  pointer-events: none;
}

.agx-footer-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.agx-footer-line {
  position: absolute;
  width: 420px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(227, 27, 35, 0.62), transparent);
  transform: rotate(-28deg);
}

.agx-footer-line.line-a {
  left: -120px;
  top: 20%;
}

.agx-footer-line.line-b {
  right: -140px;
  bottom: 28%;
}

.agx-footer-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr) minmax(280px, 0.8fr);
  gap: 44px;
  align-items: start;
}

.agx-footer-logo {
  display: inline-flex;
  width: 180px;
  margin-bottom: 18px;
}

.agx-footer-logo img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.36));
}

.agx-footer-brand p {
  max-width: 570px;
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 15px;
  line-height: 1.7;
  font-weight: 750;
}

.agx-footer-dev {
  width: fit-content;
  margin-top: 18px;
  padding: 9px 12px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.065);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 4px solid var(--ag-red-500, #e31b23);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 750;
}

.agx-footer-dev strong {
  color: var(--ag-white, #ffffff);
}

.agx-footer-title {
  margin: 0 0 16px;
  color: var(--ag-white, #ffffff);
  font-size: 17px;
  font-weight: 950;
  letter-spacing: -0.02em;
}

.agx-footer-sections,
.agx-footer-social {
  min-height: 100%;
}

.agx-footer-menu {
  display: grid;
  gap: 10px;
}

.agx-footer-menu a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: fit-content;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 14px;
  font-weight: 850;
  transition:
    color 0.22s ease,
    transform 0.22s ease;
}

.agx-footer-menu a:hover {
  color: var(--ag-white, #ffffff);
  transform: translateX(3px);
}

.agx-footer-menu i {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--ag-red-400, #ff3138);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
}

.agx-footer-social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.agx-footer-social-links a {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  color: var(--ag-white, #ffffff);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 950;
  transition:
    transform 0.22s ease,
    background 0.22s ease,
    border-color 0.22s ease;
}

.agx-footer-social-links a:hover {
  transform: translateY(-2px);
  background: rgba(227, 27, 35, 0.18);
  border-color: rgba(227, 27, 35, 0.48);
}

.agx-footer-social-links i {
  color: var(--ag-red-400, #ff3138);
}

/* WhatsApp flotante */

.whatsapp-float.agx-whatsapp-float,
.agx-whatsapp-float {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 6500;
  width: 62px;
  height: 62px;
  min-width: 62px;
  min-height: 62px;
  max-width: 62px;
  max-height: 62px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  margin: 0;
  box-sizing: border-box;
  line-height: 1;
  color: #ffffff;
  background: linear-gradient(135deg, #16c764, #11a853);
  border: 2px solid rgba(255, 255, 255, 0.74);
  border-radius: 50%;
  box-shadow: 0 20px 42px rgba(17, 19, 21, 0.28);
  text-decoration: none;
  transform: none;
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease;
}

.whatsapp-float.agx-whatsapp-float:hover,
.agx-whatsapp-float:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 28px 54px rgba(17, 19, 21, 0.34);
}

.whatsapp-float.agx-whatsapp-float i,
.agx-whatsapp-float i {
  display: block;
  margin: 0;
  padding: 0;
  width: auto;
  height: auto;
  font-size: 31px;
  line-height: 1;
}

.whatsapp-float.agx-whatsapp-float span,
.agx-whatsapp-float span {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 24px;
  height: 24px;
  display: none;
  place-items: center;
  padding: 0 6px;
  color: var(--ag-white, #ffffff);
  background: var(--ag-dark-950, #111315);
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 99px;
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
}

.whatsapp-float.agx-whatsapp-float span.has-count,
.agx-whatsapp-float span.has-count {
  display: grid;
}

@media (max-width: 980px) {
  .agx-footer {
    padding: 54px 0 38px;
  }

  .agx-footer-inner {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .agx-footer-social-links {
    max-width: 420px;
  }
}

@media (max-width: 560px) {
  .agx-footer {
    padding: 46px 0 34px;
  }

  .agx-footer-logo {
    width: 150px;
  }

  .agx-footer-brand p {
    font-size: 14px;
    line-height: 1.6;
  }

  .agx-footer-dev {
    font-size: 12.5px;
  }

  .agx-footer-menu {
    gap: 8px;
  }

  .agx-footer-menu a {
    width: 100%;
  }

  .agx-footer-social-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .agx-footer-social-links a {
    justify-content: center;
    min-height: 46px;
    padding: 0 12px;
  }

  .whatsapp-float.agx-whatsapp-float,
  .agx-whatsapp-float {
    right: 18px;
    bottom: 18px;
    width: 56px;
    height: 56px;
    min-width: 56px;
    min-height: 56px;
    max-width: 56px;
    max-height: 56px;
  }

  .whatsapp-float.agx-whatsapp-float i,
  .agx-whatsapp-float i {
    font-size: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .agx-footer-menu a,
  .agx-footer-social-links a,
  .agx-whatsapp-float {
    transition: none !important;
  }
}

.agx-dev-card {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: auto;
  max-width: 340px;
  margin-top: 18px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-left: 3px solid #ff2028;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
}

/* Evita que estilos generales hagan gigante la imagen */
.agx-dev-image {
  display: flex;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.agx-dev-image img {
  display: block;
  width: 40px !important;
  height: 40px !important;
  max-width: 40px !important;
  object-fit: contain;
}

.agx-dev-info {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
}

.agx-dev-title {
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}

.agx-dev-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.agx-dev-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 6px;
  background: #ff2028;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  transition: 0.2s ease;
}

.agx-dev-button:hover {
  color: #ffffff;
  background: #d9141c;
  transform: translateY(-1px);
}

.agx-dev-brand {
  color: #d9e0dd;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.agx-dev-brand:hover {
  color: #ff4047;
}

@media (max-width: 480px) {
  .agx-dev-card {
    max-width: 100%;
  }
}