/* Ajustes visuales propios del proyecto (colores institucionales).
   - NO tocar la carpeta de ejemplo (theme/)
   - solo hace overrides
*/

:root{
  --ins-bg: #F2F1EF;
  --ins-primary: #324A88;
  --ins-accent: #2FC9A7;
  --ins-text: #1f2a44;
  --ins-muted: #6b7280;
  --ins-card: #ffffff;
  --ins-border: rgba(31, 42, 68, 0.10);
  --primary: #324A88;
}

body { 
  background: var(--ins-bg); 
  color: var(--ins-text);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
}

/* Layout público: pie visible y alineado al fondo en páginas cortas */
.jb-public-body {
  background: var(--ins-bg);
}
.jb-site-footer {
  border-color: var(--ins-border) !important;
  box-shadow: 0 -4px 24px rgba(31, 42, 68, 0.06);
  padding-top: 1.75rem;
  padding-bottom: 1.75rem;
}
@media (min-width: 768px) {
  .jb-site-footer {
    padding-top: 2.25rem;
    padding-bottom: 2.25rem;
  }
}
.jb-footer-container {
  padding-left: 1rem;
  padding-right: 1rem;
}
.jb-site-footer a:hover {
  color: var(--ins-primary) !important;
}
.jb-footer-oneline {
  font-size: 0.875rem;
  line-height: 1.8;
  letter-spacing: 0.02em;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  column-gap: clamp(1rem, 4vw, 2.5rem);
  row-gap: 0.85rem;
}
.jb-footer-part {
  display: inline-block;
  padding: 0.2rem 0.35rem;
  max-width: 100%;
}
@media (min-width: 992px) {
  .jb-footer-oneline {
    flex-wrap: nowrap;
    column-gap: 2.25rem;
    white-space: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    justify-content: center;
    padding-bottom: 0.35rem;
  }
  .jb-footer-part {
    padding: 0.2rem 0.5rem;
  }
}

/* Home: separación respecto al navbar (main usa pt-* en home.php) */
.jb-home-tight-top .twm-home1-banner-section{
  margin-top: 0 !important;
}

/* Hero: aire superior dentro del bloque (imagen + textos no pegados al borde del card) */
.jb-home-tight-top .twm-home1-banner-section.jb-hero-banner {
  overflow: visible !important;
  padding-top: 1.75rem !important;
}

@media (min-width: 992px) {
  .jb-home-tight-top .twm-home1-banner-section.jb-hero-banner {
    padding-top: 2.25rem !important;
  }
}

.jb-home-tight-top .jb-hero-banner-row.align-items-center {
  align-items: flex-start !important;
}

/* Columna de textos del hero: aire respecto al borde superior del card */
.jb-home-tight-top .jb-hero-bnr-text-col {
  padding-top: 0.65rem !important;
}
@media (min-width: 992px) {
  .jb-home-tight-top .jb-hero-bnr-text-col {
    padding-top: 0.85rem !important;
  }
}
.jb-home-tight-top .jb-hero-main-title {
  margin-top: 0.15rem;
}

/* Filtro programa: flujo en bloque + grid (evita flex + inline-table del .site-button del theme) */
.jb-home-tight-top .jb-hero-program-search {
  position: relative;
  z-index: 2;
  padding: 1.15rem 1.3rem 1.25rem;
  background: #fff !important;
  border-color: var(--ins-border) !important;
  box-sizing: border-box;
  overflow: visible;
  isolation: isolate;
}

.jb-home-tight-top .jb-hero-program-search-form {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
}

.jb-home-tight-top .jb-hero-program-search-label-wrap {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  flex: 0 0 auto;
}

.jb-home-tight-top .jb-hero-program-search-label {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  letter-spacing: 0.04em;
  font-size: 0.7rem !important;
  line-height: 1.35 !important;
  position: relative !important;
  float: none !important;
}

.jb-home-tight-top .jb-hero-program-search-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  align-items: stretch;
  width: 100%;
  margin: 0;
  padding: 0;
  position: relative !important;
  float: none !important;
}

/* Theme global .form-select { height: 50px } — forzar tamaño coherente solo aquí */
.jb-home-tight-top .jb-hero-program-search-select.form-select {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  font-weight: 500;
  font-size: 0.95rem !important;
  line-height: 1.35 !important;
  height: 52px !important;
  min-height: 52px !important;
  padding: 0.5rem 2.5rem 0.5rem 0.95rem !important;
  border-color: rgba(31, 42, 68, 0.14) !important;
  border-radius: 0.5rem !important;
  box-sizing: border-box !important;
  position: relative !important;
  float: none !important;
}

