/* ======================================================================
   CIO Codex — Mapa do Framework
   Dark brand canvas · cyan accents · editorial hierarchy
   ====================================================================== */

.cio-mapa {
  --mapa-bg: #000000;
  --mapa-ink: #ffffff;
  --mapa-muted: rgba(255, 255, 255, 0.72);
  --mapa-faint: rgba(255, 255, 255, 0.42);
  --mapa-accent: #00c8ff;
  --mapa-accent-deep: #02cbfe;
  --mapa-line: rgba(0, 200, 255, 0.22);
  --mapa-surface: #0a0c10;
  --mapa-card: #ffffff;
  --mapa-radius: 14px;
  --mapa-font: "Manrope", "Segoe UI", sans-serif;
  --mapa-display: "Sora", "Manrope", sans-serif;
  --mapa-ease: cubic-bezier(0.22, 0.7, 0, 1);

  background: var(--mapa-bg);
  color: var(--mapa-ink);
  font-family: var(--mapa-font);
  -webkit-font-smoothing: antialiased;
  min-height: 60vh;
}

body.page-template-template-mapa-framework,
body.page-mapa-framework {
  background: #000 !important;
}

body.page-template-template-mapa-framework .cio-mapa,
body.page-mapa-framework .cio-mapa {
  margin-top: 0;
}

.cio-mapa *,
.cio-mapa *::before,
.cio-mapa *::after {
  box-sizing: border-box;
}

.cio-mapa a {
  color: inherit;
  text-decoration: none;
}

.cio-mapa-wrap {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 48px 0 96px;
}

/* ── Plus icon ── */
.cio-mapa-plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--mapa-accent);
  color: #fff;
  flex-shrink: 0;
  transition: transform 0.35s var(--mapa-ease), background 0.25s ease;
}

.cio-mapa-plus--lg {
  width: 28px;
  height: 28px;
}

.cio-mapa-plus--sm {
  width: 20px;
  height: 20px;
}

.cio-mapa-plus:hover,
a:hover > .cio-mapa-plus {
  transform: rotate(90deg) scale(1.06);
  background: var(--mapa-accent-deep);
}

/* ── Hero ── */
.cio-mapa-hero {
  display: grid;
  grid-template-columns: 1.05fr 1.35fr 0.9fr;
  gap: 36px;
  align-items: start;
  padding: 24px 0 56px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.cio-mapa-hero__brand {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 8px;
}

.cio-mapa-hero__logo {
  width: 84px;
  height: auto;
  display: block;
  filter: drop-shadow(0 0 18px rgba(0, 200, 255, 0.25));
}

.cio-mapa-hero__brand-title {
  font-family: var(--mapa-display);
  font-size: clamp(2rem, 3.4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}

.cio-mapa-hero__heading-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.cio-mapa-hero__title {
  margin: 0;
  font-family: var(--mapa-display);
  font-size: clamp(1.55rem, 2.6vw, 2.05rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--mapa-ink);
}

.cio-mapa-hero__title em {
  font-style: normal;
  color: var(--mapa-accent);
}

.cio-mapa-hero__text {
  margin: 0;
  max-width: 42ch;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--mapa-muted);
  font-weight: 500;
}

.cio-mapa-hero__preview {
  justify-self: end;
  width: 100%;
  max-width: 280px;
}

.cio-mapa-overview-card {
  background: var(--mapa-card);
  border-radius: 12px;
  overflow: hidden;
  color: #111;
  box-shadow: 0 18px 40px rgba(0, 200, 255, 0.08);
  transform: translateY(0);
  transition: transform 0.45s var(--mapa-ease);
}

.cio-mapa-overview-card:hover {
  transform: translateY(-4px);
}

.cio-mapa-overview-card__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--mapa-accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.cio-mapa-overview-card__bar img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.cio-mapa-overview-card__body {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 12px 10px 14px;
  background: linear-gradient(180deg, #f7f9fc 0%, #ffffff 100%);
}

.cio-mapa-overview-col strong {
  display: block;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 800;
  color: #0b1220;
  margin-bottom: 6px;
}

.cio-mapa-overview-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 3px;
}

.cio-mapa-overview-col li {
  font-size: 0.48rem;
  line-height: 1.25;
  color: #334155;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cio-mapa-hero__preview-caption {
  margin: 10px 0 0;
  font-size: 0.72rem;
  color: var(--mapa-faint);
  text-align: center;
}

/* ── Pillar nav ── */
.cio-mapa-pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  padding: 72px 0 80px;
}

