/* ============================================================
   SkillBeings – "You're Hired" Career Diagram Widget
   hired-style.css  v3.0.0
   ============================================================ */

/* ── SECTION ── */
.sbh-section {
  width: 100%;
  background-color: #faf8f4;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
  position: relative;
  border: 1px solid rgba(27,94,66,0.12);
  border-radius: 24px;
  box-shadow: 0 4px 40px rgba(27,94,66,0.07), 0 1px 0 rgba(255,255,255,0.9) inset;
  font-family: 'DM Sans', system-ui, sans-serif;
  box-sizing: border-box;
}

/* grid texture */
.sbh-section.sbh-has-grid::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(27,94,66,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(27,94,66,0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

/* overlay */
.sbh-overlay {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 1;
}

/* ── INNER GRID ── */
.sbh-inner {
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 400px) minmax(0, 1fr);
  min-height: 260px;
  container-type: inline-size;
}

/* column divider */
.sbh-inner.has-divider::after {
  content: '';
  position: absolute;
  left: 400px; top: 32px; bottom: 32px;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(27,94,66,0.12) 20%, rgba(27,94,66,0.12) 80%, transparent);
  pointer-events: none;
}

/* ── RIGHT ── */
.sbh-right {
  padding: 32px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  position: relative;
  min-width: 0;
}

/* ── FORCE STACK when section itself is narrow ── */
/* This uses the section width, not viewport width */
@container (max-width: 700px) {
  .sbh-inner { grid-template-columns: 1fr; }
  .sbh-inner.has-divider::after { display: none; }
  .sbh-right { padding: 0 32px 36px; overflow: visible; }
  .sbh-diagram { display: none !important; }
  .sbh-mobile-pill-grid { display: grid !important; }
}

/* ── LEFT ── */
.sbh-left {
  padding: 44px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}

/* eyebrow */
.sbh-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: #1b5e42;
  background-color: rgba(27,94,66,0.07);
  border: 1px solid rgba(27,94,66,0.14);
  border-radius: 100px;
  padding: 4px 11px 4px 8px;
  width: fit-content;
  box-sizing: border-box;
  /* reveal */
  opacity: 0;
  animation: sbh-fade-up .5s .1s ease forwards;
}
.sbh-eyebrow-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background-color: #6fcf97;
  flex-shrink: 0;
  animation: sbh-pulse 2s ease infinite;
}
@keyframes sbh-pulse {
  0%,100%{ opacity:1; transform:scale(1); }
  50%    { opacity:.4; transform:scale(1.5); }
}

/* headline */
.sbh-headline {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.65rem, 2.6vw, 2.15rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: #1a1a1a;
  margin: 0;
  opacity: 0;
  animation: sbh-fade-up .55s .18s ease forwards;
}
.sbh-headline em {
  font-style: italic;
  color: #1b5e42;
}
.sbh-hired {
  font-style: italic;
  background: linear-gradient(135deg, #e8692a, #c44e10);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline;
}

/* body */
.sbh-body {
  font-size: 13.5px;
  line-height: 1.72;
  color: #6b7280;
  max-width: 300px;
  margin: 0;
  opacity: 0;
  animation: sbh-fade-up .55s .28s ease forwards;
}
.sbh-body strong { color: #1a1a1a; font-weight: 600; }

/* cta row */
.sbh-cta-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 4px;
  flex-wrap: wrap;
  opacity: 0;
  animation: sbh-fade-up .5s .38s ease forwards;
}
.sbh-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background-color: #1b5e42;
  color: #fff;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .03em;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 11px 22px;
  cursor: pointer;
  text-decoration: none;
  transition: background-color .18s, transform .15s, box-shadow .18s;
  box-shadow: 0 4px 16px rgba(27,94,66,0.25);
  white-space: nowrap;
}
.sbh-btn-primary:hover {
  background-color: #164d36;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(27,94,66,0.30);
  text-decoration: none;
  color: #fff;
}
.sbh-btn-secondary {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: color .2s, border-color .2s;
}
.sbh-btn-secondary:hover {
  color: #1b5e42;
  border-color: #1b5e42;
  text-decoration: none;
}

/* ── RIGHT ── */
.sbh-right {
  padding: 32px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  position: relative;
}

/* ── DIAGRAM ── */
.sbh-diagram {
  position: relative;
  width: 640px;
  max-width: 100%;
  height: 210px;
  flex-shrink: 0;
}

/* SVG lines */
.sbh-diagram-svg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  overflow: visible;
  z-index: 1;
}
.sbh-connector {
  fill: none;
  stroke: rgba(27,94,66,0.15);
  stroke-width: 1.5;
}
.sbh-connector.sbh-con-animate {
  opacity: 0;
  animation: sbh-line-in .5s ease forwards;
}
@keyframes sbh-line-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── HUB ── */
.sbh-hub {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 68px; height: 68px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1b5e42, #2d7a58);
  box-shadow:
    0 0 0 8px rgba(27,94,66,0.10),
    0 0 0 16px rgba(27,94,66,0.05),
    0 8px 28px rgba(27,94,66,0.28);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  z-index: 10;
  opacity: 0;
  animation: sbh-pop-in .5s .5s cubic-bezier(.22,.68,0,1.4) forwards;
}
.sbh-hub-icon { font-size: 1.3rem; line-height: 1; }
.sbh-hub-label {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .10em;
  color: rgba(255,255,255,0.9);
  text-transform: uppercase;
}

