/*
Theme Name: Rota do Credito 2.0
Theme URI: https://rotadocredito.com.br/
Author: Rota do Credito
Author URI: https://rotadocredito.com.br/
Description: Tema Rota do Credito 2.0 com Calculadora da Prescricao, trilhas de aprendizagem e paginas de proximos passos.
Version: 2.0.003
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rota2-0
*/

:root {
  --green: #008c55;
  --green-dark: #006b43;
  --navy: #06142e;
  --blue: #0b4e9b;
  --blue-dark: #07356c;
  --bg: #f4f7fa;
  --text: #0a1020;
  --muted: #5b677a;
  --border: #e2e8f0;
  --white: #ffffff;
  --danger: #b42318;
  --warning: #a15c07;
  --success: #047857;
  --shadow: 0 18px 44px rgba(6, 20, 46, 0.11);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

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

button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(210px, 1fr) auto auto;
  align-items: center;
  gap: 24px;
  min-height: 76px;
  padding: 14px max(24px, calc((100vw - 1180px) / 2));
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
}

.brand {
  display: grid;
  gap: 2px;
  color: var(--navy);
  text-decoration: none;
}

.brand strong {
  font-size: 1.25rem;
  line-height: 1.1;
}

.brand span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.main-nav a {
  padding: 10px 11px;
  color: var(--navy);
  border-radius: var(--radius);
  font-size: 0.94rem;
  font-weight: 800;
  text-decoration: none;
}

.main-nav a:hover {
  color: var(--green-dark);
  background: #edf7f2;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--navy);
  border: 1px solid var(--border);
  border-radius: 50%;
  font-weight: 900;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--radius);
  font-weight: 900;
  letter-spacing: 0;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: var(--white);
  background: var(--green);
  box-shadow: 0 12px 28px rgba(0, 140, 85, 0.24);
}

.btn-primary:hover {
  background: var(--green-dark);
}

.btn-secondary {
  color: var(--white);
  background: var(--navy);
}

.btn-secondary:hover {
  background: #020b1d;
}

.btn-small {
  min-height: 40px;
  padding-inline: 14px;
  font-size: 0.9rem;
}

.btn-large {
  min-height: 54px;
  padding-inline: 24px;
}

.hero {
  padding: 34px max(20px, calc((100vw - 1180px) / 2)) 58px;
}

.hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  align-items: center;
  gap: 32px;
  min-height: 430px;
  padding: clamp(28px, 5vw, 56px);
  overflow: hidden;
  background:
    radial-gradient(circle at 85% 20%, rgba(0, 140, 85, 0.18), transparent 28%),
    linear-gradient(135deg, #eaf8f1 0%, #ffffff 58%, #f8fbff 100%);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-copy h1 {
  max-width: 650px;
  margin-bottom: 14px;
  color: var(--navy);
  font-size: clamp(2.25rem, 5vw, 4.8rem);
  line-height: 1;
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 620px;
  margin-bottom: 24px;
  color: #263247;
  font-size: clamp(1.04rem, 2vw, 1.24rem);
}

.pill,
.eyebrow,
.level-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  color: var(--green-dark);
  background: #e7f7ef;
  border: 1px solid #bfe7d3;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.benefits span {
  padding: 9px 12px;
  color: var(--navy);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 850;
}

.hero-visual {
  position: relative;
  min-height: 320px;
}

.document-card,
.calculator-card,
.shield-card,
.lens-card {
  position: absolute;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 20px 44px rgba(6, 20, 46, 0.14);
}

.document-card {
  inset: 22px 72px auto 22px;
  height: 214px;
  padding: 26px;
}

.doc-line {
  display: block;
  width: 72%;
  height: 12px;
  margin-bottom: 15px;
  background: #dbe7f2;
  border-radius: 999px;
}

.doc-line.wide {
  width: 88%;
}

.doc-line.short {
  width: 48%;
}

.document-card b {
  position: absolute;
  right: 28px;
  bottom: 24px;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  color: var(--green-dark);
  background: #e7f7ef;
  border-radius: 50%;
  font-size: 1.6rem;
}

.calculator-card {
  right: 24px;
  bottom: 22px;
  display: grid;
  grid-template-columns: repeat(2, 54px);
  gap: 10px;
  padding: 18px;
  transform: rotate(3deg);
}

.calculator-card span,
.calculator-card strong {
  display: grid;
  place-items: center;
  height: 42px;
  background: #eef4f8;
  border-radius: 6px;
}

.calculator-card strong {
  grid-column: 1 / -1;
  color: var(--white);
  background: var(--green);
  font-size: 1.6rem;
}

