/* =====================================================================
   HSC Global — CMDSAP extras
   Componentes extraídos da Treinamento MDSAP pra reuso em
   Auditoria/Consultoria MDSAP. Markup idêntico, CSS scopeado pra
   evitar bleed pro resto do site.
   Blocos: tokens auxiliares · mapa-section + globe-nav · sessao-faq +
   s4-dropdown + faq-grid · tag-sessao6 · titulo-sessao6.
   ===================================================================== */

:root {
  /* Tokens auxiliares usados pelos blocos extraídos (alias dos globais) */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fc;
  --text-primary: #0E1A3A;
  --text-secondary: #374151;
  --text-on-dark: #ffffff;
  --tag-bg: rgba(74, 108, 247, 0.08);
  --tag-text: var(--brand-navy);
  --tag-border: rgba(74, 108, 247, 0.15);
  --card-bg-solid: #ffffff;
  --card-border: rgba(0, 0, 0, 0.06);
  --radius-full: 9999px;
  --leading-tight: 1.15;
  --transition-fast: 0.2s ease;
  --primary: var(--brand-navy);
}

/* ===== mapa-section + globe-nav ===== */
.mapa-section {
  background: var(--bg-hero);
  color: var(--text-on-dark);
  overflow: hidden;
  position: relative;
  padding: 96px 0;
}
.mapa-section .container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

.mapa-section .titulo-mapa {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0 0 14px;
  background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 40%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.mapa-section .desc-mapa {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 0 0 22px;
  max-width: 540px;
}

.mapa-layout {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 40px;
  align-items: center;
  min-height: 70vh;
}
.mapa-text-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}
.mapa-text-col .desc-mapa { margin-bottom: 22px; }
.mapa-text-col .globe-nav {
  margin-top: 16px;
  justify-content: flex-start;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
}
.mapa-globe-col {
  display: flex;
  align-items: center;
  justify-content: center;
}
.globe-container {
  position: relative;
  width: 100%;
}
.globe-wrapper {
  position: relative;
  width: 100%;
  height: 650px;
  border-radius: var(--radius-lg);
  overflow: visible;
}
.globe-wrapper canvas { cursor: grab; outline: none; }
.globe-wrapper canvas:active { cursor: grabbing; }

/* Globe HTML labels (Globe.gl) */
.globe-html-label { text-align: center; transform: translate(-50%, -50%); transition: transform 0.3s ease; }
.globe-html-flag { font-size: 28px; line-height: 1; margin-bottom: 4px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.6)); }
.globe-html-dot { width: 8px; height: 8px; border-radius: 50%; margin: 0 auto 6px; box-shadow: 0 0 8px currentColor, 0 0 16px currentColor; position: relative; }
.globe-html-dot::after {
  content: '';
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  opacity: 0.4;
  animation: globe-html-pulse 2.5s ease-out infinite;
}
@keyframes globe-html-pulse {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 0.4; }
  100% { transform: translate(-50%, -50%) scale(2.5); opacity: 0; }
}
.globe-html-name { font-size: 15px; font-weight: 700; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,0.8), 0 0 10px rgba(0,0,0,0.5); white-space: nowrap; letter-spacing: 0.5px; }
.globe-html-agency { font-size: 11px; color: rgba(255,255,255,0.7); text-shadow: 0 1px 4px rgba(0,0,0,0.8); white-space: nowrap; font-weight: 500; }

.globe-tooltip-3d {
  position: absolute;
  z-index: 20;
  background: rgba(5, 13, 61, 0.95);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(74, 108, 247, 0.3);
  border-radius: 12px;
  padding: 14px 18px;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -100%) translateY(-8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  max-width: 240px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 20px rgba(74, 108, 247, 0.15);
  white-space: nowrap;
}
.globe-tooltip-3d.visible { opacity: 1; transform: translate(-50%, -100%) translateY(-14px); }
.gtt-country { font-size: 15px; font-weight: 700; margin-bottom: 2px; }
.gtt-agency { font-size: 12px; color: var(--accent); font-weight: 600; margin-bottom: 6px; }
.gtt-desc { font-size: 11px; color: rgba(255,255,255,0.65); line-height: 1.4; white-space: normal; }

