/* Módulo 4 – Design sugerido (curso moderno) | Pacto EJA / UFPB */
@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700;900&display=swap");

:root {
  --blue: #1e88e5;
  --blue-dark: #1565c0;
  --blue-light: #e3f2fd;
  --green: #43a047;
  --green-dark: #2e7d32;
  --green-light: #e8f5e9;
  --yellow: #fbc02d;
  --yellow-dark: #f9a825;
  --yellow-light: #fff8e1;
  --red: #e53935;
  --red-dark: #c62828;
  --red-light: #ffebee;
  --gray: #90a4ae;
  --gray-mid: #78909c;
  --gray-light: #f7f9fc;
  --gray-border: #eceff1;
  --text: #263238;
  --text-soft: #607d8b;
  --white: #ffffff;
  --sidebar-w: 340px;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 4px 20px rgba(38, 50, 56, 0.06);
  --transition: 0.22s ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "Roboto", sans-serif;
  background: var(--white);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: clip;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--blue-dark);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--blue);
}

/* ========== TOP BAR (limpo, como no design) ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gray-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 1.5rem;
}

.site-header--minimal {
  min-height: 48px;
}

.header-actions--start {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-actions--end {
  margin-left: auto;
}

/* Marca do cabeçalho suprimida */
.brand,
.brand-mark,
.brand-text {
  display: none !important;
}

.header-nav {
  display: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.progress-chip {
  background: var(--gray-light);
  border: 1px solid var(--gray-border);
  color: var(--text-soft);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
}

.btn-icon {
  border: 1px solid var(--gray-border);
  background: var(--white);
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background var(--transition), transform var(--transition), border-color var(--transition);
}

.btn-icon:hover {
  background: var(--blue-light);
  border-color: var(--blue);
  transform: scale(1.04);
}

/* ========== LAYOUT: conteúdo + menu direita ========== */
.page-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  max-width: 1320px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 3rem;
  min-height: calc(100vh - 120px);
}

@media (min-width: 960px) {
  .page-wrap {
    grid-template-columns: minmax(0, 1fr) var(--sidebar-w);
    gap: 1.75rem;
    padding: 1.5rem 1.75rem 4rem;
    align-items: start;
  }
}

.main-content {
  min-width: 0;
  background: var(--white);
}

.page-banner {
  margin: 0 0 1.35rem;
  width: 100%;
  max-width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--blue-light);
}

.page-banner img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: cover;
  vertical-align: middle;
}

.page-banner--after-title {
  margin: -0.5rem 0 1.75rem;
}

.page-banner--after-text {
  margin: 1.75rem 0 1.75rem;
}

/* ========== ATÉ BREVE (editorial) ========== */
body[data-page="ate-breve"] .page-title {
  text-align: center;
  margin-bottom: 0.85rem;
  color: var(--text);
}

body[data-page="ate-breve"] .page-title::after {
  content: "";
  display: block;
  width: 3.25rem;
  height: 2px;
  margin: 0.85rem auto 0;
  border-radius: 999px;
  background: rgba(38, 50, 56, 0.22);
}

body[data-page="ate-breve"] .content-block {
  margin-top: 0.5rem;
}

.farewell {
  max-width: 38rem;
  margin: 0 auto 1.5rem;
  padding: 2.25rem 1.85rem 2.4rem;
  border-radius: 22px;
  border: 1px solid var(--gray-border);
  background:
    radial-gradient(120% 80% at 10% 0%, rgba(96, 125, 139, 0.08), transparent 55%),
    radial-gradient(100% 70% at 100% 100%, rgba(38, 50, 56, 0.04), transparent 50%),
    var(--white);
  box-shadow: 0 10px 32px rgba(38, 50, 56, 0.07);
}

.farewell-body {
  text-align: center;
}

.farewell p {
  text-indent: 0 !important;
  text-align: center !important;
  margin: 0 0 1.15rem !important;
  line-height: 1.75;
  hyphens: manual;
  color: var(--text) !important;
}

