/* ══════════════════════════════════════════════════════════
   PEZAJOB — COVERFLOW 3D CAROUSEL
   Centre card faces forward; flanking cards tilt into depth
══════════════════════════════════════════════════════════ */

/* Scene */
.cflow {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 20px 0 32px;
  /* perspective applied on the track */
}

.cflow-track {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  transition: none; /* JS handles transforms per-card */
  position: relative;
  min-height: calc(var(--cflow-card-h, 460px) + 20px);
}

/* ── Card base ── */
.cflow-card {
  position: absolute;
  background: #fff;
  border-radius: 22px;
  border: 1px solid var(--border);
  box-shadow: 0 8px 40px rgba(44,62,80,0.12);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 0 !important;
  text-align: center;
  height: var(--cflow-card-h, 460px);
  min-height: var(--cflow-card-h, 460px);
  max-height: var(--cflow-card-h, 460px);
  overflow: hidden;
  transform-style: preserve-3d;
  transition:
    transform 0.6s cubic-bezier(0.25,0.46,0.45,0.94),
    opacity   0.6s ease,
    box-shadow 0.6s ease,
    filter    0.6s ease;
  cursor: pointer;
  will-change: transform, opacity;
  user-select: none;
  -webkit-user-select: none;
  box-sizing: border-box;
}
.cflow-card.cflow-active {
  cursor: default;
  box-shadow: 0 24px 64px rgba(44,62,80,0.22), 0 0 0 2.5px var(--secondary);
  z-index: 10;
}

/* ══════════════════════════════════════════════════
   CAROUSEL CARDS — IMAGE-FORWARD DESIGN
   Large cover image + info strip below
══════════════════════════════════════════════════ */

/* Card: no padding — image fills top half */
.cflow-card {
  justify-content: flex-start;
}

/* ── Cover image area (company & candidate) ── */
.card-cover {
  width: 100%;
  height: var(--cflow-cover-h, 240px);
  min-height: var(--cflow-cover-h, 240px);
  max-height: var(--cflow-cover-h, 240px);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  border-radius: 22px 22px 0 0;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}
.cflow-card:hover .card-cover { background-size: cover; }
.card-cover-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(5,13,20,0.55) 100%);
}

/* Badge on cover — reserve space so cards without badges match height */
.card-cover-badge {
  position: absolute; top: 12px; left: 12px;
  z-index: 2;
  min-height: 26px;
}

/* ── Card body (below image) ── */
.card-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  flex: 1 1 0;
  min-height: 0;
  overflow: visible;
  background: var(--white);
  box-sizing: border-box;
  position: relative;
}

.cflow-card.fc-slide {
  --cflow-card-h: 460px;
}