.shield-card {
  right: 32px;
  top: 32px;
  display: grid;
  place-items: center;
  width: 74px;
  height: 86px;
  color: var(--white);
  background: var(--blue);
  border-radius: 28px 28px 34px 34px;
  font-size: 2rem;
  font-weight: 950;
}

.lens-card {
  left: 8px;
  bottom: 48px;
  width: 88px;
  height: 88px;
  border: 12px solid var(--navy);
  border-radius: 50%;
  background: transparent;
}

.lens-card::after {
  content: "";
  position: absolute;
  right: -38px;
  bottom: -24px;
  width: 54px;
  height: 12px;
  background: var(--navy);
  border-radius: 999px;
  transform: rotate(42deg);
}

.calculator-shell {
  margin-top: 28px;
}

.section-heading {
  width: min(100%, 1180px);
  margin: 0 auto 20px;
}

.section-heading.compact {
  margin-bottom: 14px;
}

.section-heading.row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.section-heading h2 {
  margin: 8px 0 0;
  color: var(--navy);
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  line-height: 1.1;
}

.calculator-card-main,
.report-block,
.legal-note,
.content-card,
.sidebar,
.trail-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.calculator-card-main {
  padding: clamp(20px, 4vw, 34px);
}

.progress-area {
  margin-bottom: 28px;
}

.progress-text {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 800;
}

.progress-bar {
  height: 10px;
  overflow: hidden;
  background: #dbe4ef;
  border-radius: 999px;
}

.progress-bar span {
  display: block;
  width: 20%;
  height: 100%;
  background: linear-gradient(90deg, var(--green), #32c47c);
  border-radius: inherit;
  transition: width 220ms ease;
}

.step-content {
  min-height: 235px;
}

.step-content h2 {
  margin-bottom: 10px;
  color: var(--navy);
  font-size: clamp(1.35rem, 3vw, 1.9rem);
}

.step-content p,
.report p,
.content-card p,
.sidebar p {
  color: var(--muted);
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 850;
}

select,
input[type="date"] {
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  color: var(--text);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
}

select:focus,
input[type="date"]:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(11, 78, 155, 0.12);
}

.options {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.option {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 14px;
  background: #fbfdff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
}

.option input {
  width: 19px;
  height: 19px;
  margin: 0;
}

.conditional-field {
  margin-top: 20px;
  padding: 18px;
  background: #f6f8fb;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.error-message {
  min-height: 24px;
  margin: 10px 0 0;
  color: var(--danger);
  font-weight: 850;
}

.form-actions,
.report-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.report {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.report[hidden] {
  display: none;
}

.report-block,
.legal-note {
  padding: clamp(18px, 3vw, 28px);
}

.result-card {
  padding: 20px;
  border: 1px solid currentColor;
  border-left-width: 8px;
  border-radius: var(--radius);
}

.result-card.green {
  color: #064e3b;
  background: #ecfdf5;
  border-color: var(--success);
}

.result-card.yellow {
  color: #733e0a;
  background: #fff8e6;
  border-color: var(--warning);
}

.result-card.red {
  color: #7f1d1d;
  background: #fff1f1;
  border-color: var(--danger);
}

.missing-alert {
  margin-top: 18px;
  padding: 18px;
  color: #733e0a;
  background: #fff7dd;
  border: 1px solid #f4c566;
  border-radius: var(--radius);
}

.next-steps-box {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.next-step-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0 12px;
}

.next-step-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 112px;
  padding: 18px;
  color: var(--white);
  background: var(--navy);
  border-radius: var(--radius);
  text-decoration: none;
}

.next-step-card.featured {
  background: var(--blue);
}

.next-step-card small {
  display: block;
  color: #dbeafe;
}

.timeline,
.list {
  margin: 0;
  padding-left: 20px;
}

.timeline li + li,
.list li + li {
  margin-top: 8px;
}

.pending-grid {
  display: grid;
  gap: 12px;
}

.pending-card {
  padding: 16px;
  background: #fff8e6;
  border: 1px solid #f4c566;
  border-radius: var(--radius);
}

.learning-section {
  padding: 0 max(20px, calc((100vw - 1180px) / 2)) 58px;
}

.trail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.trail-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
}

.video-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, var(--navy), var(--blue));
}

.video-thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(0, 140, 85, 0.58), transparent 54%),
    radial-gradient(circle at 80% 28%, rgba(255, 255, 255, 0.28), transparent 28%);
}

.video-thumb span {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 950;
}

.video-thumb b {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  color: var(--green);
  background: rgba(255, 255, 255, 0.96);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.trail-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}

.trail-body h3 {
  margin-bottom: 0;
  color: var(--navy);
  font-size: 1.04rem;
  line-height: 1.25;
}

.trail-body p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.trail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: auto;
}

.duration {
  color: var(--navy);
  font-size: 0.88rem;
  font-weight: 850;
}

