/* ==========================================================================
   SGI - Software de Gestão Integrada | Enterprise Landing Page Styles
   Materialize v13.11.1 Enhanced Commercial B2B UI/UX Design
   ========================================================================== */

/* Modern Color Palette & Tokens */
:root {
  --sgi-primary: #666cff;
  --sgi-primary-hover: #555be6;
  --sgi-primary-rgb: 102, 108, 255;
  --sgi-secondary: #6d788d;
  --sgi-accent: #8c57ff;
  --sgi-iso-9001: #2563eb;
  --sgi-iso-14001: #059669;
  --sgi-iso-45001: #d97706;
  --sgi-iso-50001: #0891b2;
  --sgi-iatf-16949: #7c3aed;
  --sgi-success: #28c76f;
  --sgi-warning: #ff9f43;
  --sgi-info: #00bad1;
  --sgi-danger: #ea5455;
  --sgi-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

[data-bs-theme="dark"] {
  --sgi-card-glass: rgba(30, 31, 48, 0.85);
  --sgi-card-border: rgba(255, 255, 255, 0.1);
  --sgi-glow: rgba(102, 108, 255, 0.2);
  --sgi-hero-bg: radial-gradient(circle at 50% 10%, rgba(102, 108, 255, 0.18), rgba(15, 17, 30, 0.95) 75%);
  --sgi-section-alt: #181926;
  --sgi-nav-bg: rgba(22, 23, 36, 0.92);
}

[data-bs-theme="light"] {
  --sgi-card-glass: rgba(255, 255, 255, 0.95);
  --sgi-card-border: rgba(67, 89, 113, 0.12);
  --sgi-glow: rgba(102, 108, 255, 0.12);
  --sgi-hero-bg: radial-gradient(circle at 50% 10%, rgba(102, 108, 255, 0.08), rgba(248, 249, 252, 1) 75%);
  --sgi-section-alt: #f8f9fa;
  --sgi-nav-bg: rgba(255, 255, 255, 0.94);
}

/* Base Adjustments */
body {
  font-family: var(--sgi-font);
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 86px;
}

/* ==========================================================================
   1. NAVBAR REFINADA (ZERO QUEBRA DE LINHA, ULTRA-LIMPA)
   ========================================================================== */
.sgi-main-navbar {
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: var(--sgi-nav-bg) !important;
  border-bottom: 1px solid var(--sgi-card-border);
  transition: all 0.3s ease;
  height: 74px;
}

.sgi-nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap !important;
  width: 100%;
}

.sgi-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.sgi-brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #666cff 0%, #4a52e2 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 4px 14px rgba(102, 108, 255, 0.35);
  transition: transform 0.3s ease;
}

.sgi-brand:hover .sgi-brand-logo {
  transform: scale(1.05);
}

.sgi-brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--bs-heading-color);
  line-height: 1;
}

.sgi-brand-tag {
  font-size: 0.65rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--sgi-primary);
  background: rgba(102, 108, 255, 0.12);
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
}

/* Nav links anti-wrap */
.sgi-nav-menu-list {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  flex-wrap: nowrap !important;
}

.sgi-nav-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--bs-body-color);
  padding: 8px 14px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap !important;
  display: inline-block;
}

.sgi-nav-link:hover {
  color: var(--sgi-primary);
  background: rgba(102, 108, 255, 0.08);
}

/* Toolbar Right */
.sgi-nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap !important;
  flex-shrink: 0;
}

/* ==========================================================================
   2. HERO SECTION DE ALTO IMPACTO (LANDING PAGE MODERNA)
   ========================================================================== */
.sgi-hero-container {
  background: var(--sgi-hero-bg);
  padding-top: 130px;
  padding-bottom: 90px;
  position: relative;
  overflow: hidden;
}

.sgi-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 50rem;
  background: rgba(102, 108, 255, 0.1);
  border: 1px solid rgba(102, 108, 255, 0.25);
  color: var(--sgi-primary);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 24px;
  animation: pulse-border 3s infinite ease-in-out;
}

@keyframes pulse-border {
  0%, 100% { border-color: rgba(102, 108, 255, 0.25); box-shadow: 0 0 0 0 rgba(102, 108, 255, 0.2); }
  50% { border-color: rgba(102, 108, 255, 0.6); box-shadow: 0 0 0 8px rgba(102, 108, 255, 0); }
}

