/* ==========================================================================
   Páginas de conteúdo (direito imobiliário)
   Carregar DEPOIS de responsive.css. Não altera as páginas existentes:
   tudo aqui é novo ou depende da classe .page-realestate / modificadores.
   ========================================================================== */

:root {
  --color-text-body: #334155;
  --color-border: #0042351a;
  --prose-max: 720px;
}

/* ---------- Hero compacto ---------------------------------------------- */
.page-realestate .hero_products {
  background-image:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 72px),
    linear-gradient(155deg, #0b3d2e 0%, #115241 58%, #0b3d2e 100%);
}

.hero_products.hero_products--compact {
  height: auto;
  min-height: 0;
  padding: 36px 40px 52px;
  align-items: flex-start;
}

.hero_products--compact .hero__inner {
  padding-bottom: 0;
}

/* ---------- Foto no topo (por página) ---------------------------------- */
/* Texto à esquerda sobre verde forte; a foto aparece mais à direita. */
.page-realestate--distrato .hero_products,
.page-realestate--atraso .hero_products,
.page-realestate--usucapiao .hero_products,
.page-realestate--regularizacao .hero_products {
  --hero-shade: linear-gradient(
    180deg,
    rgba(11, 61, 46, 0.92) 0%,
    rgba(11, 61, 46, 0.8) 100%
  );
  background-size: cover;
  background-position: 50% 50%;
  background-repeat: no-repeat;
}

.page-realestate--distrato .hero_products {
  background-image: var(--hero-shade), url("../img/hero-distrato.jpg");
  background-position: 60% 50%;
}

.page-realestate--atraso .hero_products {
  background-image: var(--hero-shade), url("../img/hero-atraso.jpg");
  background-position: 50% 50%;
}

.page-realestate--usucapiao .hero_products {
  background-image: var(--hero-shade), url("../img/hero-usucapiao.jpg");
  background-position: 80% 50%;
}

.page-realestate--regularizacao .hero_products {
  background-image: var(--hero-shade), url("../img/hero-regularizacao.jpg");
  background-position: 50% 50%;
}

@media (min-width: 768px) {
  .page-realestate--distrato .hero_products,
  .page-realestate--atraso .hero_products,
  .page-realestate--usucapiao .hero_products,
  .page-realestate--regularizacao .hero_products {
    --hero-shade: linear-gradient(
      90deg,
      rgba(11, 61, 46, 0.95) 0%,
      rgba(11, 61, 46, 0.88) 42%,
      rgba(11, 61, 46, 0.4) 100%
    );
    background-position: center;
  }
}

/* Cards de situações mais baixos nestas páginas, para o conteúdo vir mais cedo */
.section--situations .specialties-grid {
  gap: 16px;
}

.section--situations .area-card {
  gap: 12px;
  padding: 24px 22px;
}

.hero__eyebrow {
  font-size: 12px;
  font-weight: 700;
  line-height: 16px;
  letter-spacing: 3.6px;
  color: #ffffffb3;
  text-transform: uppercase;
}

.hero_products--compact .hero__title,
.prose h2 {
  text-wrap: balance;
}

.hero_products--compact .hero__title {
  font-size: 28px;
  line-height: 1.22;
  letter-spacing: -0.6px;
}

.hero_products--compact .hero__description {
  font-size: 16px;
  line-height: 1.7;
}

/* ---------- Seção de leitura ------------------------------------------- */
.section.section--prose {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-bottom: 48px;
  scroll-margin-top: calc(65px + env(safe-area-inset-top) + 16px);
}

.section--situations .section-heading__title {
  font-size: 24px;
  line-height: 1.3;
}

.prose {
  width: 100%;
  max-width: var(--prose-max);
  margin: 0 auto;
  font-size: 15px;
  line-height: 1.75;
  color: var(--color-text-body);
}

.prose > * + * {
  margin-top: 16px;
}

.prose h2 {
  margin-top: 44px;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.3;
  color: var(--color-text-dark);
}

.prose h2::before {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  margin-bottom: 14px;
  background: var(--color-primary);
}

.prose > h2:first-child {
  margin-top: 0;
}

.prose h3 {
  margin-top: 28px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--color-text-dark);
}