.jb-home-tight-top .jb-hero-program-search-btn.btn {
  width: 100% !important;
  min-height: 52px !important;
  height: 52px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0.5rem 1.25rem !important;
  margin: 0 !important;
  white-space: nowrap;
  box-sizing: border-box !important;
  position: relative !important;
  float: none !important;
}

@media (min-width: 576px) {
  .jb-home-tight-top .jb-hero-program-search-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
  }

  .jb-home-tight-top .jb-hero-program-search-btn.btn {
    width: auto !important;
    min-width: 158px;
  }
}

/* CTA egresado: debajo del filtro, sin montarse */
.jb-home-tight-top .jb-hero-egresado-cta {
  position: relative;
  z-index: 1;
  margin-top: 1.75rem !important;
  clear: both;
}

/* Home (móvil): tarjetas y CTA más compactos */
@media (max-width: 767.98px) {
  .jb-home-tight-top .hpage-6-featured-block{
    padding: 14px !important;
  }

  .jb-home-tight-top .hpage-6-featured-block h4{
    font-size: 1rem !important;
    line-height: 1.25 !important;
  }

  .jb-home-tight-top .hpage-6-featured-block .company-logo{
    width: 54px !important;
    height: 54px !important;
    min-width: 54px !important;
  }

  .jb-home-tight-top .hpage-6-featured-block .badge{
    font-size: 0.7rem !important;
    padding: 4px 8px !important;
  }

  .jb-home-tight-top .hpage-6-featured-block .site-button{
    font-size: 0.78rem !important;
    padding: 7px 11px !important;
    border-radius: 8px !important;
  }

  /* Home (móvil): botón "Ver todos los empleos" más visible */
  .jb-home-tight-top a.site-button.outline{
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: 420px;
    padding: 12px 16px !important;
    font-size: 0.92rem !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    border-radius: 14px !important;
    border: 2px solid rgba(50, 74, 136, 0.25) !important;
    box-shadow: 0 10px 24px rgba(31, 42, 68, 0.14) !important;
  }
}

main {
  flex: 1 0 auto;
}

footer {
  flex-shrink: 0;
}

/* Links */
a{ color: var(--ins-primary); }
a:hover{ color: #26396a; }

/* Botones principales (bootstrap + theme) */
.btn-primary,
.site-button{
  background-color: var(--ins-primary) !important;
  border-color: var(--ins-primary) !important;
}
.btn-primary:hover,
.site-button:hover{
  filter: brightness(0.95);
}

.site-text-primary,
.twm-text-primary{ color: var(--ins-primary) !important; }

.btn-success{
  background-color: var(--ins-accent) !important;
  border-color: var(--ins-accent) !important;
}

/* Botón acento */
.btn-accent,
.btn-accent.site-button{
  background-color: var(--ins-accent) !important;
  border-color: var(--ins-accent) !important;
  /* Importante para que se vea el "efecto" del theme (text-shadow) */
  color: rgba(0, 0, 0, 0) !important;
  text-shadow: 0 0 0 #fff, 400px 0 0 #fff;
}
.btn-accent:hover{
  filter: brightness(0.96);
  text-shadow: -400px 0 0 #fff, 0 0 0 #fff;
}

/* Mantener blanco también en hover (theme pone negro) */
.site-button:hover,
.btn-accent.site-button:hover{
  color: rgba(0, 0, 0, 0) !important;
}

/* Superficies y tarjetas */
.site-bg-white{ background-color: #ffffff !important; }
.site-bg-gray{ background-color: rgba(50, 74, 136, 0.06) !important; }

.panel,
.twm-jobs-list-style1,
.twm-right-section-panel{
  border-radius: 14px;
}

.panel.panel-default,
.twm-jobs-list-style1{
  background: var(--ins-card);
  border: 1px solid var(--ins-border);
  box-shadow: 0 10px 30px rgba(31, 42, 68, 0.08);
}

/* Header (estilo index-15): mejorar contraste y borde */
.header-style-3.h-page-15-hdr .main-bar{
  background: linear-gradient(135deg, rgba(50, 74, 136, 0.96), rgba(47, 201, 167, 0.14));
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.header-style-3.h-page-15-hdr .twm-nav-sign-up{
  border: 1px solid rgba(255,255,255,0.28);
}

/* Admin sidebar: resaltar activo con color institucional */
#sidebar-admin-wraper{
  background: linear-gradient(180deg, rgba(50, 74, 136, 0.98), rgba(30, 43, 80, 0.98));
}
#sidebar-admin-wraper .admin-nav-text,
#sidebar-admin-wraper i{ color: rgba(255,255,255,0.90) !important; }

#sidebar-admin-wraper .admin-nav{
  /* Scroll SOLO si hay overflow */
  height: calc(100vh - 150px);
  padding-left: 30px;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Que los items no queden pegados al borde */
#sidebar-admin-wraper .admin-nav ul > li > a{
  padding: 10px 15px 10px 40px;
  border-radius: 10px 0 0 10px;
}

/* Scrollbar discreto (solo si aparece) */
#sidebar-admin-wraper .admin-nav::-webkit-scrollbar{
  width: 8px;
}
#sidebar-admin-wraper .admin-nav::-webkit-scrollbar-track{
  background: transparent;
}
#sidebar-admin-wraper .admin-nav::-webkit-scrollbar-thumb{
  background: rgba(255,255,255,0.20);
  border-radius: 999px;
}
#sidebar-admin-wraper .admin-nav:hover::-webkit-scrollbar-thumb{
  background: rgba(255,255,255,0.30);
}

