/* ==========================================================================
   Posturi.gov.ro — Jobs Archive UI (clean + modern)
   Drop-in replacement for: assets/css/pg-jobs-archive.css
   ========================================================================== */

:root{
  --pg-bg: #f7f9fc;
  --pg-card: #ffffff;
  --pg-border: rgba(15,23,42,.10);
  --pg-border2: rgba(15,23,42,.14);

  --pg-text: #0f172a;
  --pg-muted: rgba(15,23,42,.62);

  --pg-primary: #2563eb;
  --pg-primary-2: #1d4ed8;

  --pg-success-bg: #dcfce7;
  --pg-success-fg: #166534;
  --pg-danger-bg: #fee2e2;
  --pg-danger-fg: #991b1b;

  --pg-warm-bg: #fff7ed;
  --pg-warm-fg: #9a3412;

  --pg-radius: 18px;
  --pg-radius-lg: 22px;

  --pg-shadow: 0 10px 24px rgba(15,23,42,.06);
  --pg-shadow-hover: 0 18px 40px rgba(15,23,42,.10);
}

/* ====== WRAPPER ====== */
.pg-arc{
  max-width: 100%;
  margin: 0 auto;
  padding: 26px 16px 56px;
}

.pg-arc-filter-wrap{
  margin-top: 10px;
  margin-bottom: 30px;
}

/* ====== FILTER PILL ====== */
.pg-arc-pill{
  display:flex;
  align-items:center;
  gap:10px;
  padding: 10px 10px 10px 12px;

  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(15,23,42,.10);
  border-radius: 999px;
  box-shadow: var(--pg-shadow);
}

.pg-arc-item{
  display:flex;
  align-items:center;
  gap:10px;

  background: #f8fafc;
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 999px;
  padding: 4px 10px 4px 6px;
  min-height: 48px;
}

.pg-arc-item-search{
  flex: 1 1 auto;
  min-width: 260px;
}

.pg-arc-ico{
  width:30px;
  height:30px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius: 999px;
  background: #eef2ff;
  color: var(--pg-primary);
  flex: 0 0 auto;
}
.pg-arc-ico svg{ fill: currentColor; }

