/* ===================================================
   DR. RICARDO CAMARINHA — SITE PREMIUM
   Design System & Styles
   =================================================== */

:root {
  /* Cores Primárias */
  --navy: #0A1628;
  --navy-mid: #122040;
  --navy-light: #1E3A6E;
  --gold: #C9A84C;
  --gold-light: #E8C96A;
  --gold-pale: #F5E8C0;
  --white: #FFFFFF;
  --off-white: #F8F6F1;
  --cream: #F0EBE0;

  /* Cinzas */
  --gray-100: #F7F7F7;
  --gray-200: #EEEEEE;
  --gray-300: #DDDDDD;
  --gray-400: #AAAAAA;
  --gray-500: #777777;
  --gray-700: #444444;
  --gray-900: #1A1A1A;

  /* Semânticas */
  --success: #27AE60;
  --warning: #E67E22;
  --danger: #C0392B;
  --info: #2980B9;

  /* Tipografia */
  --font-serif: 'Playfair Display', 'Georgia', serif;
  --font-sans: 'Inter', 'Helvetica Neue', sans-serif;

  /* Espaçamentos */
  --section-pad: 100px 0;
  --container-max: 1200px;

  /* Sombras */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 8px 32px rgba(0,0,0,0.12);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.18);
  --shadow-gold: 0 4px 24px rgba(201,168,76,0.25);

  /* Bordas */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  color: var(--gray-900);
  background: var(--white);
  line-height: 1.7;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }
ul, ol { list-style: none; }

/* ===== TIPOGRAFIA ===== */
h1, h2, h3, h4, h5 {
  font-family: var(--font-serif);
  line-height: 1.2;
  color: var(--navy);
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(1.9rem, 3.5vw, 2.8rem); font-weight: 700; }
h3 { font-size: clamp(1.4rem, 2.5vw, 1.9rem); font-weight: 600; }
h4 { font-size: 1.3rem; font-weight: 600; }
h5 { font-size: 1.1rem; font-weight: 600; }

p { color: var(--gray-700); font-size: 1.05rem; }

.text-gold { color: var(--gold); }
.text-navy { color: var(--navy); }
.text-white { color: var(--white); }
.text-center { text-align: center; }
.text-light { color: var(--gray-500); }

/* ===== CONTAINER ===== */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== SEÇÃO BASE ===== */
section {
  padding: var(--section-pad);
}

.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}

.section-title {
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1.15rem;
  color: var(--gray-500);
  max-width: 580px;
}

.section-divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(to right, var(--gold), var(--gold-light));
  margin: 20px 0;
  border-radius: 2px;
}

.section-divider.center {
  margin: 20px auto;
}

/* ===== BOTÕES ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 36px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  color: var(--navy);
  box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(201,168,76,0.4);
}

.btn-secondary {
  background: transparent;
  border-color: var(--gold);
  color: var(--gold);
}

.btn-secondary:hover {
  background: var(--gold);
  color: var(--navy);
  transform: translateY(-2px);
}

.btn-white {
  background: var(--white);
  color: var(--navy);
  box-shadow: var(--shadow-md);
}

.btn-white:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

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

.btn-navy:hover {
  background: var(--navy-light);
  transform: translateY(-2px);
}

.btn-large {
  padding: 20px 48px;
  font-size: 1.05rem;
  border-radius: var(--radius-lg);
}

.btn-pulse {
  animation: pulsarBotao 2s infinite;
}

@keyframes pulsarBotao {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201,168,76,0.4); }
  50% { box-shadow: 0 0 0 12px rgba(201,168,76,0); }
}

/* ===== NAVBAR ===== */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: all 0.3s ease;
  padding: 20px 0;
}

#navbar.scrolled {
  background: rgba(10, 22, 40, 0.97);
  backdrop-filter: blur(20px);
  padding: 14px 0;
  box-shadow: 0 2px 30px rgba(0,0,0,0.3);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-logo-name {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
}

.nav-logo-title {
  font-size: 0.65rem;
  letter-spacing: 2px;
  color: var(--gold);
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 8px 16px;
  color: rgba(255,255,255,0.85);
  font-size: 0.88rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all 0.25s;
  letter-spacing: 0.3px;
  cursor: pointer;
}

.nav-link:hover,
.nav-link.active {
  color: var(--gold);
  background: rgba(201,168,76,0.1);
}

