/* Navegação e leitura dos temas do plano de parto. */
.pd-plano-topics {
  width: 100%;
  padding: 28px 0 42px;
  background: var(--pd-plano-cream);
  color: var(--pd-plano-text);
  font-family:
    var(--pd-font-sans);
}

.pd-plano-topics button {
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  text-transform: none;
  -webkit-tap-highlight-color: transparent;
}

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

/* =========================================================
   TÍTULO
========================================================= */

.pd-plano-topics-header {
  margin-bottom: 22px;
  text-align: center;
}

.pd-plano-topics-title {
  margin: 0;
  color: var(--pd-plano-green);
  font-family: var(--pd-font-serif);
  font-size: clamp(26px, 2.5vw, 36px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.5px;
}

/* =========================================================
   NAVEGAÇÃO DOS TEMAS
========================================================= */

.pd-plano-theme-tabs {
  display: grid;
  grid-template-columns:
    minmax(0, 1.22fr) minmax(0, 0.95fr) minmax(0, 1.22fr) minmax(0, 0.62fr) minmax(0, 0.99fr);
  margin-bottom: 26px;
  border-bottom: 1px solid rgba(6, 73, 63, 0.1);
}

.pd-plano-topics .pd-plano-theme-tab {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 68px;
  padding: 8px 12px 16px;
  align-items: center;
  gap: 11px;
  border: 0;
  border-radius: 0;
  color: #5f6865;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  text-align: left;
  transition: color 180ms ease;
}

.pd-plano-theme-tab::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  background: transparent;
  content: "";
  transition: background-color 180ms ease;
}

.pd-plano-topics .pd-plano-theme-tab:hover,
.pd-plano-topics .pd-plano-theme-tab:focus,
.pd-plano-topics .pd-plano-theme-tab:active {
  border: 0;
  color: var(--pd-plano-green);
  background: transparent;
  box-shadow: none;
  outline: none;
}

.pd-plano-topics .pd-plano-theme-tab[aria-selected="true"] {
  color: var(--pd-plano-green);
  background: transparent;
  font-weight: 700;
}

.pd-plano-theme-tab[aria-selected="true"]::after {
  background: var(--pd-plano-green);
}

.pd-plano-theme-number {
  display: inline-flex;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid #c9cfcc;
  border-radius: 50%;
  color: #27302e;
  background: #ffffff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  transition:
    color 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease;
}

.pd-plano-theme-tab:hover .pd-plano-theme-number,
.pd-plano-theme-tab:focus .pd-plano-theme-number,
.pd-plano-theme-tab:active .pd-plano-theme-number {
  border-color: var(--pd-plano-green);
  color: var(--pd-plano-green);
  background: #ffffff;
}

.pd-plano-theme-tab[aria-selected="true"] .pd-plano-theme-number,
.pd-plano-theme-tab[aria-selected="true"]:hover .pd-plano-theme-number,
.pd-plano-theme-tab[aria-selected="true"]:focus .pd-plano-theme-number,
.pd-plano-theme-tab[aria-selected="true"]:active .pd-plano-theme-number {
  border-color: var(--pd-plano-green);
  color: #ffffff;
  background: var(--pd-plano-green);
}

.pd-plano-theme-label {
  display: block;
  min-width: 0;
  color: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
}

.pd-plano-theme-tab[aria-selected="true"] .pd-plano-theme-label {
  font-weight: 700;
}

/* =========================================================
   ÁREA DOS CARDS
========================================================= */

.pd-plano-topic-layout {
  display: grid;
  grid-template-columns: 276px minmax(0, 1fr);
  min-height: 350px;
  gap: 22px;
}

.pd-plano-side-card,
.pd-plano-content-card {
  border: 1px solid var(--pd-plano-border);
  border-radius: var(--pd-plano-radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--pd-plano-shadow);
}

.pd-plano-side-card {
  min-width: 0;
  min-height: 350px;
  overflow: hidden;
}

.pd-plano-subtopic-list {
  display: flex;
  min-width: 0;
  min-height: 100%;
  flex-direction: column;
}

.pd-plano-topics .pd-plano-subtopic-button {
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 70px;
  padding: 15px 25px;
  align-items: center;
  border: 0;
  border-radius: 0;
  color: #28312f;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  text-align: left;
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
  transition:
    color 180ms ease,
    background-color 180ms ease;
}

