/* Footer institucional compacto para teléfonos.
   No altera la presentación de escritorio. */
@media (max-width: 767.98px) {
  /* Reglas comunes */
  body .footer.compact-footer,
  body .footer.footer-compact,
  body #pastoralFooter {
    padding: 14px 0 8px !important;
    text-align: center !important;
  }

  body .footer.compact-footer .container,
  body .footer.footer-compact .container,
  body #pastoralFooter .pf-container {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  /* Páginas HTML: Inicio, Académico, Docentes, PPFF y Mesa de Partes */
  body .footer.compact-footer .row {
    display: block !important;
    margin: 0 !important;
  }

  body .footer.compact-footer .row > div {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Oculta enlaces rápidos en móvil. */
  body .footer.compact-footer .row > div:nth-child(2) {
    display: none !important;
  }

  body .footer.compact-footer .footer-brand {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 3px !important;
    margin: 0 0 5px !important;
  }

  body .footer.compact-footer .footer-brand img {
    width: auto !important;
    height: 38px !important;
    max-width: 125px !important;
    margin: 0 !important;
    object-fit: contain !important;
  }

  body .footer.compact-footer .footer-brand p {
    margin: 0 !important;
    font-size: .82rem !important;
    line-height: 1.2 !important;
    font-weight: 600 !important;
  }

  /* Oculta el lema largo. */
  body .footer.compact-footer .row > div:first-child > p {
    display: none !important;
  }

  body .footer.compact-footer .social-icons {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 7px !important;
    margin: 6px 0 8px !important;
  }

  body .footer.compact-footer .social-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 27px !important;
    height: 27px !important;
    min-width: 27px !important;
    font-size: .78rem !important;
    margin: 0 !important;
  }

  body .footer.compact-footer .footer-title {
    display: none !important;
  }

  body .footer.compact-footer .footer-info {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 4px 14px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
  }

  body .footer.compact-footer .footer-info li {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: .76rem !important;
    line-height: 1.25 !important;
  }

  /* Oculta horarios y correo; conserva ubicación y teléfono. */
  body .footer.compact-footer .footer-info li:nth-child(1),
  body .footer.compact-footer .footer-info li:nth-child(2),
  body .footer.compact-footer .footer-info li:nth-child(5) {
    display: none !important;
  }

  body .footer.compact-footer hr {
    margin: 8px 0 6px !important;
    opacity: .22 !important;
  }

  body .footer.compact-footer .footer-bottom p {
    margin: 0 !important;
    font-size: .69rem !important;
    line-height: 1.25 !important;
  }

  /* Pastoral */
  body #pastoralFooter .pf-grid {
    display: block !important;
    margin: 0 !important;
  }

  body #pastoralFooter .pf-grid > div {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body #pastoralFooter .pf-grid > div:nth-child(2) {
    display: none !important;
  }

  body #pastoralFooter .pf-brand {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 2px !important;
  }

  body #pastoralFooter .pf-logo {
    width: auto !important;
    height: 38px !important;
    max-width: 125px !important;
    margin: 0 0 2px !important;
    object-fit: contain !important;
  }

  body #pastoralFooter .pf-brand p {
    margin: 0 !important;
    font-size: .82rem !important;
    line-height: 1.2 !important;
    font-weight: 600 !important;
  }

  body #pastoralFooter .pf-brand p:nth-of-type(2) {
    display: none !important;
  }

  body #pastoralFooter .pf-social {
    display: flex !important;
    justify-content: center !important;
    gap: 7px !important;
    margin: 6px 0 8px !important;
  }

  body #pastoralFooter .pf-social a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 27px !important;
    height: 27px !important;
    min-width: 27px !important;
    font-size: .78rem !important;
    margin: 0 !important;
  }

  body #pastoralFooter .pf-grid > div:nth-child(3) h2 {
    display: none !important;
  }

  body #pastoralFooter .pf-grid > div:nth-child(3) ul {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 4px 14px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
  }

  body #pastoralFooter .pf-grid > div:nth-child(3) li {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: .76rem !important;
    line-height: 1.25 !important;
  }

  body #pastoralFooter .pf-grid > div:nth-child(3) li:nth-child(1),
  body #pastoralFooter .pf-grid > div:nth-child(3) li:nth-child(4) {
    display: none !important;
  }

  body #pastoralFooter hr {
    margin: 8px 0 6px !important;
    opacity: .22 !important;
  }

  body #pastoralFooter .pf-copy {
    margin: 0 !important;
    font-size: .69rem !important;
    line-height: 1.25 !important;
  }

  /* Panel administrativo */
  body .footer.footer-compact .footer-grid {
    display: block !important;
    margin: 0 !important;
  }

  body .footer.footer-compact .footer-grid > div {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body .footer.footer-compact .footer-grid > div:nth-child(2) {
    display: none !important;
  }

  body .footer.footer-compact .footer-brand-col {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 2px !important;
  }

  body .footer.footer-compact .footer-logo {
    width: auto !important;
    height: 38px !important;
    max-width: 125px !important;
    margin: 0 0 2px !important;
    object-fit: contain !important;
  }

  body .footer.footer-compact .footer-brand-col p {
    margin: 0 !important;
    font-size: .82rem !important;
    line-height: 1.2 !important;
    font-weight: 600 !important;
  }

  body .footer.footer-compact .footer-brand-col p:nth-of-type(2) {
    display: none !important;
  }

  body .footer.footer-compact .social-icons {
    display: flex !important;
    justify-content: center !important;
    gap: 7px !important;
    margin: 6px 0 8px !important;
  }

  body .footer.footer-compact .social-icons a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 27px !important;
    height: 27px !important;
    min-width: 27px !important;
    font-size: .78rem !important;
    margin: 0 !important;
  }

  body .footer.footer-compact .footer-grid > div:nth-child(3) .footer-title {
    display: none !important;
  }

  body .footer.footer-compact .footer-grid > div:nth-child(3) ul {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 4px 14px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
  }

  body .footer.footer-compact .footer-grid > div:nth-child(3) li {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: .76rem !important;
    line-height: 1.25 !important;
  }

  body .footer.footer-compact .footer-grid > div:nth-child(3) li:nth-child(1),
  body .footer.footer-compact .footer-grid > div:nth-child(3) li:nth-child(4) {
    display: none !important;
  }

  body .footer.footer-compact hr {
    margin: 8px 0 6px !important;
    opacity: .22 !important;
  }

  body .footer.footer-compact .footer-bottom p {
    margin: 0 !important;
    font-size: .69rem !important;
    line-height: 1.25 !important;
  }
}

@media (max-width: 380px) {
  body .footer.compact-footer,
  body .footer.footer-compact,
  body #pastoralFooter {
    padding-top: 11px !important;
  }

  body .footer.compact-footer .footer-info,
  body #pastoralFooter .pf-grid > div:nth-child(3) ul,
  body .footer.footer-compact .footer-grid > div:nth-child(3) ul {
    gap: 3px 9px !important;
  }

  body .footer.compact-footer .footer-info li,
  body #pastoralFooter .pf-grid > div:nth-child(3) li,
  body .footer.footer-compact .footer-grid > div:nth-child(3) li {
    font-size: .71rem !important;
  }
}