/* ── Company card specifics ── */
.fc-logo {
  width: 92px; height: 92px; border-radius: 18px;
  margin-top: -46px;
  margin-bottom: 14px;
  overflow: hidden; flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(44,62,80,0.25);
  border: 4px solid var(--white);
  position: relative;
  z-index: 2;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.fc-logo img { width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 1; }
.fc-logo-fallback {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 1.7rem;
  color: var(--white);
}
/* The centred, active carousel card gets an extra-prominent logo */
.cflow-card.cflow-active .fc-logo {
  width: 104px; height: 104px; margin-top: -52px;
  border-width: 4px;
  box-shadow: 0 10px 28px rgba(44,62,80,0.3), 0 0 0 3px var(--secondary);
}
.cflow-card.cflow-active .fc-logo-fallback { font-size: 1.9rem; }
.fc-logo img ~ .fc-logo-fallback { display: none; }
.fc-logo img[style*="display: none"] ~ .fc-logo-fallback { display: flex; }
.fc-cname {
  font-family: var(--font-display); font-size: 1rem; font-weight: 700; color: var(--primary);
  margin-bottom: 3px; width: 100%;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 2.6em; line-height: 1.3;
}
.fc-industry {
  font-size: 0.76rem; color: var(--text-muted); margin-bottom: 10px; font-weight: 500;
  width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  min-height: 1.2em;
}
.fc-stats-row { display: flex; gap: 16px; justify-content: center; margin-bottom: 14px; }
.fc-stat { text-align: center; }
.fc-jobs-block {
  margin-top: auto;
  width: 100%;
  padding-top: 8px;
}
.fc-jobs-num { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; color: var(--primary); line-height: 1; }
.fc-jobs-lbl { font-size: 0.68rem; color: var(--text-muted); margin-top: 2px; }
.fc-badge { margin-bottom: 0; }

/* ── Candidate card specifics ── */
.cflow-card.pc-slide {
  --cflow-card-h: 460px;
  cursor: pointer;
}
.pc-avatar {
  width: 92px; height: 92px; border-radius: 50%;
  margin-top: -46px;
  margin-bottom: 14px;
  overflow: hidden; flex-shrink: 0;
  border: 4px solid var(--white);
  box-shadow: 0 8px 22px rgba(44,62,80,0.22);
  position: relative;
  z-index: 2;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.pc-avatar img { width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 1; }
.pc-avatar-fallback {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; color: #fff;
}
.pc-avatar img ~ .pc-avatar-fallback { display: none; }
.pc-avatar img[style*="display: none"] ~ .pc-avatar-fallback { display: flex; }
/* The centred, active carousel card gets a slightly more prominent avatar */
.cflow-card.cflow-active .pc-avatar {
  width: 100px; height: 100px; margin-top: -50px;
  box-shadow: 0 10px 26px rgba(44,62,80,0.26), 0 0 0 3px var(--secondary);
}
.cflow-card.cflow-active .pc-avatar-fallback { font-size: 1.75rem; }
.pc-avail-dot-wrap {
  position: absolute; bottom: 4px; right: 4px;
  width: 17px; height: 17px; background: #22c55e; border-radius: 50%;
  border: 3px solid #fff;
}
.pc-avail-dot-wrap.is-offline { background: #94a3b8; }
.pc-name {
  font-family: var(--font-display); font-size: 1rem; font-weight: 700; color: var(--primary);
  margin-bottom: 3px; width: 100%;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 2.6em; line-height: 1.3;
}
.pc-role {
  font-size: 0.78rem; color: var(--text-muted); margin-bottom: 10px; font-weight: 500;
  width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  min-height: 1.2em;
}
.pc-avail-label {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.71rem; font-weight: 600; color: #15803d; margin-bottom: 10px;
  min-height: 1.2em;
}
.pc-avail-label.is-offline { color: #64748b; }
.pc-avail-blink { width: 6px; height: 6px; border-radius: 50%; background: #22c55e; animation: pulse 2s infinite; }
.pc-avail-label.is-offline .pc-avail-blink { background: #94a3b8; animation: none; }
.fc-presence-dot {
  position: absolute; bottom: 4px; right: 4px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #22c55e; border: 3px solid #fff;
}
.fc-presence-dot.is-offline { background: #94a3b8; }
.fc-logo { position: relative; }
.pc-skills {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 5px;
  margin-bottom: 0; min-height: 52px; max-height: 52px; overflow: hidden; width: 100%;
}
.pc-skill { background: var(--bg); border: 1px solid var(--border); color: var(--text-light); font-size: 0.68rem; padding: 3px 8px; border-radius: 20px; font-weight: 500; }

/* ── Dark mode ── */
[data-theme="dark"] .card-body { background: #1a2030; }
[data-theme="dark"] .fc-logo { border-color: #1a2030; }
[data-theme="dark"] .pc-avatar { border-color: #1a2030; }

/* ── Responsive ── */
@media (max-width: 700px) {
  :root { --cflow-card-h: 420px; --cflow-cover-h: 190px; }
  .cflow-card.pc-slide { --cflow-card-h: 420px; }
  .fc-logo { width: 78px; height: 78px; margin-top: -39px; }
  .cflow-card.cflow-active .fc-logo { width: 88px; height: 88px; margin-top: -44px; }
  .pc-avatar { width: 78px; height: 78px; margin-top: -39px; }
  .cflow-card.cflow-active .pc-avatar { width: 88px; height: 88px; margin-top: -44px; }
}
@media (max-width: 480px) {
  :root { --cflow-card-h: 380px; --cflow-cover-h: 165px; }
  .cflow-card.pc-slide { --cflow-card-h: 380px; }
  .card-body { padding: 14px 16px 18px; }
  .cflow { padding: 12px 0 24px; }
  .fc-logo { width: 68px; height: 68px; margin-top: -34px; border-width: 3px; }
  .cflow-card.cflow-active .fc-logo { width: 76px; height: 76px; margin-top: -38px; }
  .pc-avatar { width: 68px; height: 68px; margin-top: -34px; border-width: 3px; }
  .cflow-card.cflow-active .pc-avatar { width: 76px; height: 76px; margin-top: -38px; }
}

/* ── Nav controls ── */
.cflow-nav {
  display: flex; align-items: center; justify-content: center;
  gap: 16px; margin-top: 28px;
}
.cflow-btn {
  width: 46px; height: 46px; border-radius: 50%;
  border: 2px solid var(--border); background: #fff;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 1rem; color: var(--primary); transition: all 0.2s;
  box-shadow: 0 2px 10px rgba(44,62,80,0.09);
}
.cflow-btn:hover { background: var(--primary); color: var(--secondary); border-color: var(--primary); transform: scale(1.1); }
.cflow-btn:disabled { opacity: 0.3; cursor: default; transform: none; }

.cflow-dots { display: flex; gap: 7px; align-items: center; }
.cflow-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--border); cursor: pointer; transition: all 0.25s; border: none; padding: 0;
}
.cflow-dot.active { background: var(--primary); width: 22px; border-radius: 4px; }
.cflow-dot:hover { background: var(--primary-light); }

/* ── Responsive track heights ── */
@media (max-width: 700px) {
  .cflow-track { min-height: calc(var(--cflow-card-h, 390px) + 24px); }
}
@media (max-width: 480px) {
  .cflow-track { min-height: calc(var(--cflow-card-h, 360px) + 20px); }
}

/* ══════════════════════════════════════════════════
   PAGED GRID SLIDER — Featured Companies
   5 cards per page on desktop, fewer as the screen narrows.
   Plain horizontal scroll-snap, no 3D transforms.
══════════════════════════════════════════════════ */
.fslider { position: relative; padding: 20px 0 32px; }
.fslider-viewport {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}
.fslider-viewport::-webkit-scrollbar { display: none; }
.fslider-track { display: flex; gap: 22px; }

.grid-card {
  scroll-snap-align: start;
  flex: 0 0 calc((100% - 4 * 22px) / 5);
  min-width: 0;
  background: #fff;
  border-radius: 22px;
  border: 1px solid var(--border);
  box-shadow: 0 8px 30px rgba(44,62,80,0.10);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  cursor: pointer;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.grid-card:hover { transform: translateY(-6px); box-shadow: 0 18px 44px rgba(44,62,80,0.18); }
.grid-card .card-cover { height: 118px; min-height: 118px; max-height: 118px; border-radius: 22px 22px 0 0; background-size: 130%; }
.grid-card .fc-logo { width: 76px; height: 76px; margin-top: -38px; }
.grid-card .fc-logo-fallback { font-size: 1.4rem; }
.grid-card .card-body { padding: 14px 16px 18px; flex: 0 1 auto; min-height: auto; }
.grid-card .fc-desc {
  font-size: 0.76rem; color: var(--text-muted); margin-bottom: 10px; font-weight: 400; line-height: 1.45;
  width: 100%; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.2em;
}
[data-theme="dark"] .grid-card .fc-desc { color: #94a3b8; }

@media (max-width: 1200px) {
  .grid-card { flex-basis: calc((100% - 3 * 20px) / 4); }
}
@media (max-width: 920px) {
  .grid-card { flex-basis: calc((100% - 2 * 18px) / 3); }
  .fslider-track { gap: 18px; }
}
@media (max-width: 680px) {
  .grid-card { flex-basis: calc((100% - 16px) / 2); }
  .fslider-track { gap: 16px; }
}
@media (max-width: 460px) {
  .grid-card { flex-basis: 82%; }
  .grid-card .card-cover { height: 104px; min-height: 104px; max-height: 104px; }
  .grid-card .fc-logo { width: 64px; height: 64px; margin-top: -32px; }
  .grid-card .pc-avatar { width: 64px; height: 64px; margin-top: -32px; }
}

/* ── Candidate grid card specifics ── */
.grid-card .pc-avatar { width: 76px; height: 76px; margin-top: -38px; }
.grid-card .pc-avatar-fallback { font-size: 1.4rem; }
.grid-card .pc-name { font-size: 0.92rem; min-height: 2.4em; }
.grid-card .pc-role { font-size: 0.74rem; }
.grid-card .pc-skills { min-height: 26px; max-height: 26px; }

[data-theme="dark"] .grid-card { background: #1a2030; border-color: #2a3340; }
[data-theme="dark"] .grid-card .card-body { background: #1a2030; }

/* ── Featured Companies slider: shared company card (company-card.css), 4 per page, yellow button ── */
.grid-card.cd-card { flex: 0 0 calc((100% - 3 * 22px) / 4); text-align: left; border-radius: 16px; cursor: default; }
.grid-card.cd-card .cd-btn { border-color: var(--ds-action, #d1cf0a); background: var(--ds-action, #d1cf0a); color: var(--ds-on-action, #2c3e50); padding: 9px 10px; }
.grid-card.cd-card .cd-btn:hover { border-color: var(--ds-action-hover, #b8b608); background: var(--ds-action-hover, #b8b608); color: var(--ds-on-action, #2c3e50); }
@media (max-width: 1200px) { .grid-card.cd-card { flex-basis: calc((100% - 2 * 20px) / 3); } }
@media (max-width: 920px)  { .grid-card.cd-card { flex-basis: calc((100% - 18px) / 2); } }
@media (max-width: 680px)  { .grid-card.cd-card { flex-basis: 100%; } }

/* ── Featured Candidates slider: shared seeker card (seeker-card.css), 3 per page ── */
.grid-card.sc-card { flex: 0 0 calc((100% - 2 * 22px) / 3); cursor: default; text-align: left; }
@media (max-width: 920px) { .grid-card.sc-card { flex-basis: calc((100% - 18px) / 2); } }
@media (max-width: 680px) { .grid-card.sc-card { flex-basis: 100%; } }