#sidebar-admin-wraper .admin-nav ul li.active > a,
#sidebar-admin-wraper .admin-nav ul li > a:hover{
  background: rgba(47, 201, 167, 0.14) !important;
  border-left: 4px solid var(--ins-accent);
}

/* Submenú en sidebar (Vacantes -> items) */
#sidebar-admin-wraper .admin-nav ul li .sub-menu{
  margin-left: 18px;
  padding: 10px 0;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 12px 0 0 12px;
}

#sidebar-admin-wraper .admin-nav ul li .sub-menu > li > a{
  display: block;
  padding: 8px 16px;
  color: rgba(255,255,255,0.92) !important;
}

#sidebar-admin-wraper .admin-nav ul li .sub-menu > li > a:hover{
  background: rgba(47, 201, 167, 0.14) !important;
  color: #ffffff !important;
}

#sidebar-admin-wraper .admin-nav ul li .sub-menu > li.active > a{
  background: rgba(47, 201, 167, 0.20) !important;
  color: #ffffff !important;
}

/* Admin header */
#header-admin{
  background: var(--ins-card);
  border-bottom: 1px solid var(--ins-border);
}

/* Métricas dashboard: números más notorios */
.dashboard-card .wt-card-right,
.dashboard-card-2 .wt-card-right{
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* Alertas: más suaves con paleta institucional */
.alert-info{
  background: rgba(50, 74, 136, 0.08);
  border: 1px solid rgba(50, 74, 136, 0.18);
  color: var(--ins-text);
}

/* Ajuste de contenedores para pantallas grandes */
.container{ max-width: 1180px; }

/* Clases de utilidad faltantes */
.transition-y {
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}
.transition-y:hover {
    transform: translateY(-8px);
}
.shadow-hover:hover {
    box-shadow: 0 10px 30px rgba(31, 42, 68, 0.12) !important;
}
.border-hover-primary:hover {
    border-color: var(--ins-primary) !important;
}
.bg-primary-light {
    background-color: rgba(50, 74, 136, 0.1) !important;
}
.bg-success-light {
    background-color: rgba(47, 201, 167, 0.1) !important;
}
.bg-secondary-light {
    background-color: rgba(107, 114, 128, 0.1) !important;
}

/*
    RESTAURACIÓN DE SELECTORES (bootstrap-select)
    Fix para visibilidad en dashboards (Admin/Empresa)
*/
.ls-inputicon-box {
    overflow: visible !important; /* Evita que el dropdown se recorte */
    position: relative;
    z-index: 5;
}

.bootstrap-select .dropdown-menu {
    z-index: 99999 !important; /* Asegura que aparezca sobre otros elementos */
    opacity: 1 !important;
    visibility: visible !important;
}

.bootstrap-select .dropdown-menu.show {
    display: block !important;
}

/* Ajuste estético para consistencia con el dashboard */
.bootstrap-select .dropdown-toggle {
    border: 1px solid #e1e1e1 !important;
    background-color: #fff !important;
    border-radius: 8px !important;
    height: 50px !important;
    padding-left: 15px !important;
}

.bootstrap-select .dropdown-toggle .filter-option-inner-inner {
    line-height: 28px !important;
    color: #333 !important;
}

/* Ocultar el select original para evitar duplicados si JS falla */
select.selectpicker {
    display: none !important;
}

/* DataTables: controles compactos y consistentes en todo el panel */
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
  background: #fff !important;
  border: 1px solid #d8dee8 !important;
  border-radius: 8px !important;
  min-height: 38px !important;
  padding: 6px 10px !important;
  box-shadow: none !important;
}

