/*!
 * Enatech Keys — Footer unificado
 *
 * ARCHIVO CANÓNICO: este es el único lugar donde se editan los estilos del
 * footer. Lo usan dos proyectos:
 *
 *   1. El módulo de instructivos (instructivos/assets/css/footer.css)
 *   2. El plugin de WordPress   (enatech-footer/assets/footer.css)
 *
 * Después de editarlo, propagá la copia con `bin/sync-footer-css.sh`.
 *
 * Es autocontenido a propósito: todas las variables llevan un valor de
 * respaldo, así funciona igual dentro del child theme (que define sus propios
 * tokens) que en el subdominio.
 */

.eki-footer {
    flex-shrink: 0;
    background: linear-gradient(402deg, #7902a0 30%, #4b418c 100%);
    color: var(--ek-gray-300, #d1d5db);
    /* La tipografía se fija acá, sin depender de los tokens del sitio que
       aloja el footer: es la única forma de que el subdominio y WordPress
       rendericen exactamente igual, incluso si falla la carga de DM Sans. */
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    text-align: left;
    /* Sin margen superior: el footer arranca pegado al contenido. El aire lo
       da su propio padding (3.5rem), así no queda una franja del color de
       fondo de la página entre la última sección y el footer. */
    margin-top: 0;
    /* El suavizado también se fija acá: si lo hereda del body de cada sitio,
       el mismo texto se rasteriza distinto en WordPress y en el subdominio. */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.eki-footer *,
.eki-footer *::before,
.eki-footer *::after {
    box-sizing: border-box;
}

.eki-footer-container {
    max-width: var(--ek-container-max, 1200px);
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

.eki-footer-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 2.5rem 3rem;
    padding: 3.5rem 0 2.5rem;
}

.eki-footer-brand {
    flex: 1 1 260px;
    max-width: 360px;
}

.eki-footer-col {
    flex: 1 1 150px;
    min-width: 140px;
}

/* Marca del footer ------------------------------------------------------- */

.eki-footer .eki-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 700;
    font-size: 1.4rem;
    color: #fff;
    text-decoration: none;
    margin-bottom: 1rem;
}

.eki-footer .eki-brand:hover {
    color: #fff;
}

.eki-footer .eki-brand img {
    display: block;
    width: auto;
    max-width: 100%;
}

.eki-footer .eki-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: var(--ek-radius-md, 10px);
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    flex-shrink: 0;
}

.eki-footer .eki-brand-mark svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Cuando se reutiliza el logo del header, se blanquea con el mismo filtro
   que aplica el child theme de WordPress. */
.eki-logo-blanco {
    filter: brightness(3) saturate(0);
}

.eki-footer-desc {
    font-size: 0.92rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.78);
    margin: 0;
}

/* La descripción admite HTML: se acotan los márgenes de lo que pueda venir. */
.eki-footer .eki-footer-desc > *:first-child {
    margin-top: 0;
}

.eki-footer .eki-footer-desc > *:last-child {
    margin-bottom: 0;
}

.eki-footer .eki-footer-desc p {
    margin: 0 0 0.75rem;
}

.eki-footer .eki-footer-desc a {
    color: inherit;
}

.eki-footer .eki-footer-desc svg {
    flex: 0 0 auto;
    max-width: 100%;
}

/* Un SVG pegado sin width/height se expande a 300px y descuadra la columna:
   se le da un tamaño de icono razonable salvo que traiga medidas propias. */
.eki-footer .eki-footer-desc svg:not([width]):not([height]) {
    width: 20px;
    height: 20px;
}

/* Bloque de contacto ------------------------------------------------------ */

.eki-footer .eki-footer-contacto {
    list-style: none;
    margin: 1.1rem 0 0;
    padding: 0;
    font-size: 0.92rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.78);
}

.eki-footer .eki-footer-contacto li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 12px;
}

.eki-footer .eki-footer-contacto li:last-child {
    margin-bottom: 0;
}

.eki-footer .eki-footer-contacto svg {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    margin-top: 2px;
    fill: none;
    stroke: currentColor;
}

.eki-footer .eki-footer-contacto a {
    color: inherit;
    text-decoration: none;
}

.eki-footer .eki-footer-contacto a:hover,
.eki-footer .eki-footer-contacto a:focus-visible {
    color: #fff;
    text-decoration: underline;
}

/* Columnas de enlaces ---------------------------------------------------- */

.eki-footer-title {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: normal;
    text-transform: none;
    color: #fff;
    margin: 0 0 1rem;
    padding: 0;
    border: none;
}

.eki-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.eki-footer li {
    margin: 0 0 0.6rem;
    padding: 0;
    line-height: 1.6;
    border: none;
}

.eki-footer li::before,
.eki-footer li::marker {
    content: none;
}

.eki-footer a {
    color: var(--ek-gray-300, #d1d5db);
    font-size: 0.92rem;
    text-decoration: none;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.eki-footer a:hover,
.eki-footer a:focus-visible {
    color: #fff;
}

/* Barra inferior --------------------------------------------------------- */

.eki-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.eki-footer-bottom .eki-footer-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
}

.eki-copyright {
    color: #b9d0ff;
    font-size: 0.85rem;
    margin: 0;
}

/* Medios de pago --------------------------------------------------------- */

.eki-footer-pagos {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.eki-pago {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.eki-pago img {
    display: block;
    height: 30px;
    width: auto;
    max-width: none;
    filter: none;
}

/* Responsive ------------------------------------------------------------- */

@media (max-width: 921px) {
    .eki-footer-container {
        padding: 0 1.25rem;
    }

    .eki-footer-inner {
        gap: 2rem;
        padding: 2.5rem 0 2rem;
    }

    .eki-footer-brand {
        flex-basis: 100%;
        max-width: none;
    }
}

@media (max-width: 520px) {
    .eki-footer-col {
        flex-basis: 100%;
    }

    .eki-footer-bottom .eki-footer-container {
        justify-content: center;
        text-align: center;
    }

    .eki-footer-pagos {
        justify-content: center;
    }
}
