/* ============================================================
   CLT BRASIL — FOLHA DE ESTILOS INSTITUCIONAL (CSS)
   Design System: Deep Navy, Crisp White, Emerald & Gold
   ============================================================ */

:root {
  --primary: #0a192f;
  --primary-light: #1e293b;
  --accent: #0284c7;
  --accent-hover: #0369a1;
  --green: #10b981;
  --green-dark: #059669;
  --red: #ef4444;
  --amber: #f59e0b;
  --bg-page: #f8fafc;
  --card-bg: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --border-focus: #38bdf8;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.05);
  --radius: 12px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

body {
  font-family: var(--font);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 18px;
}

/* TOPBAR */
.gov-topbar {
  background: #0f172a;
  color: #94a3b8;
  font-size: 0.76rem;
  padding: 6px 0;
  border-bottom: 1px solid #1e293b;
}
.gov-topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.gov-links a { color: #cbd5e1; font-weight: 500; }
.gov-links a:hover { color: #ffffff; }

/* HEADER */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 68px;
}
.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--primary);
}
.brand-logo:hover { text-decoration: none; }
.brand-symbol { font-size: 1.8rem; }
.brand-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #0f172a;
  display: block;
  line-height: 1.1;
}
.brand-title strong { color: #0284c7; }
.brand-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.main-nav {
  display: flex;
  gap: 6px;
  align-items: center;
}
.main-nav a {
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #334155;
  transition: all 0.15s ease;
}
.main-nav a:hover, .main-nav a.active {
  background: #f1f5f9;
  color: #0284c7;
  text-decoration: none;
}
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #334155;
  margin: 5px 0;
}

/* CARDS & GRIDS */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}
.card-hero {
  background: linear-gradient(135deg, #0a192f 0%, #1e293b 100%);
  color: #ffffff;
  padding: 40px 24px;
  border-radius: var(--radius);
  margin: 24px 0;
}
.card-hero h1 { font-size: 2.2rem; line-height: 1.2; margin-bottom: 12px; font-weight: 800; }
.card-hero p { font-size: 1.05rem; color: #cbd5e1; max-width: 800px; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

/* CALCULATOR FORMS */
.calc-form {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-md);
}
.form-group {
  margin-bottom: 18px;
}
.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: #1e293b;
}
.form-group small {
  display: block;
  color: var(--text-muted);
  font-size: 0.78rem;
  margin-top: 4px;
}
.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.input-prefix {
  position: absolute;
  left: 14px;
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.92rem;
  pointer-events: none;
}
.form-input {
  width: 100%;
  height: 46px;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.98rem;
  font-family: inherit;
  color: var(--text-main);
  background: #ffffff;
  transition: border-color 0.15s;
}
.form-input.has-prefix { padding-left: 42px; }
.form-input:focus {
  outline: none;
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

select.form-input {
  cursor: pointer;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1rem;
  padding: 12px 24px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}
.btn-primary {
  background: #0284c7;
  color: #ffffff;
}
.btn-primary:hover { background: #0369a1; text-decoration: none; }
.btn-green {
  background: var(--green);
  color: #ffffff;
}
.btn-green:hover { background: var(--green-dark); text-decoration: none; }
.btn-block { width: 100%; }

/* RESULTS BOX */
.calc-result {
  margin-top: 24px;
  padding: 24px;
  border-radius: 10px;
  background: #f8fafc;
  border: 2px solid #0284c7;
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.result-total-card {
  background: linear-gradient(135deg, #065f46 0%, #047857 100%);
  color: #ffffff;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  margin-bottom: 18px;
}
.result-total-label { font-size: 0.88rem; text-transform: uppercase; letter-spacing: 0.5px; opacity: 0.9; }
.result-total-val { font-size: 2.2rem; font-weight: 900; line-height: 1.1; margin-top: 4px; }

/* TABLES */
.table-wrap { overflow-x: auto; margin: 16px 0; }
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}
th, td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
th {
  background: #f1f5f9;
  font-weight: 700;
  color: #1e293b;
}
tr:hover td { background: #f8fafc; }

/* ADSENSE AD SLOTS */
.ad-slot {
  margin: 28px 0;
  text-align: center;
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: 10px;
}
.ad-label {
  display: block;
  font-size: 0.68rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.ad-banner-mock {
  padding: 18px;
  color: #94a3b8;
  font-size: 0.82rem;
  font-weight: 500;
  background: #f8fafc;
  border-radius: 4px;
}

/* PILLS & BADGES */
.pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}
.pill-blue { background: #e0f2fe; color: #0284c7; }
.pill-green { background: #d1fae5; color: #059669; }
.pill-amber { background: #fef3c7; color: #d97706; }

/* CTA AFILIADO FGTS (MONETIZAÇÃO HÍBRIDA) */
.cta-fgts-card {
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
  color: #ffffff;
  padding: 22px;
  border-radius: 10px;
  margin: 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  border: 1px solid #3b82f6;
}
.cta-fgts-content h3 { font-size: 1.25rem; font-weight: 800; margin-bottom: 4px; }
.cta-fgts-content p { font-size: 0.88rem; color: #bfdbfe; margin: 0; }

/* FOOTER */
.site-footer {
  background: #0a192f;
  color: #cbd5e1;
  padding: 48px 0 20px;
  margin-top: 60px;
  border-top: 3px solid #0284c7;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 36px;
}
.footer-col h4 {
  color: #ffffff;
  font-size: 0.98rem;
  margin-bottom: 14px;
  font-weight: 700;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; font-size: 0.85rem; }
.footer-col a { color: #94a3b8; text-decoration: none; }
.footer-col a:hover { color: #ffffff; text-decoration: underline; }
.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 20px;
}
.badge-safe {
  font-size: 0.78rem;
  color: #38bdf8;
  font-weight: 600;
}

/* RESPONSIVO */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .main-nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 68px;
    left: 0;
    width: 100%;
    background: #ffffff;
    padding: 16px;
    box-shadow: var(--shadow-lg);
    border-bottom: 1px solid var(--border);
  }
  .main-nav.open { display: flex; }
  .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .card-hero h1 { font-size: 1.6rem; }
  .cta-fgts-card { flex-direction: column; text-align: center; }
  .cta-fgts-card .btn { width: 100%; }
}

/* BANNER DE CONSENTIMENTO LGPD / COOKIES */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(10, 25, 47, 0.98);
  backdrop-filter: blur(10px);
  color: #e2e8f0;
  padding: 16px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.35);
  z-index: 999999;
  display: none;
  animation: slideUpCookie 0.35s ease-out;
}
@keyframes slideUpCookie {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.cookie-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.cookie-text {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 280px;
}
.cookie-icon {
  font-size: 1.8rem;
  line-height: 1;
}
.cookie-text p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: #cbd5e1;
}
.cookie-text a {
  color: #10b981;
  text-decoration: underline;
  margin-left: 4px;
}
.cookie-text a:hover {
  color: #34d399;
}
.cookie-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
@media (max-width: 768px) {
  .cookie-banner { padding: 14px 0; }
  .cookie-banner-inner { flex-direction: column; align-items: stretch; gap: 12px; }
  .cookie-actions { justify-content: stretch; }
  .cookie-actions .btn { flex: 1; text-align: center; }
}

/* E-E-A-T AUTHOR BOX */
.author-meta-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-top: 14px;
  flex-wrap: wrap;
  gap: 12px;
}
@media (max-width: 600px) {
  .author-meta-box {
    flex-direction: column;
    align-items: flex-start;
  }
}