/* O reset (Meyer) zera font-weight/style; redefinir explicitamente */
.prose strong,
.faq__answer strong,
.cta-band strong {
  font-weight: 600;
  color: var(--color-text-dark);
}

.cta-band strong {
  color: inherit;
}

.prose em {
  font-style: italic;
}

.prose a,
.faq__answer a {
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose ul,
.prose ol {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-left: 1.3em;
}

.prose ul {
  list-style: disc;
}

.prose ol {
  list-style: decimal;
}

.prose li::marker {
  color: var(--color-primary);
}

.prose .checklist,
.prose .steps {
  padding-left: 0;
  list-style: none;
}

/* ---------- Caixa "Em resumo" ------------------------------------------ */
.summary-box {
  padding: 24px 22px;
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: var(--color-white);
  box-shadow: 0 1px 2px #0000000d;
}

.summary-box__label {
  font-size: 12px;
  font-weight: 700;
  line-height: 16px;
  letter-spacing: 3px;
  color: var(--color-primary);
  text-transform: uppercase;
}

.summary-box ul {
  margin-top: 14px;
}

/* ---------- Tabelas ---------------------------------------------------- */
.table-wrap {
  margin-top: 20px;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-white);
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-text-body);
  overflow: hidden;
}

.table-caption {
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: var(--color-text-muted);
}

.data-table th,
.data-table td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--color-border);
}

.data-table thead th {
  border-bottom: 0;
  background: var(--color-primary);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 1.2px;
  color: var(--color-white);
  text-transform: uppercase;
}

.data-table tbody th {
  font-weight: 700;
  color: var(--color-text-dark);
}

.data-table tbody tr:last-child th,
.data-table tbody tr:last-child td {
  border-bottom: 0;
}

/* Celular: cada linha vira um cartão com rótulos */
@media (max-width: 767px) {
  .data-table,
  .data-table tbody,
  .data-table tr,
  .data-table th,
  .data-table td {
    display: block;
  }

  .data-table thead {
    position: absolute;
    left: -9999px;
  }

  .data-table tbody tr {
    padding: 6px 0;
    border-bottom: 1px solid var(--color-border);
  }

  .data-table tbody tr:last-child {
    border-bottom: 0;
  }

  .data-table th,
  .data-table td {
    padding: 8px 16px;
    border-bottom: 0;
  }

  .data-table tbody th {
    padding-top: 12px;
    font-size: 15px;
  }

  .data-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 1.2px;
    color: var(--color-primary);
    text-transform: uppercase;
  }
}

/* ---------- Exemplo ilustrativo ---------------------------------------- */
.example-box {
  padding: 22px;
  border: 1px dashed #00423559;
  border-radius: var(--radius-md);
  background: #0042350d;
}

.example-box__label {
  font-size: 12px;
  font-weight: 700;
  line-height: 16px;
  letter-spacing: 3px;
  color: var(--color-primary);
  text-transform: uppercase;
}

.example-box dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px 0;
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.5;
}

.example-box dt {
  padding-right: 16px;
}

.example-box dd {
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
  color: var(--color-text-dark);
}

.example-box .is-total {
  padding-top: 12px;
  border-top: 1px solid #00423540;
  font-weight: 700;
  color: var(--color-text-dark);
}

.example-box__note {
  margin-top: 14px;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--color-text-muted);
}

/* ---------- Passo a passo e checklist ---------------------------------- */
.steps {
  counter-reset: step;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.steps li {
  counter-increment: step;
  position: relative;
  min-height: 34px;
  padding-left: 50px;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--color-primary);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  color: var(--color-white);
}

.steps li strong {
  display: block;
}

.checklist {
  list-style: none;
}

.checklist li {
  position: relative;
  padding-left: 30px;
}

.checklist li::before {
  content: "";
  position: absolute;
  top: 0.4em;
  left: 0;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: var(--color-primary)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.5l2.5 2.5 4.5-5' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 12px no-repeat;
}

/* ---------- Faixa de chamada para ação --------------------------------- */
.cta-band {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: var(--prose-max);
  margin: 12px auto 0;
  padding: 28px 24px;
  border-radius: var(--radius-md);
  background: var(--color-primary);
  box-shadow: 0 8px 24px rgba(11, 61, 46, 0.25);
  color: var(--color-white);
}

.prose + .cta-band,
.cta-band + .prose {
  margin-top: 0;
}

