/* estilos.css - MaxFinance Sinergias */
:root {
  /* Paleta base refinada */
  --bg: #f8fafc;
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --subtle-bg: #f1f5f9;
  
  /* Sistema de cores por página */
  --brand: #0f766e;
  --brand-light: #0d9488;
  --brand-dark: #115e59;
  --brand-subtle: #f0fdfa;
  
  /* Cores por página - mantendo os temas originais */
  --accent-teal: #0f766e;
  --accent-indigo: #3b5bdb;
  --accent-amber: #b45309;
  --accent-violet: #6d28d9;
  --accent-slate: #0f172a;
  --accent-rose: #db2777;
  --accent-emerald: #059669;
  --accent-sky: #0284c7;
  
  /* Sombras mais limpas */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 40px -10px rgba(0, 0, 0, 0.15);
  
  /* Bordas */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 30px;
  
  /* Layout */
  --wrap: 1400px;
  --header-height: 80px;
  --nav-width: 280px;
  
  /* Header background */
  --header-bg-img: url("img/max1.jpg");
  --header-bg-opacity: 0.3;
}
.footer-list{list-style:none;margin:.75rem 0 0;padding:0}
.footer-list li{margin:.35rem 0}


/* === Aliases de compatibilidade === */
:root{
  --card-bg: var(--card);
  --border-color: var(--line);
  --accent-color: var(--brand);
  --surface: var(--card);
  --hover-bg: var(--brand-subtle);
  --text-muted: var(--muted);
}

/* ===== TEMAS POR PÁGINA ===== */
body[data-accent="teal"] {
  --brand: var(--accent-teal);
  --brand-light: #0d9488;
  --brand-dark: #115e59;
  --brand-subtle: #f0fdfa;
}

body[data-accent="indigo"] {
  --brand: var(--accent-indigo);
  --brand-light: #5c7cfa;
  --brand-dark: #2b4bcc;
  --brand-subtle: #eef2ff;
}

body[data-accent="amber"] {
  --brand: var(--accent-amber);
  --brand-light: #f59e0b;
  --brand-dark: #92400e;
  --brand-subtle: #fffbeb;
}

body[data-accent="violet"] {
  --brand: var(--accent-violet);
  --brand-light: #8b5cf6;
  --brand-dark: #5b21b6;
  --brand-subtle: #f5f3ff;
}

body[data-accent="slate"] {
  --brand: var(--accent-slate);
  --brand-light: #334155;
  --brand-dark: #0f172a;
  --brand-subtle: #f8fafc;
}

body[data-accent="rose"] {
  --brand: var(--accent-rose);
  --brand-light: #ec4899;
  --brand-dark: #be185d;
  --brand-subtle: #fdf2f8;
}

body[data-accent="emerald"] {
  --brand: var(--accent-emerald);
  --brand-light: #10b981;
  --brand-dark: #047857;
  --brand-subtle: #f0fdf4;
}

body[data-accent="sky"] {
  --brand: var(--accent-sky);
  --brand-light: #0ea5e9;
  --brand-dark: #0369a1;
  --brand-subtle: #f0f9ff;
}

/* ===== BASE ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--ink);
  background: 
    radial-gradient(circle at 85% 10%, rgba(15, 118, 110, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 15% 80%, rgba(45, 212, 191, 0.05) 0%, transparent 50%),
    var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

/* Skip link */
.skip {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--brand);
  color: white;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  z-index: 1000;
  transition: top 0.3s ease;
}

.skip:focus {
  top: 20px;
  left: 20px;
  outline: 3px solid var(--brand-light);
  outline-offset: 2px;
}

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.site-header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
}

/* Header imagem fundo */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--header-bg-img);
  background-size: cover;
  background-position: center;
  opacity: .60;
  pointer-events: none;
  z-index: -1;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 24px;
}

/* MArca */
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  min-width: 240px;
  transition: transform 0.3s ease;
}

.brand:hover {
  transform: translateX(-2px);
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  color: white;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 1.25rem;
  box-shadow: 0 8px 20px rgba(15, 118, 110, 0.25);
  transition: transform 0.3s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.05) rotate(5deg);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand-text strong {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--brand-dark);
}

.brand-text .muted {
  font-size: 0.875rem;
  color: var(--muted);
}

/* Navegação */
.nav {
  margin-left: auto;
}

