/* ============================================================
   Companies index (/podjetja, /en/companies) — presentation only.
   Loaded after /hub.css; every colour comes from its tokens.
   ============================================================ */

.co-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Hero: actions row under the lead */
.co-hero { position: relative; overflow: hidden; }
.co-hero::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -80px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(closest-side, hsl(var(--accent) / .22), transparent);
  pointer-events: none;
}
.co-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
}
.co-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 12px;
  background: var(--gradient);
  color: hsl(var(--primary-foreground));
  font-weight: 700;
  transition: filter .16s ease, transform .16s ease;
}
.co-btn:hover { filter: brightness(1.08); text-decoration: none; transform: translateY(-1px); }
.co-search { flex: 1 1 280px; max-width: 460px; }
.co-search[hidden] { display: none; }
.co-search input {
  width: 100%;
  height: 44px;
  padding: 0 16px;
  border: 1px solid hsl(var(--border));
  border-radius: 12px;
  background: hsl(var(--background) / .6);
  color: hsl(var(--foreground));
  font: inherit;
}
.co-search input::placeholder { color: hsl(var(--muted-foreground)); }
.co-search input:focus-visible { outline: 2px solid hsl(var(--accent)); outline-offset: 2px; }

.co-count { margin: 18px 0 0; color: hsl(var(--muted-foreground)); font-size: .9rem; }
.co-count[hidden], .co-empty[hidden] { display: none; }
.co-empty {
  margin: 18px 0 0;
  padding: 18px 20px;
  border: 1px dashed hsl(var(--border));
  border-radius: var(--radius);
  color: hsl(var(--muted-foreground));
}

/* Grid (the shared "main article > ul" rule would otherwise cap it at the prose width) */
main article > ul.co-grid {
  max-width: none;
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
}

.co-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
  animation: co-in .5s ease both;
  animation-delay: calc(var(--i, 0) * 35ms);
}
.co-card[hidden] { display: none; }
.co-card:hover, .co-card:focus-within {
  transform: translateY(-3px);
  border-color: hsl(var(--primary) / .6);
  box-shadow: var(--shadow-lift);
}

.co-head { display: flex; align-items: center; gap: 14px; }
.co-logo {
  flex: none;
  width: 48px;
  height: 48px;
  padding: 4px;
  border-radius: 12px;
  object-fit: contain;
  background: hsl(var(--foreground) / .94);
}
.co-av {
  flex: none;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  font-size: 1.2rem;
  font-weight: 800;
  color: hsl(var(--primary-foreground));
}
.co-av-0 { background: linear-gradient(135deg, hsl(var(--chart-1)), hsl(var(--chart-2))); }
.co-av-1 { background: linear-gradient(135deg, hsl(var(--chart-2)), hsl(var(--chart-4))); }
.co-av-2 { background: linear-gradient(135deg, hsl(var(--chart-1)), hsl(var(--chart-3))); }
.co-av-3 { background: linear-gradient(135deg, hsl(var(--chart-4)), hsl(var(--chart-1))); }

.co-title { min-width: 0; }
.co-title h2 { margin: 0; font-size: 1.05rem; line-height: 1.25; letter-spacing: -.01em; overflow-wrap: anywhere; }
.co-link { color: hsl(var(--foreground)); }
.co-link:hover { text-decoration: none; }
/* Stretched link: the whole card opens the company; job links sit above it. */
.co-link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }

.co-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 6px 0 0; font-size: .84rem; color: hsl(var(--muted-foreground)); }
.co-badge {
  padding: 2px 10px;
  border-radius: 999px;
  background: hsl(var(--primary) / .2);
  color: hsl(var(--foreground));
  font-size: .78rem;
  font-weight: 700;
}

.co-desc {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: hsl(var(--foreground) / .78);
  font-size: .92rem;
  line-height: 1.5;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

main article > .co-grid .co-jobs { max-width: none; list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.co-jobs li a {
  position: relative;
  z-index: 2;
  display: -webkit-box;
  padding: 7px 10px;
  overflow: hidden;
  border-radius: 10px;
  background: hsl(var(--elevated) / .65);
  color: hsl(var(--foreground) / .92);
  font-size: .88rem;
  font-weight: 600;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.co-jobs li a:hover { background: hsl(var(--primary) / .22); text-decoration: none; }
.co-more { padding: 0 10px; color: hsl(var(--muted-foreground)); font-size: .82rem; }

.co-cta { margin-top: auto; padding-top: 4px; color: hsl(var(--accent)); font-size: .88rem; font-weight: 700; }
.co-card:hover .co-cta { text-decoration: underline; }

/* Employer call to action */
.co-employer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  margin-top: var(--space-section);
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-lg);
  background:
    radial-gradient(70% 160% at 100% 0%, hsl(var(--accent) / .16), transparent 60%),
    hsl(var(--card));
}
.co-employer h2 { margin: 0 0 6px; }
.co-employer p { margin: 0; max-width: 52ch; color: hsl(var(--foreground) / .8); }

@keyframes co-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .co-card { animation: none; transition: none; }
  .co-card:hover, .co-card:focus-within { transform: none; }
  .co-btn { transition: none; }
}
@media (forced-colors: active) {
  .co-card { border-color: CanvasText; }
}
