/* ==========================================================================
   НЭЛКОМ — Промышленный электромонтаж и электроинжиниринг (nelkom.ru)
   Design System: Industrial Cyber-Precision (Dark Edition)
   ========================================================================== */

:root {
  --bg-primary: #060911;
  --bg-secondary: #0c1220;
  --bg-card: rgba(14, 23, 42, 0.78);
  --bg-card-hover: rgba(22, 36, 65, 0.92);
  --bg-glass: rgba(15, 23, 42, 0.65);
  
  --border-subtle: rgba(56, 189, 248, 0.15);
  --border-active: rgba(56, 189, 248, 0.5);
  --border-glow: 0 0 20px rgba(0, 210, 255, 0.25);
  
  --primary: #0284c7;
  --primary-light: #38bdf8;
  --accent: #00d2ff;
  --accent-glow: rgba(0, 210, 255, 0.35);
  --electric-amber: #f59e0b;
  --safety-orange: #f97316;
  --high-voltage: #ef4444;
  --success: #10b981;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Space Grotesk', var(--font-sans);
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;
  
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.6), 0 0 1px 1px rgba(255, 255, 255, 0.05);
  --shadow-glow: 0 0 35px -5px rgba(0, 210, 255, 0.3);
  
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  max-width: 100vw;
  line-height: 1.6;
  background: radial-gradient(circle at 50% 0%, #0d1b33 0%, #060911 60%);
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

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

/* ==========================================================================
   Typography & Badges
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #fff;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  margin-bottom: 1.25rem;
}

h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  margin-bottom: 1rem;
}

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

p {
  color: var(--text-muted);
  margin-bottom: 1.2rem;
  font-size: 1.05rem;
}

.text-gradient {
  background: linear-gradient(135deg, #ffffff 20%, var(--accent) 70%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 9999px;
  background: rgba(2, 132, 199, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--accent);
}

.badge-amber {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
  color: var(--electric-amber);
}

.badge-green {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
  color: var(--success);
}

.badge-red {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
  color: var(--high-voltage);
}

/* ==========================================================================
   Layout & Containers
   ========================================================================== */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-narrow {
  max-width: 960px;
}

section {
  padding: 5rem 0;
  position: relative;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: rgba(6, 9, 17, 0.88);
  border-bottom: 1px solid var(--border-subtle);
  transition: var(--transition);
}

.header-top {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0.35rem 0;
  font-size: 0.82rem;
  color: var(--text-dim);
  background: rgba(4, 7, 13, 0.95);
}

.header-top-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.header-top-info {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  white-space: nowrap;
}

.header-top-info span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

.header-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  gap: 1.2rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  flex-shrink: 0;
  white-space: nowrap;
  text-decoration: none;
}

.logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
  box-shadow: 0 0 15px rgba(0, 210, 255, 0.4);
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
  white-space: nowrap;
}

.logo-title {
  color: #fff;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo-sub {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-transform: uppercase;
  margin-top: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 0.85rem;
  margin: 0;
  padding: 0;
  flex: 1 1 auto;
  justify-content: center;
}

.nav-links li {
  margin: 0;
  padding: 0;
}

.nav-extra {
  display: none;
}

@media (min-width: 1536px) {
  .nav-extra {
    display: list-item;
  }
}

.nav-links a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap !important;
  text-decoration: none;
  transition: var(--transition);
  padding: 0.35rem 0.2rem;
  display: inline-block;
}

.nav-links a:hover, .nav-links a.active {
  color: #fff;
  text-shadow: 0 0 8px rgba(0, 210, 255, 0.4);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-shrink: 0;
  white-space: nowrap;
  margin-left: auto;
}

.header-phone {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  flex-shrink: 0;
  white-space: nowrap !important;
}

.header-phone-val {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap !important;
  letter-spacing: 0.02em;
  text-decoration: none;
  display: inline-block;
  line-height: 1.2;
}

.header-phone-val:hover {
  color: var(--accent);
  text-shadow: 0 0 10px rgba(0, 210, 255, 0.4);
}

.header-phone-sub {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--success);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  white-space: nowrap !important;
  margin-top: 3px;
  line-height: 1;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
  animation: pulse 2s infinite;
  display: inline-block;
  flex-shrink: 0;
}