.nav-links {
  display: flex;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--muted);
  transition: all 0.2s ease;
  position: relative;
}

.nav-links a i {
  font-size: 0.9rem;
  opacity: 0.7;
}

.nav-links a:hover {
  color: var(--brand);
  background: var(--brand-subtle);
  transform: translateY(-1px);
}

.nav-links a[aria-current="page"] {
  color: var(--brand);
  background: var(--brand-subtle);
  font-weight: 700;
}

.nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 16px;
  right: 16px;
  height: 2px;
  background: var(--brand);
  border-radius: 1px;
}

/* Alternar idioma */
.lang {
  display: flex;
  gap: 2px;
  background: var(--subtle-bg);
  padding: 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}

.lang-btn {
  padding: 6px 14px;
  border: none;
  border-radius: 6px;
  background: none;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-btn[aria-pressed="true"] {
  background: white;
  color: var(--brand);
  box-shadow: var(--shadow-sm);
}

.lang-btn:hover:not([aria-pressed="true"]) {
  background: rgba(255, 255, 255, 0.5);
}

/* Alternar navegação móvel */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.nav-toggle:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.nav-toggle-bars {
  display: inline-block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  position: relative;
  margin-right: 8px;
  transition: all 0.3s ease;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 2px;
  background: var(--ink);
  left: 0;
  transition: all 0.3s ease;
}

.nav-toggle-bars::before {
  top: -6px;
}

.nav-toggle-bars::after {
  bottom: -6px;
}

/* ===== TIPOGRAFIA ===== */
h1, h2, h3, h4 {
  font-weight: 800;
  line-height: 1.2;
  color: var(--brand-dark);
  letter-spacing: -0.01em;
}

h1 {
  font-size: 2.75rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--brand-dark), var(--brand));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

h4 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.lead {
  font-size: 1.25rem;
  color: var(--muted);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.muted {
  color: var(--muted);
}

.mini {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ===== SECÇÕES ===== */
.page-head {
  padding: 3rem 0 2rem;
  position: relative;
}

.page-head::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--brand), var(--brand-light));
  border-radius: 2px;
}

.section {
  padding: 4rem 0;
}

.section-head {
  margin-bottom: 2.5rem;
  text-align: center;
}

/* ===== CARDS ===== */
.card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand), var(--brand-light));
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--brand-light);
}

/* ===== SISTEMA DE GRELHA (GRID) ===== */
.grid {
  display: grid;
  gap: 2rem;
}

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

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* ===== BOTÕES ===== */
.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  min-height: 48px;
  position: relative;
  overflow: hidden;
}

.btn i {
  font-size: 1rem;
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn:hover::before {
  left: 100%;
}

.btn.primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(15, 118, 110, 0.3);
}

.btn.primary:hover {
  background: linear-gradient(135deg, var(--brand-light), var(--brand));
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(15, 118, 110, 0.4);
}

.btn.ghost {
  background: transparent;
  color: var(--brand);
  border-color: var(--line);
}

.btn.ghost:hover {
  background: var(--brand-subtle);
  border-color: var(--brand);
  transform: translateY(-2px);
}

/* ===== ESTILOS DA PÁGINA INICIAL ===== */
body[data-page="home"] .hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3rem;
  padding: 4rem 0 2rem;
  align-items: stretch;
}

body[data-page="home"] .hero::before {
  content: "";
  position: absolute;
  left: -5%;
  right: -5%;
  top: 0;
  height: 280px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--brand-subtle) 0%, transparent 100%);
  border: 1px solid rgba(15, 118, 110, 0.1);
  z-index: -1;
  transform: skewY(-1.5deg);
}

