/* ==========================================================================
   Footer
   ==========================================================================
   Decisión: el footer solo vive in-page en Home/Index. El resto de las
   vistas no tienen footer — dejan que el contenido respire hasta el
   borde del viewport.

   Los links legales (Privacy / Terms / Cookies) viven en la home (sección
   home-footer). Para acceso desde otras vistas, se llega vía el menú
   "Ayuda" del navbar o vía la home directamente.

   .home-footer       → sección final tipo "rich footer" en Home/Index
                        con 4 columnas (Brand / Producto / Información /
                        Biblioteca) y fine print con copyright + version.
   ========================================================================== */


/* -------------------------------------------------------------------------
   Compatibilidad legacy — el footer ya no es position:fixed,
   ninguna vista necesita reservar espacio para él.
   ------------------------------------------------------------------------- */

:root {
    --footer-height: 0px;
}

.content-with-footer {
    padding-bottom: 0;
}


/* ==========================================================================
   Home footer in-page — sección final rica
   ==========================================================================
   Es una <section>, no un <footer>, porque cumple función VISUAL de
   footer pero vive dentro de la home. Cierra la página con info
   institucional + producto + biblioteca + créditos.
   ========================================================================== */

.home-footer {
    padding: var(--home-section-y) 0 2.5rem;
}

.home-footer__grid {
    display: grid;
    gap: 2.5rem 3rem;
    grid-template-columns: 1fr;
    margin-bottom: 2.5rem;
}

@media (min-width: 768px) {
    .home-footer__grid {
        grid-template-columns: 1.6fr 1fr 1fr 1fr;
    }
}

@media (min-width: 1200px) {
    .home-footer__grid {
        gap: 2.5rem 4rem;
    }
}


/* -------------------------------------------------------------------------
   Brand column
   ------------------------------------------------------------------------- */

.home-footer__logo {
    display: inline-block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.015em;
    margin-bottom: 1rem;
}

.home-footer__tagline {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.55;
    max-width: 38ch;
    margin: 0 0 1.25rem;
}

.home-footer__tagline-em {
    font-style: italic;
    color: var(--primary-color);
}

.home-footer__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 180ms ease;
}

.home-footer__cta i {
    transition: transform 220ms var(--ease-out-strong);
}

.home-footer__cta:hover {
    color: var(--text-primary);
}

.home-footer__cta:hover i {
    transform: translateX(4px);
}


/* -------------------------------------------------------------------------
   Nav columns
   ------------------------------------------------------------------------- */

.home-footer__heading {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 1.1rem;
}

.home-footer__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.home-footer__list a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.92rem;
    transition: color 180ms ease;
}

.home-footer__list a:hover,
.home-footer__list a:focus-visible {
    color: var(--primary-color);
}


/* -------------------------------------------------------------------------
   Fine print
   ------------------------------------------------------------------------- */

.home-footer__fine {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.85rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.8rem;
}

.home-footer__copy,
.home-footer__version {
    font-variant-numeric: tabular-nums;
}

.home-footer__sep {
    color: var(--border-color);
}

.home-footer__credit {
    margin-left: auto;
    color: var(--text-muted);
}

.home-footer__credit-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 180ms ease;
}

.home-footer__credit-link:hover,
.home-footer__credit-link:focus-visible {
    color: var(--primary-color);
}

@media (max-width: 575.98px) {
    .home-footer__credit {
        margin-left: 0;
        width: 100%;
        margin-top: 0.5rem;
    }
}


/* ==========================================================================
   Home footer in-page — sección final rica
   ==========================================================================
   Es una <section>, no un <footer>, porque cumple función VISUAL de
   footer pero vive dentro de la home. Cierra la página con info
   institucional + producto + biblioteca + créditos.
   ========================================================================== */

.home-footer {
    padding: var(--home-section-y) 0 2.5rem;
}

.home-footer__grid {
    display: grid;
    gap: 2.5rem 3rem;
    grid-template-columns: 1fr;
    margin-bottom: 2.5rem;
}

@media (min-width: 768px) {
    .home-footer__grid {
        grid-template-columns: 1.6fr 1fr 1fr 1fr;
    }
}

@media (min-width: 1200px) {
    .home-footer__grid {
        gap: 2.5rem 4rem;
    }
}


/* -------------------------------------------------------------------------
   Brand column
   ------------------------------------------------------------------------- */

.home-footer__logo {
    display: inline-block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.015em;
    margin-bottom: 1rem;
}

.home-footer__tagline {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.55;
    max-width: 38ch;
    margin: 0 0 1.25rem;
}

.home-footer__tagline-em {
    font-style: italic;
    color: var(--primary-color);
}

.home-footer__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 180ms ease;
}

.home-footer__cta i {
    transition: transform 220ms var(--ease-out-strong);
}

.home-footer__cta:hover {
    color: var(--text-primary);
}

.home-footer__cta:hover i {
    transform: translateX(4px);
}


/* -------------------------------------------------------------------------
   Nav columns
   ------------------------------------------------------------------------- */

.home-footer__heading {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 1.1rem;
}

.home-footer__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.home-footer__list a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.92rem;
    transition: color 180ms ease;
}

.home-footer__list a:hover,
.home-footer__list a:focus-visible {
    color: var(--primary-color);
}


/* -------------------------------------------------------------------------
   Fine print
   ------------------------------------------------------------------------- */

.home-footer__fine {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.85rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.8rem;
}

.home-footer__copy,
.home-footer__version {
    font-variant-numeric: tabular-nums;
}

.home-footer__sep {
    color: var(--border-color);
}

.home-footer__credit {
    margin-left: auto;
    color: var(--text-muted);
}

.home-footer__credit-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 180ms ease;
}

.home-footer__credit-link:hover,
.home-footer__credit-link:focus-visible {
    color: var(--primary-color);
}

@media (max-width: 575.98px) {
    .home-footer__credit {
        margin-left: 0;
        width: 100%;
        margin-top: 0.5rem;
    }
}
