/* FOOTER */
.footer {
  background: #111827;
  color: #fff;
  padding: 48px 24px 20px;
  width: 100%;
}

.footer-container {
  width: min(1200px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 32px;
  align-items: start;
}

.footer-section {
  min-width: 0;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.3;
}

.footer-logo img {
  display: block;
  width: auto;
  height: 42px;
  max-width: 100%;
  object-fit: contain;
}

.footer-title {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  text-decoration: none;
  color: #9ca3af;
  font-size: 15px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  transition:
    color 0.3s ease,
    transform 0.3s ease;
}

.footer-links a:hover {
  color: #3b82f6;
  transform: translateX(3px);
}

/* BOTTOM */
.footer-bottom {
  width: min(1200px, 100%);
  margin: 36px auto 0;
  padding-top: 16px;
  border-top: 1px solid #374151;
  text-align: center;
  font-size: 14px;
  line-height: 1.5;
  color: #9ca3af;
}

/* TABLET */
@media (max-width: 1024px) {
  .footer {
    padding: 40px 20px 20px;
  }

  .footer-container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
  }
}

/* MÓVIL */
@media (max-width: 768px) {
  .footer {
    padding: 32px 18px 18px;
  }

  .footer-container {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .footer-section {
    width: 100%;
    padding: 16px 0;
    border-bottom: 1px solid #374151;
  }

  .footer-section:first-child {
    padding-top: 0;
  }

  .footer-logo {
    font-size: 17px;
  }

  .footer-logo img {
    height: 38px;
  }

  .footer-title {
    position: relative;
    margin: 0;
    padding-right: 32px;
    cursor: pointer;
    font-size: 17px;
  }

  .footer-title::after {
    content: "+";
    position: absolute;
    top: 50%;
    right: 2px;
    transform: translateY(-50%);
    font-size: 24px;
    font-weight: 400;
    color: #9ca3af;
    transition: transform 0.3s ease;
  }

  .footer-section.active .footer-title::after {
    transform: translateY(-50%) rotate(45deg);
  }

  .footer-links {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    gap: 10px;
    margin-top: 0;
    transition:
      max-height 0.35s ease,
      opacity 0.25s ease,
      margin-top 0.35s ease;
  }

  .footer-section.active .footer-links {
    max-height: 400px;
    opacity: 1;
    margin-top: 14px;
  }

  .footer-links a {
    width: 100%;
    font-size: 15px;
    padding: 3px 0;
  }

  .footer-links a:hover {
    transform: none;
  }

  .footer-bottom {
    margin-top: 24px;
    padding-top: 14px;
    font-size: 13px;
  }
}

/* TELÉFONOS PEQUEÑOS */
@media (max-width: 480px) {
  .footer {
    padding: 28px 16px 16px;
  }

  .footer-logo {
    font-size: 16px;
    gap: 9px;
  }

  .footer-logo img {
    height: 34px;
  }

  .footer-title {
    font-size: 16px;
  }

  .footer-links a {
    font-size: 14px;
  }

  .footer-bottom {
    font-size: 12px;
  }
}
/* =========================================================
   RESPONSIVE GLOBAL FINAL - FOOTER
   Los enlaces permanecen visibles en móvil.
========================================================= */

.footer,
.footer-container,
.footer-section,
.footer-bottom {
  box-sizing: border-box;
  max-width: 100%;
}

.footer-logo img {
  max-width: 100%;
  height: auto;
  max-height: 42px;
  object-fit: contain;
}

@media (max-width: 1024px) {
  .footer-container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .footer {
    padding: 32px 18px 18px;
  }

  .footer-container {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .footer-section {
    width: 100%;
    min-width: 0;
    padding: 18px 0;
    border-bottom: 1px solid #374151;
  }

  .footer-title {
    margin: 0 0 12px;
    padding-right: 0;
    cursor: default;
  }

  .footer-title::after {
    display: none;
    content: none;
  }

  .footer-links,
  .footer-section.active .footer-links {
    display: flex;
    max-height: none;
    overflow: visible;
    opacity: 1;
    margin-top: 0;
    gap: 10px;
  }

  .footer-links a {
    width: 100%;
    max-width: 100%;
    padding: 3px 0;
    overflow-wrap: anywhere;
  }

  .footer-bottom {
    width: 100%;
    margin-top: 24px;
  }
}

@media (max-width: 480px) {
  .footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .footer-logo {
    font-size: 16px;
  }

  .footer-logo img {
    max-height: 34px;
  }

  .footer-links a {
    font-size: 14px;
  }
}