.hero-chips {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: var(--radius);
  border: 1px solid rgba(15, 118, 110, 0.15);
  background: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  color: var(--brand-dark);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.chip:hover {
  transform: translateY(-2px);
  border-color: var(--brand-light);
  box-shadow: var(--shadow-sm);
}

.chip-ico {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  background: var(--brand-subtle);
  color: var(--brand);
  font-size: 1rem;
}

/* Métricas */
.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.metric {
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: white;
  transition: all 0.3s ease;
}

.metric:hover {
  transform: translateY(-4px);
  border-color: var(--brand-light);
  box-shadow: var(--shadow);
}

.metric strong {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.25rem;
  margin-bottom: 8px;
  color: var(--brand-dark);
}

.metric span {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Caixa de vídeo */
.video-box {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: #000;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.video-box video {
  width: 100%;
  height: 100%;
  display: block;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.video-box:hover video {
  transform: scale(1.05);
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.2);
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.video-box:hover .video-overlay {
  opacity: 1;
}

.video-play-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  color: var(--brand);
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.video-play-btn:hover {
  transform: scale(1.1);
  background: white;
}

.legenda {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.featured-badge {
  display: inline-block;
  padding: 6px 12px;
  background: var(--brand-subtle);
  color: var(--brand);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 10px;
}

/*Estatísticas com cores corretas */
.stats-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.stat {
  text-align: center;
  padding: 1.5rem;
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--brand); /* Cor da marca, não branco */
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  color: var(--muted); /* Cor muted, não branco */
  font-size: 0.9rem;
  font-weight: 600;
}

/* ===== PÁGINA DE SERVIÇOS ===== */
body[data-page="servicos"] .service-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  align-items: start;
}

body[data-page="servicos"] aside.sticky {
  position: sticky;
  top: calc(var(--header-height) + 2rem);
}

.service-block {
  border-radius: var(--radius-lg);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  margin-bottom: 1.5rem;
  background: white;
}

.service-block:last-child {
  margin-bottom: 0;
}

.service-block::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background: linear-gradient(180deg, var(--brand), var(--brand-light));
}

.service-block header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.service-block .icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  background: var(--brand-subtle);
  color: var(--brand);
  font-size: 1.5rem;
}

.service-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 1rem 0;
}

.badge {
  display: inline-flex;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--subtle-bg);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--brand-dark);
}

/* ===== PÁGINA DO SIMULADOR ===== */
body[data-page="simulador"] .tool-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

body[data-page="simulador"] .result-card {
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--brand-subtle) 0%, white 100%);
  position: sticky;
  top: calc(var(--header-height) + 2rem);
}

.summary {
  display: grid;
  gap: 12px;
  margin: 1.5rem 0;
}

.summary > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-radius: var(--radius);
  background: var(--brand-subtle);
  border: 1px solid rgba(15, 118, 110, 0.1);
}

dt {
  font-weight: 600;
  color: var(--brand-dark);
}

dd {
  font-weight: 700;
  color: var(--brand);
  font-size: 1.1rem;
}

/* ===== PÁGINA DE TABELAS ===== */
body[data-page="tabelas"] .tables-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  align-items: start;
}

.table-tools {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.table-tools label {
  min-width: 240px;
}

.insight {
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--brand-subtle) 0%, white 100%);
  padding: 2rem;
}

.kpi {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}

.kpi > div {
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: white;
}

.kpi strong {
  display: block;
  font-size: 1.125rem;
  margin-bottom: 4px;
}

/* ===== PÁGINA DE FORMAÇÃO ===== */
body[data-page="formacao"] .training-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  align-items: start;
}

.resource {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: white;
  margin-bottom: 1rem;
}

.resource:last-child {
  margin-bottom: 0;
}

.resource .icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: var(--brand-subtle);
  color: var(--brand);
  display: grid;
  place-items: center;
  font-size: 1.25rem;
}

.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
}

.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: white;
  position: relative;
}

.step .icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--brand-subtle);
  color: var(--brand);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1.1rem;
}

.rows {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  display: grid;
  gap: 12px;
}

.row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 1rem;
  align-items: center;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: white;
}

/* ===== ESPAÇOS PARA IMAGENS E VIDEO ===== */
.media-slot {
  border-radius: var(--radius-lg);
  border: 2px dashed rgba(15, 118, 110, 0.2);
  background: var(--brand-subtle);
  padding: 2rem;
  color: var(--brand-dark);
  font-weight: 600;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  transition: all 0.3s ease;
}

.media-slot:hover {
  border-color: var(--brand-light);
  background: rgba(15, 118, 110, 0.05);
}

.media-slot.small {
  border-radius: var(--radius);
  padding: 1.5rem;
  min-height: 150px;
  font-size: 0.9rem;
}

.media-slot img {
  max-width: 100%;
  height: auto;
  display: block;
}

.media-duo{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
  margin: 0 0 1rem;
}

.media-box{
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: white;
  box-shadow: var(--shadow-sm);
  min-height: 140px;
  display: grid;
  place-items: center;
}

