/**
 * PHM Tech — Panteão da Tecnologia: Construtores da Computação (CSS Oficial)
 * Padrão Microsoft Fluent · Cores Harmonizadas (Claro, Sépia, Escuro)
 * Prof. Paulo Henrique Maciel · PHM Tech
 */

/* ==========================================================================
   1. SEÇÕES PRINCIPAIS & ALTERNÂNCIA DE CORES
   ========================================================================== */

.panteao-main-app {
  display: block;
  width: 100%;
}

/* Seção 1: Hero, Banner & Filtros de Pesquisa (Fundo Padrão) */
.panteao-section-hero {
  background: var(--bg);
  padding: 3rem 0 2.5rem 0;
  border-bottom: 1px solid var(--line);
}

/* Seção 2: Grade de Biografias & Paginação (Superfície Alternada) */
.panteao-section-catalog {
  background: var(--surface-soft);
  padding: 3.5rem 0 4.5rem 0;
  border-bottom: 1px solid var(--line);
}

/* Seção 3: Pilares & Legado dos Pioneiros (Fundo Padrão) */
.panteao-section-pillars {
  background: var(--bg);
  padding: 3.5rem 0 4.5rem 0;
  border-bottom: 1px solid var(--line);
}

/* ==========================================================================
   2. HERO PRINCIPAL & BANNER (SEM CORTE DE IMAGEM)
   ========================================================================== */

.panteao-master-hero {
  text-align: center;
  max-width: 1100px;
  margin: 0 auto;
}

.panteao-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(14, 165, 233, 0.3);
  color: #0284c7;
  padding: 0.35rem 0.95rem;
  border-radius: var(--phm-radius-sm, 4px);
  font-family: var(--fonte-mono, 'JetBrains Mono', monospace);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
}

[data-theme="dark"] .panteao-hero-badge {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.3);
}

.panteao-hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  color: var(--navy);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 0.85rem;
}

.panteao-hero-highlight {
  background: linear-gradient(135deg, #0284c7, #6366f1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="dark"] .panteao-hero-highlight {
  background: linear-gradient(135deg, #38bdf8, #a5b4fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.panteao-hero-lead {
  font-size: 1.05rem;
  color: var(--text-soft);
  max-width: 840px;
  margin: 0 auto 2rem auto;
  line-height: 1.65;
}

/* Banner de Destaque 100% Visível (Sem Corte de Personagens) */
.panteao-banner-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1.5px solid var(--line);
  box-shadow: var(--shadow-md);
  margin-bottom: 2rem;
  background: var(--surface);
  display: flex;
  flex-direction: column;
}

.panteao-banner-img {
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  display: block;
}

.panteao-banner-bar {
  background: var(--surface-soft);
  border-top: 1px solid var(--line);
  padding: 0.85rem 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.panteao-banner-bar-title {
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--navy);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* Barra de Pesquisa */
.panteao-search-bar-wrap {
  max-width: 780px;
  margin: 0 auto 1.5rem auto;
  position: relative;
}

.panteao-search-input {
  width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--phm-radius-sm, 4px);
  padding: 0.85rem 3rem 0.85rem 2.85rem;
  font-size: 0.95rem;
  color: var(--navy);
  font-weight: 600;
  outline: none;
  font-family: inherit;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.panteao-search-input:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.15);
}

.panteao-search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-soft);
  pointer-events: none;
}

.panteao-search-clear {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-soft);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
}

.panteao-search-clear:hover {
  color: var(--navy);
}

/* Barra de Navegação Alfabética A-Z (Em Linha Única) */
.panteao-alphabet-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
  max-width: 100%;
  width: 100%;
  margin: 0 auto 1.75rem auto;
}

.alpha-btn {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--navy);
  padding: 0.35rem 0.42rem;
  border-radius: var(--phm-radius-sm, 4px);
  font-family: var(--fonte-mono, 'JetBrains Mono', monospace);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 28px;
  box-shadow: var(--shadow-xs);
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

.alpha-btn[data-letter="ALL"] {
  padding: 0.35rem 0.75rem;
  min-width: 58px;
  border-radius: var(--phm-radius-sm, 4px);
}