.sgi-hero-title {
  font-size: 3.25rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.sgi-gradient-text {
  background: linear-gradient(135deg, #666cff 0%, #a855f7 70%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sgi-hero-lead {
  font-size: 1.2rem;
  line-height: 1.65;
  color: var(--bs-secondary-color);
  max-width: 820px;
  margin: 0 auto 2.5rem auto;
}

/* Showcase Mockup 3D */
.sgi-mockup-wrapper {
  position: relative;
  max-width: 1140px;
  margin: 30px auto 0 auto;
}

.sgi-browser-window {
  background: var(--sgi-card-glass);
  border: 1px solid var(--sgi-card-border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.2), 0 0 40px var(--sgi-glow);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.sgi-browser-window:hover {
  transform: translateY(-4px);
  box-shadow: 0 35px 90px -15px rgba(0, 0, 0, 0.25), 0 0 50px var(--sgi-glow);
}

.sgi-browser-bar {
  background: rgba(0, 0, 0, 0.05);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--sgi-card-border);
}

[data-bs-theme="dark"] .sgi-browser-bar {
  background: rgba(255, 255, 255, 0.04);
}

.sgi-mockup-img {
  width: 100%;
  height: auto;
  display: block;
}

/* Floating Badges on Mockup */
.sgi-floating-kpi {
  position: absolute;
  background: var(--sgi-card-glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--sgi-card-border);
  border-radius: 14px;
  padding: 14px 18px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 10;
  animation: float-slow 5s ease-in-out infinite;
}

.sgi-floating-kpi.kpi-left {
  left: -20px;
  top: 25%;
}

.sgi-floating-kpi.kpi-right {
  right: -20px;
  bottom: 20%;
  animation-delay: -2.5s;
}

@keyframes float-slow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ==========================================================================
   3. SOCIAL PROOF & SETORES CERTIFICADOS
   ========================================================================== */
.sgi-sectors-strip {
  padding: 40px 0;
  border-top: 1px solid var(--sgi-card-border);
  border-bottom: 1px solid var(--sgi-card-border);
  background: var(--bs-body-bg);
}

.sgi-sector-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 12px;
  background: var(--sgi-section-alt);
  border: 1px solid var(--sgi-card-border);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--bs-heading-color);
  transition: all 0.25s ease;
}