.media-box img{
  width: 100%;
  height: 100%;
  min-height: 140px;
  object-fit: cover;
  display: block;
}

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


/* ===== FORMULÁRIOS ===== */
.form {
  display: grid;
  gap: 1.5rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.form-group {
  display: grid;
  gap: 8px;
  font-weight: 600;
  color: var(--brand-dark);
}

label {
  display: grid;
  gap: 8px;
  font-weight: 600;
  color: var(--brand-dark);
}

input, select, textarea {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 1rem;
  background: white;
  transition: all 0.3s ease;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-subtle);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

.checkbox-group {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.checkbox-group input[type="checkbox"] {
  width: auto;
  margin-top: 5px;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-weight: normal;
  cursor: pointer;
  font-size: 0.95rem;
}

.form-note {
  padding: 12px;
  background: var(--brand-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.form-note i {
  color: var(--brand);
  margin-top: 2px;
}

/* ===== LISTAS ===== */
.check {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  display: grid;
  gap: 12px;
}

.check li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--muted);
}

.check li::before {
  content: "✓";
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  background: var(--brand-subtle);
  color: var(--brand);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.875rem;
  font-weight: 700;
}

/* ===== TABELAS ===== */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: white;
  margin: 1.5rem 0;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.table th {
  background: var(--subtle-bg);
  padding: 1rem;
  font-weight: 600;
  text-align: left;
  color: var(--brand-dark);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.table td {
  padding: 1rem;
  border-bottom: 1px solid var(--line);
}

.table tbody tr:hover {
  background: var(--brand-subtle);
}

.table tbody tr:last-child td {
  border-bottom: none;
}

/* ===== FOOTER ===== */
.site-footer {
  margin-top: 4rem;
  background: var(--subtle-bg);
  border-top: 1px solid var(--line);
}

.footer-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 3rem;
  padding: 3rem 0;
}

.footer-bottom {
  background: var(--brand-dark);
  color: white;
  padding: 1.5rem 0;
}

.footer-bottom .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.footer-bottom p {
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
}

.footer-bottom .legal-links {
  display: flex;
  gap: 1.5rem;
}

.footer-bottom .legal-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 0.875rem;
}

.footer-bottom .legal-links a:hover {
  color: white;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-links-section {
  display: flex;
  justify-content: center;
}

.footer-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.footer-links > div {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links strong {
  display: block;
  margin-bottom: 8px;
  color: var(--brand-dark);
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--brand);
}

.footer-social {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.footer-social strong {
  color: var(--brand-dark);
}

.social-icons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.social-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: white;
  color: var(--brand);
  display: grid;
  place-items: center;
  text-decoration: none;
  font-size: 1.2rem;
  border: 2px solid var(--line);
  transition: all 0.3s ease;
}

.social-icon:hover {
  transform: translateY(-4px);
  border-color: var(--brand);
  background: var(--brand);
  color: white;
  box-shadow: var(--shadow);
}

.newsletter-signup {
  margin-top: 1rem;
}

.newsletter-form {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.newsletter-form input {
  flex: 1;
  padding: 10px 14px;
  font-size: 0.9rem;
}

.newsletter-form button {
  padding: 10px 16px;
  background: var(--brand);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.3s ease;
}

.newsletter-form button:hover {
  background: var(--brand-light);
}

.contact-info {
  font-size: 0.9rem;
  line-height: 1.6;
}

.contact-info i {
  width: 20px;
  color: var(--brand);
}

/* ===== PÁGINA DE CONTACTOS ===== */
.contact-info {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.contact-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.contact-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: var(--brand-subtle);
  color: var(--brand);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.contact-item div {
  flex: 1;
}

.contact-item strong {
  display: block;
  margin-bottom: 4px;
  color: var(--brand-dark);
}

.contact-item p {
  color: var(--muted);
  line-height: 1.5;
}

.contact-link {
  color: var(--brand);
  text-decoration: none;
  font-weight: 500;
}

.contact-link:hover {
  text-decoration: underline;
}

.map-container {
  margin-top: 2rem;
}

.map-wrapper {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin: 1rem 0;
}

.map-info {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.contact-methods {
  text-align: center;
}

.contact-method {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.method-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-subtle), white);
  color: var(--brand);
  display: grid;
  place-items: center;
  font-size: 1.8rem;
  border: 2px solid var(--line);
}

.method-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--brand-subtle);
  color: var(--brand);
  text-decoration: none;
  border-radius: var(--radius);
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  font: inherit;
}

.method-link:hover {
  background: var(--brand);
  color: white;
  transform: translateY(-2px);
}

.cta-section {
  padding-top: 0;
}

/* ===== NOTIFICAÇÃO (TOAST) ===== */
#toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--brand);
  color: white;
  padding: 1rem 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  font-weight: 600;
  z-index: 1000;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  max-width: calc(100% - 2rem);
  text-align: center;
  pointer-events: none;
}

#toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-row {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  
  .legal-grid,
  body[data-page="servicos"] .service-layout,
  body[data-page="simulador"] .tool-layout,
  body[data-page="tabelas"] .tables-layout,
  body[data-page="formacao"] .training-layout {
    grid-template-columns: 1fr;
  }
  
  body[data-page="home"] .hero {
    grid-template-columns: 1fr;
  }
  
  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .metrics {
    grid-template-columns: 1fr;
  }
  
  .footer-row {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }
  
  .footer-logo {
    justify-content: center;
  }
  
  .footer-links {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .social-icons {
    justify-content: center;
  }
  
  .footer-bottom .wrap {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  
  .footer-bottom .legal-links {
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .header-row {
    gap: 12px;
  }
  
  .nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: white;
    border-bottom: 1px solid var(--line);
    padding: 1rem;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
    z-index: 99;
  }
  
  header[data-nav="open"] .nav {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  .nav-links {
    flex-direction: column;
    gap: 4px;
  }
  
  .nav-toggle {
    display: flex;
    align-items: center;
  }
  
  header[data-nav="open"] .nav-toggle-bars {
    background: transparent;
  }
  
  header[data-nav="open"] .nav-toggle-bars::before {
    transform: rotate(45deg);
    top: 0;
  }
  
  header[data-nav="open"] .nav-toggle-bars::after {
    transform: rotate(-45deg);
    bottom: 0;
  }
  
  .brand {
    min-width: auto;
  }
  
  .brand-text strong {
    font-size: 1rem;
  }
  
  .stats-container {
    grid-template-columns: 1fr;
  }
}

/* ===== ANIMAÇÕES ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.card {
  animation: fadeInUp 0.6s ease-out;
}

.service-block {
  animation: slideInLeft 0.6s ease-out;
}

.resource, .step {
  animation: fadeInUp 0.6s ease-out;
}

.btn.primary {
  animation: pulse 2s infinite;
}

/* Animação em cascata (stagger) */
.card:nth-child(2) { animation-delay: 0.1s; }
.card:nth-child(3) { animation-delay: 0.2s; }
.card:nth-child(4) { animation-delay: 0.3s; }
.card:nth-child(5) { animation-delay: 0.4s; }

/* Visibilidade de idioma */
.txt-en { display: none; }
.txt-pt { display: block; }

body[data-lang="en"] .txt-pt { display: none; }
body[data-lang="en"] .txt-en { display: block; }

/* Estilos para impressão */
@media print {
  .nav-toggle,
  .lang,
  .actions,
  .btn,
  #toast,
  .site-footer,
  .video-box,
  .social-icons {
    display: none !important;
  }
  
  .card {
    break-inside: avoid;
    box-shadow: none !important;
    border: 1px solid #ddd !important;
  }
  
  a {
    color: #000 !important;
    text-decoration: none !important;
  }
  
  .page-head::after {
    background: #000 !important;
  }
}

/* botões outras formas de contacto*/
.chat-toggle {
  cursor: pointer;
  transition: all 0.3s ease;
}

.chat-toggle:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.chat-toggle.offline {
  opacity: 0.7;
  background-color: var(--subtle-bg) !important;
}

.chat-toggle.offline:hover {
  opacity: 0.9;
}

.chat-toggle[title] {
  position: relative;
}

.chat-toggle[title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: white;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  white-space: nowrap;
  z-index: 1000;
  margin-bottom: 8px;
  pointer-events: none;
}

.chat-toggle[title]:hover::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--ink);
  margin-bottom: -2px;
  z-index: 1000;
  pointer-events: none;
}

/* ===== ÁREA PESSOAL ===== */
.user-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.user-header hgroup {
  flex: 1;
}

