/* =====================================================
   PORTAL NUVOIL — master.css  (Bootstrap 4)
   ===================================================== */

/* ── Base ── */
body {
   background-color: #fff;
   color: #797979;
   font-family: "Raleway", "Helvetica Neue", Helvetica, Arial, sans-serif;
   line-height: 1.5;
   font-size: 16px;
}

p { font-size: 16px; }

/* Espacio para el navbar fixed */
.be-content {
   padding-top: 64px;
}

/* ── Navbar ── */
.be-top-header {
   background: #fff !important;
   border-bottom: 1px solid #EBEBEB;
   box-shadow: 0 2px 12px rgba(0,0,0,0.06);
   min-height: 64px;
   padding: 0;
}

.be-top-header .container {
   height: 64px;
}

/* Logo */
.navbar-brand.logo-nuvoil {
   background-image: url('/static/images/logos/logo_horizontal.png');
   background-repeat: no-repeat;
   background-position: center left;
   background-size: contain;
   width: 140px;
   height: 44px;
   padding: 0;
   margin: 0;
   display: block;
}

/* Toggler (hamburguesa) */
.navbar-toggler {
   border: none;
   padding: 8px;
   outline: none !important;
   box-shadow: none !important;
}

.navbar-toggler .icon-bar {
   display: block;
   width: 22px;
   height: 2px;
   border-radius: 2px;
   background-color: #d71921;
   margin: 5px 0;
   transition: background 0.2s;
}

/* Links del nav */
.nav-portal .nav-item > .nav-link {
   font-family: 'Poppins', -apple-system, sans-serif;
   font-size: 14px;
   font-weight: 500;
   color: #555 !important;
   padding: 0 18px;
   line-height: 64px;
   letter-spacing: 0.2px;
   text-decoration: none !important;
   transition: color 0.2s;
   position: relative;
}

.nav-portal .nav-item > .nav-link:hover {
   color: #D71921 !important;
}

/* Indicador activo — línea roja inferior */
.nav-portal .nav-item > .nav-link::after {
   content: '';
   position: absolute;
   bottom: 0;
   left: 18px;
   right: 18px;
   height: 2px;
   background: #D71921;
   border-radius: 2px 2px 0 0;
   transform: scaleX(0);
   transition: transform 0.2s;
}

.nav-portal .nav-item.nav-activo > .nav-link {
   color: #D71921 !important;
   font-weight: 600 !important;
}

.nav-portal .nav-item.nav-activo > .nav-link::after {
   transform: scaleX(1);
}

/* ── Sesión candidato ── */
.nav-candidato {
   display: flex;
   align-items: center;
}

.nav-btn-login {
   display: inline-flex;
   align-items: center;
   gap: 7px;
   padding: 8px 18px;
   background: #D71921;
   color: #fff !important;
   border-radius: 8px;
   font-size: 13px;
   font-weight: 600;
   font-family: 'Poppins', sans-serif;
   text-decoration: none !important;
   transition: background 0.2s, transform 0.15s;
   white-space: nowrap;
}

.nav-btn-login:hover {
   background: #A51018;
   transform: translateY(-1px);
   color: #fff !important;
}

.nav-candidato-info {
   display: flex;
   align-items: center;
   gap: 10px;
}

.nav-candidato-foto {
   width: 34px;
   height: 34px;
   border-radius: 50%;
   object-fit: cover;
   border: 2px solid #EBEBEB;
}

.nav-candidato-inicial {
   width: 34px;
   height: 34px;
   border-radius: 50%;
   background: #D71921;
   color: #fff;
   display: flex;
   align-items: center;
   justify-content: center;
   font-size: 14px;
   font-weight: 700;
   font-family: 'Poppins', sans-serif;
   flex-shrink: 0;
}

.nav-candidato-nombre {
   font-size: 13px;
   font-weight: 600;
   color: #333;
   font-family: 'Poppins', sans-serif;
}

/* ── Dropdown menú candidato ── */
.nav-candidato-dropdown {
   position: relative;
}

.nav-candidato-trigger {
   display: flex;
   align-items: center;
   gap: 8px;
   background: none;
   border: none;
   padding: 4px 8px;
   border-radius: 8px;
   cursor: pointer;
   transition: background 0.2s;
   font-family: 'Poppins', sans-serif;
   outline: none !important;
   box-shadow: none !important;
}