.nav-cta {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--navy) !important;
  font-weight: 700;
  padding: 10px 24px;
  border-radius: var(--radius-md);
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-gold);
  background: rgba(201,168,76,0.1) !important;
  color: var(--gold) !important;
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
}

.nav-hamburger span {
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ===== HERO ===== */
#hero {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 50%, #0D2347 100%);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 120px 0 80px;
}

.hero-bg-pattern {
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(201,168,76,0.06) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(201,168,76,0.04) 0%, transparent 40%),
    radial-gradient(circle at 60% 80%, rgba(30,58,110,0.5) 0%, transparent 50%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(201,168,76,0.15);
  border: 1px solid rgba(201,168,76,0.3);
  color: var(--gold);
  padding: 8px 20px;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 28px;
}

.hero-title {
  color: var(--white);
  margin-bottom: 20px;
}

.hero-title span {
  color: var(--gold);
  display: block;
}

.hero-subtitle {
  color: rgba(255,255,255,0.75);
  font-size: 1.15rem;
  line-height: 1.8;
  margin-bottom: 36px;
  max-width: 500px;
}

.hero-stats {
  display: flex;
  gap: 32px;
  margin-bottom: 40px;
  padding: 24px 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.hero-stat {
  text-align: center;
}

.hero-stat-number {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}

.hero-stat-label {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-image-wrap {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-img-frame {
  position: relative;
  width: 440px;
  max-width: 100%;
}

.hero-img-frame::before {
  content: '';
  position: absolute;
  top: -16px;
  left: -16px;
  right: 16px;
  bottom: 16px;
  border: 2px solid rgba(201,168,76,0.3);
  border-radius: var(--radius-xl);
  z-index: 0;
}

.hero-img-frame img {
  width: 100%;
  border-radius: var(--radius-xl);
  position: relative;
  z-index: 1;
  object-fit: cover;
  aspect-ratio: 3/4;
  filter: brightness(0.95) contrast(1.05);
}

.hero-credential-badge {
  position: absolute;
  bottom: 24px;
  left: -20px;
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  box-shadow: var(--shadow-lg);
  z-index: 2;
  max-width: 220px;
}

.hero-credential-badge .badge-icon {
  font-size: 1.5rem;
  margin-bottom: 6px;
}

.hero-credential-badge .badge-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
}

.hero-credential-badge .badge-sub {
  font-size: 0.65rem;
  color: var(--gray-500);
  margin-top: 2px;
}

.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.5);
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  animation: bounceScroll 2s infinite;
}

.hero-scroll-arrow {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(201,168,76,0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
}

@keyframes bounceScroll {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ===== SOCIAL PROOF BAR ===== */
.social-proof-bar {
  background: var(--navy);
  padding: 24px 0;
  border-top: 1px solid rgba(201,168,76,0.2);
}

.proof-items {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.proof-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
  font-weight: 500;
}

.proof-item i {
  color: var(--gold);
  font-size: 1.1rem;
}

/* ===== ABAS DE NAVEGAÇÃO ===== */
#page-tabs {
  position: sticky;
  top: 66px;
  z-index: 900;
  background: var(--white);
  border-bottom: 2px solid var(--gray-200);
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
}

/* ===== CONDECORAÇÕES BADGE ===== */
.cond-badge {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: 100px;
  padding: 12px 24px;
  color: rgba(255,255,255,0.85);
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.25s;
}
.cond-badge:hover {
  background: rgba(201,168,76,0.12);
  border-color: rgba(201,168,76,0.5);
  color: var(--gold-light);
}

.tabs-bar {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs-bar::-webkit-scrollbar { display: none; }

.tab-btn {
  flex-shrink: 0;
  padding: 18px 28px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-500);
  border-bottom: 3px solid transparent;
  transition: all 0.25s;
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: 0.3px;
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
}

.tab-btn:hover {
  color: var(--navy);
  background: var(--gray-100);
}

.tab-btn.active {
  color: var(--navy);
  border-bottom-color: var(--gold);
}

/* ===== SEÇÕES DE CONTEÚDO ===== */
.tab-section { display: none; }
.tab-section.active { display: block; }

/* ===== HOME - CHAMADA DE URGÊNCIA ===== */
.urgency-strip {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  padding: 20px 0;
  text-align: center;
}

.urgency-strip p {
  color: var(--navy);
  font-weight: 700;
  font-size: 1.05rem;
}

.urgency-strip a {
  color: var(--navy);
  text-decoration: underline;
  font-weight: 800;
}

/* ===== MANIFESTO ===== */
#manifesto {
  background: var(--off-white);
}