.user-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.user-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  border: 1px solid var(--line);
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--brand);
  box-shadow: var(--shadow);
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--brand);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--muted);
  font-size: 0.9rem;
}

.auth-required {
  text-align: center;
  padding: 3rem;
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto;
}

.auth-required i {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.3;
}

.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--muted);
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.3;
}

/* Estilos para os elementos de lista */
.list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.list-item {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: all 0.3s ease;
}

.list-item:hover {
  border-color: var(--brand);
  background: var(--brand-subtle);
}

.list-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.list-item-title {
  font-weight: 600;
  color: var(--brand-dark);
  margin: 0;
  font-size: 1rem;
}

.list-item-date {
  color: var(--muted);
  font-size: 0.875rem;
  white-space: nowrap;
}

.list-item-details {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

/* Responsividade para Área Pessoal */
@media (max-width: 1024px) {
  .user-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .user-header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .user-actions {
    width: 100%;
    justify-content: center;
  }
  
  .user-stats {
    grid-template-columns: 1fr;
  }
  
  .stat-card {
    padding: 1rem;
  }
  
  .stat-number {
    font-size: 1.75rem;
  }
}

/* ===== PÁGINA DE AUTENTICAÇÃO ===== */
.auth-page {
  min-height: calc(100vh - var(--header-height) - 200px);
  display: grid;
  place-items: center;
  padding: 4rem 1rem;
}

.auth-article {
  max-width: 440px;
  width: 100%;
  animation: fadeInUp 0.6s ease-out;
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.auth-nav {
  display: flex;
  border-bottom: 2px solid var(--line);
  margin-bottom: 2rem;
}

.auth-nav button {
  flex: 1;
  padding: 1rem 1.5rem;
  background: none;
  border: none;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  position: relative;
  transition: color 0.3s ease;
}

.auth-nav button[aria-selected="true"] {
  color: var(--brand);
}

.auth-nav button[aria-selected="true"]::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--brand);
}

.auth-section {
  display: none;
}

.auth-section[aria-hidden="false"] {
  display: block;
}

.auth-form .form-group {
  margin-bottom: 1.5rem;
}

.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
}

.form-footer {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--muted);
}

.error-message {
  background: #fee2e2;
  color: #dc2626;
  padding: 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  display: none;
}

.error-message:not(:empty) {
  display: block;
}

/* Área Pessoal — complementos*/


/* Cabeçalho de cartões (usado em ações/gestão de itens) */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

/* Status dos orçamentos */
.status-pending {
  color: #f59e0b;
  font-weight: 600;
}

.status-approved {
  color: #10b981;
  font-weight: 600;
}

.status-rejected {
  color: #ef4444;
  font-weight: 600;
}

/* ===== HEADER — texto mais escuro + Dropdown "Serviços" ===== */

/* Texto do cabeçalho mais escuro (apenas no header) */
.site-header .nav-links a{
  color: var(--ink);
}
.site-header .brand-text .muted{
  color: #334155; /* slate-700 */
}

/* Dropdown (Serviços) */
.nav-links .has-submenu{
  position: relative;
}

.nav-links .nav-parent{
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: none;
  border: 0;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.nav-links .nav-parent .caret{
  margin-left: 2px;
  font-size: 0.9rem;
  opacity: 0.65;
  transition: transform 0.2s ease;
}

.nav-links .nav-parent:hover,
.nav-links .nav-parent:focus-visible{
  color: var(--brand);
  background: var(--brand-subtle);
  transform: translateY(-1px);
  outline: none;
}

.nav-links .nav-parent.active{
  color: var(--brand);
  background: var(--brand-subtle);
  font-weight: 700;
}

.nav-links .has-submenu.open .nav-parent .caret{
  transform: rotate(180deg);
  opacity: 0.9;
}

.nav-links .submenu{
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 260px;
  padding: 8px;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.98);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  list-style: none;
  display: none;
  z-index: 120;
}

.nav-links .has-submenu.open > .submenu{
  display: grid;
  gap: 4px;
}

.nav-links .submenu a{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  color: var(--ink);
  transition: all 0.2s ease;
}

.nav-links .submenu a:hover{
  color: var(--brand);
  background: var(--brand-subtle);
}

.nav-links .submenu a[aria-current="page"]{
  color: var(--brand);
  background: var(--brand-subtle);
}

