/* ── JOBBEAST Team Orbital – Stylesheet ──────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@300;400;600;700&display=swap');

:root {
  --jbt-red:    #7E0E33;
  --jbt-wine:   #522033;
  --jbt-accent: #c4446a;
  --jbt-text:   #f0e8eb;
  --jbt-muted:  rgba(240,232,235,0.55);
  --jbt-glass:  rgba(10, 4, 7, 0.75);
}

/* ── WRAPPER ── */
.jbt-wrap {
  position: relative;
  width: 100%;
  min-height: 700px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  font-family: 'Source Sans 3', sans-serif;
  color: var(--jbt-text);
}

/* ── ORBITAL STAGE ── */
.jbt-orbital {
  position: relative;
  width: min(720px, 92vw);
  height: min(720px, 92vw);
  flex-shrink: 0;
}

/* ── SVG LINES ── */
.jbt-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* ── CENTER LOGO ── */
.jbt-center {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 150px; height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, rgba(82,32,51,0.85), rgba(10,4,7,0.9) 75%);
  border: 1.5px solid rgba(196,68,106,0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  box-shadow:
    0 0 40px rgba(126,14,51,0.55),
    0 0 90px rgba(126,14,51,0.2),
    inset 0 0 30px rgba(126,14,51,0.12);
  animation: jbtPulse 3s ease-in-out infinite;
}

@keyframes jbtPulse {
  0%,100% { box-shadow: 0 0 40px rgba(126,14,51,0.55), 0 0 90px rgba(126,14,51,0.2), inset 0 0 30px rgba(126,14,51,0.12); }
  50%      { box-shadow: 0 0 60px rgba(126,14,51,0.8),  0 0 130px rgba(126,14,51,0.3), inset 0 0 40px rgba(126,14,51,0.2); }
}

.jbt-logo-img {
  width: 90px;
  height: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

/* ── PERSON NODE ── */
.jbt-person {
  position: absolute;
  /* NO transform: translate(-50%,-50%) — JS subtracts RING/2 directly */
  z-index: 5;
  cursor: pointer;
  outline: none;
}

.jbt-ring {
  width: 100px; height: 100px;
  border-radius: 50%;
  border: 2px solid rgba(196,68,106,0.35);
  padding: 4px;
  background: radial-gradient(circle, rgba(82,32,51,0.25), transparent);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.jbt-ring::after {
  content: '';
  position: absolute;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--jbt-accent);
  top: -2px; right: 12px;
  box-shadow: 0 0 8px rgba(196,68,106,0.9);
  opacity: 0;
  transition: opacity 0.3s;
}

.jbt-person:hover .jbt-ring,
.jbt-person.jbt-active .jbt-ring {
  border-color: var(--jbt-accent);
  box-shadow: 0 0 18px rgba(196,68,106,0.6), 0 0 40px rgba(196,68,106,0.2);
}

.jbt-person:hover .jbt-ring::after,
.jbt-person.jbt-active .jbt-ring::after {
  opacity: 1;
}

.jbt-photo {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.jbt-initials {
  width: 100%; height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--jbt-wine), #16060d);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: rgba(196,68,106,0.75);
  user-select: none;
}

/* ── PERSON LABEL ── */
.jbt-person-name {
  position: absolute;
  white-space: nowrap;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--jbt-text);
  pointer-events: none;
  line-height: 1.3;
  /* position fully controlled by JS */
}

.jbt-person-sub {
  display: block;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 15px;
  font-weight: 300;
  color: var(--jbt-muted);
  margin-top: 1px;
}

/* ── DEPT FLOATING BADGES ── */
.jbt-dept-badge {
  position: absolute;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: none;
  color: rgba(196,68,106,0.75);
  border: 1px solid rgba(196,68,106,0.25);
  border-radius: 20px;
  padding: 4px 12px;
  background: rgba(10,4,7,0.75);
  backdrop-filter: blur(6px);
  pointer-events: none;
  /* Always on top of person nodes */
  z-index: 15;
  white-space: nowrap;
}