.alpha-btn span {
  line-height: 1;
}

.alpha-count {
  font-size: 0.62rem;
  color: var(--text-soft);
  font-weight: 600;
  margin-top: 1px;
}

.alpha-btn:hover:not(.disabled) {
  border-color: #0284c7;
  color: #0284c7;
  background: rgba(2, 132, 199, 0.08);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.2);
}

.alpha-btn.active {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  border-color: #0284c7;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
  transform: translateY(-1px);
}

.alpha-btn.active .alpha-count {
  color: rgba(255, 255, 255, 0.9);
}

.alpha-btn.disabled {
  opacity: 0.3;
  cursor: not-allowed;
  background: transparent;
  border-color: transparent;
}

/* Categorias em Pílulas */
.panteao-category-pills {
  display: flex;
  justify-content: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.cat-pill-btn {
  background: var(--surface);
  border: 1.5px solid var(--line);
  color: var(--navy);
  padding: 0.5rem 1rem;
  border-radius: var(--phm-radius-sm, 4px);
  font-family: var(--fonte-mono, 'JetBrains Mono', monospace);
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.cat-pill-btn:hover {
  border-color: #0284c7;
  color: #0284c7;
  background: rgba(2, 132, 199, 0.06);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.18);
}

.cat-pill-btn:hover svg {
  transform: scale(1.12);
}

.cat-pill-btn svg {
  transition: transform 0.2s ease;
}

.cat-pill-btn.active {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  border-color: #0284c7;
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.35);
  transform: translateY(-1px);
}

/* ==========================================================================
   3. GRADE DE BIOGRAFIAS (SEÇÃO 2)
   ========================================================================== */

.panteao-results-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
  gap: 1rem;
}

.results-count-text {
  font-size: 0.92rem;
  color: var(--text-soft);
}

.results-count-text strong {
  color: var(--navy);
  font-weight: 800;
}

.page-size-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.84rem;
  color: var(--text-soft);
  font-weight: 600;
}

.page-size-select {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--navy);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.82rem;
  outline: none;
  cursor: pointer;
}

/* Grid de Cards */
.pioneers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
  gap: 1.5rem;
}

@media (max-width: 640px) {
  .header-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .header-actions > *,
  .btn-header-action,
  .nav-pref-trigger,
  .pioneer-card {
    min-width: 0;
    max-width: 100%;
  }

  .btn-header-action,
  .nav-pref-trigger {
    width: 100%;
  }
}

.pioneer-card {
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  position: relative;
  cursor: pointer;
}

.pioneer-card:hover {
  transform: translateY(-3px);
  border-color: #0284c7;
  box-shadow: var(--shadow-md);
}

.pioneer-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.pioneer-cat-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pioneer-years-badge {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-soft);
}

.pioneer-name {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--navy);
  line-height: 1.25;
  margin: 0;
}

.pioneer-title-sub {
  font-size: 0.84rem;
  font-weight: 700;
  color: #0284c7;
  margin: 0;
}

[data-theme="dark"] .pioneer-title-sub {
  color: #38bdf8;
}

.pioneer-summary {
  font-size: 0.84rem;
  color: var(--text-soft);
  line-height: 1.55;
  margin: 0;
  flex: 1;
}

.pioneer-quote-box {
  background: var(--surface-soft);
  border-left: 3px solid #0284c7;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.6rem 0.85rem;
  font-style: italic;
  font-size: 0.78rem;
  color: var(--navy);
  line-height: 1.45;
}

.pioneer-tags-row {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-top: auto;
}

.pioneer-tag-pill {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-soft);
  background: var(--surface-soft);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.pioneer-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 0.75rem;
  margin-top: 0.25rem;
}

.pioneer-nation {
  font-size: 0.78rem;
  color: var(--text-soft);
  font-weight: 600;
}