.farewell-lead {
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--text);
}

.farewell-accent {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.farewell-wish {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text);
}

.farewell-embrace {
  font-style: italic;
  font-weight: 600;
  color: var(--text);
}

.farewell-signoff {
  margin-top: 1.75rem;
  padding-top: 1.4rem;
  text-align: center;
  border-top: 1px solid var(--gray-border);
}

.farewell-with {
  font-weight: 700 !important;
  color: var(--text) !important;
  margin-bottom: 0.55rem !important;
  letter-spacing: 0.02em;
}

.farewell-team {
  margin: 0.15rem 0 0 !important;
  font-weight: 700 !important;
  color: var(--text) !important;
  font-size: 0.98rem;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .farewell-team {
    white-space: normal;
    line-height: 1.4;
  }
}

.farewell-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 2rem 2.75rem;
  margin-top: 1.75rem;
}

.farewell-logo {
  display: block;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
  background: transparent;
  image-rendering: auto;
}

.farewell-logo--ufpb,
.farewell-logo--unesco {
  height: 108px;
  max-width: min(340px, 44vw);
}

/* ========== BREADCRUMB ========== */
.breadcrumb {
  font-size: 0.9rem;
  color: var(--text-soft);
  margin-bottom: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.breadcrumb .back-link {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--gray-light);
  color: var(--text);
  margin-right: 0.15rem;
  transition: background var(--transition), transform var(--transition);
}

.breadcrumb .back-link:hover {
  background: var(--blue-light);
  color: var(--blue-dark);
  transform: translateX(-2px);
}

.breadcrumb a {
  color: var(--gray-mid);
}

.breadcrumb .sep {
  color: var(--gray);
}

/* Hero / badges de abertura suprimidos */
.hero-panel {
  display: none !important;
}

/* Figuras do material (DOCX) */
.doc-figure {
  margin: 1.25rem 0 1.5rem;
  padding: 0.85rem;
  background: var(--gray-light);
  border: 1px solid var(--gray-border);
  border-radius: 14px;
  text-align: center;
  box-shadow: var(--shadow);
}

.doc-figure img {
  display: block;
  width: 100%;
  max-width: 820px;
  height: auto;
  margin: 0 auto;
  border-radius: 10px;
  background: var(--white);
}

.doc-figure--50 {
  max-width: 50%;
  margin-left: auto;
  margin-right: auto;
}

.doc-figure--50 img {
  max-width: 100%;
}

.doc-figure--40 {
  max-width: 44%; /* 40% + 10% */
  margin-left: auto;
  margin-right: auto;
}

.doc-figure--40 img {
  max-width: 100%;
}

@media (max-width: 720px) {
  .doc-figure--40 {
    max-width: 90%;
  }
}

.doc-figure--lousa {
  max-width: 72%;
  margin-left: auto;
  margin-right: auto;
}

.doc-figure--lousa img {
  max-width: 100%;
}

.doc-figure figcaption {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-soft);
  font-weight: 500;
  text-align: center;
  line-height: 1.45;
}

.figure-download {
  margin: 0.85rem 0 0.15rem !important;
  text-align: center;
  text-indent: 0 !important;
}

.figure-download .btn {
  font-weight: 700;
}

.video-card,
.video-embed {
  margin: 1rem 0 1.35rem;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--gray-border);
  background: #0d1117;
  aspect-ratio: 16 / 9;
  box-shadow: var(--shadow);
  position: relative;
  max-width: 720px;
}

.video-card iframe,
.video-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  position: absolute;
  inset: 0;
}

.video-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: none;
  cursor: pointer;
  background: #000;
  display: block;
}

.video-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.92;
  transition: opacity var(--transition), transform 0.35s ease;
}

.video-cover:hover img {
  opacity: 1;
  transform: scale(1.02);
}

.video-play-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 4cm;
  height: 4cm;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  color: var(--white);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: transform var(--transition), background var(--transition);
}

.video-play-icon {
  width: 3cm;
  height: 3cm;
  min-width: 3cm;
  min-height: 3cm;
  display: block;
  object-fit: contain;
}

