/* ---------- Persona nav dropdowns (logged-out primary nav) ---------- */
/* Hover/focus dropdown for Teachers / Schools / Students items in the
   white-header design. Each opens a card pair: AI Marking (cyan
   tint) + Study guides (purple tint) — matching the persona-signup
   modal options on the landing page. */

.persona-nav-item {
  position: relative;
}

.persona-nav-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  background-color: #ffffff;
  border: 1.5px solid #1a1f3a;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(26, 31, 58, 0.12);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  /* Tight transition + only-opacity easing so a screenshot mid-fade
     doesn't catch a ghosted state */
  transition: opacity 0.12s ease 0s, transform 0.12s ease 0s;
  z-index: 99999;
  white-space: nowrap;
}

.persona-nav-item:hover .persona-nav-dropdown,
.persona-nav-item:focus-within .persona-nav-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

/* Bridge the gap between the trigger link and the dropdown so the
   hover state doesn't drop when the cursor crosses the empty pixels. */
.persona-nav-item:hover::after,
.persona-nav-item:focus-within::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 240px;
  height: 8px;
}

/* Stacked layout per Figma: icon on top + label below, both centered
   horizontally and the pair vertically centered as a group on the
   card's middle axis. */
.persona-nav-card {
  display: grid !important;
  grid-template-rows: auto auto;
  justify-items: center;
  align-content: center;
  row-gap: 0.65rem;
  width: 144px;
  height: 108px;
  padding: 0.75rem 0.5rem;
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  text-align: center;
  font-family: "Open Sans", "Helvetica Neue", Arial, sans-serif;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.persona-nav-card:hover,
.persona-nav-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
  outline: none;
}

.persona-nav-card--ai {
  background: #e6f5ff;
}

.persona-nav-card--study {
  background: #f1eaff;
}

.persona-nav-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}

.persona-nav-card__icon svg {
  display: block;
  width: 38px;
  height: 38px;
  margin: 0;
}

/* book.svg is taller-than-wide-ish; constrain visually to match AI icon */
.persona-nav-card--study .persona-nav-card__icon svg {
  width: 34px;
}

.persona-nav-card__label {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: -0.005em;
  line-height: 1.2;
}

/* Theme's common-styles adds a `•` ::before to every <ul> li. Override. */
.primary-menu--persona > li::before {
  content: none !important;
  display: none !important;
}

/* ---------- Resources dropdown (text-menu variant) ----------
   Unlike the Teachers/Schools/Students dropdowns (two icon cards), the
   Resources dropdown lists text menu entries — a bold title with a lighter
   description below, in the ClassDojo "Training / Teacher Resources" style.
   Left-aligned, wider, and the items read as a vertical menu. */
.persona-nav-dropdown--menu {
  display: block;
  padding: 0.5rem;
  min-width: 280px;
  max-width: 340px;
  white-space: normal;
  text-align: left;
}

.persona-nav-link {
  display: block;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  font-family: "Open Sans", "Helvetica Neue", Arial, sans-serif;
  transition: background-color 0.12s ease;
}

.persona-nav-link:hover,
.persona-nav-link:focus-visible {
  background-color: #f4f0ff;
  outline: none;
}

/* "h1" line — bold title (matches the screenshot's dark bold heading). */
.persona-nav-link__title {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.3;
  letter-spacing: -0.005em;
}

/* "h2" line — lighter description beneath the title. */
.persona-nav-link__desc {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.85rem;
  font-weight: 400;
  color: #6b6b78;
  line-height: 1.35;
}