.header-actions .btn {
  white-space: nowrap !important;
  flex-shrink: 0;
  padding: 0.52rem 0.95rem;
  font-size: 0.84rem;
}

/* Mobile Hamburger Menu Toggle */
.mobile-menu-toggle {
  display: none;
  background: rgba(14, 23, 42, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  font-size: 1.35rem;
  transition: var(--transition);
  flex-shrink: 0;
}

.mobile-menu-toggle:hover {
  border-color: var(--accent);
  background: rgba(0, 210, 255, 0.1);
}

/* Mobile Nav Drawer */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  height: 100vh;
  background: rgba(10, 15, 29, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid var(--border-active);
  z-index: 1000;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.7);
  transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
  overflow-y: auto;
  visibility: hidden;
}

.mobile-drawer.active {
  right: 0;
  visibility: visible;
}

.mobile-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.mobile-drawer-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.2rem 0.5rem;
}

.mobile-drawer-links {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.mobile-drawer-links a {
  color: #fff;
  font-size: 1.05rem;
  font-weight: 500;
  text-decoration: none;
  display: block;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.mobile-drawer-links a:hover {
  color: var(--accent);
}

.mobile-drawer-contacts {
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

.mobile-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-drawer-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 14px var(--success); }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.6rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.btn-primary {
  background: linear-gradient(135deg, #0284c7 0%, #00d2ff 100%);
  color: #040814;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(0, 210, 255, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(0, 210, 255, 0.5);
  background: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 100%);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary-light);
  transform: translateY(-2px);
}

.btn-amber {
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
  color: #0b0f19;
  font-weight: 700;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.35);
}

.btn-amber:hover {
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
  transform: translateY(-2px);
}

/* ==========================================================================
   Hero Section & Canvas
   ========================================================================== */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  padding: 4rem 0 6rem 0;
  overflow: hidden;
}

#powerCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.65;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 820px;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: #cbd5e1;
  margin-bottom: 2.2rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin-bottom: 3.5rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  padding: 1.8rem;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-val {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 0.25rem;
}

.stat-val span {
  color: var(--accent);
}

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

/* ==========================================================================
   Cards & Grids
   ========================================================================== */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.8rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(460px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  position: relative;
  transition: var(--transition);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary-light);
  transform: translateY(-5px);
  box-shadow: var(--shadow-glow);
}

.card-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: rgba(2, 132, 199, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 1.4rem;
  color: var(--accent);
  transition: var(--transition);
}

.card:hover .card-icon {
  background: rgba(2, 132, 199, 0.3);
  border-color: var(--accent);
  box-shadow: 0 0 16px rgba(0, 210, 255, 0.4);
}

.card-title {
  font-size: 1.35rem;
  margin-bottom: 0.8rem;
  color: #fff;
}

.card-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  flex-grow: 1;
  margin-bottom: 1.5rem;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.9rem;
}

.card-link {
  color: var(--accent);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.card-link:hover {
  gap: 0.7rem;
}

/* ==========================================================================
   Engineering Specs & Technical Tables
   ========================================================================== */
.spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
  margin: 1.8rem 0;
}

.spec-item {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 1rem 1.2rem;
}

.spec-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  margin-bottom: 0.3rem;
}

.spec-val {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}

.spec-val.accent { color: var(--accent); }
.spec-val.amber { color: var(--electric-amber); }
.spec-val.green { color: var(--success); }

.tech-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.95rem;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.tech-table th {
  background: rgba(2, 132, 199, 0.15);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  padding: 1rem 1.2rem;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.tech-table td {
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}

.tech-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
  color: #fff;
}

/* ==========================================================================
   Chat Case Studies (Real Incident Dialogues)
   ========================================================================== */