.manifesto-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.manifesto-quote {
  font-family: var(--font-serif);
  font-size: 1.7rem;
  line-height: 1.5;
  color: var(--navy);
  position: relative;
  padding-left: 28px;
}

.manifesto-quote::before {
  content: '"';
  position: absolute;
  left: 0;
  top: -10px;
  font-size: 5rem;
  color: var(--gold);
  line-height: 1;
  font-family: Georgia, serif;
  opacity: 0.5;
}

.manifesto-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border-bottom: 3px solid var(--gold);
  transition: transform 0.3s;
}

.stat-card:hover {
  transform: translateY(-4px);
}

.stat-card-number {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}

.stat-card-desc {
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-top: 8px;
  line-height: 1.4;
}

/* ===== AUTORIDADE ===== */
#autoridade {
  background: var(--navy);
  color: var(--white);
}

.autoridade-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 60px;
}

.autoridade-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  transition: all 0.3s;
}

.autoridade-card:hover {
  background: rgba(201,168,76,0.08);
  border-color: rgba(201,168,76,0.4);
  transform: translateY(-4px);
}

.autoridade-card i {
  font-size: 2rem;
  color: var(--gold);
  margin-bottom: 16px;
}

.autoridade-card h4 {
  color: var(--white);
  margin-bottom: 10px;
  font-size: 1rem;
}

.autoridade-card p {
  color: rgba(255,255,255,0.65);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ===== PILARES ===== */
.pilares-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 60px;
}

.pilar-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  transition: all 0.3s;
  cursor: pointer;
}

.pilar-card:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow-gold);
  transform: translateY(-6px);
}

.pilar-icon {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 1.8rem;
}

.pilar-num {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.pilar-card h4 {
  font-size: 1rem;
  margin-bottom: 10px;
  color: var(--navy);
}

.pilar-card p {
  font-size: 0.85rem;
  color: var(--gray-500);
  line-height: 1.6;
}

/* ===== TIMELINE ===== */
.timeline {
  position: relative;
  padding: 40px 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--gold), rgba(201,168,76,0.2));
  transform: translateX(-50%);
}

.timeline-item {
  display: flex;
  gap: 40px;
  margin-bottom: 60px;
  align-items: flex-start;
  position: relative;
}

.timeline-item:nth-child(even) {
  flex-direction: row-reverse;
}

.timeline-item:nth-child(even) .timeline-content {
  text-align: right;
}

.timeline-dot {
  position: absolute;
  left: 50%;
  top: 16px;
  transform: translateX(-50%);
  width: 16px;
  height: 16px;
  background: var(--gold);
  border-radius: 50%;
  border: 3px solid var(--white);
  box-shadow: 0 0 0 3px var(--gold);
  z-index: 1;
}

.timeline-content {
  flex: 1;
  max-width: calc(50% - 60px);
}

.timeline-year {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.timeline-content h4 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.timeline-content p {
  font-size: 0.9rem;
  color: var(--gray-500);
}

/* ===== LIVROS ===== */
.livros-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 48px;
  margin-top: 60px;
}

.livro-card {
  display: flex;
  gap: 32px;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-200);
  transition: all 0.3s;
}

.livro-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.livro-capa {
  width: 130px;
  min-width: 130px;
  height: 190px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.livro-capa img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.livro-capa-placeholder {
  width: 130px;
  min-width: 130px;
  height: 190px;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: var(--shadow-md);
  padding: 16px;
  text-align: center;
}

.livro-capa-placeholder i {
  font-size: 2rem;
  color: var(--gold);
}

.livro-capa-placeholder span {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.3;
}

.livro-info h3 {
  font-size: 1.25rem;
  margin-bottom: 6px;
}

.livro-subtitulo {
  font-size: 0.85rem;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 14px;
}

.livro-info p {
  font-size: 0.9rem;
  color: var(--gray-500);
  line-height: 1.7;
  margin-bottom: 20px;
}

/* ===== DIAGNÓSTICO ===== */
#diagnostico-section {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  color: var(--white);
}

.diagnostico-hero {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 60px;
}

.diagnostico-hero h2 {
  color: var(--white);
}

.diagnostico-hero p {
  color: rgba(255,255,255,0.7);
  font-size: 1.1rem;
  margin-top: 16px;
}

/* ===== FORMULÁRIO / LOGIN ===== */
.auth-container {
  max-width: 520px;
  margin: 0 auto;
}

.auth-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  box-shadow: var(--shadow-lg);
}