.pg-arc-ico-blue{ background:#eaf2ff; color:#2563eb; }
.pg-arc-ico-orange{ background:#fff3e6; color:#f97316; }
.pg-arc-ico-green{ background:#e9fff3; color:#16a34a; }
.pg-arc-ico-purple{ background:#f2edff; color:#7c3aed; }
.pg-arc-ico-gray{ background:#f3f4f6; color:#334155; }

.pg-arc-input,
.pg-arc-select{
  border:0;
  outline:0;
  background:transparent;
  font-size:14px;
  color: var(--pg-text);
}

.pg-arc-input{
  width:100%;
}

.pg-arc-select{
  min-width: 150px;
  appearance: none;
  padding-right: 18px;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(100,116,139,.85) 50%),
    linear-gradient(135deg, rgba(100,116,139,.85) 50%, transparent 50%);
  background-position: calc(100% - 12px) 50%, calc(100% - 7px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.pg-arc-btn{
  border:0;
  background: linear-gradient(180deg, var(--pg-primary), var(--pg-primary-2));
  color:#fff;
  font-weight:700;
  padding: 12px 18px;
  border-radius: 999px;
  min-height:48px;
  min-width: 96px;
  cursor:pointer;
  box-shadow: 0 14px 28px rgba(37,99,235,.24);
  transition: transform .15s ease, filter .15s ease, box-shadow .15s ease;
}
.pg-arc-btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(37,99,235,.26);
}
.pg-arc-btn:active{ transform: translateY(0); }

/* ====== HEADER ====== */
.pg-arc-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
  margin: 10px 0 18px;
}

.pg-arc-title{
  margin:0;
  font-size: 34px;
  line-height:1.15;
  letter-spacing:-.02em;
  color: var(--pg-text);
}

.pg-arc-sub{
  margin-top: 8px;
  color: var(--pg-muted);
  font-size:14px;
}

.pg-arc-all{
  display:inline-flex;
  align-items:center;
  gap:8px;
  border:1px solid rgba(15,23,42,.10);
  background:#fff;
  border-radius:999px;
  padding: 11px 14px;
  color: var(--pg-text);
  text-decoration:none;
  font-weight:700;
  transition: background .15s ease, transform .15s ease;
}
.pg-arc-all:hover{
  background:#f8fafc;
  transform: translateY(-1px);
}

/* ====== GRID ====== */
.pg-arc-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

/* ====== CARD ====== */
.pg-card{
  position: relative;
  background: var(--pg-card);
  border:1px solid rgba(15,23,42,.10);
  border-radius: var(--pg-radius-lg);
  padding: 16px;
  box-shadow: var(--pg-shadow);
  display:flex;
  flex-direction:column;
  gap: 12px;
  min-height: 220px;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, opacity .15s ease;
}

.pg-card:hover{
  transform: translateY(-2px);
  box-shadow: var(--pg-shadow-hover);
  border-color: rgba(15,23,42,.14);
}

.pg-card-top {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex-direction: column;
}
.pg-card-ava{
  width:44px;
  height:44px;
  border-radius: 999px;
  background:#eef2ff;
  color:#1e40af;
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
}
.pg-card-ava svg{ fill: currentColor; }

.pg-card-ttl{
  flex:1 1 auto;
  min-width: 0;
}

.pg-card-h{
  font-weight:500;
  font-size:16px;
  line-height:1.28;
  color: var(--pg-text);

  display: -webkit-box;
  -webkit-line-clamp: 2;       /* titlu max 2 rânduri */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pg-card-s{
  margin-top: 6px;
  font-size: 16px;
  font-weight: 600;
  color: var(--pg-muted);
}

/* ====== CITY ROW ====== */
.pg-card-city{
  display:flex;
  align-items:center;
  gap:6px;
  margin-top: 6px;
}

.pg-ico-city{
  flex-shrink:0;
  color:#16a34a;
}

/* ====== BADGE STATUS ====== */
.pg-badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size: 12px;
  font-weight:800;
  border-radius: 999px;
  padding: 7px 10px;
  border:1px solid transparent;
  white-space: nowrap;
}

.pg-badge-green{
  background: var(--pg-success-bg);
  color: var(--pg-success-fg);
  border-color: rgba(22,101,52,.16);
}

.pg-badge-red{
  background: var(--pg-danger-bg);
  color: var(--pg-danger-fg);
  border-color: rgba(153,27,27,.16);
}

/* dacă badge-ul e roșu, considerăm job expirat => stil card mai “muted” */
.pg-card:has(.pg-badge-red){
  opacity: .92;
}
.pg-card:has(.pg-badge-red)::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius: var(--pg-radius-lg);
  pointer-events:none;
  box-shadow: inset 0 0 0 1px rgba(153,27,27,.10);
}

/* ====== TAGS ====== */
.pg-card-tags{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top: 2px;
}

.pg-tag{
  display:inline-flex;
  align-items:center;
  font-size: 12px;
  font-weight:800;
  border-radius: 999px;
  padding: 6px 10px;
  border:1px solid rgba(15,23,42,.08);
  background:#f8fafc;
  color:#334155;
}

.pg-tag-warm{
  background: var(--pg-warm-bg);
  color: var(--pg-warm-fg);
  border-color: rgba(154,52,18,.18);
}

/* Tip job */
.pg-tag-tip-permanent{
  background:#dcfce7;
  color:#166534;
  border-color:#bbf7d0;
}
.pg-tag-tip-temporary{
  background:#fef3c7;
  color:#92400e;
  border-color:#fde68a;
}
.pg-tag-tip-default{
  background:#f3f4f6;
  color:#374151;
  border-color:#e5e7eb;
}

/* ====== EMPLOYER LINE ====== */
.pg-card-ex{
  color: #334155;
  font-size: 14px;
  line-height:1.55;

  display: -webkit-box;
  -webkit-line-clamp: 3;       /* max 3 rânduri */
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pg-card-ex strong{
  color: var(--pg-text);
  font-weight: 800;
}

/* ====== FOOTER ====== */
.pg-card-foot{
  margin-top:auto;
  padding-top: 12px;
  border-top: 1px solid rgba(15,23,42,.08);

  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.pg-card-deadline{
  font-size:12px;
  font-weight:900;
  color: var(--pg-text);
  background:#f8fafc;
  border:1px solid rgba(15,23,42,.10);
  padding:6px 10px;
  border-radius:999px;
}

.pg-card-link{
  color: var(--pg-primary);
  font-weight:900;
  text-decoration:none;
}
.pg-card-link:hover{ text-decoration:underline; }

/* ====== PAGINATION ====== */
.pg-arc-pagi{ margin-top: 22px; }

.pg-arc-pagi ul{
  display:flex;
  gap:8px;
  list-style:none;
  padding:0;
  margin:0;
  justify-content:center;
}

.pg-arc-pagi a,
.pg-arc-pagi span{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:38px;
  height:38px;
  border-radius: 12px;
  border:1px solid rgba(15,23,42,.10);
  background:#fff;
  text-decoration:none;
  color: var(--pg-text);
  font-weight:900;
  transition: transform .12s ease, background .12s ease;
}
.pg-arc-pagi a:hover{
  transform: translateY(-1px);
  background:#f8fafc;
}

.pg-arc-pagi .current{
  background: var(--pg-primary);
  border-color: var(--pg-primary);
  color:#fff;
}

/* ====== EMPTY ====== */
.pg-arc-empty{
  margin-top: 18px;
  color: var(--pg-muted);
}

/* ====== RESPONSIVE ====== */
@media (max-width: 1100px){
  .pg-arc-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pg-arc-title{ font-size: 28px; }
}

@media (max-width: 820px){
  .pg-arc-pill{
    flex-wrap: wrap;
    border-radius: 22px;
    padding: 12px;
  }
  .pg-arc-item{
    width: 100%;
    border-radius: 16px;
    justify-content:flex-start;
  }
  .pg-arc-item-search{ min-width: 0; }
  .pg-arc-select{ min-width: 0; width: 100%; }
  .pg-arc-btn{ width: 100%; border-radius: 16px; }
}

@media (max-width: 720px){
  .pg-arc-grid{ grid-template-columns: 1fr; }
  .pg-arc-head{
    flex-direction: column;
    align-items:flex-start;
  }
}
/* ====== STATUS as DOT (no text) ====== */
.pg-badge{
  /* ascunde textul, păstrează elementul ca “bulină” */
  font-size: 0 !important;
  line-height: 0 !important;

  padding: 0 !important;
  width: 10px !important;
  height: 10px !important;
  border-radius: 999px !important;

  border: 2px solid rgba(255,255,255,.9) !important;
  box-shadow: 0 6px 14px rgba(15,23,42,.12) !important;

  /* poziționare ca în colțul din dreapta sus */
  margin-left: auto;
  margin-top: 4px;
}

/* verde */
.pg-badge-green{
  background: #22c55e !important;
  border-color: rgba(34,197,94,.35) !important;
}

/* roșu */
.pg-badge-red{
  background: #ef4444 !important;
  border-color: rgba(239,68,68,.35) !important;
}

/* opțional: tooltip la hover (îl iei din aria-label din HTML dacă există, altfel nimic) */
.pg-badge[title]{ cursor: help; }
.pg-card:has(.pg-badge-red){
  opacity: .92;
}
.pg-card:has(.pg-badge-red)::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius: var(--pg-radius-lg);
  pointer-events:none;
  box-shadow: inset 0 0 0 1px rgba(239,68,68,.12);
}
/* ====== JOB TITLE – FULL TEXT ====== */
.pg-card-h{
  display: block !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: initial !important;

  -webkit-line-clamp: unset !important;
  -webkit-box-orient: unset !important;

  font-size: 16px;
  line-height: 1.35;
}
.pg-card-top {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex-direction: column;
}
.pg-card{
  position:relative;
  overflow:hidden; /* important pt ribbon */
}

/* container ribbon */
.pg-ribbon{
  position:absolute;
  top:14px;
  right:-48px;
  width:160px;
  text-align:center;
  transform:rotate(45deg);
  z-index:30;
  pointer-events:none;
}

/* text ribbon */
.pg-ribbon span{
  display:block;
  padding:6px 0;
  font-size:12px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#fff;
  background:linear-gradient(135deg,#dc2626,#991b1b);
  box-shadow:0 4px 12px rgba(0,0,0,.25);
}

/* subtle dim card */
.pg-card:has(.pg-ribbon-cancelled){
  opacity:.9;
}
.pg-card{
  position:relative;
}

/* banda verticală */
.pg-status-rail{
  position:absolute;
  top:0;
  right:0;
  bottom:0;
  width:38px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:11px;
  font-weight:800;
  letter-spacing:.14em;
  text-transform:uppercase;
  writing-mode:vertical-rl;
  text-orientation:mixed;
  z-index:5;
}

.pg-status-cancelled{
  background:#fef2f2;
  color:#991b1b;
  border-left:1px solid #fecaca;
}

/* card ușor „stins” */
.pg-card:has(.pg-status-cancelled){
  background:#fafafa;
}
.pg-alert-cancelled{background:#fef2f2;
  color:#991b1b;
  border-left:1px solid #fecaca;padding:20px;}.pg-card{ position:relative; overflow:hidden; }

.pg-card--cancelled{
  opacity:.95;
  filter:saturate(.9);
}

.pg-ribbon{
  position:absolute;
  top:14px;
  right:-52px;
  transform:rotate(45deg);
  width:180px;
  text-align:center;
  padding:8px 0;
  font-size:12px;
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase;
  z-index:20;
  border:1px solid rgba(0,0,0,.06);
  box-shadow:0 8px 22px rgba(0,0,0,.08);
  pointer-events:none;
}

.pg-ribbon--cancelled{
  background:#e30817bd;
  color:#ffffff;
}
.pg-ribbon-rectificat{
  background:#074dffcf;
  color:#ffffff;
}