.video-cover:hover .video-play-btn {
  transform: translate(-50%, -50%) scale(1.08);
  background: #fff;
}

.video-cover-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.85rem;
  text-align: center;
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 600;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}

.video-embed.is-playing .video-cover {
  display: none;
}

/* Player nunca dentro da sanfona; nas referências não há embeds gerados */
.callout-body .video-embed {
  display: none !important;
}

/* ========== ACTION BAR ========== */
.action-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.action-bar--no-tags {
  justify-content: flex-end;
}

/* Tags/pílulas suprimidas */
.action-bar .tags,
.tag {
  display: none !important;
}

.action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

/* ========== TITLES ========== */
.page-title {
  font-size: clamp(1.45rem, 2.8vw, 2rem);
  font-weight: 900;
  letter-spacing: -0.01em;
  margin: 0 0 1.75rem;
  color: var(--blue-dark);
  line-height: 1.25;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--red-dark);
  margin: 2.1rem 0 1.35rem;
  padding-bottom: 0.45rem;
  border-bottom: 3px solid var(--yellow);
  scroll-margin-top: 96px;
}

.section-title.has-icon {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.section-icon {
  width: 3cm;
  height: 3cm;
  min-width: 3cm;
  min-height: 3cm;
  flex-shrink: 0;
  display: block;
  object-fit: contain;
}

.subsection-title {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--green-dark);
  margin: 1.6rem 0 1.25rem;
  scroll-margin-top: 96px;
}

.lead {
  font-size: 1.02rem;
  color: var(--text-soft);
  margin-bottom: 1.1rem;
}

.content-block {
  margin-top: 0.35rem;
}

.content-block > :first-child:not([hidden]),
.content-block > [hidden] + p,
.content-block > [hidden] + .callout,
.content-block > [hidden] + blockquote {
  margin-top: 0.5rem;
}

.page-title + .content-block {
  margin-top: 0.25rem;
  padding-top: 0.5rem;
}

.content-block p {
  margin: 0 0 1rem;
  text-align: justify;
  hyphens: auto;
  text-indent: 1.25cm;
}

.content-block .callout-body p,
.content-block .tip-title,
.content-block .carta-link {
  text-indent: 0;
}

body[data-page$="-referencias"] .content-block p {
  text-indent: 0;
  text-align: left;
  hyphens: manual;
}

.content-block .tip-title {
  display: inline-block;
  max-width: 100%;
  margin: 1.35rem 0 0.85rem;
  padding: 0.35rem 0.65rem;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text);
  background: var(--yellow-light);
  border-left: 4px solid var(--yellow);
  border-radius: 6px;
  text-align: left;
}

.content-block .tip-title strong {
  font-weight: 700;
}

/* ========== FLIP CARDS ========== */
.flip-deck {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.1rem;
  margin: 1.35rem 0 1.6rem;
  perspective: 1200px;
}

.flip-card {
  height: 220px;
  cursor: pointer;
  border: none;
  background: transparent;
  padding: 0;
  text-align: left;
  outline: none;
}