.auth-tabs {
  display: flex;
  background: var(--gray-100);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 36px;
}

.auth-tab-btn {
  flex: 1;
  padding: 12px;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-500);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.25s;
}

.auth-tab-btn.active {
  background: var(--white);
  color: var(--navy);
  box-shadow: var(--shadow-sm);
}

.auth-form { display: none; }
.auth-form.active { display: block; }

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  color: var(--gray-900);
  transition: all 0.25s;
  background: var(--white);
}

.form-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(201,168,76,0.1);
}

.form-input::placeholder {
  color: var(--gray-400);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-select {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  color: var(--gray-900);
  background: var(--white);
  cursor: pointer;
  transition: all 0.25s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23777' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

.form-select:focus {
  outline: none;
  border-color: var(--gold);
}

.form-error {
  font-size: 0.8rem;
  color: var(--danger);
  margin-top: 6px;
}

.form-hint {
  font-size: 0.78rem;
  color: var(--gray-400);
  margin-top: 4px;
}

.btn-full {
  width: 100%;
  justify-content: center;
  padding: 16px;
}

/* ===== DIAGNÓSTICO MULTI-ETAPAS ===== */
.diagnostico-wrapper {
  max-width: 800px;
  margin: 0 auto;
}

.diagnostico-progress {
  margin-bottom: 40px;
}

.progress-bar-wrap {
  background: rgba(255,255,255,0.15);
  border-radius: 100px;
  height: 6px;
  overflow: hidden;
  margin-bottom: 12px;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(to right, var(--gold), var(--gold-light));
  border-radius: 100px;
  transition: width 0.5s ease;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
}

.diagnostico-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  box-shadow: var(--shadow-lg);
  animation: fadeSlide 0.4s ease;
}

@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.diagnostico-step-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--gray-100);
}

.step-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.step-header-text h3 {
  font-size: 1.3rem;
  color: var(--navy);
}

.step-header-text p {
  font-size: 0.88rem;
  color: var(--gray-500);
  margin-top: 4px;
}

.question-group {
  margin-bottom: 28px;
}

.question-label {
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 16px;
  display: block;
}

.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.option-btn {
  padding: 14px 18px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--gray-700);
  font-size: 0.9rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: all 0.25s;
  display: flex;
  align-items: center;
  gap: 10px;
}

.option-btn:hover {
  border-color: var(--gold);
  background: var(--gold-pale);
}

.option-btn.selected {
  border-color: var(--navy);
  background: var(--navy);
  color: var(--white);
}

.option-btn .opt-icon {
  font-size: 1.2rem;
}

.scale-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.scale-btn {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--gray-200);
  background: var(--white);
  color: var(--gray-700);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
}

.scale-btn:hover { border-color: var(--gold); background: var(--gold-pale); }
.scale-btn.selected { background: var(--navy); border-color: var(--navy); color: var(--white); }

.step-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 2px solid var(--gray-100);
}

/* ===== RESULTADO DO DIAGNÓSTICO ===== */
.resultado-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  box-shadow: var(--shadow-lg);
  max-width: 800px;
  margin: 0 auto;
}

.resultado-header {
  text-align: center;
  padding-bottom: 32px;
  border-bottom: 2px solid var(--gray-100);
  margin-bottom: 32px;
}

.resultado-score-circle {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 8px solid;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.resultado-score-num {
  font-family: var(--font-serif);
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1;
}

.resultado-score-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.7;
}

.resultado-classificacao {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.resultado-msg {
  font-size: 0.95rem;
  color: var(--gray-500);
  max-width: 500px;
  margin: 0 auto;
}

.pilares-resultado {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 32px 0;
}

.pilar-resultado-item {
  background: var(--gray-100);
  border-radius: var(--radius-md);
  padding: 16px 20px;
}

.pilar-resultado-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.pilar-resultado-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy);
}

.pilar-resultado-score {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--gold);
}

.pilar-bar {
  height: 6px;
  background: var(--gray-200);
  border-radius: 100px;
  overflow: hidden;
}

.pilar-bar-fill {
  height: 100%;
  border-radius: 100px;
  transition: width 1s ease;
}

.recomendacoes-section {
  background: var(--navy);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin: 32px 0;
  color: var(--white);
}

.recomendacoes-section h4 {
  color: var(--gold);
  margin-bottom: 20px;
}