.btn-view-bio {
  background: var(--surface-soft);
  color: #0284c7;
  border: 1px solid rgba(2, 132, 199, 0.35);
  padding: 0.45rem 0.95rem;
  border-radius: var(--phm-radius-sm, 4px);
  font-family: var(--fonte-mono, 'JetBrains Mono', monospace);
  font-size: 0.78rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-view-bio svg {
  transition: transform 0.2s ease;
}

.pioneer-card:hover .btn-view-bio,
.btn-view-bio:hover {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
  transform: translateY(-2px);
}

.pioneer-card:hover .btn-view-bio svg,
.btn-view-bio:hover svg {
  transform: translateX(3px);
}

/* Paginação */
.panteao-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.45rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.pag-btn {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--navy);
  min-width: 36px;
  height: 36px;
  padding: 0 0.75rem;
  border-radius: var(--phm-radius-sm, 4px);
  font-family: var(--fonte-mono, 'JetBrains Mono', monospace);
  font-size: 0.82rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

.pag-btn:hover:not(.disabled) {
  border-color: #0284c7;
  color: #0284c7;
  background: rgba(2, 132, 199, 0.08);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.2);
}

.pag-btn.active {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  border-color: #0284c7;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
  transform: translateY(-1px);
}

.pag-btn.disabled {
  opacity: 0.35;
  cursor: not-allowed;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

/* ==========================================================================
   4. PILARES HISTÓRICOS DA COMPUTAÇÃO (SEÇÃO 3)
   ========================================================================== */

.panteao-pillars-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1.15rem;
  align-items: stretch;
}

.panteao-pillar-card {
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--phm-radius-md, 6px);
  padding: 1.35rem 1.15rem;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.panteao-pillar-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3.5px;
  background: var(--line);
  transition: height 0.2s ease;
}

.panteao-pillar-card:nth-child(1)::before { background: #0284c7; }
.panteao-pillar-card:nth-child(2)::before { background: #2563eb; }
.panteao-pillar-card:nth-child(3)::before { background: #059669; }
.panteao-pillar-card:nth-child(4)::before { background: #7c3aed; }
.panteao-pillar-card:nth-child(5)::before { background: #ea580c; }

.panteao-pillar-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -6px rgba(0, 0, 0, 0.12), 0 4px 10px rgba(0, 0, 0, 0.05);
  border-color: rgba(2, 132, 199, 0.35);
}

.panteao-pillar-card:hover::before {
  height: 5px;
}

.panteao-pillar-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--phm-radius-sm, 4px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-xs);
}

.panteao-pillar-title {
  font-family: var(--font-heading);
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--navy);
  margin: 0;
  line-height: 1.3;
}

.panteao-pillar-desc {
  font-size: 0.81rem;
  color: var(--text-soft);
  line-height: 1.55;
  margin: 0;
  flex: 1;
}

/* RESPONSIVIDADE HARMONIOSA DOS PILARES (3 + 2 CENTRALIZADOS OU GRADE) */
@media (max-width: 1100px) {
  .panteao-pillars-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.25rem;
  }

  .panteao-pillar-card {
    flex: 0 1 calc(33.333% - 1.25rem);
    min-width: 250px;
    max-width: 320px;
  }
}

@media (max-width: 768px) {
  .panteao-pillar-card {
    flex: 0 1 calc(50% - 0.75rem);
    min-width: 220px;
    max-width: none;
  }
}

@media (max-width: 520px) {
  .panteao-pillar-card {
    flex: 0 1 100%;
    min-width: 100%;
  }
}

/* ==========================================================================
   5. MODAL DE BIOGRAFIA & TRAJETÓRIA (Z-INDEX 99999)
   ========================================================================== */

.modal-overlay,
#bio-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(6, 11, 23, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 1.5rem;
  box-sizing: border-box;
}

.panteao-modal-dialog {
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--phm-radius-md, 6px);
  width: 92%;
  max-width: 860px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.4), 0 0 35px rgba(2, 132, 199, 0.15);
  overflow: hidden;
  position: relative;
  z-index: 100000;
  animation: modalPopIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalPopIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.panteao-modal-header {
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface-soft);
  gap: 1rem;
}

.modal-close {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text-soft);
  width: 36px;
  height: 36px;
  border-radius: var(--phm-radius-sm, 4px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  padding: 0;
}

.modal-close:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #ef4444;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.panteao-modal-body {
  padding: 1.75rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* LAYOUT DO CABEÇALHO DA BIOGRAFIA (DENTRO DO CORPO) */
