/**
 * ESTILOS DEL PORTAL DE VACANTES Y CONVOCATORIAS LABORALES
 * Concesión Vías del Nus - Vinus S.A.S.
 *
 * @author  Mateo Jaramillo Suarez
 * @email   teojaramillosuarez@gmail.com
 * @phone   3157456196
 */

/* ==========================================================================
   1. SECCIÓN PRINCIPAL
   ========================================================================== */
.vacantes-page-section {
  padding: 50px 0 90px;
  background-color: #fafbfc;
  min-height: 70vh;
}

/* Banner Superior de Política de Empleo Comunitario */
.vacantes-hero-banner {
  background: linear-gradient(135deg, #004785 0%, #0079c2 100%);
  border-radius: 18px;
  padding: 38px 40px;
  color: #ffffff;
  box-shadow: 0 10px 30px rgba(0, 71, 133, 0.18);
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
}

.vacantes-hero-banner::after {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.vacantes-badge-kicker {
  display: inline-block;
  background: #fbbf24;
  color: #003666;
  font-weight: 800;
  font-size: 11px;
  padding: 5px 14px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
}

.vacantes-banner-title {
  font-size: 26px;
  font-weight: 900;
  color: #ffffff;
  margin: 0 0 12px 0;
  line-height: 1.3;
}

.vacantes-banner-desc {
  font-size: 14.5px;
  color: #e2e8f0;
  line-height: 1.7;
  max-width: 880px;
  margin: 0 0 16px 0;
}

.vacantes-banner-sub {
  font-size: 13px;
  color: #93c5fd;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ==========================================================================
   2. BARRA DE CONTROL, BÚSQUEDA Y FILTROS
   ========================================================================== */
.vacantes-controls-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px 28px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  margin-bottom: 32px;
}

.vacantes-search-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.vacantes-input-wrapper {
  position: relative;
  flex: 1;
  min-width: 260px;
}

.vacantes-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
}

.vacantes-input-wrapper input {
  width: 100%;
  height: 44px;
  padding: 0 40px 0 42px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 14px;
  color: #1e293b;
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
}

.vacantes-input-wrapper input:focus {
  background: #ffffff;
  border-color: #0079c2;
  box-shadow: 0 0 0 3px rgba(0, 121, 194, 0.12);
}

.vacantes-select-wrapper {
  min-width: 200px;
}

.vacantes-select-wrapper select {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 13.5px;
  color: #334155;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.vacantes-select-wrapper select:focus {
  border-color: #0079c2;
  background: #ffffff;
}

/* Chips de Área */
.vacantes-chips-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 14px;
  border-top: 1px dashed #e2e8f0;
}

.vacantes-chip-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.vacantes-chip-btn:hover {
  background: #e2e8f0;
  color: #004785;
}

.vacantes-chip-btn.active {
  background: #0079c2;
  border-color: #0079c2;
  color: #ffffff;
  font-weight: 700;
}

.vacantes-counter-text {
  font-size: 13.5px;
  font-weight: 600;
  color: #64748b;
  margin-left: auto;
}

.vacantes-counter-text strong {
  color: #0079c2;
}

/* ==========================================================================
   3. GRID DE TARJETAS DE VACANTES
   ========================================================================== */
.vacantes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.vacante-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  position: relative;
}

.vacante-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 71, 133, 0.09);
  border-color: #0079c2;
}