.recomendacao-item {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.recomendacao-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.recomendacao-item i {
  color: var(--gold);
  font-size: 1.1rem;
  margin-top: 2px;
  flex-shrink: 0;
}

.recomendacao-item p {
  color: rgba(255,255,255,0.8);
  font-size: 0.9rem;
  line-height: 1.6;
}

.resultado-cta-box {
  text-align: center;
  padding: 32px;
  background: var(--gold-pale);
  border-radius: var(--radius-lg);
  border: 2px solid rgba(201,168,76,0.3);
}

.resultado-cta-box h4 {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.resultado-cta-box p {
  color: var(--gray-500);
  margin-bottom: 24px;
}

/* ===== ÁREA LOGADA ===== */
.dashboard-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  max-width: 1100px;
  margin: 0 auto;
}

.dashboard-sidebar {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  height: fit-content;
}

.user-avatar-wrap {
  text-align: center;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--gray-100);
  margin-bottom: 24px;
}

.user-avatar {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--gold);
  margin: 0 auto 12px;
}

.user-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
}

.user-email-display {
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-top: 4px;
}

.sidebar-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: var(--gray-500);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s;
  margin-bottom: 4px;
}

.sidebar-nav-link:hover,
.sidebar-nav-link.active {
  background: var(--navy);
  color: var(--white);
}

.sidebar-nav-link i {
  width: 18px;
  text-align: center;
}

.dashboard-main {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.dashboard-panel { display: none; }
.dashboard-panel.active { display: block; }

.welcome-banner {
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  border-radius: var(--radius-lg);
  padding: 28px;
  color: var(--white);
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.welcome-text h3 { color: var(--white); margin-bottom: 6px; }
.welcome-text p { color: rgba(255,255,255,0.7); font-size: 0.9rem; }

.score-mini {
  text-align: center;
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-md);
  padding: 16px 24px;
}

.score-mini-num {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}

.score-mini-label {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

.dashboard-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

.dash-card {
  background: var(--gray-100);
  border-radius: var(--radius-md);
  padding: 20px;
  border-left: 4px solid var(--gold);
}

.dash-card-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gray-500);
  margin-bottom: 8px;
}

.dash-card-value {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--navy);
}

.dash-card-sub {
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-top: 4px;
}

.acompanhamento-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.acomp-item {
  display: flex;
  gap: 16px;
  padding: 16px 20px;
  background: var(--gray-100);
  border-radius: var(--radius-md);
  align-items: flex-start;
}

.acomp-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.acomp-icon.tarefa { background: #EBF5FB; color: var(--info); }
.acomp-icon.nota { background: #EAF7EF; color: var(--success); }
.acomp-icon.alerta { background: #FEF9E7; color: var(--warning); }

.acomp-body h5 { font-size: 0.9rem; color: var(--navy); margin-bottom: 4px; }
.acomp-body p { font-size: 0.83rem; color: var(--gray-500); line-height: 1.5; }
.acomp-data { font-size: 0.75rem; color: var(--gray-400); margin-top: 6px; }

/* ===== CTA SEÇÕES ===== */
.cta-section {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  color: var(--white);
  text-align: center;
  padding: 100px 0;
}

.cta-section h2 { color: var(--white); margin-bottom: 16px; }
.cta-section p { color: rgba(255,255,255,0.75); font-size: 1.1rem; margin-bottom: 36px; max-width: 600px; margin-left: auto; margin-right: auto; }

.cta-group {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== DEPOIMENTOS ===== */
.depoimentos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 60px;
}

.depoimento-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  position: relative;
}

.depoimento-stars {
  color: var(--gold);
  font-size: 0.85rem;
  margin-bottom: 16px;
}

.depoimento-texto {
  font-size: 0.95rem;
  color: var(--gray-700);
  line-height: 1.7;
  font-style: italic;
  margin-bottom: 20px;
}

.depoimento-autor {
  display: flex;
  align-items: center;
  gap: 12px;
}

.depoimento-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 1rem;
  font-weight: 700;
}

.depoimento-nome {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--navy);
}

.depoimento-info {
  font-size: 0.78rem;
  color: var(--gray-500);
}

/* ===== FAQ ===== */
.faq-list {
  max-width: 700px;
  margin: 60px auto 0;
}

.faq-item {
  border-bottom: 1px solid var(--gray-200);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  background: none;
  border: none;
  text-align: left;
}

.faq-arrow {
  color: var(--gold);
  transition: transform 0.3s;
  flex-shrink: 0;
}