.flip-card:focus-visible .flip-card-inner {
  box-shadow: 0 0 0 3px var(--blue), var(--shadow);
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.55s ease;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.flip-card.is-flipped .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.flip-card-front {
  background: linear-gradient(160deg, var(--yellow-light) 0%, #fff 70%);
  border: 2px solid var(--yellow);
}

.flip-card-back {
  background: linear-gradient(160deg, var(--blue-light) 0%, #fff 65%);
  border: 2px solid var(--blue);
  transform: rotateY(180deg);
  justify-content: flex-start;
  overflow-y: auto;
}

.flip-card-num {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  margin-bottom: 0.65rem;
  border-radius: 50%;
  background: var(--yellow);
  color: #3e2723;
  font-weight: 800;
  font-size: 0.95rem;
}

.flip-card-title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.35;
}

.flip-card-hint {
  margin-top: auto;
  padding-top: 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-soft);
}

.flip-card-back p {
  margin: 0 !important;
  text-indent: 0 !important;
  text-align: left !important;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.45;
  hyphens: manual;
}

.content-block ul,
.content-block ol {
  margin: 0 0 1rem 1.25cm;
  padding: 0 0 0 1.35rem;
}

.content-block li {
  margin-bottom: 0.4rem;
  padding-left: 0.15rem;
}

.quote {
  margin: 1.25rem 0 1.5rem;
  padding: 1.15rem 1.35rem;
  border: 2px solid var(--blue);
  border-left: 6px solid var(--blue);
  background: linear-gradient(180deg, var(--blue-light) 0%, var(--white) 55%);
  color: var(--text);
  font-style: italic;
  font-weight: 600;
  text-indent: 0 !important;
  text-align: left;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 1.15rem;
  border-radius: 10px;
  border: none;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--transition), background var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.btn:hover {
  transform: translateY(-2px);
  text-decoration: none;
}

.btn-primary {
  background: var(--blue);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(30, 136, 229, 0.3);
}

.btn-primary:hover {
  background: var(--blue-dark);
  color: var(--white);
}

.btn-secondary {
  background: var(--white);
  color: var(--text);
  border: 1px solid var(--gray-border);
}

.btn-secondary:hover {
  background: var(--gray-light);
  color: var(--text);
  border-color: var(--gray);
}

.btn-success {
  background: var(--green);
  color: var(--white);
}

.btn-success:hover {
  background: var(--green-dark);
  color: var(--white);
}

.btn-danger {
  background: var(--red);
  color: var(--white);
}

/* Favoritar suprimido */
.btn-fav {
  display: none !important;
}

/* ========== CALLOUTS ========== */
.callout {
  margin: 1.15rem 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 2px solid var(--gray-border);
  background: var(--white);
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

.callout:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(38, 50, 56, 0.1);
}

.callout-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 1rem;
  min-height: calc(3cm + 0.7rem);
  cursor: pointer;
  user-select: none;
  font-weight: 700;
  color: var(--white);
}

.callout-header-label {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.callout-icon {
  width: 3cm;
  height: 3cm;
  min-width: 3cm;
  min-height: 3cm;
  flex-shrink: 0;
  display: block;
  object-fit: contain;
  object-position: center;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 50%;
  padding: 0.22cm;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.14);
}

.callout-icon[src*="que_tal"] {
  padding: 0.12cm;
  background: #fff;
}

.callout-title {
  line-height: 1.25;
}

.callout-header .chevron {
  transition: transform var(--transition);
  flex-shrink: 0;
}

.callout.open .callout-header .chevron {
  transform: rotate(180deg);
}

.callout-body {
  display: none;
  padding: 1rem 1.15rem 1.15rem;
  background: var(--white);
  font-weight: 700;
}

.callout.open .callout-body {
  display: block;
  animation: fadeIn 0.28s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.callout.atividade {
  border-color: var(--blue);
}

.callout.atividade .callout-header {
  background: var(--blue);
}

.callout.atencao {
  border-color: var(--red);
}

.callout.atencao .callout-header {
  background: var(--red);
}

.callout.dica {
  border-color: var(--yellow);
}

.callout.dica .callout-header {
  background: var(--yellow);
  color: #3e2723;
}

.callout.anote {
  border-color: var(--green);
}

.callout.anote .callout-header {
  background: var(--green);
}

.callout.carta {
  border-color: var(--yellow-dark);
  background: var(--yellow-light);
}

.callout.carta .callout-header {
  background: transparent;
  color: var(--text);
  cursor: default;
}

.callout.carta .callout-body {
  display: block;
  background: transparent;
  padding-top: 0;
}

.carta-link {
  font-weight: 700;
  color: var(--blue-dark);
}

.highlight-box {
  margin: 1.35rem 0 1.6rem;
  border: 2px solid var(--blue);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--blue-light) 0%, var(--white) 42%);
  box-shadow: var(--shadow);
  overflow: hidden;
  padding: 1rem 1.15rem 1.15rem;
}

