.site-footer {
    width: 100%;
    min-height: 76px;
    margin-top: 0;
    padding-block: 8px;
    background: #020811;
}

.site-footer > .container {
    display: grid;
    grid-template-columns: minmax(230px, 1.45fr) repeat(3, minmax(120px, .72fr)) minmax(275px, 1.35fr);
    align-items: start;
    column-gap: clamp(16px, 2.3vw, 36px);
}

.footer-grid { display: contents; }

.footer-brand h2 {
    font-size: 15px;
    line-height: 1.1;
}

.footer-brand h2 span { color: var(--color-primary); }

.footer-brand p,
.footer-column a,
.footer-bottom p {
    font-size: 11px;
    line-height: 1.25;
}

.footer-brand p { margin-top: 2px; }
.footer-version { margin-top: 1px; }

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.footer-column h3 {
    margin-bottom: 2px;
    font-size: 11px;
    line-height: 1.2;
}

.footer-column a { color: var(--color-muted); }

/* Facebook queda fuera del footer hasta que se habilite el canal. */
.footer-column:last-child a:nth-of-type(2) { display: none; }

.footer-bottom {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0;
    padding: 0;
    border: 0;
}

@media (max-width: 900px) {
    .site-footer { min-height: 0; padding-block: 10px; }
    .site-footer > .container { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 12px; }
    .footer-grid { display: grid; grid-template-columns: subgrid; grid-column: 1 / -1; row-gap: 12px; }
    .footer-bottom { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
    .site-footer > .container { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
}


/* ==========================================================
   FOOTER MOBILE V2 — más horizontal y compacto
   ========================================================== */
@media (max-width: 560px) {
    .site-footer {
        padding: 7px 0 6px !important;
    }

    .site-footer > .container {
        grid-template-columns: 1fr !important;
        row-gap: 6px !important;
    }

    .footer-grid {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 7px 9px !important;
        align-items: start !important;
    }

    .footer-brand {
        grid-column: 1 / -1 !important;
        display: grid !important;
        grid-template-columns: auto minmax(0,1fr) auto !important;
        align-items: center !important;
        gap: 7px !important;
        padding-bottom: 4px !important;
        border-bottom: 1px solid rgba(255,255,255,.06);
    }

    .footer-brand h2 {
        margin: 0 !important;
        font-size: 13px !important;
        white-space: nowrap !important;
    }

    .footer-brand p {
        margin: 0 !important;
        overflow: hidden !important;
        font-size: 9px !important;
        line-height: 1.1 !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    .footer-version {
        justify-self: end !important;
        color: var(--color-muted) !important;
        font-size: 8.5px !important;
    }

    .footer-column {
        min-width: 0 !important;
        gap: 2px !important;
    }

    .footer-column h3 {
        margin: 0 0 2px !important;
        font-size: 9.5px !important;
        line-height: 1.05 !important;
    }

    .footer-column a {
        overflow: hidden !important;
        font-size: 9px !important;
        line-height: 1.15 !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    .footer-bottom {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 10px !important;
        padding-top: 4px !important;
        border-top: 1px solid rgba(255,255,255,.05) !important;
    }

    .footer-bottom p {
        margin: 0 !important;
        font-size: 8px !important;
        line-height: 1.1 !important;
        white-space: nowrap !important;
    }

    .footer-bottom p:last-child {
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
}


/* ==========================================================
   FOOTER MOBILE V3 — marca breve + tres columnas reales.
   Evita el footer vertical enorme; conserva todos los enlaces
   y el texto legal. Sin cambios en tablet o escritorio.
   ========================================================== */
@media (max-width: 560px) {
  .site-footer {
    min-height: 0 !important;
    padding: 10px 0 12px !important;
  }

  .site-footer > .container {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    width: calc(100% - 28px) !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    row-gap: 10px !important;
  }

  .site-footer .footer-grid {
    display: grid !important;
    grid-column: 1 !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    column-gap: 11px !important;
    row-gap: 10px !important;
    align-items: start !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .site-footer .footer-brand {
    grid-column: 1 / -1 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-rows: auto auto !important;
    gap: 3px 10px !important;
    align-items: center !important;
    min-width: 0 !important;
    padding-bottom: 8px !important;
    border-bottom: 1px solid rgba(125, 170, 195, .14) !important;
    text-align: left !important;
  }

  .site-footer .footer-brand h2 {
    grid-column: 1 !important;
    grid-row: 1 !important;
    margin: 0 !important;
    font-size: 17px !important;
    line-height: 1.15 !important;
    text-align: left !important;
  }

  .site-footer .footer-brand p:not(.footer-version) {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    margin: 0 !important;
    font-size: 10px !important;
    line-height: 1.25 !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    text-align: left !important;
  }

  .site-footer .footer-brand .footer-version {
    grid-column: 2 !important;
    grid-row: 1 !important;
    justify-self: end !important;
    margin: 0 !important;
    font-size: 9.5px !important;
    white-space: nowrap !important;
  }

  .site-footer .footer-column {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    min-width: 0 !important;
    width: 100% !important;
    gap: 5px !important;
    text-align: left !important;
  }

  .site-footer .footer-column h3 {
    margin: 0 0 2px !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
    text-align: left !important;
    white-space: normal !important;
  }

  .site-footer .footer-column a {
    display: block !important;
    max-width: 100% !important;
    margin: 0 !important;
    font-size: 10px !important;
    line-height: 1.2 !important;
    text-align: left !important;
    white-space: normal !important;
    overflow: visible !important;
    overflow-wrap: anywhere !important;
    text-overflow: clip !important;
  }

  /* Mantener Facebook oculto hasta que exista su enlace real. */
  .site-footer .footer-column:last-child a:nth-of-type(2) {
    display: none !important;
  }

  .site-footer .footer-bottom {
    grid-column: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 3px !important;
    width: 100% !important;
    padding: 8px 0 0 !important;
    border-top: 1px solid rgba(125, 170, 195, .12) !important;
  }

  .site-footer .footer-bottom p {
    width: 100% !important;
    margin: 0 !important;
    font-size: 9px !important;
    line-height: 1.2 !important;
    text-align: left !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }
}