.pd-plano-topics .pd-plano-subtopic-button:hover,
.pd-plano-topics .pd-plano-subtopic-button:focus,
.pd-plano-topics .pd-plano-subtopic-button:active {
  border: 0;
  color: var(--pd-plano-green);
  background: rgba(237, 243, 239, 0.72);
  box-shadow: none;
  outline: none;
}

.pd-plano-topics .pd-plano-subtopic-button[aria-current="page"],
.pd-plano-topics .pd-plano-subtopic-button[aria-current="page"]:hover,
.pd-plano-topics .pd-plano-subtopic-button[aria-current="page"]:focus,
.pd-plano-topics .pd-plano-subtopic-button[aria-current="page"]:active {
  color: var(--pd-plano-green);
  background: var(--pd-plano-green-soft);
}

/* =========================================================
   CARD PRINCIPAL
========================================================= */

.pd-plano-content-card {
  display: flex;
  min-width: 0;
  min-height: 350px;
  padding: 28px 28px 22px 32px;
  flex-direction: column;
}

.pd-plano-content-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 28px;
}

.pd-plano-content-copy {
  min-width: 0;
}

.pd-plano-content-title {
  margin: 0 0 10px;
  color: var(--pd-plano-green);
  font-family: var(--pd-font-serif);
  font-size: clamp(24px, 2vw, 31px);
  font-weight: 500;
  line-height: 1.16;
  letter-spacing: -0.4px;
}

.pd-plano-content-text {
  max-width: 640px;
  margin: 0;
  color: var(--pd-plano-text-soft);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
}

/* Suporte aos resumos divididos em vários parágrafos */