.faq-item.open .faq-arrow {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.faq-answer-inner {
  padding: 0 0 20px;
  font-size: 0.95rem;
  color: var(--gray-500);
  line-height: 1.7;
}

/* ===== FOOTER ===== */
footer {
  background: var(--navy);
  color: rgba(255,255,255,0.7);
  padding: 80px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 60px;
  margin-bottom: 60px;
}

.footer-brand p {
  margin-top: 16px;
  font-size: 0.9rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.55);
  max-width: 300px;
}

.footer-logo-name {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--white);
  font-weight: 700;
}

.footer-logo-title {
  font-size: 0.7rem;
  color: var(--gold);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 4px;
}

.footer-col h5 {
  color: var(--white);
  font-size: 0.85rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.footer-link {
  display: block;
  color: rgba(255,255,255,0.55);
  font-size: 0.9rem;
  padding: 6px 0;
  transition: color 0.25s;
  cursor: pointer;
}

.footer-link:hover { color: var(--gold); }

.footer-contact-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 8px 0;
}

.footer-contact-item i {
  color: var(--gold);
  font-size: 0.9rem;
  margin-top: 3px;
  flex-shrink: 0;
}

.footer-contact-item span {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.5;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}

/* ===== NOTIFICAÇÕES ===== */
.toast-container {
  position: fixed;
  top: 100px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 300px;
  border-left: 4px solid;
  animation: slideToast 0.4s ease;
}

.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.info { border-left-color: var(--info); }
.toast.warning { border-left-color: var(--warning); }

.toast i { font-size: 1.1rem; }
.toast.success i { color: var(--success); }
.toast.error i { color: var(--danger); }
.toast.info i { color: var(--info); }
.toast.warning i { color: var(--warning); }

.toast-msg { font-size: 0.9rem; color: var(--gray-700); font-weight: 500; }

@keyframes slideToast {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ===== LOADER ===== */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,22,40,0.8);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(201,168,76,0.3);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== MEDIA: TV PROGRAM ===== */
.tv-section {
  background: var(--off-white);
}

.tv-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 0;
}

.tv-visual {
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
}

.tv-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(201,168,76,0.2);
  border: 1px solid rgba(201,168,76,0.4);
  color: var(--gold);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  width: fit-content;
}

.tv-visual h3 {
  color: var(--white);
  font-size: 1.8rem;
}

.tv-visual p {
  color: rgba(255,255,255,0.7);
  font-size: 0.95rem;
}

.tv-content {
  padding: 48px;
}

.tv-feature-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 24px 0;
}

