:root {
  --bg: #ececec;
  --text: #5e6673;
  --purple: #a50074;
  --purple-dark: #8d005f;
  --link: #3958a8;
  --blue-line: #214aa8;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.72;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1120px, calc(100% - 80px));
  margin: 0 auto;
}

.hero {
  position: relative;
  min-height: 152px;
  background-image: url('assets/header-banner.png');
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(19, 27, 49, 0.22);
}

.hero__inner {
  position: relative;
  z-index: 1;
  min-height: 152px;
  display: flex;
  align-items: center;
}

.hero h1 {
  margin: 0;
  color: var(--white);
  font-size: 30px;
  font-weight: 500;
  letter-spacing: 0.5px;
  padding-left: 4px;
}

.page-content {
  padding: 24px 0 72px;
}

.intro p,
.content-section li,
.highlight-link {
  font-size: 18px;
}

.intro p {
  margin: 0 0 12px;
}

strong {
  color: var(--purple);
  font-weight: 700;
}

em {
  font-style: italic;
}

.highlight-link {
  margin: 28px 0 92px;
  padding: 8px 0 8px 18px;
  border-left: 5px solid var(--blue-line);
}

.highlight-link a {
  color: var(--text);
  text-decoration: none;
}

.highlight-link em {
  color: var(--purple);
  font-weight: 700;
}

.section-title {
  background: var(--purple);
  margin: 0 0 16px;
  padding: 10px 14px;
}

.section-title h2 {
  margin: 0;
  color: var(--white);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.2px;
}

.content-section {
  margin-bottom: 22px;
}

.content-section ul {
  margin: 0 0 28px 22px;
  padding: 0;
}

.content-section li {
  margin: 6px 0;
  padding-left: 2px;
}

.content-section li::marker {
  color: #616161;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.muted {
  color: #7a7a7a;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 768px) {
  .container {
    width: min(100% - 32px, 1120px);
  }

  .hero,
  .hero__inner {
    min-height: 128px;
  }

  .hero h1 {
    font-size: 24px;
  }

  .intro p,
  .content-section li,
  .highlight-link {
    font-size: 16px;
  }

  .section-title h2 {
    font-size: 20px;
  }

  .highlight-link {
    margin-bottom: 60px;
  }
}


.history-page .intro {
  margin-bottom: 34px;
}

.history-block p {
  font-size: 18px;
  margin: 0 0 14px;
}

.history-block {
  scroll-margin-top: 24px;
}

.history-block .section-title {
  margin-top: 24px;
}

@media (max-width: 768px) {
  .history-block p {
    font-size: 16px;
  }
}






.inline-open {
  border: 0;
  background: transparent;
  color: var(--link);
  font: inherit;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
}

.inline-open:hover,
.inline-open:focus {
  text-decoration: underline;
  outline: none;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: rgba(8, 11, 22, 0.72);
}

.modal-backdrop.is-open {
  display: flex;
}

.history-modal-card {
  position: relative;
  width: min(1080px, 100%);
  max-height: min(88vh, 980px);
  overflow: hidden;
  background: #f4f4f4;
  border-radius: 10px;
  box-shadow: 0 28px 90px rgba(0,0,0,0.38);
  border: 1px solid rgba(255,255,255,0.35);
}

.modal-header {
  background: var(--purple);
  color: var(--white);
  padding: 22px 72px 20px 28px;
}

.modal-header h2 {
  margin: 0;
  font-size: 27px;
  font-weight: 500;
  letter-spacing: 0.2px;
}

.modal-kicker {
  margin: 0 0 5px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  opacity: 0.82;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 18px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  color: var(--white);
  font-size: 29px;
  line-height: 32px;
  cursor: pointer;
}

.modal-close:hover,
.modal-close:focus {
  background: rgba(255,255,255,0.24);
  outline: none;
}

.modal-body {
  max-height: calc(min(88vh, 980px) - 96px);
  overflow-y: auto;
  padding: 28px 32px 36px;
}

.modal-body section {
  padding-bottom: 22px;
  margin-bottom: 22px;
  border-bottom: 1px solid #d9d9d9;
}

.modal-body section:last-child {
  border-bottom: 0;
  margin-bottom: 0;
}

.modal-body h3 {
  margin: 0 0 10px;
  color: var(--purple);
  font-size: 21px;
  font-weight: 700;
}

.modal-body p {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 17px;
  line-height: 1.75;
}