/* ── INFO CARD ── */
.jbt-info-card {
  position: absolute;
  width: 290px;
  background: var(--jbt-glass);
  border: 1px solid rgba(196,68,106,0.3);
  border-radius: 4px;
  padding: 26px 24px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow:
    0 20px 60px rgba(0,0,0,0.5),
    0 0 40px rgba(126,14,51,0.12);
  z-index: 30;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.jbt-info-card::before {
  content: '';
  position: absolute;
  left: 0; top: 18%; bottom: 18%;
  width: 2px;
  background: linear-gradient(to bottom, transparent, var(--jbt-accent), transparent);
  border-radius: 2px;
}

.jbt-info-card.jbt-visible {
  opacity: 1;
  pointer-events: auto;
}

.jbt-info-close {
  position: absolute !important;
  top: 12px !important; right: 12px !important;
  width: 24px !important; height: 24px !important;
  min-width: unset !important; min-height: unset !important;
  background: none !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  cursor: pointer !important;
  color: var(--jbt-muted) !important;
  font-size: 16px !important;
  line-height: 1 !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: color 0.2s !important;
  text-decoration: none !important;
}
.jbt-info-close:hover {
  color: var(--jbt-accent) !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
}

.jbt-info-avatar {
  width: 68px; height: 68px;
  border-radius: 50%;
  border: 1.5px solid rgba(196,68,106,0.35);
  margin-bottom: 14px;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 16px; font-weight: 700;
  color: rgba(196,68,106,0.7);
  background: linear-gradient(135deg, var(--jbt-wine), #16060d);
}
.jbt-info-avatar img { width: 100%; height: 100%; object-fit: cover; }

.jbt-info-name {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 22px; font-weight: 700;
  line-height: 1.15;
  color: #fff;
  margin-bottom: 3px;
}

.jbt-info-role {
  font-size: 15px; font-weight: 300;
  color: var(--jbt-muted);
  margin-bottom: 18px;
}

.jbt-info-divider {
  height: 1px;
  background: linear-gradient(to right, rgba(196,68,106,0.35), transparent);
  margin-bottom: 14px;
}

.jbt-info-label {
  font-size: 13px; letter-spacing: 0.05em; text-transform: none;
  color: var(--jbt-accent); margin-bottom: 6px; font-weight: 600;
}

.jbt-info-text {
  font-size: 14px; font-weight: 300; line-height: 1.6;
  color: rgba(240,232,235,0.75);
  margin-bottom: 14px;
}

.jbt-info-super {
  display: flex; gap: 8px; align-items: flex-start;
  background: rgba(126,14,51,0.1);
  border: 1px solid rgba(196,68,106,0.15);
  border-radius: 3px;
  padding: 10px 12px;
  font-size: 13px; font-weight: 300;
  color: rgba(240,232,235,0.65);
  line-height: 1.55;
}
.jbt-info-super svg { flex-shrink: 0; margin-top: 2px; color: var(--jbt-accent); }

/* ── RESPONSIVE: Mobile = Grid Layout ── */
@media (max-width: 768px) {

  /* Hide the orbital completely on mobile */
  .jbt-orbital,
  .jbt-info-card { display: none !important; }

  .jbt-wrap {
    padding: 20px 4px;
    min-height: unset;
    display: block;
  }

  /* Show mobile grid instead */
  .jbt-mobile-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 1fr;
    gap: 12px;
    align-items: stretch;
    width: 100%;
    box-sizing: border-box;
  }

  .jbt-mobile-card {
    background: rgba(82,32,51,0.25);
    border: 1px solid rgba(196,68,106,0.25);
    border-radius: 8px;
    padding: 16px 14px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
  }

  .jbt-mobile-card:active {
    border-color: var(--jbt-accent);
    background: rgba(82,32,51,0.45);
  }

  .jbt-mobile-avatar-wrap {
    width: 80px; height: 80px;
    flex-shrink: 0;
    margin: 0 auto 10px;
  }

  .jbt-mobile-photo {
    width: 80px; height: 80px;
    border-radius: 50%;
    border: 2px solid rgba(196,68,106,0.4);
    object-fit: cover;
    object-position: center top;
    display: block;
  }

  .jbt-mobile-initials {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--jbt-wine), #16060d);
    display: flex; align-items: center; justify-content: center;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 20px; font-weight: 700;
    color: rgba(196,68,106,0.75);
  }

  .jbt-mobile-dept {
    font-size: 10px; letter-spacing: 0.2em;
    text-transform: uppercase; color: var(--jbt-accent);
    text-align: center; margin-bottom: 4px;
  }

  .jbt-mobile-name {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 15px; font-weight: 700;
    color: #fff; text-align: center;
    line-height: 1.2; margin-bottom: 2px;
  }

  .jbt-mobile-role {
    font-size: 12px; font-weight: 300;
    color: var(--jbt-muted); text-align: center;
  }

  /* Mobile detail panel */
  .jbt-mobile-detail {
    display: none;
    grid-column: 1 / -1;
    background: rgba(10,4,7,0.85);
    border: 1px solid rgba(196,68,106,0.3);
    border-radius: 8px;
    padding: 20px 18px;
    margin-top: 4px;
  }

  .jbt-mobile-detail.jbt-open { display: block; }

  .jbt-mobile-detail-header {
    display: flex; align-items: center; gap: 14px;
    margin-bottom: 14px;
  }

  .jbt-mobile-detail-avatar {
    width: 52px; height: 52px; border-radius: 50%;
    border: 1.5px solid rgba(196,68,106,0.35);
    overflow: hidden; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 14px; font-weight: 700;
    color: rgba(196,68,106,0.7);
    background: linear-gradient(135deg, var(--jbt-wine), #16060d);
  }
  .jbt-mobile-detail-avatar img { width:100%; height:100%; object-fit:cover; }

  .jbt-mobile-detail-name {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 18px; font-weight: 700; color: #fff;
  }
  .jbt-mobile-detail-role {
    font-size: 13px; font-weight: 300; color: var(--jbt-muted);
  }

  .jbt-mobile-detail-divider {
    height: 1px;
    background: linear-gradient(to right, rgba(196,68,106,0.35), transparent);
    margin: 12px 0;
  }

  .jbt-info-label {
    font-size: 10px; letter-spacing: 0.3em; text-transform: uppercase;
    color: var(--jbt-accent); margin-bottom: 5px; font-weight: 600;
  }

  .jbt-mobile-detail-fact {
    font-size: 14px; font-weight: 300; line-height: 1.6;
    color: rgba(240,232,235,0.75); margin-bottom: 12px;
  }

  .jbt-mobile-detail-super {
    display: flex; gap: 8px; align-items: flex-start;
    background: rgba(126,14,51,0.1);
    border: 1px solid rgba(196,68,106,0.15);
    border-radius: 3px; padding: 10px 12px;
    font-size: 13px; font-weight: 300;
    color: rgba(240,232,235,0.65); line-height: 1.5;
  }
}

/* Hide mobile grid on desktop */
.jbt-mobile-grid { display: none; }