.cio-mapa-pillars__title {
  margin: 0 0 22px;
  font-family: var(--mapa-display);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  text-align: center;
}

.cio-mapa-pillars__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
  width: max-content;
  max-width: 100%;
  margin-inline: auto;
}

.cio-mapa-pillars__list a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--mapa-ink);
  transition: color 0.25s ease;
}

.cio-mapa-pillars__list a:hover {
  color: var(--mapa-accent);
}

/* ── Detail sections ── */
.cio-mapa-section {
  padding: 56px 0 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.cio-mapa-section__head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.cio-mapa-section__title {
  margin: 0;
  font-family: var(--mapa-display);
  font-size: clamp(1.55rem, 2.8vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.cio-mapa-section__title em {
  font-style: normal;
  color: var(--mapa-accent);
}

.cio-mapa-section__grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(0, 1.15fr);
  gap: 40px;
  align-items: start;
}

.cio-mapa-section__visual {
  margin: 0;
  position: sticky;
  top: 96px;
}

.cio-mapa-visual-card {
  display: block;
  border-radius: var(--mapa-radius);
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.45s var(--mapa-ease);
}

.cio-mapa-visual-card:hover {
  transform: translateY(-3px);
}

.cio-mapa-visual-card img {
  display: block;
  width: 100%;
  height: auto;
}

.cio-mapa-section__visual figcaption {
  margin-top: 16px;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--mapa-muted);
  font-weight: 500;
}

.cio-mapa-section__topics {
  display: grid;
  gap: 42px;
}

.cio-mapa-topic {
  scroll-margin-top: 110px;
}

.cio-mapa-topic__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.cio-mapa-topic__title {
  margin: 0;
  font-family: var(--mapa-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.cio-mapa-topic__title a:hover {
  color: var(--mapa-accent);
}

.cio-mapa-topic__thumb {
  display: block;
  width: min(220px, 55%);
  margin-bottom: 14px;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.cio-mapa-topic__thumb img {
  display: block;
  width: 100%;
  height: auto;
}

.cio-mapa-topic__blurb {
  margin: 0 0 14px;
  max-width: 54ch;
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--mapa-muted);
  font-weight: 500;
}

.cio-mapa-topic__cta {
  margin: 12px 0 0;
}

.cio-mapa-topic__cta a {
  color: var(--mapa-accent);
  font-weight: 700;
  font-size: 0.92rem;
}

.cio-mapa-topic__cta a:hover {
  text-decoration: underline;
}

/* ── Accordion ── */
.cio-mapa-accordion {
  border: 0;
}

.cio-mapa-accordion > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--mapa-accent);
  font-weight: 700;
  font-size: 0.95rem;
  user-select: none;
}

.cio-mapa-accordion > summary::-webkit-details-marker {
  display: none;
}

.cio-mapa-accordion__chev {
  transition: transform 0.3s var(--mapa-ease);
}

.cio-mapa-accordion[open] > summary .cio-mapa-accordion__chev {
  transform: rotate(180deg);
}

.cio-mapa-accordion__body {
  padding-top: 14px;
  animation: cioMapaReveal 0.35s var(--mapa-ease);
}

@keyframes cioMapaReveal {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cio-mapa-topics {
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--mapa-ink);
  display: grid;
  gap: 10px;
}

.cio-mapa-topics > li,
.cio-mapa-topics ul > li {
  position: relative;
  padding-left: 1.15rem;
}

.cio-mapa-topics > li::before,
.cio-mapa-topics ul > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mapa-accent);
  box-shadow:
    0 0 6px rgba(0, 200, 255, 0.95),
    0 0 14px rgba(0, 200, 255, 0.55),
    0 0 22px rgba(0, 200, 255, 0.28);
}

