/* Guía del portal: the sidebar entry, the guided tour and the news panel. */

.portal-guide-open {
  position: relative;
  width: 100%;
  background: none;
  font-family: inherit;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
}

.nav-link.portal-guide-open {
  font-size: inherit;
  line-height: inherit;
}

.mobile-nav-link.portal-guide-open {
  border: 0;
  text-align: center;
  color: inherit;
}

/* How many news the teacher has not seen yet. */
.nav-news-count {
  min-width: 22px;
  height: 22px;
  margin-left: auto;
  padding: 0 7px;
  border: 2px solid var(--brand-navy);
  border-radius: 999px;
  background: var(--brand-yellow);
  color: var(--brand-navy);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 18px;
  text-align: center;
  order: 3;
}

.nav-news-count[hidden] { display: none; }

.mobile-nav-link .nav-news-count {
  position: absolute;
  top: 2px;
  right: calc(50% - 26px);
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  font-size: 0.66rem;
  line-height: 14px;
}

.portal-guide-open:focus-visible {
  outline: 3px solid rgba(255, 235, 63, 0.7);
  outline-offset: 2px;
}

.pg-layer[hidden] { display: none; }

.pg-shield {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: transparent;
  transition: background 200ms ease;
}

.pg-shield.is-dimmed { background: rgba(22, 12, 53, 0.55); }

.pg-spotlight {
  position: fixed;
  z-index: 1001;
  border: 3px solid var(--brand-yellow);
  border-radius: 20px;
  box-shadow: 0 0 0 9999px rgba(22, 12, 53, 0.55);
  pointer-events: none;
  transition: top 220ms ease, left 220ms ease, width 220ms ease, height 220ms ease;
}

.pg-spotlight[hidden] { display: none; }

.pg-card {
  position: fixed;
  z-index: 1002;
  width: min(380px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 20px 22px 18px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 24px 70px rgba(22, 12, 53, 0.35);
}

.pg-card:focus { outline: none; }

.pg-card.is-centred {
  top: 50%;
  left: 50%;
  width: min(460px, calc(100vw - 32px));
  transform: translate(-50%, -50%);
}

.pg-card-head,
.pg-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pg-eyebrow {
  margin: 0;
  color: var(--accent-purple);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pg-card h2 {
  margin: 8px 0 8px;
  color: var(--brand-navy);
  font-size: 1.3rem;
  line-height: 1.2;
}

.pg-card.is-centred h2 { font-size: 1.55rem; }

.pg-card p { margin: 0; color: var(--muted); line-height: 1.5; }

.pg-close {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--brand-navy);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.pg-progress {
  display: flex;
  gap: 6px;
  margin-top: 16px;
}

.pg-progress span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
}

.pg-progress span.is-current {
  width: 22px;
  border-radius: 8px;
  background: var(--brand-cyan);
}

.pg-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.pg-card .pg-footnote {
  margin-top: 14px;
  font-size: 0.82rem;
}

/* News panel */
.pg-panel {
  width: min(560px, calc(100vw - 32px));
  max-height: min(88dvh, 820px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 24px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 24px 70px rgba(22, 12, 53, 0.35);
}

.pg-panel::backdrop { background: rgba(22, 12, 53, 0.55); }

.pg-panel h2 {
  margin: 4px 0 0;
  color: var(--brand-navy);
  font-size: 1.5rem;
}

.pg-tours {
  display: grid;
  gap: 10px;
  margin: 18px 0 22px;
}

.pg-tour-offer {
  display: flex;
  align-items: center;
  gap: 16px;
  border-radius: 20px;
  padding: 16px 18px;
  background: var(--brand-cyan-soft);
}

.pg-tour-offer h3 { margin: 0 0 4px; color: var(--brand-navy); font-size: 1.05rem; }
.pg-tour-offer h3 small { color: var(--muted); font-size: 0.8rem; font-weight: 800; }
.pg-tour-offer p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.pg-tour-offer .button { flex: 0 0 auto; }

.pg-guide-title { margin-top: 22px; }

.pg-news-title {
  margin: 0 0 10px;
  color: var(--brand-navy);
  font-size: 1.05rem;
}

.pg-news {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pg-news-item {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 16px;
}

.pg-news-item.is-new {
  border-color: var(--brand-cyan);
  background: var(--surface-soft);
}

.pg-news-date {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.pg-new-badge {
  border-radius: 999px;
  padding: 2px 8px;
  background: var(--brand-yellow);
  color: var(--brand-navy);
  font-size: 0.7rem;
  font-weight: 900;
}

.pg-news-item h4 {
  margin: 6px 0 4px;
  color: var(--brand-navy);
  font-size: 1rem;
}

.pg-news-item p:not(.pg-news-date) {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

@media (max-width: 520px) {
  .pg-tour-offer { flex-direction: column; align-items: flex-start; }
  .pg-panel { padding: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .pg-spotlight,
  .pg-shield { transition: none; }
}