.pd-plano-content-text p {
  margin: 0 0 14px;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

.pd-plano-content-text p:last-child {
  margin-bottom: 0;
}

.pd-plano-more-link {
  position: static;
  display: block;
  width: fit-content;
  margin-top: 28px;
  margin-bottom: 24px;
  grid-column: 1;
  grid-row: 2;
  color: var(--pd-plano-green);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
  white-space: nowrap;
}

.pd-plano-more-link:hover,
.pd-plano-more-link:focus,
.pd-plano-more-link:active {
  color: var(--pd-plano-green-hover);
  background: transparent;
  outline: none;
}

.pd-plano-more-arrow {
  display: none;
}

/* =========================================================
   BOTÕES ANTERIOR E PRÓXIMO
========================================================= */

.pd-plano-content-footer {
  display: flex;
  margin-top: auto;
  padding-top: 22px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.pd-plano-topics .pd-plano-nav-button {
  display: inline-flex;
  min-width: 148px;
  min-height: 44px;
  padding: 10px 18px;
  align-items: center;
  justify-content: center;
  gap: 13px;
  border: 1px solid var(--pd-plano-green);
  border-radius: 7px;
  box-shadow: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  transition:
    color 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.pd-plano-topics .pd-plano-nav-button-prev {
  color: var(--pd-plano-green);
  background: #ffffff;
}

.pd-plano-topics .pd-plano-nav-button-prev:hover,
.pd-plano-topics .pd-plano-nav-button-prev:focus,
.pd-plano-topics .pd-plano-nav-button-prev:active {
  border-color: var(--pd-plano-green);
  color: var(--pd-plano-green);
  background: var(--pd-plano-green-soft);
  box-shadow: 0 8px 20px rgba(6, 73, 63, 0.08);
  outline: none;
}

.pd-plano-topics .pd-plano-nav-button-next {
  border-color: var(--pd-plano-green);
  color: #ffffff;
  background: var(--pd-plano-green);
}

.pd-plano-topics .pd-plano-nav-button-next:hover,
.pd-plano-topics .pd-plano-nav-button-next:focus,
.pd-plano-topics .pd-plano-nav-button-next:active {
  border-color: var(--pd-plano-green-deep);
  color: #ffffff;
  background: var(--pd-plano-green-deep);
  box-shadow: 0 9px 22px rgba(6, 73, 63, 0.15);
  outline: none;
}

.pd-plano-topics .pd-plano-nav-button:active:not(:disabled) {
  transform: translateY(1px);
}

.pd-plano-topics .pd-plano-nav-button:disabled,
.pd-plano-topics .pd-plano-nav-button:disabled:hover,
.pd-plano-topics .pd-plano-nav-button:disabled:focus,
.pd-plano-topics .pd-plano-nav-button:disabled:active {
  border-color: #dfe4e1;
  color: #aeb6b2;
  background: #f5f6f4;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.pd-plano-button-arrow {
  color: inherit;
  font-size: 20px;
  font-weight: 300;
  line-height: 0.8;
}

/* Foco acessível */

.pd-plano-theme-tab:focus-visible,
.pd-plano-subtopic-button:focus-visible,
.pd-plano-nav-button:focus-visible,
.pd-plano-more-link:focus-visible {
  outline: 2px solid rgba(6, 73, 63, 0.32);
  outline-offset: 3px;
}

/* =========================================================
   SEGURANÇA
========================================================= */

.pd-plano-security-note {
  display: flex;
  margin: 18px 0 0;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #8f9995;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.5;
  text-align: center;
}

.pd-plano-security-lock {
  font-size: 12px;
  line-height: 1;
}

/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1100px) {
  .pd-plano-topics-container {
    width: min(960px, calc(100% - 48px));
  }

  .pd-plano-theme-tabs {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
  }

  .pd-plano-topics .pd-plano-theme-tab {
    flex: 0 0 195px;
    scroll-snap-align: start;
  }

  .pd-plano-topic-layout {
    grid-template-columns: 240px minmax(0, 1fr);
    min-height: 340px;
    gap: 18px;
  }

  .pd-plano-side-card,
  .pd-plano-content-card {
    min-height: 340px;
  }

  .pd-plano-content-card {
    padding: 27px 25px 22px 28px;
  }

  .pd-plano-content-top {
    gap: 18px;
  }

  .pd-plano-more-link {
    gap: 9px;
    font-size: 11px;
  }

  .pd-plano-topics .pd-plano-nav-button {
    min-width: 138px;
  }
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 760px) {
  .pd-plano-topics {
    padding: 32px 0 38px;
  }

  .pd-plano-topics-container {
    width: calc(100% - 32px);
  }

  .pd-plano-topics-header {
    margin-bottom: 20px;
  }

  .pd-plano-topics-title {
    font-size: clamp(25px, 8vw, 32px);
  }

  .pd-plano-theme-tabs {
    width: calc(100% + 32px);
    margin-bottom: 22px;
    margin-left: -16px;
    padding: 0 16px;
  }

  .pd-plano-topics .pd-plano-theme-tab {
    flex-basis: 185px;
    min-height: 64px;
    padding: 7px 8px 14px;
  }

  .pd-plano-theme-number {
    flex-basis: 32px;
    width: 32px;
    height: 32px;
    font-size: 11px;
  }

  .pd-plano-theme-label {
    font-size: 12px;
  }

  .pd-plano-topic-layout {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 13px;
  }

  .pd-plano-side-card {
    min-height: auto;
  }

  .pd-plano-topics .pd-plano-subtopic-button {
    min-height: 54px;
    padding: 13px 17px;
    font-size: 12px;
  }

  .pd-plano-content-card {
    min-height: 290px;
    padding: 23px 19px 18px;
  }

  .pd-plano-content-top {
    grid-template-columns: 1fr;
    gap: 11px;
  }

  .pd-plano-content-title {
    margin-bottom: 8px;
    font-size: 25px;
  }

  .pd-plano-content-text {
    font-size: 13px;
  }

  .pd-plano-more-link {
    margin-top: 0;
    font-size: 11px;
  }

  .pd-plano-content-footer {
    padding-top: 21px;
    gap: 9px;
  }

  .pd-plano-topics .pd-plano-nav-button {
    width: 50%;
    min-width: 0;
    min-height: 43px;
    padding: 9px 11px;
    gap: 7px;
    font-size: 12px;
  }

  .pd-plano-button-arrow {
    font-size: 18px;
  }

  .pd-plano-security-note {
    margin-top: 17px;
    padding: 0 10px;
    font-size: 10.5px;
  }
}

@media (max-width: 390px) {
  .pd-plano-content-footer {
    flex-direction: column;
  }

  .pd-plano-topics .pd-plano-nav-button {
    width: 100%;
  }
}