/* Mobile: submenu em fluxo (não absoluto) */
@media (max-width: 768px){
  .nav-links .submenu{
    position: static;
    top: auto;
    left: auto;
    min-width: 0;
    margin-top: 8px;
    box-shadow: none;
    background: white;
  }
}
/* ===== Header: correções mobile ===== */
@media (max-width: 560px) {
  .site-header .header-row{
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 10px;
  }

  /* Brand compacto */
  .site-header .brand{
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .site-header .brand-mark{
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
  }

  .site-header .brand-text{
    min-width: 0;
  }

  .site-header .brand-text strong{
    display: block;
    font-size: 0.95rem;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Esconde a tagline no mobile para não partir o layout */
  .site-header .brand-text .muted{
    display: none;
  }

  /* Botão menu mais compacto */
  .site-header .nav-toggle{
    padding: 10px 10px;
    min-width: 44px;
    justify-content: center;
  }

  /* Esconde o texto "Menu" visualmente (mantém para leitores de ecrã) */
  .site-header .nav-toggle .txt-pt,
  .site-header .nav-toggle .txt-en{
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
  }

  /* Idioma compacto */
  .site-header .lang{
    display: flex;
    gap: 6px;
  }

  .site-header .lang-btn{
    padding: 8px 10px;
    min-width: 44px;
  }

  /* Garante que o nav (quando abre) ocupa a largura toda e fica abaixo */
  .site-header .nav{
    grid-column: 1 / -1;
  }
}
.submenu[hidden] { display: none !important; 
}

/* =========================================================
   PATCH SEGURO — MELHOR APROVEITAMENTO DE LARGURA
   Acrescentar no fim do estilos.css original
   ========================================================= */

/* 1) Container principal mais largo, sem rebentar a estrutura */
:root{
  --wrap: 1560px;
}

/* mantém margens laterais equilibradas */
.wrap{
  width: min(100%, var(--wrap));
  margin-inline: auto;
  padding-inline: clamp(16px, 2vw, 28px);
}

/* 2) Header: permitir melhor distribuição sem esmagar */
.header-row{
  gap: 16px;
}

.brand{
  min-width: 0;
  flex-shrink: 0;
}

.brand-text{
  min-width: 0;
}

.nav{
  min-width: 0;
}

.nav-links{
  flex-wrap: nowrap;
}

.nav-links a,
.nav-links .nav-parent{
  white-space: nowrap;
}

/* 3) Hero: melhorar uso da largura sem alterar lógica base */
body[data-page="home"] .hero{
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: clamp(20px, 2vw, 32px);
  align-items: start;
}

/* evita que o fundo decorativo saia demasiado fora */
body[data-page="home"] .hero::before{
  left: 0;
  right: 0;
  top: 0;
  height: 240px;
  transform: none;
}

/* 4) Cartão principal da hero: apenas melhor ocupação interna */
body[data-page="home"] .hero > .card:first-child{
  padding: clamp(24px, 2vw, 34px);
}

/* 5) Chips e ações: distribuição mais limpa */
.hero-chips{
  gap: 10px 12px;
}

.chip{
  max-width: 100%;
}

.actions{
  gap: 12px;
}

.actions .btn{
  flex: 0 0 auto;
}

/* 6) Métricas: manter 3 colunas quando há espaço, sem deformar */
.metrics{
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

/* 7) Coluna direita: vídeo/imagem mais controlado */
.video-box{
  width: 100%;
}

.video-box video{
  width: 100%;
  aspect-ratio: 4 / 5;
  height: auto;
  min-height: unset;
  object-fit: cover;
}

/* cartão abaixo do vídeo */
body[data-page="home"] aside .card{
  margin-top: 0;
}

/* 8) Grelhas gerais: mais robustas sem mexer no resto */
.grid-2,
.grid-3,
.grid-4,
.metrics,
.stats-container,
.form-grid,
.kpi,
.user-stats{
  align-items: stretch;
}

.grid-2 > *,
.grid-3 > *,
.grid-4 > *,
.metrics > *,
.stats-container > *{
  min-width: 0;
}

/* 9) Wide screens: aproveitar melhor monitores largos */
@media (min-width: 1400px){
  :root{
    --wrap: 1640px;
  }

  body[data-page="home"] .hero{
    grid-template-columns: minmax(0, 1.1fr) minmax(400px, 0.9fr);
    gap: 28px;
  }
}

@media (min-width: 1700px){
  :root{
    --wrap: 1720px;
  }

  .wrap{
    padding-inline: 32px;
  }

  body[data-page="home"] .hero{
    grid-template-columns: minmax(0, 1.12fr) minmax(440px, 0.88fr);
  }
}

/* 10) Portáteis intermédios: evita esmagamento do menu */
@media (max-width: 1200px){
  .nav-links a,
  .nav-links .nav-parent{
    padding: 10px 12px;
    font-size: 0.9rem;
  }

  .brand-text strong{
    font-size: 1rem;
  }
}

/* 11) Tablet: a hero passa para 1 coluna de forma limpa */
@media (max-width: 1024px){
  body[data-page="home"] .hero{
    grid-template-columns: 1fr;
    gap: 24px;
  }

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

  .footer-row{
    grid-template-columns: 1fr 1fr;
  }
}

/* 12) Mobile: tudo numa coluna, sem sobreposições */
@media (max-width: 768px){
  .wrap{
    padding-inline: 16px;
  }

  .grid-2,
  .grid-3,
  .grid-4,
  .metrics,
  .stats-container,
  .form-grid,
  .kpi,
  .user-stats,
  .media-duo{
    grid-template-columns: 1fr;
  }

  body[data-page="home"] .hero{
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 2rem 0 1.5rem;
  }

  body[data-page="home"] .hero::before{
    height: 180px;
  }

  .footer-row{
    grid-template-columns: 1fr;
  }

  .footer-bottom .wrap{
    flex-direction: column;
    text-align: center;
  }

  .nav{
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: white;
    border-bottom: 1px solid var(--line);
    padding: 1rem;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
    z-index: 99;
  }

  header[data-nav="open"] .nav{
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-links{
    flex-direction: column;
    gap: 4px;
  }

  .nav-links .submenu{
    position: static;
    top: auto;
    left: auto;
    min-width: 0;
    margin-top: 8px;
    box-shadow: none;
    background: white;
  }
}

/* 13) Telefone pequeno */
@media (max-width: 560px){
  .site-header .header-row{
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 10px;
  }

  .site-header .brand{
    min-width: 0;
    gap: 10px;
  }

  .site-header .brand-mark{
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
  }

  .site-header .brand-text strong{
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .site-header .brand-text .muted{
    display: none;
  }

  .site-header .nav-toggle{
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    padding: 10px 10px;
  }

  .site-header .lang-btn{
    padding: 8px 10px;
    min-width: 44px;
  }

  .site-header .nav{
    grid-column: 1 / -1;
  }

  .metrics{
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   PATCH — SIMULADOR COMPLETO DE TRANSFERÊNCIA + TAXA DE ESFORÇO
   Acrescentar no fim do estilos.css
   ========================================================= */

.sim-block {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.sim-block h3,
.compare-panel h3 {
  margin-bottom: 0.5rem;
}

.sim-compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.compare-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  padding: 1rem;
}

.decision-box {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--subtle-bg);
  margin-bottom: 1.5rem;
}

.decision-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 40px;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
}

.decision-badge.positive {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.decision-badge.warning {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

.decision-badge.negative {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.decision-badge.neutral {
  background: #e2e8f0;
  color: #334155;
  border: 1px solid #cbd5e1;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.result-mini-card,
.effort-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  padding: 1rem;
  display: grid;
  gap: 0.5rem;
}

.result-mini-card strong,
.effort-card strong {
  font-size: 1.4rem;
  line-height: 1.15;
  color: var(--brand-dark);
}

.result-label {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 600;
}

.compare-table-wrap {
  margin: 1rem 0 1.5rem;
}

.compare-table td.positive {
  color: #166534;
  font-weight: 700;
}

.compare-table td.negative {
  color: #991b1b;
  font-weight: 700;
}

.compare-table td.neutral {
  color: #475569;
  font-weight: 600;
}

.effort-results-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.effort-card.good strong {
  color: #166534;
}

.effort-card.medium strong {
  color: #92400e;
}

.effort-card.high strong {
  color: #991b1b;
}

@media (max-width: 1024px) {
  .sim-compare-grid,
  .effort-results-grid,
  .result-grid {
    grid-template-columns: 1fr;
  }
}