/**
 * Footer — Drenajes Agrícolas Mayo
 */

footer#dam-site-footer.dam-footer {
  --dam-footer-cta-space: 11rem;
  background-color: var(--color-brand-green) !important;
  color: #fff;
  padding-top: 0 !important;
  padding-bottom: 3rem !important;
  margin: 0;
  width: 100%;
  max-width: 100%;
}

/* Reserva hueco verde para el CTA solapado (equivalente pt-40 del rediseño) */
footer#dam-site-footer .dam-footer__spacer {
  display: block;
  width: 100%;
  height: var(--dam-footer-cta-space);
  min-height: var(--dam-footer-cta-space);
  margin: 0;
  padding: 0;
  border: 0;
  pointer-events: none;
}

@media (min-width: 768px) {
  footer#dam-site-footer.dam-footer {
    --dam-footer-cta-space: 12rem;
  }
}

@media (min-width: 1024px) {
  footer#dam-site-footer.dam-footer {
    --dam-footer-cta-space: 13rem;
  }
}

footer#dam-site-footer .dam-footer__main {
  padding-top: 0;
  padding-bottom: 0;
  margin-bottom: 4rem;
  border-bottom: none;
}

.dam-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

@media (min-width: 768px) {
  .dam-footer__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
  }
}

@media (min-width: 1024px) {
  .dam-footer__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
  }
}

/* Marca */
.dam-footer__brand {
  display: inline-block;
  margin-bottom: 1.5rem;
  text-decoration: none;
  color: inherit;
}

.dam-footer__brand:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
  border-radius: 2px;
}

.dam-footer__logo--text {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem;
  font-size: 1.5rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.dam-footer__logo--image {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}

.dam-footer__logo-img {
  display: block;
  width: auto;
  max-height: 72px;
  height: auto;
}

@media (min-width: 768px) {
  .dam-footer__logo-img {
    max-height: 80px;
  }
}

@media (min-width: 1024px) {
  .dam-footer__logo-img {
    max-height: 88px;
  }
}

.dam-footer__logo-primary {
  font-weight: 700;
}

.dam-footer__logo-secondary {
  font-weight: 300;
  opacity: 0.8;
}

.dam-footer__about {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.625;
  opacity: 0.8;
}

/* Títulos de columna */
.dam-footer__heading {
  margin: 0 0 1.5rem;
  font-size: 0.875rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Menú */
.dam-footer__menu {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.dam-footer__menu-item {
  margin: 0;
}

.dam-footer__link {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85) !important;
  text-decoration: none !important;
  transition: color var(--transition-base);
}

footer#dam-site-footer a.dam-footer__link:hover,
footer#dam-site-footer a.dam-footer__link:focus-visible {
  color: var(--color-brand-sand) !important;
  text-decoration: none !important;
}

.dam-footer__link:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.dam-footer__menu--fallback .dam-footer__link {
  font-size: 0.875rem;
}

/* Contacto (columna 3) */
.dam-footer__text {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.625;
  opacity: 0.8;
}

.dam-footer__contact-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dam-footer__contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin: 0;
}

.dam-footer__contact-icon {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1.25rem;
  margin-top: 0.125rem;
  color: #fff;
  opacity: 0.9;
}

.dam-footer__contact-icon svg {
  display: block;
  width: 1rem;
  height: 1rem;
}

.dam-footer__contact-text {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
}

footer#dam-site-footer a.dam-footer__contact-link {
  color: rgba(255, 255, 255, 0.85) !important;
  text-decoration: none !important;
  transition: color var(--transition-base);
  word-break: break-word;
}

footer#dam-site-footer a.dam-footer__contact-link:hover,
footer#dam-site-footer a.dam-footer__contact-link:focus-visible {
  color: var(--color-brand-sand) !important;
  text-decoration: none !important;
}

footer#dam-site-footer a.dam-footer__contact-link:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Redes sociales */
.dam-footer__social {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgb(244 237 228 / 0.15);
}

.dam-footer__social-label {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
}

.dam-footer__social-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dam-footer__social-item {
  margin: 0;
}

footer#dam-site-footer a.dam-footer__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  color: #fff !important;
  text-decoration: none !important;
  background-color: rgb(255 255 255 / 0.08);
  border: 1px solid rgb(255 255 255 / 0.15);
  border-radius: 9999px;
  transition: background-color var(--transition-base), color var(--transition-base), border-color var(--transition-base);
}

footer#dam-site-footer a.dam-footer__social-link svg {
  display: block;
  width: 1.125rem;
  height: 1.125rem;
}

footer#dam-site-footer a.dam-footer__social-link:hover,
footer#dam-site-footer a.dam-footer__social-link:focus-visible {
  color: var(--color-brand-green) !important;
  background-color: var(--color-brand-sand) !important;
  border-color: var(--color-brand-sand) !important;
  text-decoration: none !important;
}

footer#dam-site-footer a.dam-footer__social-link:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Barra inferior (cookies + legal + copyright) */
.dam-footer__bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding-top: 2rem;
  border-top: 1px solid rgb(244 237 228 / 0.2);
  text-align: center;
}

@media (min-width: 768px) {
  .dam-footer__bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
  }
}

.dam-footer__bottom-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

@media (min-width: 768px) {
  .dam-footer__bottom-meta {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem 1.5rem;
    width: auto;
    margin-left: auto;
  }
}

.dam-footer__legal-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 768px) {
  .dam-footer__legal-list {
    justify-content: flex-end;
  }
}

.dam-footer__legal-item {
  margin: 0;
}

footer#dam-site-footer a.dam-footer__legal-link {
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.75) !important;
  text-decoration: none !important;
  transition: color var(--transition-base);
}

footer#dam-site-footer a.dam-footer__legal-link:hover,
footer#dam-site-footer a.dam-footer__legal-link:focus-visible {
  color: var(--color-brand-sand) !important;
  text-decoration: none !important;
}

footer#dam-site-footer a.dam-footer__legal-link:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.dam-footer__cookies,
.dam-footer__copyright {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.5;
  opacity: 0.6;
}

@media (min-width: 768px) {
  .dam-footer__cookies {
    text-align: left;
    flex: 1 1 auto;
  }

  .dam-footer__copyright {
    text-align: right;
  }
}