.page-main {
  padding: 34px max(20px, calc((100vw - 1180px) / 2)) 58px;
}

.breadcrumb {
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

.breadcrumb a {
  color: var(--blue);
  text-decoration: none;
}

.page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 22px;
  align-items: start;
}

.content-card,
.sidebar {
  padding: clamp(20px, 3vw, 30px);
}

.page-title {
  margin-bottom: 12px;
  color: var(--navy);
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.05;
}

.info-box {
  margin: 22px 0;
  padding: 18px;
  background: #eef7ff;
  border: 1px solid #c7dffc;
  border-radius: var(--radius);
}

.info-box h2,
.info-box h3 {
  margin-bottom: 8px;
  color: var(--navy);
}

.embed-box {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  margin: 22px 0;
  color: var(--white);
  background: linear-gradient(135deg, var(--navy), var(--blue));
  border-radius: var(--radius);
  overflow: hidden;
}

.embed-box iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.embed-placeholder {
  display: grid;
  gap: 12px;
  place-items: center;
  text-align: center;
  padding: 20px;
}

.embed-placeholder b {
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  color: var(--green);
  background: var(--white);
  border-radius: 50%;
  font-size: 1.4rem;
}

.cta-box {
  padding: 20px;
  background: #f7fbf9;
  border: 1px solid #cfe9dc;
  border-radius: var(--radius);
}

.report-list,
.side-links {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.report-list {
  margin-bottom: 18px;
}

.report-list li {
  padding: 12px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-weight: 850;
}

.side-links a {
  display: block;
  padding: 12px;
  color: var(--navy);
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-weight: 850;
  text-decoration: none;
}

.side-links a.active {
  color: var(--white);
  background: var(--navy);
  border-color: var(--navy);
}

.bottom-band {
  margin-top: 24px;
  padding: clamp(22px, 4vw, 36px);
  color: var(--white);
  background: var(--navy);
  border-radius: var(--radius);
}

.bottom-band p {
  color: #dbeafe;
}

.bottom-benefits {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.bottom-benefits span {
  padding: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  font-weight: 850;
}

.custom-footer {
  padding: 0 max(20px, calc((100vw - 1180px) / 2)) 58px;
}

.custom-footer-inner {
  display: grid;
  gap: 24px;
  padding: clamp(24px, 5vw, 42px);
  color: var(--white);
  background:
    linear-gradient(135deg, rgba(0, 140, 85, 0.92), rgba(6, 20, 46, 0.98)),
    var(--navy);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.custom-footer-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 20px;
}

.custom-footer-head h2 {
  max-width: 760px;
  margin: 8px 0 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.08;
}

.custom-footer-head p,
.custom-footer-card p {
  color: #dbeafe;
}

.custom-footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.custom-footer .btn-secondary {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.26);
}

.custom-footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.custom-footer-card {
  min-height: 176px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
}

.custom-footer-card span {
  display: inline-flex;
  margin-bottom: 16px;
  color: #9af0bc;
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.custom-footer-card h3 {
  margin-bottom: 8px;
  font-size: 1.12rem;
  line-height: 1.25;
}

.custom-footer-card p {
  margin-bottom: 0;
}

.site-footer {
  padding: 28px max(20px, calc((100vw - 1180px) / 2));
  color: #dbeafe;
  background: var(--navy);
}

.site-footer p {
  max-width: 700px;
  margin: 6px 0 0;
  color: #dbeafe;
}

@media (max-width: 1020px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .main-nav {
    grid-column: 1 / -1;
    flex-wrap: wrap;
    order: 3;
  }

  .hero-card,
  .page-layout {
    grid-template-columns: 1fr;
  }

  .trail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bottom-benefits {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .custom-footer-head,
  .custom-footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-header {
    position: static;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .header-actions,
  .section-heading.row,
  .form-actions,
  .report-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .header-actions {
    display: grid;
    grid-template-columns: 1fr auto;
  }

  .main-nav a {
    padding: 8px 9px;
    font-size: 0.9rem;
  }

  .hero {
    padding-top: 20px;
  }

  .hero-card {
    padding: 24px;
  }

  .hero-visual {
    min-height: 260px;
  }

  .document-card {
    inset: 12px 34px auto 0;
  }

  .calculator-card {
    right: 0;
  }

  .trail-grid,
  .next-step-grid,
  .bottom-benefits,
  .custom-footer-grid {
    grid-template-columns: 1fr;
  }

  .btn {
    width: 100%;
  }

  .option {
    align-items: flex-start;
  }
}

@media print {
  .site-header,
  .site-footer,
  .calculator-card-main,
  .report-actions {
    display: none;
  }

  body {
    background: var(--white);
  }
}