.highlight-box-head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.highlight-box-intro {
  margin: 0.35rem 0 0 !important;
  text-indent: 0 !important;
  text-align: left !important;
  font-weight: 700;
  color: var(--blue-dark);
  line-height: 1.45;
}

.highlight-list {
  margin: 0;
  padding: 0 0 0 1.25rem;
  list-style: disc;
}

.highlight-list li {
  margin: 0.35rem 0;
  padding-left: 0.15rem;
  font-weight: 700;
  text-align: left;
  line-height: 1.45;
}

.highlight-list li::marker {
  color: var(--blue);
}

.lyrics-quadro {
  margin: 1.35rem 0 1.6rem;
  border: 2px solid var(--green);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.lyrics-quadro-caption {
  display: block;
  background: var(--green);
  color: var(--white);
  font-weight: 700;
  padding: 0.75rem 1.1rem;
  margin: 0;
}

.lyrics-quadro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.song-card {
  padding: 1.1rem 1.15rem 1.25rem;
  min-width: 0;
}

.song-card + .song-card {
  border-left: 1px solid #c8e6c9;
  background: var(--green-light);
}

.song-title {
  margin: 0 0 0.25rem;
  font-size: 1.02rem;
  color: var(--green-dark);
  font-weight: 700;
  line-height: 1.3;
}

.song-author {
  margin: 0 0 0.85rem !important;
  font-size: 0.88rem;
  color: var(--text-soft);
  font-style: italic;
  font-weight: 500;
  text-indent: 0 !important;
  text-align: left !important;
}

.song-line {
  margin: 0 0 0.22rem !important;
  text-indent: 0 !important;
  text-align: left !important;
  font-size: 0.92rem;
  line-height: 1.45;
  font-weight: 500;
  hyphens: manual;
}

.song-line.refrain {
  font-weight: 700;
  color: var(--green-dark);
  margin-top: 0.55rem !important;
}

.quadro-fonte {
  margin: 0 !important;
  padding: 0.65rem 1.1rem 0.85rem;
  font-size: 0.82rem;
  color: var(--text-soft);
  text-indent: 0 !important;
  text-align: left !important;
  border-top: 1px solid #c8e6c9;
}

@media (max-width: 860px) {
  .lyrics-quadro-grid {
    grid-template-columns: 1fr;
  }

  .song-card + .song-card {
    border-left: none;
    border-top: 1px solid #c8e6c9;
  }
}

.content-table-wrap {
  margin: 1.25rem 0 1.5rem;
  overflow-x: auto;
  border-radius: var(--radius);
  border: 2px solid var(--blue);
  box-shadow: var(--shadow);
  background: var(--white);
}

.content-table {
  width: 100%;
  border-collapse: collapse;
  font-weight: 700;
}

.content-table th {
  background: var(--blue);
  color: var(--white);
  text-align: left;
  padding: 0.85rem 1.1rem;
  font-weight: 700;
}

.content-table td {
  padding: 0.75rem 1.1rem;
  border-top: 1px solid #bbdefb;
  text-indent: 0;
  vertical-align: top;
}

.content-table tbody tr:nth-child(even) {
  background: var(--blue-light);
}

.content-table tbody tr:hover {
  background: #bbdefb;
}

.content-table-caption {
  caption-side: top;
  background: var(--green);
  color: var(--white);
  font-weight: 700;
  text-align: left;
  padding: 0.75rem 1.1rem;
}

.abbr-table {
  border-color: var(--green);
  max-width: 520px;
}

.abbr-table .content-table th {
  background: var(--green-dark);
}

.abbr-table .content-table td {
  border-top-color: #c8e6c9;
}

.abbr-table .content-table tbody tr:nth-child(even) {
  background: var(--green-light);
}

.abbr-table .content-table tbody tr:hover {
  background: #c8e6c9;
}

.abbr-table .content-table td:first-child {
  width: 35%;
  white-space: nowrap;
  color: var(--green-dark);
}

.objectives {
  background: var(--green-light);
  border: 1px solid #c8e6c9;
  border-radius: var(--radius);
  padding: 1.2rem 1.35rem;
  margin: 1.15rem 0 1.75rem;
}

.objectives h2 {
  margin: 0 0 0.7rem;
  color: var(--green-dark);
  font-size: 1.1rem;
}

.objectives ul {
  margin: 0;
  padding-left: 1.15rem;
}

/* ========== MENU DIREITA (sempre aberto) ========== */
.toc-sidebar {
  min-width: 0;
  display: block !important;
  position: relative;
  inset: auto;
  width: auto;
  z-index: 1;
  background: transparent;
  border: none;
  box-shadow: none;
  overflow: visible;
  padding: 0;
}

.toc-sidebar.is-always-open {
  display: block !important;
}

.toc-panel {
  position: sticky;
  top: 76px;
  background: var(--gray-light);
  border: 1px solid var(--gray-border);
  border-radius: 16px;
  padding: 1rem 0.75rem 1.15rem;
  box-shadow: var(--shadow);
  max-height: calc(100vh - 100px);
  overflow: auto;
}

.toc-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.toc-heading {
  display: block !important;
  margin: 0;
  padding: 0 0.45rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--blue-dark);
}