.chat-case-box {
  background: rgba(11, 19, 36, 0.95);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  margin: 2rem 0;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.chat-meta {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.8rem;
  padding-bottom: 1.2rem;
  margin-bottom: 1.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
  color: var(--text-dim);
}

.chat-msg {
  padding: 1.2rem;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  font-size: 0.98rem;
  line-height: 1.6;
}

.chat-msg.client {
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid var(--electric-amber);
}

.chat-msg.engineer {
  background: rgba(2, 132, 199, 0.08);
  border-left: 3px solid var(--accent);
}

.chat-author {
  display: block;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.chat-author.client-tag { color: var(--electric-amber); }
.chat-author.eng-tag { color: var(--accent); }

/* ==========================================================================
   Interactive Calculator
   ========================================================================== */
.calc-wrapper {
  background: linear-gradient(135deg, rgba(14, 23, 42, 0.95) 0%, rgba(10, 16, 30, 0.95) 100%);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: var(--shadow-glow);
  margin: 3rem 0;
}

.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

.calc-form-group {
  margin-bottom: 1.4rem;
}

.calc-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 0.5rem;
}

.calc-input, .calc-select {
  width: 100%;
  padding: 0.85rem 1.1rem;
  background: rgba(6, 11, 22, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 1rem;
  transition: var(--transition);
}

.calc-input:focus, .calc-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 14px rgba(0, 210, 255, 0.3);
}

.calc-result-box {
  background: rgba(4, 8, 16, 0.9);
  border: 1px solid rgba(0, 210, 255, 0.3);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.calc-result-header {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.8rem;
}

.calc-res-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.calc-res-label {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.calc-res-val {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}

.calc-res-val.highlight {
  color: var(--accent);
  font-size: 1.5rem;
}

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  list-style: none;
  padding: 1.5rem 0;
  font-size: 0.88rem;
  color: var(--text-dim);
}

.breadcrumbs a {
  color: var(--text-muted);
}

.breadcrumbs a:hover {
  color: var(--accent);
}

.breadcrumbs .sep {
  opacity: 0.4;
}

.breadcrumbs .active {
  color: #fff;
  font-weight: 500;
}

/* ==========================================================================
   Content Cards (Internal Pages)
   ========================================================================== */
.content-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(14px);
}

.content-card h2 {
  font-size: 1.85rem;
  margin-bottom: 1.4rem;
  color: #fff;
}

.content-card h3 {
  font-size: 1.35rem;
  margin-top: 1.8rem;
  margin-bottom: 0.8rem;
  color: var(--primary-light);
}

.content-card ul, .content-card ol {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--text-muted);
}

.content-card li {
  margin-bottom: 0.6rem;
  line-height: 1.6;
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: rgba(0, 210, 255, 0.08);
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  color: var(--accent);
  border: 1px solid rgba(0, 210, 255, 0.15);
}

/* ==========================================================================
   Modal Dialog
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(4, 7, 15, 0.88);
  backdrop-filter: blur(12px);
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

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

.modal-card {
  background: #0d1526;
  border: 1px solid var(--border-active);
  border-radius: var(--radius-xl);
  padding: 2.8rem;
  width: 100%;
  max-width: 580px;
  position: relative;
  box-shadow: var(--shadow-glow);
  animation: modalEnter 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalEnter {
  from { opacity: 0; transform: scale(0.95) translateY(15px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.2rem;
  transition: var(--transition);
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  background: #03060c;
  border-top: 1px solid var(--border-subtle);
  padding: 4.5rem 0 2rem 0;
  margin-top: auto;
  font-size: 0.92rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.footer-col h4 {
  font-size: 1.05rem;
  margin-bottom: 1.4rem;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--accent);
  padding-left: 4px;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1366px) {
  .nav-extra { display: none !important; }
  .nav-links { gap: 0.9rem; }
  .nav-links a { font-size: 0.86rem; }
  .header-actions { gap: 1rem; }
  .header-phone-val { font-size: 1.08rem; }
  .header-actions .btn { padding: 0.6rem 1.05rem; font-size: 0.85rem; }
}

@media (max-width: 1200px) {
  .nav-links { gap: 0.75rem; }
  .nav-links a { font-size: 0.82rem; }
  .header-top-info { gap: 0.8rem; font-size: 0.78rem; }
  .logo-title { font-size: 1.3rem; }
  .header-actions { gap: 0.85rem; }
  .header-phone-val { font-size: 1.0rem; }
  .header-actions .btn { padding: 0.55rem 0.95rem; font-size: 0.82rem; }
}

@media (max-width: 1080px) {
  .header-top { display: none; }
  .nav-links { display: none; }
  .mobile-menu-toggle { display: flex; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .calc-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .header-nav { padding: 0.6rem 0; gap: 0.8rem; }
  .header-actions .btn { display: none; }
  .header-phone-val { font-size: 0.95rem; }
  .header-phone-sub { font-size: 0.68rem; }
  .logo-icon { width: 36px; height: 36px; font-size: 1.1rem; }
  .logo-title { font-size: 1.15rem; }
  .logo-sub { font-size: 0.58rem; }
  .hero-stats { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
}


/* ==========================================================================
   NELKOM AI CHATBOT WIDGET
   ========================================================================== */
