/* ==========================================================================
   FBGF Service — Design System
   ========================================================================== */

:root {
  --navy-950: #0a132b;
  --navy-900: #0f1f3d;
  --navy-800: #16294f;
  --navy-700: #1e3766;
  --gold-500: #f5a623;
  --gold-400: #ffc857;
  --red-600: #c1272d;
  --gray-50: #f7f8fa;
  --gray-100: #eef0f4;
  --gray-200: #dde1e8;
  --gray-400: #9aa3b2;
  --gray-600: #5c6577;
  --text-dark: #1a2033;
  --white: #ffffff;

  --font-base: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;

  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-md: 0 4px 16px rgba(15, 31, 61, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 31, 61, 0.14);
  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-base);
  color: var(--text-dark);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.2; font-weight: 800; }
p { margin: 0 0 1em; }

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

.section { padding: 72px 0; }
.section-tight { padding: 48px 0; }
.bg-navy { background: var(--navy-900); color: var(--white); }
.bg-gray { background: var(--gray-50); }

.eyebrow {
  display: inline-block;
  color: var(--gold-500);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: .78rem;
  margin-bottom: 10px;
}
.bg-navy .eyebrow { color: var(--gold-400); }

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  color: var(--navy-900);
}
.bg-navy .section-title { color: var(--white); }

.section-lede {
  color: var(--gray-600);
  font-size: 1.05rem;
  max-width: 640px;
}
.bg-navy .section-lede { color: var(--gray-200); }

.bar-gold {
  width: 56px;
  height: 4px;
  background: var(--gold-500);
  border-radius: 2px;
  margin: 6px 0 18px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: .95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-gold { background: var(--gold-500); color: var(--navy-950); }
.btn-gold:hover { background: var(--gold-400); box-shadow: var(--shadow-md); }
.btn-outline { border-color: var(--white); color: var(--white); }
.btn-outline:hover { background: var(--white); color: var(--navy-900); }
.btn-navy { background: var(--navy-900); color: var(--white); }
.btn-navy:hover { background: var(--navy-800); box-shadow: var(--shadow-md); }
.btn-whatsapp { background: #25D366; color: var(--white); }
.btn-whatsapp:hover { background: #1ebe5b; }
.btn-block { width: 100%; justify-content: center; }
.btn-sm { padding: 9px 18px; font-size: .85rem; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--gray-200);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
}
.logo-link img { height: 42px; }

.main-nav ul { display: flex; gap: 2px; align-items: center; }
.main-nav a {
  display: block;
  padding: 10px 14px;
  font-weight: 600;
  font-size: .93rem;
  color: var(--navy-900);
  border-radius: 8px;
}
.main-nav a:hover, .main-nav a.active { color: var(--red-600); background: var(--gray-50); }

.nav-cta { display: flex; align-items: center; gap: 10px; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--navy-900);
  margin: 5px 0;
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}

@media (max-width: 900px) {
  .main-nav {
    position: fixed;
    inset: 78px 0 0 0;
    background: var(--white);
    transform: translateX(100%);
    transition: transform .25s ease;
    overflow-y: auto;
    padding: 20px;
  }
  .main-nav.open { transform: translateX(0); }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 4px; }
  .main-nav a { padding: 16px; font-size: 1.05rem; }
  .nav-toggle { display: block; }
  .nav-cta .btn-sm-desktop { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: linear-gradient(120deg, var(--navy-950) 0%, var(--navy-800) 100%);
  color: var(--white);
  overflow: hidden;
}
.hero .container {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 48px;
  align-items: center;
  padding-top: 64px;
  padding-bottom: 64px;
  min-height: 520px;
}
.hero h1 { font-size: clamp(2rem, 4vw, 3.1rem); }
.hero h1 .accent { color: var(--gold-500); }
.hero p.lede { font-size: 1.15rem; color: var(--gray-200); max-width: 520px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.hero-media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4/5;
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; }

.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.hero-stats div strong { display: block; font-size: 1.9rem; color: var(--gold-500); }
.hero-stats div span { color: var(--gray-200); font-size: .85rem; }

@media (max-width: 860px) {
  .hero .container { grid-template-columns: 1fr; padding-top: 40px; }
  .hero-media { order: -1; aspect-ratio: 16/9; }
}

/* ---------- Cards ---------- */
.grid {
  display: grid;
  gap: 24px;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 960px) {
  .grid-3, .grid-4, .grid-5 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; }
}

.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: box-shadow .2s ease, transform .2s ease;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.card .icon-bar { width: 4px; height: 28px; background: var(--gold-500); border-radius: 2px; margin-bottom: 14px; }
.card h3 { font-size: 1.15rem; color: var(--navy-900); }
.card p { color: var(--gray-600); font-size: .95rem; margin-bottom: 0; }
.card.accent-red .icon-bar { background: var(--red-600); }