/* Globe nav buttons */
.globe-nav { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.globe-nav-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.4s var(--ease-out);
  font-family: inherit;
  width: auto;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
  text-align: left;
}
.globe-nav-info { display: flex; align-items: baseline; gap: 6px; }
.globe-nav-country { font-size: 13px; font-weight: 700; color: #fff; white-space: nowrap; }
.globe-nav-agency { font-size: 10px; font-weight: 600; color: var(--accent); opacity: 0.8; white-space: nowrap; transition: opacity 0.3s; }
.globe-nav-btn:hover .globe-nav-agency,
.globe-nav-btn.active .globe-nav-agency { opacity: 1; }
.globe-nav-btn:hover,
.globe-nav-btn.active {
  background: linear-gradient(135deg, rgba(74, 108, 247, 0.25), rgba(0, 212, 255, 0.15));
  border-color: rgba(255, 255, 255, 0.1);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(74, 108, 247, 0.15);
}
.globe-nav-flag { width: 24px; height: 24px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.globe-nav-flag img { width: 100%; height: 100%; object-fit: contain; border-radius: 4px; }

.globe-nav-item { transition: flex-basis 0.5s var(--ease-in-out); }
.globe-nav-item.expanded { flex-basis: 100%; }
.globe-nav-item .globe-nav-btn { width: 100%; }

.globe-nav-chevron { width: 16px; height: 16px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; opacity: 0.4; transition: transform 0.4s var(--ease-in-out), opacity 0.3s; margin-left: auto; }
.globe-nav-chevron svg { width: 12px; height: 12px; }
.globe-nav-item.expanded .globe-nav-chevron { transform: rotate(180deg); opacity: 0.7; }
.globe-nav-btn:hover .globe-nav-chevron { opacity: 0.6; }

.globe-nav-detail {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.55s var(--ease-in-out), opacity 0.4s var(--ease-in-out) 0.05s, padding 0.5s var(--ease-in-out);
  padding: 0 18px;
  border-radius: 0;
  background: none;
}
.globe-nav-item.expanded .globe-nav-detail {
  max-height: 320px;
  opacity: 1;
  padding: 10px 18px 16px;
}
.globe-nav-detail p { font-size: 12px; color: rgba(255, 255, 255, 0.6); line-height: 1.6; margin: 0 0 12px; }
.globe-nav-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.globe-nav-detail-item { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; background: rgba(255, 255, 255, 0.04); border-radius: var(--radius-sm); }
.globe-nav-detail-item small { font-size: 9px; color: rgba(255, 255, 255, 0.35); text-transform: uppercase; letter-spacing: 0.4px; font-weight: 500; }
.globe-nav-detail-item strong { font-size: 12px; font-weight: 700; color: #fff; line-height: 1.3; }

@media (max-width: 768px) {
  .mapa-layout { grid-template-columns: 1fr; gap: 16px; min-height: auto; }
  .mapa-text-col { display: contents; }
  .mapa-section .titulo-mapa { font-size: 1.85rem; line-height: 1.18; order: 1; text-align: center; }
  .mapa-section .desc-mapa { order: 1; text-align: center; font-size: 1rem; max-width: 100%; }
  .mapa-globe-col { order: 2; }
  .globe-wrapper { height: 420px; width: 100%; }
  .mapa-text-col .globe-nav { order: 3; justify-content: center; gap: 8px; padding-top: 8px; }
  .globe-nav-btn { padding: 12px 16px; font-size: 14px; }
}

/* ===== sessao-faq + s4-dropdown ===== */
.sessao-faq {
  background: var(--bg-primary);
  position: relative;
  overflow: hidden;
  padding: 96px 0;
}
.sessao-faq .container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.sessao-faq::before {
  content: '';
  position: absolute;
  top: -100px; left: -100px;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(74, 108, 247, 0.04) 0%, transparent 70%);
  pointer-events: none;
}
.sessao-faq::after {
  content: '';
  position: absolute;
  bottom: -100px; right: -100px;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.03) 0%, transparent 70%);
  pointer-events: none;
}

.faq-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}
.tag-sessao6 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  background: var(--tag-bg);
  border: 1px solid var(--tag-border);
  font-size: 0.85rem;
  color: var(--tag-text);
  font-weight: 500;
  margin-bottom: 16px;
}
.titulo-sessao6 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--text-primary);
  line-height: var(--leading-tight);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.sessao-faq .tag-sessao6 { justify-content: center; margin: 0 auto 16px; }
.sessao-faq .titulo-sessao6 { margin-bottom: 12px; position: relative; display: block; }

.faq-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 48px;
}
.faq-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  counter-reset: faq-counter;
}

/* base s4-dropdown / card-soft (extraído) */
.s4-dropdown.card-soft {
  background: var(--card-bg-solid);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  margin-bottom: 0;
  overflow: hidden;
  transition: all 0.3s var(--ease-out);
}
.s4-dropdown.card-soft:hover {
  border-color: var(--accent-glow);
  box-shadow: 0 4px 16px rgba(74, 108, 247, 0.08);
}
.s4-dropdown-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  cursor: pointer;
  gap: 16px;
}
.s4-dropdown-head h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
  margin: 0;
}
.s4-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color var(--transition-fast);
  white-space: nowrap;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.s4-toggle:hover { color: var(--accent); }
.s4-caret {
  display: inline-block;
  width: 0; height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid currentColor;
  transition: transform 0.3s var(--ease-out);
}
.s4-dropdown.open .s4-caret { transform: rotate(180deg); }
.s4-dropdown-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s var(--ease-out), padding 0.3s;
  padding: 0 24px;
}
.s4-dropdown.open .s4-dropdown-body {
  max-height: 2000px;
  padding: 0 24px 24px;
}
.s4-dropdown-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.8;
  padding-left: 48px;
  position: relative;
  margin: 0;
}
.s4-dropdown-desc::before {
  content: '';
  position: absolute;
  left: 20px; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), transparent);
  border-radius: 2px;
  opacity: 0.3;
}

/* Numeração 01..05 nos cards do FAQ */
.faq-grid .s4-dropdown {
  counter-increment: faq-counter;
  position: relative;
  transition: all 0.3s var(--ease-out);
  border-radius: var(--radius-md);
}
.faq-grid .s4-dropdown-head::before {
  content: counter(faq-counter, decimal-leading-zero);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.4;
  margin-right: 16px;
  min-width: 32px;
  transition: opacity 0.3s ease;
}
.faq-grid .s4-dropdown:hover .s4-dropdown-head::before,
.faq-grid .s4-dropdown.open .s4-dropdown-head::before { opacity: 1; }
.faq-grid .s4-dropdown:hover,
.faq-grid .s4-dropdown.open {
  box-shadow: 0 6px 28px rgba(74, 108, 247, 0.1);
  background: var(--card-bg-solid);
}
.faq-grid .s4-dropdown.open { border-color: rgba(74, 108, 247, 0.15); }