.nelkom-chat-toggle {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 998;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: rgba(14, 23, 42, 0.92);
  border: 1px solid var(--border-active);
  padding: 0.65rem 1.25rem 0.65rem 0.85rem;
  border-radius: 9999px;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 210, 255, 0.35);
  backdrop-filter: blur(14px);
  transition: var(--transition);
}

.nelkom-chat-toggle:hover {
  transform: translateY(-3px) scale(1.02);
  border-color: var(--accent);
  box-shadow: 0 12px 35px rgba(0, 210, 255, 0.45);
}

.chat-toggle-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0284c7 0%, #00d2ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  color: #040814;
  box-shadow: 0 0 14px rgba(0, 210, 255, 0.6);
}

.chat-toggle-label {
  display: flex;
  flex-direction: column;
}

.chat-toggle-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.chat-toggle-status {
  font-size: 0.75rem;
  color: var(--success);
  display: flex;
  align-items: center;
  gap: 4px;
}

.chat-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 6px var(--success);
}

/* Chat Box */
.nelkom-chat-box {
  position: fixed;
  bottom: 6.5rem;
  right: 2rem;
  width: 410px;
  height: 580px;
  max-width: calc(100vw - 3rem);
  max-height: calc(100vh - 8rem);
  background: rgba(10, 16, 30, 0.96);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-xl);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.7), 0 0 35px rgba(0, 210, 255, 0.25);
  backdrop-filter: blur(20px);
  z-index: 999;
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: modalEnter 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.nelkom-chat-box.active {
  display: flex;
}

.nelkom-chat-header {
  padding: 1.1rem 1.4rem;
  background: rgba(15, 23, 42, 0.9);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.chat-header-avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0284c7 0%, #00d2ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.chat-header-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.chat-header-sub {
  font-size: 0.72rem;
  color: var(--accent);
}

.chat-header-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.2rem;
  transition: var(--transition);
}

.chat-header-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.nelkom-chat-messages {
  flex-grow: 1;
  padding: 1.2rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.chat-bubble {
  max-width: 86%;
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  line-height: 1.5;
  word-break: break-word;
}

.chat-bubble.bot {
  align-self: flex-start;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border-subtle);
  color: #e2e8f0;
  border-bottom-left-radius: 4px;
}

.chat-bubble.user {
  align-self: flex-end;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #fff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.3);
}

.chat-typing {
  display: flex;
  gap: 4px;
  padding: 0.8rem 1.2rem;
}

.chat-typing .dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out;
}

.chat-typing .dot:nth-child(2) { animation-delay: 0.2s; }
.chat-typing .dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1.1); opacity: 1; }
}

.nelkom-chat-prompts {
  padding: 0.5rem 1rem;
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.nelkom-chat-prompts::-webkit-scrollbar { display: none; }

.chat-prompt-btn {
  white-space: nowrap;
  padding: 0.35rem 0.75rem;
  background: rgba(2, 132, 199, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 9999px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.chat-prompt-btn:hover {
  background: rgba(2, 132, 199, 0.25);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.nelkom-chat-input-bar {
  padding: 0.9rem 1.1rem;
  background: rgba(15, 23, 42, 0.9);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  gap: 0.6rem;
}

.chat-input-field {
  flex-grow: 1;
  background: rgba(6, 11, 22, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.7rem 1rem;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.9rem;
}

.chat-input-field:focus {
  outline: none;
  border-color: var(--accent);
}

.chat-send-btn {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #0284c7 0%, #00d2ff 100%);
  border: none;
  color: #040814;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.chat-send-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 14px rgba(0, 210, 255, 0.5);
}

@media (max-width: 768px) {
  .nelkom-chat-toggle {
    bottom: 1rem;
    right: 1rem;
    padding: 0.5rem;
  }
  .chat-toggle-label { display: none; }
  .nelkom-chat-box {
    bottom: 4.5rem;
    right: 1rem;
    width: calc(100vw - 2rem);
    height: 75vh;
  }
}