.modal-summary {
  background: #ffffff;
  border-left: 5px solid var(--blue-line);
  padding: 18px 20px 8px;
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 768px) {
  .modal-backdrop {
    padding: 16px;
  }

  .modal-header {
    padding: 20px 62px 18px 20px;
  }

  .modal-header h2 {
    font-size: 23px;
  }

  .modal-body {
    padding: 22px 20px 28px;
  }

  .modal-body p {
    font-size: 16px;
  }
}


/* --- v11: collapsible sections and 3D buttons --- */
.collapsible-section .section-title-dropdown {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.collapsible-content[hidden],
.history-topic-list[hidden] {
  display: none !important;
}

.toggle-3d {
  border: 1px solid rgba(255,255,255,0.84);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.26), rgba(255,255,255,0.05)),
    linear-gradient(180deg, #cc4fad 0%, #a00072 52%, #85005f 100%);
  color: var(--white);
  border-radius: 999px;
  padding: 7px 18px;
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.15;
  min-width: 126px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.42),
    inset 0 -2px 0 rgba(0,0,0,0.20),
    0 5px 0 rgba(91,0,67,0.70),
    0 8px 16px rgba(0,0,0,0.22);
  text-shadow: 0 1px 1px rgba(0,0,0,0.38);
  transform: translateY(0);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.toggle-3d:hover,
.toggle-3d:focus {
  filter: brightness(1.08);
  outline: none;
}

.toggle-3d:active {
  transform: translateY(4px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.30),
    inset 0 -1px 0 rgba(0,0,0,0.18),
    0 1px 0 rgba(91,0,67,0.70),
    0 4px 8px rgba(0,0,0,0.18);
}

.toggle-icon {
  transition: transform 0.2s ease;
  font-size: 14px;
}

.collapsible-section.is-expanded .toggle-icon {
  transform: rotate(180deg);
}

.collapsible-content {
  margin-top: 16px;
}

.collapsible-content > ul,
.history-topic-list {
  margin-top: 16px;
}

.modal-body h4 {
  margin: 18px 0 10px;
  color: var(--purple);
  font-size: 19px;
  font-weight: 700;
}

.table-line {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px !important;
  line-height: 1.55 !important;
  background: #ffffff;
  border-left: 3px solid var(--blue-line);
  padding: 8px 10px;
}

.preserved-docs hr {
  border: 0;
  border-top: 1px solid #d3d3d3;
  margin: 26px 0;
}

@media (max-width: 768px) {
  .collapsible-section .section-title-dropdown {
    align-items: flex-start;
    flex-direction: column;
  }

  .toggle-3d {
    align-self: flex-start;
  }
}


/* --- v12: documentary preservation per card --- */
.topic-docs {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 2px solid #d7d7d7;
}

.topic-docs h4,
.dossier-all h4 {
  margin: 0 0 14px;
  color: var(--purple);
  font-size: 20px;
  font-weight: 700;
}

.topic-docs h5,
.dossier-all h5 {
  margin: 18px 0 8px;
  color: #4f4f4f;
  font-size: 16px;
  font-weight: 700;
}

.topic-docs p,
.dossier-all p {
  font-size: 16px;
  line-height: 1.7;
}

.dossier-all hr,
.preserved-docs hr {
  border: 0;
  border-top: 1px solid #d0d0d0;
  margin: 28px 0;
}

.table-line {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px !important;
  line-height: 1.55 !important;
  background: #ffffff;
  border-left: 3px solid var(--blue-line);
  padding: 8px 10px;
  overflow-wrap: anywhere;
}


/* --- v13: spider support icon beside opening text --- */
.intro-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px;
  gap: 28px;
  align-items: start;
}

.intro-copy {
  min-width: 0;
}

.intro-spider-link {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 8px;
}

.intro-spider-link a {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--purple);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  border-radius: 16px;
  padding: 10px;
  transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
}

.intro-spider-link a:hover,
.intro-spider-link a:focus {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: 0 8px 20px rgba(0,0,0,0.14);
  outline: none;
}

.intro-spider-link img {
  width: 108px;
  height: 108px;
  object-fit: contain;
  display: block;
}

@media (max-width: 768px) {
  .intro-layout {
    grid-template-columns: 1fr;
  }

  .intro-spider-link {
    justify-content: flex-start;
    padding-top: 2px;
    margin: 8px 0 18px;
  }

  .intro-spider-link img {
    width: 86px;
    height: 86px;
  }

  .intro-spider-link a {
    align-items: flex-start;
    text-align: left;
  }
}


/* --- v14: profissionais certificados --- */
.professional-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin-top: 8px;
}

.professional-card img {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid #d9d9d9;
  box-shadow: 0 8px 20px rgba(0,0,0,0.16);
  background: #fff;
}

.professional-card p {
  margin-top: 0;
}