.cta-band__title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
}

.cta-band__text {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.7;
  color: #ffffffcc;
}

.cta-band .btn {
  flex: 0 0 auto;
}

/* ---------- Perguntas frequentes --------------------------------------- */
.faq {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.faq__item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-white);
  overflow: hidden;
}

.faq__question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  list-style: none;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--color-text-dark);
}

.faq__question::-webkit-details-marker {
  display: none;
}

.faq__question::after {
  content: "";
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  margin-top: -4px;
  border-right: 2px solid var(--color-primary);
  border-bottom: 2px solid var(--color-primary);
  transform: rotate(45deg);
  transition: transform 0.2s ease, margin 0.2s ease;
}

.faq__item[open] .faq__question::after {
  margin-top: 4px;
  transform: rotate(-135deg);
}

.faq__question:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: -2px;
}

.faq__answer {
  padding: 0 20px 20px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--color-text-body);
}

.faq__answer > * + * {
  margin-top: 10px;
}

/* ---------- Leia também, base legal e aviso ---------------------------- */
.related {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.related__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-white);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--color-text-dark);
  text-decoration: none;
  transition: border-color 0.2s ease;
}

.prose .related__link {
  color: var(--color-text-dark);
  text-decoration: none;
}

.related__link::after {
  content: "\2192";
  color: var(--color-primary);
}

.related__link:hover,
.related__link:focus-visible {
  border-color: var(--color-primary);
}

.legal-basis {
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
  font-size: 13px;
  line-height: 1.7;
  color: var(--color-text-muted);
}

.prose .lp-note {
  max-width: none;
  margin: 24px 0 0;
  text-align: left;
  font-size: 13px;
}

/* ==========================================================================
   Tablet
   ========================================================================== */
@media (min-width: 768px) {
  .hero_products.hero_products--compact {
    padding: 56px 48px 72px;
  }

  .section--situations .specialties-grid {
    gap: 20px;
  }

  .section--situations .area-card {
    min-height: 0;
    padding: 28px 28px 30px;
  }

  .hero_products--compact .hero__title {
    font-size: 40px;
    line-height: 1.15;
    letter-spacing: -1px;
    max-width: 640px;
  }

  .hero_products--compact .hero__description {
    font-size: 18px;
  }

  .section--situations .section-heading__title {
    font-size: 30px;
  }

  .prose {
    font-size: 16px;
  }

  .prose h2 {
    margin-top: 52px;
    font-size: 26px;
  }

  .prose h3 {
    font-size: 18px;
  }

  .summary-box {
    padding: 28px 30px;
  }

  .data-table {
    font-size: 14.5px;
  }

  .data-table th,
  .data-table td {
    padding: 16px 18px;
  }

  .example-box {
    padding: 26px 28px;
  }

  .example-box dl {
    font-size: 15px;
  }

  .cta-band {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 30px 32px;
  }

  .cta-band__body {
    flex: 1 1 auto;
  }

  .cta-band .btn {
    width: auto;
    min-width: 220px;
  }

  .faq__question {
    padding: 20px 24px;
    font-size: 16px;
  }

  .faq__answer {
    padding: 0 24px 24px;
    font-size: 15px;
  }
}

/* ==========================================================================
   Desktop
   ========================================================================== */
@media (min-width: 1024px) {
  .hero_products.hero_products--compact {
    height: auto;
    min-height: 0;
    padding: 88px 64px 96px;
    align-items: center;
  }

  .hero_products--compact .hero__title {
    max-width: 820px;
    font-size: 54px;
    line-height: 1.08;
    letter-spacing: -1.4px;
  }

  .hero_products--compact .hero__description {
    max-width: 680px;
    font-size: 19px;
  }

  .section--situations .section-heading__title {
    font-size: 36px;
  }

  .section.section--prose {
    padding-bottom: 72px;
    scroll-margin-top: calc(82px + env(safe-area-inset-top) + 20px);
  }

  .prose {
    font-size: 17px;
  }

  .prose h2 {
    font-size: 30px;
  }

  .faq__question {
    font-size: 17px;
  }

  .faq__answer {
    font-size: 16px;
  }

  .related {
    flex-direction: row;
  }

  .related__link {
    flex: 1 1 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .faq__question::after,
  .related__link {
    transition: none;
  }
}