.card-media {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--gray-200);
  background: var(--white);
  box-shadow: none;
}
.card-media .media { aspect-ratio: 4/3; overflow: hidden; background: var(--gray-100); }
.card-media .media img { width: 100%; height: 100%; object-fit: cover; }
.card-media .body { padding: 18px 20px; }
.card-media h3 { font-size: 1.05rem; margin-bottom: 4px; }
.card-media .tag {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--navy-900);
  background: var(--gray-100);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

/* ---------- Diferenciais / process steps ---------- */
.steps { counter-reset: step; }
.step {
  position: relative;
  padding-left: 56px;
  margin-bottom: 28px;
}
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0; top: 0;
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--gold-500);
  background: var(--navy-900);
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.step h4 { color: var(--navy-900); margin-bottom: 4px; }
.step p { color: var(--gray-600); margin-bottom: 0; }

/* ---------- Clientes / logos ---------- */
.client-badge {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 18px 12px;
  text-align: center;
  font-weight: 700;
  color: var(--navy-800);
  background: var(--white);
  font-size: .95rem;
}

/* ---------- Caso de sucesso ---------- */
.case-hero {
  background: var(--navy-900);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
@media (max-width: 860px) { .case-hero { grid-template-columns: 1fr; padding: 28px; } }

.metric-row { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 20px; }
.metric { }
.metric strong { display: block; font-size: 2rem; color: var(--gold-500); }
.metric span { font-size: .85rem; color: var(--gray-200); }

table.tabela-disjuntores {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
  margin: 20px 0;
}
table.tabela-disjuntores th, table.tabela-disjuntores td {
  border: 1px solid var(--gray-200);
  padding: 10px 12px;
  text-align: left;
}
table.tabela-disjuntores th { background: var(--navy-900); color: var(--white); }
table.tabela-disjuntores tr:nth-child(even) { background: var(--gray-50); }

.callout {
  border-left: 4px solid var(--gold-500);
  background: var(--gray-50);
  padding: 18px 22px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 24px 0;
}
.callout.danger { border-left-color: var(--red-600); }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 700; margin-bottom: 6px; font-size: .9rem; color: var(--navy-900); }
.form-control {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  font-size: .95rem;
  font-family: inherit;
  background: var(--white);
}
.form-control:focus { outline: none; border-color: var(--gold-500); box-shadow: 0 0 0 3px rgba(245,166,35,.2); }
textarea.form-control { min-height: 130px; resize: vertical; }

.auth-box {
  max-width: 420px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-md);
}

.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: .9rem;
  margin-bottom: 18px;
}
.alert-error { background: #fdecec; color: var(--red-600); border: 1px solid #f3c8c9; }
.alert-success { background: #eafaf0; color: #1a7a44; border: 1px solid #b9ecd0; }
.alert-info { background: #eaf1fb; color: var(--navy-800); border: 1px solid #cfe0f7; }

/* ---------- Tabela painel admin/cliente ---------- */
table.tabela-painel { width: 100%; border-collapse: collapse; }
table.tabela-painel th, table.tabela-painel td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--gray-200);
  text-align: left;
  font-size: .92rem;
}
table.tabela-painel th { color: var(--gray-600); text-transform: uppercase; font-size: .74rem; letter-spacing: .04em; }
.badge { padding: 4px 10px; border-radius: 999px; font-size: .74rem; font-weight: 700; }
.badge-pending { background: var(--gray-100); color: var(--gray-600); }
.badge-active { background: #eafaf0; color: #1a7a44; }
.badge-expiring { background: #fff6e6; color: #a5690a; }
.badge-expired { background: #fdecec; color: var(--red-600); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-950); color: var(--gray-200); padding: 56px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h4 { color: var(--white); font-size: .95rem; margin-bottom: 14px; }
.footer-grid ul li { margin-bottom: 9px; font-size: .9rem; }
.footer-grid a:hover { color: var(--gold-400); }
.footer-logo img { height: 36px; margin-bottom: 14px; background: var(--white); padding: 8px 12px; border-radius: 8px; }
.footer-bottom {
  border-top: 1px solid var(--navy-800);
  margin-top: 40px;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: .82rem;
  color: var(--gray-400);
}
.social-row { display: flex; gap: 12px; margin-top: 14px; }
.social-row a {
  width: 38px; height: 38px;
  border: 1px solid var(--navy-700);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.social-row a:hover { background: var(--gold-500); border-color: var(--gold-500); color: var(--navy-950); }

/* ---------- WhatsApp floating button ---------- */
.whatsapp-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  background: #25D366;
  color: var(--white);
  width: 58px; height: 58px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
  z-index: 200;
}
.whatsapp-float:hover { transform: scale(1.06); }

/* ---------- Breadcrumb / page header ---------- */
.page-header {
  background: var(--navy-900);
  color: var(--white);
  padding: 52px 0 42px;
}
.page-header h1 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); }
.page-header p { color: var(--gray-200); max-width: 620px; margin-bottom: 0; }

/* utility */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