@media (max-width: 768px) {
  .professional-card {
    grid-template-columns: 1fr;
  }
  .professional-card img {
    width: 132px;
    height: 132px;
  }
}


/* --- v18: darker palette for Profissionais Credenciados --- */
#profissionais-certificados .section-title {
  background: #6f004f;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,0.22);
}

#profissionais-certificados .toggle-3d {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.20), rgba(255,255,255,0.04)),
    linear-gradient(180deg, #9c1f78 0%, #740052 52%, #54003d 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.35),
    inset 0 -2px 0 rgba(0,0,0,0.22),
    0 5px 0 rgba(54,0,40,0.78),
    0 8px 16px rgba(0,0,0,0.24);
}


/* --- v19: WhatsApp action button beside expand/recolher --- */
.section-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.whatsapp-action {
  width: 39px;
  height: 39px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.22), rgba(255,255,255,0.02)),
    linear-gradient(180deg, #3ecf6d 0%, #20a85b 52%, #0f7f40 100%);
  border: 1px solid rgba(255,255,255,0.72);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.42),
    inset 0 -2px 0 rgba(0,0,0,0.20),
    0 5px 0 rgba(4,87,42,0.72),
    0 8px 16px rgba(0,0,0,0.22);
  transform: translateY(0);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
  text-decoration: none;
}

.whatsapp-action svg {
  width: 23px;
  height: 23px;
  fill: currentColor;
  display: block;
}

.whatsapp-action:hover,
.whatsapp-action:focus {
  filter: brightness(1.08);
  outline: none;
  text-decoration: none;
}

.whatsapp-action:active {
  transform: translateY(4px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.30),
    inset 0 -1px 0 rgba(0,0,0,0.18),
    0 1px 0 rgba(4,87,42,0.72),
    0 4px 8px rgba(0,0,0,0.18);
}

#profissionais-certificados .whatsapp-action {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.20), rgba(255,255,255,0.02)),
    linear-gradient(180deg, #2dbb63 0%, #16834a 52%, #0b5f34 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.35),
    inset 0 -2px 0 rgba(0,0,0,0.22),
    0 5px 0 rgba(3,65,35,0.80),
    0 8px 16px rgba(0,0,0,0.24);
}

@media (max-width: 768px) {
  .section-actions {
    margin-left: 0;
    align-self: flex-start;
  }
}


/* --- v20: WhatsApp buttons harmonized with section palette --- */
.whatsapp-action {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.20), rgba(255,255,255,0.03)),
    linear-gradient(180deg, #9e006f 0%, #7e0059 52%, #610044 100%) !important;
  color: var(--white);
  border-color: rgba(255,255,255,0.74);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.34),
    inset 0 -2px 0 rgba(0,0,0,0.24),
    0 5px 0 rgba(67,0,49,0.78),
    0 8px 16px rgba(0,0,0,0.24) !important;
}

.whatsapp-action:hover,
.whatsapp-action:focus {
  filter: brightness(1.09);
}

#profissionais-certificados .whatsapp-action {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0.03)),
    linear-gradient(180deg, #7c0059 0%, #5d0043 52%, #430031 100%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.30),
    inset 0 -2px 0 rgba(0,0,0,0.26),
    0 5px 0 rgba(39,0,29,0.82),
    0 8px 16px rgba(0,0,0,0.26) !important;
}


/* --- v23: botão discreto de retorno para página principal --- */
.home-return {
  display: flex;
  justify-content: flex-start;
  margin: 0 0 24px;
}

.home-return__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 18px;
  border-radius: 8px;
  color: #1f2140;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-decoration: none;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.92), rgba(245,246,251,0.86)),
    linear-gradient(180deg, #ffffff 0%, #eef1f8 100%);
  border: 1px solid rgba(150, 160, 190, 0.36);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.95),
    0 3px 0 rgba(174, 181, 201, 0.46),
    0 6px 14px rgba(0,0,0,0.12);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.home-return__button:hover,
.home-return__button:focus {
  filter: brightness(1.03);
  text-decoration: none;
  outline: none;
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.98),
    0 4px 0 rgba(174, 181, 201, 0.48),
    0 8px 16px rgba(0,0,0,0.14);
}

.home-return__button:active {
  transform: translateY(3px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.84),
    0 1px 0 rgba(174, 181, 201, 0.46),
    0 3px 8px rgba(0,0,0,0.12);
}

@media (max-width: 768px) {
  .home-return {
    margin-bottom: 18px;
  }

  .home-return__button {
    min-height: 38px;
    padding: 8px 14px;
    font-size: 13px;
  }
}