.cio-mapa-topics > li::before {
  width: 8px;
  height: 8px;
  top: 0.5em;
}

.cio-mapa-topics ul {
  list-style: none;
  margin: 10px 0 2px;
  padding: 0 0 0 0.35rem;
  display: grid;
  gap: 7px;
  color: var(--mapa-muted);
}

.cio-mapa-topics ul > li::before {
  width: 5px;
  height: 5px;
  top: 0.62em;
  background: rgba(0, 200, 255, 0.85);
  box-shadow:
    0 0 5px rgba(0, 200, 255, 0.8),
    0 0 12px rgba(0, 200, 255, 0.35);
}

.cio-mapa-topics a {
  font-size: 0.94rem;
  font-weight: 500;
  line-height: 1.4;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.cio-mapa-topics a:hover {
  color: var(--mapa-accent);
  text-shadow: 0 0 12px rgba(0, 200, 255, 0.35);
}

.cio-mapa-topics > li:hover::before {
  box-shadow:
    0 0 8px rgba(0, 200, 255, 1),
    0 0 18px rgba(0, 200, 255, 0.7),
    0 0 28px rgba(0, 200, 255, 0.4);
}

@media (prefers-reduced-motion: reduce) {
  .cio-mapa-topics a {
    transition: none;
  }
}

/* ── Entrance motion ── */
.cio-mapa [data-anim] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--mapa-ease), transform 0.7s var(--mapa-ease);
}

.cio-mapa [data-anim].is-in {
  opacity: 1;
  transform: none;
}

.cio-mapa-section[data-anim].is-in .cio-mapa-topic {
  opacity: 0;
  transform: translateY(12px);
  animation: cioMapaTopicIn 0.55s var(--mapa-ease) forwards;
}

.cio-mapa-section[data-anim].is-in .cio-mapa-topic:nth-child(1) { animation-delay: 0.05s; }
.cio-mapa-section[data-anim].is-in .cio-mapa-topic:nth-child(2) { animation-delay: 0.12s; }
.cio-mapa-section[data-anim].is-in .cio-mapa-topic:nth-child(3) { animation-delay: 0.19s; }
.cio-mapa-section[data-anim].is-in .cio-mapa-topic:nth-child(4) { animation-delay: 0.26s; }

@keyframes cioMapaTopicIn {
  to {
    opacity: 1;
    transform: none;
  }
}

/* ── Responsive ── */
@media (max-width: 980px) {
  .cio-mapa-hero {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .cio-mapa-hero__preview {
    justify-self: start;
    max-width: 320px;
  }

  .cio-mapa-section__grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .cio-mapa-section__visual {
    position: static;
  }
}

@media (max-width: 720px) {
  .cio-mapa-wrap {
    width: min(100% - 32px, 1180px);
    padding: 28px 0 72px;
  }

  .cio-mapa-pillars {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 48px 0 56px;
  }

  .cio-mapa-pillars__list {
    margin-inline: 0;
  }

  .cio-mapa-pillars__title {
    text-align: left;
  }

  .cio-mapa-topic__thumb {
    width: min(260px, 78%);
  }

  .cio-mapa-overview-col li {
    font-size: 0.52rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cio-mapa *,
  .cio-mapa *::before,
  .cio-mapa *::after {
    animation: none !important;
    transition: none !important;
  }

  .cio-mapa [data-anim] {
    opacity: 1;
    transform: none;
  }
}