.dataTables_wrapper .dataTables_filter input {
  width: 220px;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
  margin-bottom: 10px;
}

/* Header público (layout.php) - ajustes mobile */
@media (max-width: 991.98px) {
  /* Ocultar hamburguesa: el menú del usuario es el acceso principal */
  .navbar .navbar-toggler {
    display: none !important;
  }

  /* Mantener visible el área de usuario aunque el navbar colapse */
  .navbar #navbarNav.navbar-collapse {
    display: flex !important;
    flex-basis: auto !important;
    flex-grow: 0 !important;
    align-items: center !important;
    justify-content: flex-end !important;
  }

  /* Ocultar solo los links ("Bolsa de Empleo"), pero NO el usuario */
  .navbar #navbarNav .navbar-nav {
    display: none !important;
  }

  /* Asegurar que el dropdown del usuario quede visible y alineado */
  .navbar .dropdown > a.dropdown-toggle {
    white-space: nowrap;
  }

  /* En móvil: mostrar solo el avatar (ocultar nombre largo) */
  .navbar .dropdown > a.dropdown-toggle span.text-uppercase {
    display: none !important;
  }

  /* Nota: el problema del dropdown fuera de pantalla se corrige
     específicamente para dashboards (admin/empresa) más abajo. */
}

/* Dashboards (Admin/Empresa): dropdown de usuario en móvil no debe salirse */
@media (max-width: 991.98px) {
  #header-admin-wrap .dropdown-menu,
  #header-admin .dropdown-menu,
  .header-admin-fixed .dropdown-menu {
    min-width: 200px !important;
    max-width: calc(100vw - 24px) !important;
    right: 12px !important;
    left: auto !important;
    margin-right: 0 !important;
    transform: none !important;
  }
}

/* --- Página de login: layout propio (sin navbar/footer del sitio) --- */
.jb-auth-shell {
  min-height: 100vh;
  margin: 0;
  background: linear-gradient(160deg, var(--ins-bg) 0%, #e8eaf2 50%, rgba(47, 201, 167, 0.1) 100%);
}
.jb-auth-main {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
}
.jb-auth-main--centered {
  align-items: center;
  justify-content: center;
}

.jb-login-page {
  flex: 0 1 auto;
  width: 100%;
  max-width: 440px;
  box-sizing: border-box;
}
.jb-login-inner {
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}
.jb-login-brand-logo {
  max-width: 180px;
  height: auto;
  object-fit: contain;
}
.jb-login-card {
  border-radius: 1rem;
  border: 1px solid var(--ins-border) !important;
}
.jb-login-submit.btn-primary {
  background: var(--ins-primary);
  border-color: var(--ins-primary);
}
.jb-login-submit.btn-primary:hover {
  filter: brightness(1.05);
  border-color: var(--ins-primary);
}

/* Barra superior pública: Ingresar / Regístrate */
.navbar .jb-header-auth-btns .btn {
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.01em;
  border-width: 2px;
  padding-left: 0.85rem;
  padding-right: 0.85rem;
}
.navbar .jb-header-auth-btns .jb-header-auth-txt {
  margin-left: 0.35rem;
}
@media (max-width: 991.98px) {
  .navbar .jb-header-auth-btns .btn {
    min-width: 2.5rem;
    min-height: 2.5rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    justify-content: center;
    display: inline-flex;
    align-items: center;
  }
  .navbar .jb-header-auth-btns .jb-header-auth-txt {
    margin-left: 0;
  }
}
.navbar .jb-header-btn-register.btn-primary {
  background: var(--ins-primary);
  border-color: var(--ins-primary);
}
.navbar .jb-header-btn-register.btn-primary:hover {
  filter: brightness(1.06);
  border-color: var(--ins-primary);
}
.navbar .jb-header-btn-login.btn-outline-primary {
  color: var(--ins-primary);
  border-color: var(--ins-primary);
}
.navbar .jb-header-btn-login.btn-outline-primary:hover {
  background: var(--ins-primary);
  border-color: var(--ins-primary);
  color: #fff;
}