.modal-header-layout {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1.25rem;
  flex-wrap: wrap;
}

.modal-portrait-slot {
  width: 88px;
  height: 88px;
  border-radius: var(--phm-radius-sm, 4px);
  background: rgba(2, 132, 199, 0.1);
  border: 2px solid #0284c7;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.2);
}

.modal-portrait-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-monogram-fallback {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 900;
  color: #ffffff;
  font-family: var(--font-heading);
}

.modal-headline-info {
  flex: 1;
  min-width: 240px;
}

.modal-tag-line {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.35rem;
}

.modal-cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(2, 132, 199, 0.1);
  border: 1px solid rgba(2, 132, 199, 0.3);
  color: #0284c7;
  padding: 0.2rem 0.65rem;
  border-radius: var(--phm-radius-sm, 4px);
  font-family: var(--fonte-mono, 'JetBrains Mono', monospace);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.modal-country-badge {
  font-size: 0.8rem;
  color: var(--text-soft);
  font-weight: 600;
}

.modal-person-name {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: 900;
  color: var(--navy);
  line-height: 1.2;
  margin: 0.2rem 0;
}

.modal-person-dates {
  font-size: 0.84rem;
  color: var(--gold, #d97706);
  font-weight: 700;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
}

.modal-person-title {
  font-size: 1rem;
  color: #0284c7;
  font-weight: 700;
}

/* CITAÇÃO / FRASE */
.modal-quote-box {
  background: var(--surface-soft);
  border-left: 4px solid #0284c7;
  border-radius: 0 var(--phm-radius-sm, 4px) var(--phm-radius-sm, 4px) 0;
  padding: 1rem 1.35rem;
  margin: 0.5rem 0;
  position: relative;
}

.quote-mark {
  font-size: 2.2rem;
  color: #0284c7;
  line-height: 1;
  font-family: Georgia, serif;
  opacity: 0.5;
  display: block;
  margin-bottom: -0.5rem;
}

.quote-text {
  font-size: 0.95rem;
  font-style: italic;
  color: var(--navy);
  line-height: 1.6;
  margin: 0;
}

/* SEÇÕES DA BIOGRAFIA */
.modal-section-heading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--navy);
  margin-top: 0.5rem;
}

.modal-narrative-text {
  font-size: 0.94rem;
  color: var(--navy);
  line-height: 1.75;
  margin: 0;
}

/* LINHA DO TEMPO */
.modal-timeline {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  border-left: 2px solid var(--line);
  padding-left: 1.35rem;
  margin-left: 0.5rem;
}

.timeline-item {
  position: relative;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.62rem;
  top: 0.35rem;
  width: 8px;
  height: 8px;
  border-radius: var(--phm-radius-xs, 2px);
  background: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.2);
}

.timeline-year {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 800;
  color: #0284c7;
  display: inline-block;
  margin-bottom: 0.15rem;
}

.timeline-detail {
  font-size: 0.88rem;
  color: var(--navy);
  line-height: 1.55;
}

/* CARD DE CURIOSIDADE */
.modal-curiosity-card {
  background: rgba(250, 204, 21, 0.1);
  border: 1.5px solid rgba(250, 204, 21, 0.4);
  border-radius: var(--phm-radius-md, 6px);
  padding: 1.25rem 1.35rem;
  margin-top: 0.5rem;
}

.curiosity-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 800;
  color: #b45309;
  margin-bottom: 0.5rem;
}

.curiosity-icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.curiosity-text {
  font-size: 0.9rem;
  color: var(--navy);
  line-height: 1.65;
  margin: 0;
}

/* TAGS NO RODAPÉ DO CONTEÚDO */
.modal-footer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  margin-top: 0.5rem;
}

.modal-tag-pill {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--text-soft);
  padding: 0.25rem 0.65rem;
  border-radius: var(--phm-radius-sm, 4px);
  font-size: 0.76rem;
  font-family: var(--fonte-mono, 'JetBrains Mono', monospace);
  font-weight: 600;
}