.nav-candidato-trigger:hover,
.nav-candidato-trigger:focus,
.nav-candidato-trigger[aria-expanded="true"] {
   background: #F5F5F5;
}

/* Ocultar el caret nativo de BS4 */
.nav-candidato-trigger::after { display: none; }

.nav-candidato-caret {
   font-size: 11px;
   color: #999;
   transition: transform 0.2s;
}

.nav-candidato-trigger[aria-expanded="true"] .nav-candidato-caret {
   transform: rotate(180deg);
}

.nav-candidato-menu {
   border: 1px solid #EBEBEB;
   border-radius: 12px;
   box-shadow: 0 8px 32px rgba(0,0,0,0.10);
   padding: 8px;
   min-width: 200px;
   top: calc(100% + 8px) !important;
}

.nav-candidato-menu .dropdown-item {
   border-radius: 8px;
   padding: 9px 14px;
   font-size: 13px;
   font-weight: 500;
   color: #444;
   font-family: 'Poppins', sans-serif;
   display: flex;
   align-items: center;
   gap: 10px;
   transition: background 0.15s, color 0.15s;
}

.nav-candidato-menu .dropdown-item i {
   width: 16px;
   text-align: center;
   color: #aaa;
}

.nav-candidato-menu .dropdown-item:hover {
   background: #FFF5F5;
   color: #D71921;
}

.nav-candidato-menu .dropdown-item:hover i {
   color: #D71921;
}

.nav-candidato-menu .dropdown-divider {
   margin: 4px 8px;
   border-color: #EBEBEB;
}

.nav-candidato-cerrar { color: #888 !important; }
.nav-candidato-cerrar:hover { color: #D71921 !important; }

/* ── Responsive navbar ── */
@media (max-width: 767px) {
   .be-content { padding-top: 64px; }

   .nav-portal .nav-item > .nav-link {
      line-height: 1 !important;
      padding: 14px 20px !important;
      font-size: 15px !important;
   }

   .nav-portal .nav-item > .nav-link::after {
      display: none;
   }

   .nav-portal .nav-item.nav-activo > .nav-link {
      border-left: 3px solid #D71921;
      padding-left: 17px !important;
      background: #FFF5F5 !important;
   }

   .nav-candidato {
      margin: 12px 20px;
   }

   .nav-candidato-nombre { display: none; }
}

/* ── Links ── */
.a-link          { color: #d71921; }
.a-link:hover    { text-decoration: underline; color: #d71921; }

/* ── Botones ── */
.btn-primary {
   background-color: #d71921;
   border-color: #d71921;
   color: #fff;
}

.btn-primary:hover,
.btn-primary:focus {
   background-color: #c3171e;
   border-color: #c3171e;
   color: #fff;
   box-shadow: none;
}

.btn-primary:active,
.btn-primary:active:focus {
   background-color: #a91419;
   border-color: #a91419;
   box-shadow: none;
}

/* ── Inputs ── */
.form-control:focus {
   border-color: #d71921;
   box-shadow: 0 0 0 0.2rem rgba(215,25,33,0.15);
}

/* ── Select2 ── */
.select2-results > .select2-results__options {
   max-height: 200px;
   overflow-y: auto;
}

.select2-results__option--highlighted[aria-selected] {
   color: #797979;
   background-color: #eee;
}

.select2-results__option[aria-selected=true] {
   background-color: #ddd;
}

.select2-container--open {
   z-index: 9999 !important;
}

/* ── Footer ── */
footer {
   background-color: #797979;
}

footer a { color: #d1d1d1; }
footer a:hover { color: #d1d1d1; text-decoration: underline; }

footer .copyright {
   padding: 10px 0;
   box-shadow: inset rgba(255,255,255,0.1) 0 1px 0;
   color: #fff;
   overflow: hidden;
}

footer .sitio-info {
   font: 700 12px/26px Montserrat, sans-serif;
   text-transform: uppercase;
}

/* ── Utilidades ── */
.full-width { width: 100%; }
.vcenter    { display: flex; align-items: center; }

img {
   max-width: 100%;
   height: auto;
}