/* pulse rings — only when .sbh-pulse on section */
.sbh-pulse .sbh-hub::before {
  content: '';
  position: absolute; inset: -12px;
  border-radius: 50%;
  border: 1.5px solid rgba(27,94,66,0.18);
  animation: sbh-ring 2.5s ease infinite;
}
.sbh-pulse .sbh-hub::after {
  content: '';
  position: absolute; inset: -22px;
  border-radius: 50%;
  border: 1px solid rgba(27,94,66,0.08);
  animation: sbh-ring 2.5s .6s ease infinite;
}
@keyframes sbh-ring {
  0%   { transform: scale(1);   opacity: 1; }
  100% { transform: scale(1.32); opacity: 0; }
}

/* ── PILLS ── */
.sbh-pill {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background-color: #fff;
  border: 1px solid rgba(27,94,66,0.13);
  border-radius: 10px;
  padding: 7px 13px 7px 10px;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: 0 2px 12px rgba(27,94,66,0.08), 0 1px 0 rgba(255,255,255,0.9) inset;
  transition: transform .28s cubic-bezier(.22,.68,0,1.3), box-shadow .25s ease, border-color .2s;
  z-index: 5;
  cursor: pointer;
  /* reveal */
  opacity: 0;
  animation: sbh-pill-in .45s cubic-bezier(.22,.68,0,1.3) forwards;
}
.sbh-pill:hover {
  transform: scale(1.06) translateY(-2px) !important;
  box-shadow: 0 8px 24px rgba(27,94,66,0.14);
  border-color: rgba(27,94,66,0.28);
  text-decoration: none;
}
.sbh-pill-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.sbh-pill-text {
  font-size: 11.5px;
  font-weight: 600;
  color: #1a1a1a;
  letter-spacing: .01em;
}

/* ── CAPTION ── */
.sbh-caption {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #6b7280;
  text-align: center;
  opacity: 0;
  animation: sbh-fade-up .4s 1.2s ease forwards;
}

/* Mobile pill grid — hidden on desktop, shown on mobile */
.sbh-mobile-pill-grid {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
  padding: 8px 0 8px;
}
.sbh-mobile-pill-grid .sbh-pill {
  position: static !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  width: 100% !important;
  white-space: normal !important;
  opacity: 1 !important;
  animation: none !important;
  transform: none !important;
}
.sbh-mobile-pill-grid .sbh-pill-text {
  white-space: normal !important;
  font-size: 11px;
  line-height: 1.3;
}

/* ── ANIMATIONS ── */
@keyframes sbh-fade-up {
  from { opacity:0; transform:translateY(16px); }
  to   { opacity:1; transform:translateY(0); }
}
@keyframes sbh-pop-in {
  from { opacity:0; transform:translate(-50%,-50%) scale(.55); }
  to   { opacity:1; transform:translate(-50%,-50%) scale(1); }
}
@keyframes sbh-pill-in {
  from { opacity:0; transform:scale(.65) translateY(12px); }
  to   { opacity:1; transform:scale(1) translateY(0); }
}

/* ── JS-driven stacking (.sbh-stacked added by ResizeObserver in widget) ── */
.sbh-section.sbh-stacked { overflow: visible !important; border-radius: 16px; }
.sbh-section.sbh-stacked .sbh-inner { grid-template-columns: 1fr !important; }
.sbh-section.sbh-stacked .sbh-inner.has-divider::after { display: none !important; }
.sbh-section.sbh-stacked .sbh-left  { padding: 28px 24px 20px !important; }
.sbh-section.sbh-stacked .sbh-right { padding: 0 24px 28px !important; overflow: visible !important; }
.sbh-section.sbh-stacked .sbh-diagram { display: none !important; }
.sbh-section.sbh-stacked .sbh-caption { display: none !important; }
.sbh-section.sbh-stacked .sbh-mobile-pill-grid { display: grid !important; }
.sbh-section.sbh-stacked .sbh-headline { font-size: 1.65rem !important; }

/* ── CSS viewport fallback (in case JS hasn't run yet) ── */
@media (max-width: 700px) {
  .sbh-section { overflow: visible !important; border-radius: 16px; }
  .sbh-inner { grid-template-columns: 1fr !important; }
  .sbh-inner.has-divider::after { display: none !important; }
  .sbh-left  { padding: 28px 24px 20px !important; }
  .sbh-right { padding: 0 24px 28px !important; overflow: visible !important; }
  .sbh-diagram { display: none !important; }
  .sbh-caption { display: none !important; }
  .sbh-mobile-pill-grid { display: grid !important; }
  .sbh-headline { font-size: 1.65rem !important; }
}
@media (max-width: 400px) {
  .sbh-mobile-pill-grid { grid-template-columns: 1fr !important; }
}