.tv-feature {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.tv-feature i {
  color: var(--gold);
  font-size: 1rem;
  margin-top: 2px;
}

.tv-feature p {
  font-size: 0.9rem;
  color: var(--gray-600);
  line-height: 1.5;
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.3s ease;
  display: none;
}

.modal-overlay.active { display: flex; }

.modal-box {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  max-width: 520px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  position: relative;
  animation: popIn 0.3s ease;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 1.4rem;
  color: var(--gray-400);
  cursor: pointer;
  background: none;
  border: none;
  transition: color 0.25s;
}

.modal-close:hover { color: var(--navy); }

@keyframes popIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ===== ANIMAÇÕES DE SCROLL ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVO ===== */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 60px; }
  .hero-image-wrap { order: -1; }
  .hero-img-frame { width: 380px; }
  .autoridade-grid { grid-template-columns: repeat(2, 1fr); }
  .pilares-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .tv-card { grid-template-columns: 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root { --section-pad: 70px 0; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .hero-stats { gap: 16px; flex-wrap: wrap; }
  .hero-ctas { flex-direction: column; }
  .manifesto-content { grid-template-columns: 1fr; gap: 40px; }
  .manifesto-stats { grid-template-columns: 1fr 1fr; }
  .autoridade-grid { grid-template-columns: 1fr; }
  .pilares-grid { grid-template-columns: 1fr 1fr; }
  .livros-grid { grid-template-columns: 1fr; }
  .depoimentos-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  .auth-card { padding: 32px 24px; }
  .diagnostico-card { padding: 32px 24px; }
  .options-grid { grid-template-columns: 1fr; }
  .pilares-resultado { grid-template-columns: 1fr; }
  .dashboard-cards-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .tab-btn { padding: 14px 20px; font-size: 0.82rem; }
  .timeline::before { left: 20px; }
  .timeline-item, .timeline-item:nth-child(even) { flex-direction: column; padding-left: 50px; }
  .timeline-item:nth-child(even) .timeline-content { text-align: left; }
  .timeline-content { max-width: 100%; }
  .timeline-dot { left: 20px; transform: none; }
}

@media (max-width: 480px) {
  .pilares-grid { grid-template-columns: 1fr; }
  .manifesto-stats { grid-template-columns: 1fr; }
  .hero-stats { flex-direction: column; align-items: center; }
  .btn-large { padding: 16px 32px; }
  .proof-items { gap: 20px; flex-direction: column; }
}

/* ===== UTILITÁRIOS ===== */
.hidden { display: none !important; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-16 { gap: 16px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-40 { margin-top: 40px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-32 { margin-bottom: 32px; }
.fw-700 { font-weight: 700; }
.bg-off-white { background: var(--off-white); }
.bg-cream { background: var(--cream); }
.bg-navy { background: var(--navy); }

/* Scroll para navbar mobile */
.nav-mobile-menu {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  background: rgba(10,22,40,0.98);
  border-top: 1px solid rgba(255,255,255,0.1);
}

.nav-mobile-menu.open { display: flex; }
.nav-mobile-link {
  padding: 14px 16px;
  color: rgba(255,255,255,0.8);
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.nav-mobile-link:hover, .nav-mobile-link.active { color: var(--gold); }

/* JAM360AI official link */
.jam-link {
  opacity: .82;
  font-size: .86rem;
}
.jam-link:hover {
  opacity: 1;
}
.nav-mobile-menu a.nav-mobile-link {
  text-decoration: none;
}

/* UX hardening pass — keeps content visible even if animation JS is delayed */
.reveal {
  opacity: 1;
  transform: none;
}

.nav-logo-title {
  color: var(--gold-light);
  opacity: .95;
}

.nav-link:focus-visible,
.tab-btn:focus-visible,
.btn:focus-visible,
.nav-mobile-link:focus-visible {
  outline: 3px solid rgba(232,201,106,.75);
  outline-offset: 3px;
}

@media (max-width: 1180px) and (min-width: 769px) {
  .nav-link { padding: 8px 10px; font-size: .82rem; }
  .nav-cta { padding: 10px 14px; }
  .nav-links { gap: 4px; }
}

@media (max-width: 768px) {
  #navbar { padding: 12px 0; }
  .nav-logo-name { font-size: 1.08rem; }
  .nav-logo-title { font-size: .58rem; letter-spacing: 1.4px; }
  #page-tabs { top: 60px; }
  #page-tabs .container { padding: 0; }
  .tabs-bar {
    padding: 0 12px;
    gap: 4px;
    -webkit-overflow-scrolling: touch;
    background: linear-gradient(90deg, #fff 0%, #fff 88%, rgba(255,255,255,0));
  }
  .tab-btn {
    padding: 13px 14px;
    font-size: .78rem;
  }
  #hero {
    min-height: auto;
    padding: 92px 0 56px;
  }
  .hero-grid { gap: 34px; }
  .hero-title { font-size: clamp(2.05rem, 12vw, 3rem); }
  .hero-title em { font-size: .55em !important; line-height: 1.35; }
  .hero-subtitle { font-size: 1rem; line-height: 1.65; }
  .hero-img-frame { width: min(330px, 92vw); }
  .hero-credential-badge {
    left: 50%;
    transform: translateX(-50%);
    bottom: -18px;
    width: calc(100% - 34px);
    max-width: 280px;
  }
  .hero-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }
  .hero-stat { padding: 10px 6px; }
  .hero-ctas .btn { width: 100%; justify-content: center; }
  section { overflow: hidden; }
}

@media (max-width: 480px) {
  .hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }
  .btn-large { padding: 15px 22px; }
  .section-title { font-size: clamp(1.75rem, 9vw, 2.35rem); }
  .container { padding: 0 18px; }
}

/* Layout polish after real viewport audit */
#hero {
  min-height: calc(100vh - 126px);
  padding-top: 84px;
}

@media (max-width: 768px) {
  #page-tabs { display: none; }
  #hero { padding-top: 34px; }
  .nav-mobile-menu.open {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    box-shadow: 0 20px 40px rgba(0,0,0,.25);
  }
  .hero-credential-badge {
    position: relative;
    left: auto;
    bottom: auto;
    transform: none;
    margin: -22px auto 0;
  }
}

/* Mobile overflow containment */
@media (max-width: 768px) {
  html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }
  #hero,
  #hero .container,
  .hero-grid,
  .hero-content,
  .hero-image-wrap,
  .hero-img-frame {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  #hero .container {
    padding-left: 20px;
    padding-right: 20px;
  }
  .hero-content > *,
  .hero-subtitle,
  .hero-title,
  .hero-badge,
  .hero-ctas,
  .hero-stats {
    max-width: 100%;
    min-width: 0;
  }
  .hero-badge {
    display: inline-flex;
    white-space: normal;
    line-height: 1.35;
    align-items: flex-start;
  }
  .hero-title,
  .hero-subtitle,
  .hero-badge,
  p {
    overflow-wrap: break-word;
  }
  .hero-img-frame {
    width: min(300px, calc(100vw - 56px));
    margin-left: auto;
    margin-right: auto;
  }
  .hero-img-frame::before {
    left: 8px;
    right: 8px;
    top: -10px;
    bottom: 10px;
  }
}

@media (max-width: 768px) {
  .hero-content {
    display: block;
    padding-left: 0;
    padding-right: 0;
  }
  .hero-subtitle {
    width: calc(100vw - 48px);
    max-width: calc(100vw - 48px) !important;
    margin-left: 0;
    margin-right: 0;
  }
  .hero-subtitle strong,
  .hero-title span,
  .hero-title em {
    overflow-wrap: break-word;
    word-break: normal;
  }
}

@media (max-width: 768px) {
  .hero-subtitle,
  .hero-title,
  .hero-badge,
  .hero-ctas,
  .hero-stats {
    width: min(100%, 320px) !important;
    max-width: 320px !important;
    margin-left: auto;
    margin-right: auto;
  }
  .hero-content { text-align: center; }
  .hero-badge { justify-content: center; }
}

@media (max-width: 768px) {
  .hero-content,
  .hero-content > *,
  .hero-title,
  .hero-subtitle,
  .hero-badge,
  .hero-ctas,
  .hero-stats {
    width: min(300px, calc(100vw - 56px)) !important;
    max-width: min(300px, calc(100vw - 56px)) !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    text-align: left;
  }
  .hero-badge { justify-content: flex-start; }
  .hero-image-wrap {
    justify-content: flex-start;
  }
  .hero-img-frame {
    width: min(280px, calc(100vw - 64px)) !important;
    max-width: min(280px, calc(100vw - 64px)) !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}

/* Contrast fix requested by João: top navigation must never disappear on light sections */
#navbar {
  background: rgba(10, 22, 40, 0.98);
  backdrop-filter: blur(18px);
  box-shadow: 0 2px 24px rgba(0,0,0,0.22);
}

#navbar .nav-link:not(.nav-cta) {
  color: rgba(255,255,255,0.92);
}

