/* =============================================================
   Custom fixes - bootstrap_dgesui
   Este archivo NO es sobreescrito por webpack.
   ============================================================= */

/* --- Estructura de flujo normal (page-wrapper) --- */
.page-wrapper { display: flex; flex-direction: column; }
.gobmx-header-row { width: 100%; }
.main-nav-row { width: 100%; }
.main-nav-row .sub-navbar {
  position: relative !important;
  top: auto !important;
  margin-top: 0 !important;
  z-index: auto !important;
}
.banner-row { width: 100%; }

/* --- Body sin margin/padding forzados --- */
body { padding-top: 0 !important; }
body.navbar-is-fixed-top { margin-top: 0 !important; }

/* --- Toolbar de Drupal: solo usuarios con permisos --- */
body.toolbar-fixed .page-wrapper { margin-top: 39px; }
body.toolbar-fixed.toolbar-horizontal.toolbar-tray-open .page-wrapper { margin-top: 79px; }

/* --- Sub-navbar sin margin-right de gobmx --- */
.admin-content-navbar { margin-right: 0 !important; }
@media (min-width: 991px) { .admin-content-navbar { margin-right: 0 !important; } }
.sub-navbar .navbar-collapse { margin-top: 0 !important; }

/* --- Footer wrapper --- */
.main-footer-wrapper { display: flex; flex-direction: column; }
.drupal-footer-row { position: relative; z-index: 1; }
.gobmx-footer-row { position: relative; z-index: 0; }
.drupal-footer .footer-top { margin-top: 0; }
#gobmx-footer-placeholder .footer-top { margin-top: 0 !important; }
.drupal-footer { margin-bottom: 20px; }

/* --- List group activo --- */
.list-group-item.active {
  background-color: #9d2449 !important;
  border-color: #9d2449 !important;
  color: #ffffff !important;
}
.list-group-item.active:hover {
  background-color: #7a1c39 !important;
  border-color: #7a1c39 !important;
}

/* --- jQuery UI datepicker polyfill --- */
#gobmx-footer-placeholder .main-footer .footer-top { margin-top: 0 !important; }

/* --- Responsivo --- */
@media (max-width: 767px) {
  .main-nav-row .sub-navbar .navbar-collapse { margin-top: 0; }
  .page-wrapper { flex-direction: column; }
  .scrollable-menu {
    max-height: 60vh;
    overflow-y: auto;
  }
}