/* RODAPÉ DO MODAL (BOTÃO FECHAR) */
.panteao-modal-footer {
  padding: 1rem 1.75rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  background: var(--surface-soft);
}

.btn-modal-close-pill,
.btn-save-primary {
  background: var(--surface);
  border: 1.5px solid var(--line);
  color: var(--navy);
  padding: 0.55rem 1.25rem;
  border-radius: var(--phm-radius-sm, 4px);
  font-family: var(--fonte-mono, 'JetBrains Mono', monospace);
  font-size: 0.85rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-modal-close-pill svg,
.btn-save-primary svg {
  transition: transform 0.2s ease;
}

.btn-modal-close-pill:hover,
.btn-save-primary:hover {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.35);
  transform: translateY(-2px);
}

.btn-modal-close-pill:hover svg,
.btn-save-primary:hover svg {
  transform: scale(1.15);
}

/* P1-10 — contraste WCAG AA em superfícies claras */
:root:not([data-theme="dark"]) .panteao-hero-badge { color: #075985 !important; }
:root:not([data-theme="dark"]) .brand-accent-gold { color: #7a5a0a !important; }
:root:not([data-theme="dark"]) .footer-brand-sep { color: #64748b !important; }
[data-theme="dark"] .pioneer-cat-badge,
[data-theme="dark"] .pioneer-title-sub,
[data-theme="dark"] .btn-view-bio,
[data-theme="dark"] .panteao-hero-badge { color: #93c5fd !important; }

/* ==========================================================================
   CABEÇALHO CANÔNICO DO ECOSSISTEMA PHM TECH — BOTÕES GHOST & NAVEGAÇÃO
   ========================================================================== */
.phm-ecosystem-header .phm-ecosystem-header__inner,
.phm-ecosystem-header .nav-wrap {
  justify-content: flex-start !important;
}

.phm-ecosystem-header .phm-projects-menu > summary,
.phm-ecosystem-header .phm-hub-back {
  width: 34px !important;
  min-width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid transparent !important;
  border-radius: 4px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--text-soft, #475569) !important;
  transition: all 0.15s ease;
}

.phm-ecosystem-header .phm-projects-menu > summary::-webkit-details-marker {
  display: none !important;
}

.phm-ecosystem-header .phm-projects-menu > summary span,
.phm-ecosystem-header .phm-projects-menu > summary svg:last-child,
.phm-ecosystem-header .phm-hub-back span {
  display: none !important;
}

.phm-ecosystem-header .phm-projects-menu > summary svg:first-child,
.phm-ecosystem-header .phm-hub-back svg {
  margin: 0 !important;
}

.phm-ecosystem-header .phm-projects-menu > summary:hover,
.phm-ecosystem-header .phm-projects-menu[open] > summary,
.phm-ecosystem-header .phm-hub-back:hover {
  border-color: var(--line, #e2e8f0) !important;
  background: var(--surface-soft, #f1f5f9) !important;
  color: #0284c7 !important;
}

[data-theme="dark"] .phm-ecosystem-header .phm-projects-menu > summary,
[data-theme="dark"] .phm-ecosystem-header .phm-hub-back {
  color: #94a3b8 !important;
}

[data-theme="dark"] .phm-ecosystem-header .phm-projects-menu > summary:hover,
[data-theme="dark"] .phm-ecosystem-header .phm-projects-menu[open] > summary,
[data-theme="dark"] .phm-ecosystem-header .phm-hub-back:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #38bdf8 !important;
}

[data-theme="sepia"] .phm-ecosystem-header .phm-projects-menu > summary,
[data-theme="sepia"] .phm-ecosystem-header .phm-hub-back {
  color: #715842 !important;
}

[data-theme="sepia"] .phm-ecosystem-header .phm-projects-menu > summary:hover,
[data-theme="sepia"] .phm-ecosystem-header .phm-projects-menu[open] > summary,
[data-theme="sepia"] .phm-ecosystem-header .phm-hub-back:hover {
  background: rgba(67, 52, 34, 0.08) !important;
  border-color: rgba(67, 52, 34, 0.15) !important;
  color: #78350f !important;
}

.phm-ecosystem-header .menu-toggle {
  display: none !important;
}

@media (max-width: 900px) {
  .phm-ecosystem-header .menu-toggle {
    display: inline-flex !important;
    width: 34px !important;
    min-width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid transparent !important;
    border-radius: 4px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--text-soft, #475569) !important;
    cursor: pointer;
    transition: all 0.15s ease;
  }
  .phm-ecosystem-header .menu-toggle:hover {
    border-color: var(--line, #e2e8f0) !important;
    background: var(--surface-soft, #f1f5f9) !important;
    color: #0284c7 !important;
  }
  [data-theme="dark"] .phm-ecosystem-header .menu-toggle {
    color: #94a3b8 !important;
  }
  [data-theme="dark"] .phm-ecosystem-header .menu-toggle:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #38bdf8 !important;
  }
  [data-theme="sepia"] .phm-ecosystem-header .menu-toggle {
    color: #715842 !important;
  }
  [data-theme="sepia"] .phm-ecosystem-header .menu-toggle:hover {
    background: rgba(67, 52, 34, 0.08) !important;
    border-color: rgba(67, 52, 34, 0.15) !important;
    color: #78350f !important;
  }
  .phm-ecosystem-header .header-editorial-nav {
    display: none !important;
  }
  .phm-ecosystem-header .header-editorial-nav.open {
    display: flex !important;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--surface, #0f172a);
    border-bottom: 1px solid var(--line, rgba(255, 255, 255, 0.1));
    padding: 1rem 1.25rem;
    gap: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    z-index: 999;
  }
  .phm-ecosystem-header .header-editorial-nav.open a {
    padding: 0.65rem 0.85rem !important;
    font-size: 0.85rem !important;
    border-radius: 4px !important;
  }
  [data-theme="light"] .phm-ecosystem-header .header-editorial-nav.open {
    background: #ffffff;
    border-bottom-color: var(--line, #e2e8f0);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  }
  [data-theme="sepia"] .phm-ecosystem-header .header-editorial-nav.open {
    background: #f4ecdc;
    border-bottom-color: var(--line, #e2e8f0);
    box-shadow: 0 10px 25px rgba(67, 52, 34, 0.12);
  }
}

body.app-body {
  overflow-x: hidden;
}

.phm-ecosystem-header {
  width: 100% !important;
  max-width: 100vw !important;
  box-sizing: border-box !important;
}

@media (max-width: 640px) {
  .phm-ecosystem-header .phm-ecosystem-header__inner {
    padding-inline: 0.35rem !important;
    gap: 0.2rem !important;
  }
  .phm-ecosystem-header .nav-left-cluster {
    flex-shrink: 1 !important;
    min-width: 0 !important;
  }
  .phm-ecosystem-header .app-logo-wordmark {
    height: 20px !important;
    max-width: 85px !important;
    width: auto !important;
  }
  .phm-ecosystem-header .nav-cluster-divider {
    display: none !important;
  }
  .phm-ecosystem-header .phm-ecosystem-header__actions {
    gap: 0.15rem !important;
    flex-shrink: 0 !important;
  }
  .phm-ecosystem-header .nav-pref-trigger,
  .phm-ecosystem-header .phm-projects-menu > summary,
  .phm-ecosystem-header .phm-hub-back,
  .phm-ecosystem-header .menu-toggle {
    width: 30px !important;
    min-width: 30px !important;
    height: 30px !important;
    min-height: 30px !important;
    padding: 0 !important;
    border-radius: 4px !important;
    justify-content: center !important;
  }
}

/* Salvaguarda de Acessibilidade: Skip Link fora do fluxo visual quando não focado */
.phm-skip-link {
  position: absolute !important;
  top: -9999px !important;
  left: 1rem !important;
  z-index: 999999 !important;
  padding: 0.5rem 1rem !important;
  background: #0b1329 !important;
  color: #38bdf8 !important;
  border: 1px solid #0284c7 !important;
  border-radius: 4px !important;
  font-family: var(--font-body, system-ui, sans-serif) !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.phm-skip-link:focus,
.phm-skip-link:focus-visible {
  top: 1rem !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  outline: 2px solid #38bdf8 !important;
}

