/**
 * Site footer — hub canónico (index.php) + reuso en homes / legales / fichas.
 * Desktop: mismos valores visuales que el footer inline histórico del hub.
 * Mobile: solo dentro de @media (max-width: 1024px) / 768px.
 */

.footer {
  --site-footer-bg: #2c3e50;
  --site-footer-fg: #ffffff;
  --site-footer-heading: #3498db;
  --site-footer-link: #bdc3c7;
  --site-footer-link-hover: #3498db;
  --site-footer-border: #34495e;
  --site-footer-legal: #95a5a6;
  --site-footer-muted: #7f8c8d;
  --site-footer-pad-y-top: 60px;
  --site-footer-pad-y-bottom: 30px;
  --site-footer-gap: 40px;
  --site-footer-section-gap: 20px;
  --site-footer-li-gap: 10px;
  --site-footer-legal-gap-y: 12px;
  --site-footer-legal-gap-x: 22px;
  --site-footer-legal-mb: 18px;
  --site-footer-legal-pad-x: 12px;
  --site-footer-legal-size: 0.88rem;
  --site-footer-note-size: 0.82rem;
  --site-footer-note-mt: 12px;
  --site-footer-note-max: 720px;
  --site-footer-content-mb: 40px;
  --site-footer-bottom-pt: 30px;
  --site-footer-container-max: 1200px;
  --site-footer-container-pad-x: 20px;
  --site-footer-col-min: 250px;

  background: var(--site-footer-bg);
  color: var(--site-footer-fg);
  padding: var(--site-footer-pad-y-top) 0 var(--site-footer-pad-y-bottom);
}

.footer .container {
  max-width: var(--site-footer-container-max);
  margin: 0 auto;
  padding: 0 var(--site-footer-container-pad-x);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--site-footer-col-min), 1fr));
  gap: var(--site-footer-gap);
  margin-bottom: var(--site-footer-content-mb);
}

.footer-section h3 {
  margin-bottom: var(--site-footer-section-gap);
  color: var(--site-footer-heading);
}

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

.footer-section ul li {
  margin-bottom: var(--site-footer-li-gap);
}

.footer-section ul li a {
  color: var(--site-footer-link);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section ul li a:hover {
  color: var(--site-footer-link-hover);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--site-footer-bottom-pt);
  border-top: 1px solid var(--site-footer-border);
  color: var(--site-footer-link);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--site-footer-legal-gap-y) var(--site-footer-legal-gap-x);
  margin-bottom: var(--site-footer-legal-mb);
  padding: 0 var(--site-footer-legal-pad-x);
}

.footer-legal a {
  color: var(--site-footer-legal);
  font-size: var(--site-footer-legal-size);
  text-decoration: none;
}

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

.footer-bottom-note {
  font-size: var(--site-footer-note-size);
  color: var(--site-footer-muted);
  margin-top: var(--site-footer-note-mt);
  line-height: 1.45;
  max-width: var(--site-footer-note-max);
  margin-left: auto;
  margin-right: auto;
}

/* RESPONSIVE MOBILE — inicio */
@media (max-width: 1024px) {
  .footer {
    --rwd-footer-pad-y-top: var(--rwd-space-xl, 48px);
    --rwd-footer-pad-y-bottom: var(--rwd-space-lg, 32px);
    --rwd-footer-gap: var(--rwd-space-lg, 32px);
    --rwd-footer-content-mb: var(--rwd-space-lg, 32px);
    --rwd-footer-bottom-pt: var(--rwd-space-md, 24px);
    --rwd-footer-legal-gap: var(--rwd-space-sm, 16px);
    --rwd-footer-container-pad-x: var(--rwd-space-sm, 16px);

    padding: var(--rwd-footer-pad-y-top) 0 var(--rwd-footer-pad-y-bottom);
  }

  .footer .container {
    padding: 0 var(--rwd-footer-container-pad-x);
  }

  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: var(--rwd-footer-gap);
    margin-bottom: var(--rwd-footer-content-mb);
  }

  .footer-section ul li a,
  .footer-legal a {
    display: inline-flex;
    align-items: center;
    min-height: var(--rwd-touch-target-min, 44px);
  }

  .footer-legal {
    flex-direction: column;
    align-items: center;
    gap: var(--rwd-footer-legal-gap);
  }

  .footer-bottom {
    padding-top: var(--rwd-footer-bottom-pt);
  }
}

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--rwd-space-md, 24px);
  }

  .footer-section h3 {
    margin-bottom: var(--rwd-space-sm, 16px);
    font-size: var(--rwd-font-lg, 18px);
  }

  .footer-section p,
  .footer-section ul li,
  .footer-bottom p {
    font-size: var(--rwd-font-base, 16px);
    line-height: var(--rwd-line-height-base, 1.4);
  }

  .footer-legal a {
    font-size: var(--rwd-font-sm, 14px);
    width: 100%;
    justify-content: center;
  }

  .footer-bottom-note {
    font-size: var(--rwd-font-sm, 14px);
    padding: 0 var(--rwd-space-xs, 8px);
  }
}
/* RESPONSIVE MOBILE — fin */