.toc-close-mobile {
  display: none;
  border: 1px solid var(--gray-border);
  background: var(--white);
  color: var(--text);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
}

.toc-tabs {
  display: none;
}

.toc-panel-section {
  display: block !important;
}

.toc-backdrop {
  display: none;
}

.toc-toggle-mobile {
  display: none;
}

.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc-list > li {
  margin: 0;
}

.toc-list > li + li {
  border-top: 1px solid var(--gray-border);
}

.lesson-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.95rem 0.55rem;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  transition: background var(--transition);
}

.lesson-item:hover {
  background: var(--gray-light);
  text-decoration: none;
  color: var(--text);
}

.lesson-item.active {
  background: transparent;
}

.lesson-item.active .lesson-title {
  color: var(--blue-dark);
  font-weight: 700;
}

.lesson-item.active .play-icon {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}

.lesson-item.done .play-icon {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
}

.lesson-item.done .play-icon::before {
  content: "✓";
  font-size: 0.75rem;
}

.play-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--gray);
  color: var(--gray-mid);
  display: grid;
  place-items: center;
  font-size: 0.65rem;
  margin-top: 2px;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.play-icon::before {
  content: "▶";
  margin-left: 1px;
}

.lesson-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.lesson-title {
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
}

.lesson-duration {
  font-size: 0.78rem;
  color: var(--gray-mid);
  font-weight: 400;
}

.toc-group-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gray);
  padding: 0.85rem 0.55rem 0.4rem;
}

.toc-children {
  list-style: none;
  display: none;
  margin: 0 0 0.35rem;
  padding: 0 0 0 0.85rem;
  border-left: 2px solid #bbdefb;
}

.toc-children.is-open {
  display: block;
}

.lesson-item.has-children {
  cursor: pointer;
}

.lesson-item.has-children .lesson-title::after {
  content: " ▾";
  font-size: 0.75em;
  color: var(--gray-mid);
  font-weight: 700;
}

.lesson-item.has-children[aria-expanded="false"] .lesson-title::after {
  content: " ▸";
}

.toc-children .lesson-item {
  padding: 0.38rem 0.4rem;
  align-items: center;
}

.toc-children .lesson-title {
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.3;
}

.toc-children .lesson-item.child.active {
  background: var(--blue-light);
}

.toc-children .lesson-item.child.active .lesson-title {
  color: var(--blue-dark);
  font-weight: 700;
}

.toc-children .lesson-item.child.active .play-icon {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}

.subtopic-grid {
  margin-top: 0.5rem;
  margin-bottom: 1.75rem;
}

.toc-sub {
  list-style: none;
  margin: 0;
  padding: 0 0 0 0.35rem;
}