.sgi-sector-badge:hover {
  border-color: var(--sgi-primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

/* ==========================================================================
   4. SEÇÃO: O FLUXO DE UMA EMPRESA COM NORMAS INTEGRADAS (WORKFLOW REAL)
   ========================================================================== */
.sgi-workflow-step-card {
  background: var(--bs-card-bg);
  border: 1px solid var(--sgi-card-border);
  border-radius: 18px;
  padding: 28px;
  height: 100%;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.sgi-workflow-step-card:hover {
  transform: translateY(-6px);
  border-color: var(--sgi-primary);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
}

.sgi-step-number {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #666cff 0%, #8c57ff 100%);
  color: #fff;
  font-weight: 800;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  box-shadow: 0 6px 16px rgba(102, 108, 255, 0.35);
}

/* ==========================================================================
   5. FOCO NOS MÓDULOS COM IMAGENS REAIS E DETALHAMENTO
   ========================================================================== */
.sgi-module-hero-card {
  background: var(--bs-card-bg);
  border: 1px solid var(--sgi-card-border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
}

.sgi-module-img-container {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--sgi-card-border);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
  position: relative;
}

.sgi-module-img-container img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
}

.sgi-module-img-container:hover img {
  transform: scale(1.02);
}

/* Module Feature Pill */
.sgi-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.sgi-feature-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(40, 199, 111, 0.12);
  color: var(--sgi-success);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ==========================================================================
   6. HLS TREE & FILTER PILLS
   ========================================================================== */
.sgi-filter-pill {
  cursor: pointer;
  padding: 8px 18px;
  border-radius: 50rem;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.25s ease;
  border: 1px solid var(--sgi-card-border);
  background: var(--bs-body-bg);
  color: var(--bs-heading-color);
}

.sgi-filter-pill:hover {
  border-color: var(--sgi-primary);
  color: var(--sgi-primary);
}

.sgi-filter-pill.active {
  background: var(--sgi-primary);
  border-color: var(--sgi-primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(102, 108, 255, 0.35);
}

/* Norm Badges */
.badge-iso-9001 { background: rgba(37, 99, 235, 0.12) !important; color: #2563eb !important; border: 1px solid rgba(37, 99, 235, 0.25); }
.badge-iso-14001 { background: rgba(5, 150, 105, 0.12) !important; color: #059669 !important; border: 1px solid rgba(5, 150, 105, 0.25); }
.badge-iso-45001 { background: rgba(217, 119, 6, 0.12) !important; color: #d97706 !important; border: 1px solid rgba(217, 119, 6, 0.25); }
.badge-iso-50001 { background: rgba(8, 145, 178, 0.12) !important; color: #0891b2 !important; border: 1px solid rgba(8, 145, 178, 0.25); }
.badge-iatf-16949 { background: rgba(124, 58, 237, 0.12) !important; color: #7c3aed !important; border: 1px solid rgba(124, 58, 237, 0.25); }

/* ==========================================================================
   7. COMPARISON TABLE
   ========================================================================== */
.sgi-comparison-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--sgi-card-border);
  border-radius: 18px;
  overflow: hidden;
  background: var(--bs-card-bg);
}

.sgi-comparison-table th {
  padding: 20px 24px;
  font-weight: 700;
  font-size: 0.95rem;
  background: var(--sgi-section-alt);
  border-bottom: 2px solid var(--sgi-card-border);
}

.sgi-comparison-table th.sgi-highlight-col {
  background: rgba(102, 108, 255, 0.1);
  color: var(--sgi-primary);
  border-bottom: 2px solid var(--sgi-primary);
}

.sgi-comparison-table td {
  padding: 18px 24px;
  border-bottom: 1px solid var(--sgi-card-border);
  vertical-align: middle;
}

.sgi-comparison-table td.sgi-highlight-col {
  background: rgba(102, 108, 255, 0.03);
  font-weight: 600;
}

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

/* ==========================================================================
   8. AI CHATBOT & TOASTS
   ========================================================================== */
.sgi-floating-ai-widget {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 1050;
}

.sgi-ai-launcher-btn {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed 0%, #666cff 100%);
  color: #fff;
  border: none;
  box-shadow: 0 10px 25px rgba(102, 108, 255, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.65rem;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.sgi-ai-launcher-btn:hover {
  transform: scale(1.08);
}

.sgi-ai-chat-window {
  position: absolute;
  bottom: 72px;
  right: 0;
  width: 380px;
  border-radius: 18px;
  background: var(--bs-card-bg);
  border: 1px solid var(--sgi-card-border);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 1060;
  animation: sgiSlideUp 0.3s ease;
}

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

.sgi-ai-chat-window.show {
  display: flex;
}

.sgi-ai-chat-header {
  padding: 16px 20px;
  background: linear-gradient(135deg, #7c3aed 0%, #666cff 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sgi-ai-chat-body {
  padding: 16px;
  max-height: 320px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sgi-ai-msg {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.875rem;
  line-height: 1.45;
  max-width: 85%;
}

.sgi-ai-msg.ai {
  background: rgba(102, 108, 255, 0.12);
  color: var(--bs-heading-color);
  align-self: flex-start;
  border-bottom-left-radius: 2px;
}

.sgi-ai-msg.user {
  background: var(--sgi-primary);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 2px;
}

.sgi-ai-chat-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--sgi-card-border);
  display: flex;
  gap: 8px;
}

.sgi-live-toast-wrapper {
  position: fixed;
  top: 90px;
  right: 25px;
  z-index: 1070;
  max-width: 350px;
}

/* ==========================================================================
   9. RESPONSIVE OPTIMIZATIONS
   ========================================================================== */
@media (max-width: 991.98px) {
  .sgi-hero-title {
    font-size: 2.25rem;
  }
  .sgi-floating-kpi {
    display: none !important;
  }
  .sgi-hero-container {
    padding-top: 100px;
    padding-bottom: 60px;
  }
}