#navbar .nav-link:not(.nav-cta):hover,
#navbar .nav-link:not(.nav-cta).active {
  color: var(--gold-light);
  background: rgba(232,201,106,0.16);
}

#page-tabs {
  background: #FFFFFF;
}

.tab-btn {
  color: #24324A;
}

.tab-btn:hover {
  color: var(--navy);
  background: #EEF2F7;
}

.tab-btn.active {
  color: var(--navy);
  background: rgba(201,168,76,0.18);
  border-bottom-color: var(--gold);
}

#navbar .nav-link {
  white-space: nowrap;
}

/* iPad/tablet fix: remove duplicated secondary tab strip that appeared white/overlapped under the header */
#page-tabs {
  background: var(--navy);
  border-bottom: 1px solid rgba(232,201,106,0.22);
  box-shadow: 0 10px 24px rgba(0,0,0,0.18);
}

#page-tabs .tab-btn {
  color: rgba(255,255,255,0.9);
}

#page-tabs .tab-btn:hover,
#page-tabs .tab-btn.active {
  color: var(--gold-light);
  background: rgba(232,201,106,0.14);
}

@media (max-width: 1180px) {
  #page-tabs {
    display: none !important;
  }
}

/* Fix blank authority cards on iPad: text was white over white cards */
.autoridade-card[style*="background:var(--white)"],
.autoridade-card[style*="background: var(--white)"] {
  background: #FFFFFF !important;
  border-color: #E6E2D8 !important;
  box-shadow: 0 10px 28px rgba(10,22,40,0.06);
}

.autoridade-card[style*="background:var(--white)"] h4,
.autoridade-card[style*="background: var(--white)"] h4 {
  color: var(--navy) !important;
}

.autoridade-card[style*="background:var(--white)"] p,
.autoridade-card[style*="background: var(--white)"] p {
  color: var(--gray-700) !important;
}