.toc-sub li {
  border-top: 1px solid var(--gray-border);
}

.toc-sub a {
  display: block;
  padding: 0.7rem 0.55rem;
  font-size: 0.84rem;
  color: var(--blue-dark);
  border-radius: 8px;
  text-decoration: none;
  transition: background var(--transition);
}

.toc-sub a:hover,
.toc-sub a.active {
  background: var(--blue-light);
  color: var(--blue-dark);
}

/* Recursos do menu suprimidos */
.resource-item,
.toc-group-label {
  display: none !important;
}

/* Bloco Apoio suprimido */
.support-box {
  display: none !important;
}

/* ========== MOBILE / TABLET ========== */
@media (max-width: 959px) {
  .site-header {
    padding: 0.55rem 0.85rem;
  }

  .toc-toggle-mobile {
    display: grid !important;
  }

  .progress-chip {
    font-size: 0.72rem;
    padding: 0.35rem 0.65rem;
    max-width: 56vw;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .page-wrap {
    display: block;
    padding: 0.85rem 0.85rem 5.5rem;
    gap: 0;
  }

  .main-content {
    width: 100%;
    max-width: 100%;
  }

  .toc-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1090;
    background: rgba(38, 50, 56, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
  }

  .toc-backdrop.open {
    opacity: 1;
    pointer-events: auto;
  }

  .toc-sidebar {
    display: block !important;
    position: fixed;
    top: 0;
    right: 0;
    width: min(360px, 92vw);
    height: 100vh;
    height: 100dvh;
    z-index: 1100;
    transform: translateX(105%);
    transition: transform 0.28s ease;
    padding: 0.65rem;
    background: transparent;
  }

  .toc-sidebar.open {
    transform: translateX(0);
  }

  .toc-panel {
    position: relative;
    top: 0;
    height: calc(100% - 0.2rem);
    max-height: none;
    border-radius: 16px;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .toc-close-mobile {
    display: grid;
    place-items: center;
  }

  body.toc-drawer-open {
    overflow: hidden;
    touch-action: none;
  }

  .page-title {
    font-size: clamp(1.35rem, 6vw, 1.75rem);
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

  .breadcrumb {
    font-size: 0.82rem;
    gap: 0.3rem;
  }

  .breadcrumb span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 55vw;
  }

  .action-bar,
  .action-buttons {
    width: 100%;
  }

  .action-buttons .btn,
  .page-nav .btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .page-nav {
    flex-direction: column;
    gap: 0.65rem;
  }

  .page-nav > div {
    width: 100%;
  }

  .callout-icon {
    width: 2.2cm;
    height: 2.2cm;
    min-width: 2.2cm;
    min-height: 2.2cm;
    padding: 0.14cm;
  }

  .callout-header {
    min-height: calc(2.2cm + 0.55rem);
    padding: 0.45rem 0.75rem;
    gap: 0.5rem;
  }

  .callout-title {
    font-size: 0.98rem;
  }

  .callout-body {
    padding: 0.85rem 0.9rem 1rem;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .content-block p,
  .content-block li,
  .content-block a {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .content-block p {
    text-indent: 0.8cm;
  }

  body[data-page$="-referencias"] .content-block p {
    text-indent: 0;
  }

  .doc-figure--50,
  .doc-figure--40,
  .doc-figure--lousa {
    max-width: 100%;
  }

  .farewell {
    padding: 1.5rem 1.1rem 1.7rem;
    border-radius: 16px;
  }

  .farewell-team {
    white-space: normal;
    line-height: 1.4;
  }

  .farewell-logos {
    flex-wrap: wrap;
    gap: 1rem 1.25rem;
  }

  .farewell-logo--ufpb,
  .farewell-logo--unesco {
    height: 90px;
    max-width: min(300px, 86vw);
  }

  .flip-deck {
    grid-template-columns: 1fr;
  }

  .section-title.has-icon {
    gap: 0.55rem;
  }

  .section-icon {
    width: 2.2cm;
    height: 2.2cm;
  }

  .fab-stack {
    right: 0.75rem;
    bottom: 0.85rem;
  }

  .fab {
    width: 44px;
    height: 44px;
  }

  .video-embed {
    max-width: 100%;
  }

  .highlight-box-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .page-wrap {
    padding: 0.7rem 0.7rem 5rem;
  }

  .lesson-title {
    font-size: 0.86rem;
  }

  .lesson-item {
    padding: 0.8rem 0.45rem;
    min-height: 44px;
  }

  .callout-icon {
    width: 1.85cm;
    height: 1.85cm;
    min-width: 1.85cm;
    min-height: 1.85cm;
  }

  .callout-header {
    min-height: calc(1.85cm + 0.45rem);
  }

  .site-footer {
    padding: 1rem 0.75rem;
    font-size: 0.8rem;
  }
}

/* ========== PAGE NAV / CARDS ========== */
.page-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.25rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--gray-border);
  flex-wrap: wrap;
}

.mark-complete {
  margin-top: 1.4rem;
}

/* Cards de navegação suprimidos */
.lesson-grid,
.lesson-card,
.subtopic-grid {
  display: none !important;
}

/* ========== QUIZ ========== */
.quiz-card {
  border: 1px solid var(--gray-border);
  border-radius: 14px;
  padding: 1.2rem;
  margin: 1.15rem 0;
  background: var(--white);
  box-shadow: var(--shadow);
}

.quiz-card.correct {
  border-color: var(--green);
  background: var(--green-light);
}

.quiz-card.wrong {
  border-color: var(--red);
  background: var(--red-light);
}

.quiz-card h3 {
  margin: 0 0 0.7rem;
  color: var(--blue-dark);
  font-size: 1.02rem;
}

.quiz-options {
  display: grid;
  gap: 0.5rem;
  margin: 0.9rem 0;
}

.quiz-option {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--gray-border);
  border-radius: 10px;
  cursor: pointer;
  background: var(--white);
  transition: background var(--transition), border-color var(--transition);
}

.quiz-option:hover {
  border-color: var(--blue);
  background: var(--blue-light);
}

.quiz-option input {
  margin-top: 0.2rem;
  accent-color: var(--blue);
}

.quiz-feedback {
  display: none;
  margin-top: 0.8rem;
  padding: 0.8rem 1rem;
  border-radius: 10px;
  font-size: 0.93rem;
}

.quiz-card.answered .quiz-feedback {
  display: block;
}

.quiz-feedback.ok {
  background: var(--green-light);
  color: #1b5e20;
  border: 1px solid #a5d6a7;
}

.quiz-feedback.fail {
  background: var(--red-light);
  color: #b71c1c;
  border: 1px solid #ef9a9a;
}

.quiz-score {
  position: sticky;
  bottom: 1rem;
  margin-top: 1.4rem;
  background: linear-gradient(90deg, var(--blue-dark), var(--green-dark));
  color: var(--white);
  padding: 1rem 1.2rem;
  border-radius: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  box-shadow: 0 8px 24px rgba(21, 101, 192, 0.28);
}

/* ========== FAB / FOOTER ========== */
.fab-stack {
  position: fixed;
  right: 1rem;
  bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  z-index: 800;
}

.fab {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  color: var(--white);
  font-size: 1.15rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  transition: transform var(--transition);
  display: grid;
  place-items: center;
}

.fab:hover {
  transform: scale(1.08);
}

.fab-top {
  background: var(--blue);
  opacity: 0;
  pointer-events: none;
}

.fab-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.site-footer {
  background: var(--gray-light);
  border-top: 1px solid var(--gray-border);
  padding: 1.15rem;
  text-align: center;
  color: var(--text-soft);
  font-size: 0.85rem;
}

@media print {
  .site-header,
  .toc-sidebar,
  .fab-stack,
  .page-nav,
  .mark-complete,
  .action-bar,
  .hero-panel {
    display: none !important;
  }

  .callout-body {
    display: block !important;
  }
}