/* Badges de la Tarjeta */
.vacante-top-badges {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.vacante-badge-code {
  font-size: 11.5px;
  font-weight: 800;
  color: #0284c7;
  background: #e0f2fe;
  padding: 3px 9px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

.vacante-badge-status {
  font-size: 11px;
  font-weight: 800;
  color: #166534;
  background: #dcfce7;
  padding: 3px 9px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.vacante-badge-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
}

.vacante-title {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 12px 0;
  line-height: 1.35;
}

.vacante-meta-list {
  list-style: none;
  padding: 0;
  margin: 0 0 16px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vacante-meta-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #475569;
}

.vacante-meta-icon {
  width: 16px;
  height: 16px;
  color: #0079c2;
  flex-shrink: 0;
}

.vacante-desc-snippet {
  font-size: 13.5px;
  color: #64748b;
  line-height: 1.6;
  margin: 0 0 18px 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Requisitos destacados */
.vacante-tags-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 22px;
  margin-top: auto;
}

.vacante-tag-chip {
  font-size: 11.5px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #334155;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 600;
}

/* Botón Ver Detalle */
.btn-ver-vacante {
  background: linear-gradient(135deg, #004785 0%, #0079c2 100%);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity 0.2s ease, transform 0.2s ease;
  font-family: inherit;
  width: 100%;
}

.btn-ver-vacante:hover {
  opacity: 0.94;
  transform: translateY(-1px);
}

/* Estado Vacío de Búsqueda */
.vacantes-no-results {
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  padding: 48px 24px;
  text-align: center;
  display: none;
}

.vacantes-no-results-icon {
  width: 48px;
  height: 48px;
  color: #94a3b8;
  margin: 0 auto 14px;
}

.vacantes-no-results-title {
  font-size: 18px;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 6px;
}

.vacantes-no-results-desc {
  font-size: 14px;
  color: #64748b;
  max-width: 440px;
  margin: 0 auto 18px;
}

/* ==========================================================================
   4. MODAL INTERACTIVO DE DETALLE DE VACANTE
   ========================================================================== */
.vacante-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  padding: 20px;
}

.vacante-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.vacante-modal-container {
  background: #ffffff;
  border-radius: 18px;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
  position: relative;
  display: flex;
  flex-direction: column;
}

.vacante-modal-header {
  padding: 28px 32px 20px;
  border-bottom: 1px solid #f1f5f9;
  position: sticky;
  top: 0;
  background: #ffffff;
  z-index: 2;
}

.vacante-modal-close-btn {
  position: absolute;
  right: 20px;
  top: 20px;
  background: #f1f5f9;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #64748b;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.vacante-modal-close-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.vacante-modal-body {
  padding: 28px 32px 36px;
}

.modal-section-title {
  font-size: 14.5px;
  font-weight: 800;
  color: #004785;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 22px 0 10px 0;
}

.modal-list-items {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-list-items li {
  position: relative;
  padding-left: 20px;
  font-size: 13.5px;
  color: #334155;
  line-height: 1.6;
}

.modal-list-items li::before {
  content: '•';
  color: #0079c2;
  font-size: 18px;
  position: absolute;
  left: 4px;
  top: -2px;
}

/* Caja de Canales de Postulación dentro del Modal */
.modal-apply-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  padding: 22px;
  margin-top: 28px;
}

.modal-apply-title {
  font-size: 16px;
  font-weight: 800;
  color: #166534;
  margin: 0 0 8px 0;
}

.modal-apply-desc {
  font-size: 13px;
  color: #15803d;
  line-height: 1.6;
  margin: 0 0 16px 0;
}

.modal-apply-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-apply-email {
  background: #16a34a;
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s ease;
}

.btn-apply-email:hover {
  background: #15803d;
}

.btn-apply-sena {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-apply-sena:hover {
  border-color: #0079c2;
  color: #0079c2;
}

/* Transparencia Box */
.vacantes-transparency-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.transparency-icon {
  color: #0079c2;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Responsive */
@media (max-width: 640px) {
  .vacantes-hero-banner {
    padding: 26px 20px;
  }
  .vacantes-banner-title {
    font-size: 20px;
  }
  .vacantes-controls-card {
    padding: 18px 16px;
  }
  .vacantes-grid {
    grid-template-columns: 1fr;
  }
  .vacante-modal-header,
  .vacante-modal-body {
    padding: 20px;
  }
}
