/* ==========================================================================
   COMPONENTS (PREMIUM LIGHT B2B DESIGN SYSTEM)
   ========================================================================== */

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  user-select: none;
  border: 1px solid transparent;
}

.btn-primary,
.btn-accent {
  background: #FFFFFF;
  color: #070B14;
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 1),
    0 1px 2px rgba(0, 0, 0, 0.2),
    0 8px 24px -4px rgba(255, 255, 255, 0.22),
    0 4px 12px rgba(0, 0, 0, 0.4);
  font-family: var(--font-heading, 'Unbounded', sans-serif);
  font-weight: 700;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.btn-primary:hover,
.btn-accent:hover {
  background: #F8FAFC;
  color: #000000;
  border-color: #FFFFFF;
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 1),
    0 0 32px rgba(255, 255, 255, 0.45),
    0 12px 28px -4px rgba(0, 0, 0, 0.5);
  transform: translateY(-2px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: #F8FAFC;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.1), var(--shadow-xs);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.18), var(--shadow-sm);
}

.btn-ghost {
  background-color: transparent;
  color: var(--text-primary);
}

.btn-ghost:hover {
  background-color: rgba(15, 23, 42, 0.05);
  color: var(--accent);
}

.btn-lg {
  padding: 18px 36px;
  font-size: 1.05rem;
  border-radius: var(--radius-lg);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.btn-icon {
  width: 20px;
  height: 20px;
  transition: transform var(--transition-fast);
}

.btn:hover .btn-icon {
  transform: translateX(3px);
}

/* --- Badges & Indicators --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  letter-spacing: 0.02em;
}

.badge-live {
  background-color: rgba(16, 185, 129, 0.15);
  color: #10B981;
  border: 1px solid rgba(16, 185, 129, 0.35);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.15);
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #10B981;
  box-shadow: 0 0 8px #10B981;
  animation: pulseLive 2s infinite ease-in-out;
}

@keyframes pulseLive {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.7; }
}

.badge-danger {
  background-color: rgba(239, 68, 68, 0.15);
  color: #EF4444;
  border: 1px solid rgba(239, 68, 68, 0.35);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.15);
}

.badge-warning {
  background-color: rgba(245, 158, 11, 0.15);
  color: #F59E0B;
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.15);
}

.badge-accent {
  background: rgba(0, 240, 255, 0.12);
  color: #00F0FF;
  border: 1px solid rgba(0, 240, 255, 0.35);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.15);
}

/* --- Cards --- */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.card:hover {
  border-color: #CBD5E1;
  box-shadow: var(--shadow-md);
}

.card-elevated {
  box-shadow: var(--shadow-lg);
  border-color: rgba(15, 23, 42, 0.08);
}

.card-accent-border {
  border-top: 3px solid var(--accent);
}

/* --- Forms & Inputs --- */
.form-group {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background-color: rgba(15, 23, 42, 0.95);
  color: #FFFFFF;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

.form-select option {
  background-color: var(--bg-main);
  color: var(--text-primary);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: #00F0FF;
  box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.2), 0 0 16px rgba(0, 240, 255, 0.15);
  background-color: rgba(15, 23, 42, 0.92);
  color: #FFFFFF;
}

.form-input::placeholder, .form-textarea::placeholder {
  color: rgba(148, 163, 184, 0.6);
}

/* Chrome/Safari Autofill dark fix */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 40px #0F172A inset !important;
  -webkit-text-fill-color: #FFFFFF !important;
  caret-color: #00F0FF !important;
  transition: background-color 5000s ease-in-out 0s;
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* --- Interactive Slider (Range Input) --- */
.range-slider-wrapper {
  margin-top: 10px;
  margin-bottom: 8px;
}

.range-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: var(--bg-subtle);
  outline: none;
  cursor: pointer;
  position: relative;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid #FFFFFF;
  box-shadow: 0 2px 6px rgba(12, 30, 60, 0.35);
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.18);
  background: var(--accent);
}

.range-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid #FFFFFF;
  box-shadow: 0 2px 6px rgba(12, 30, 60, 0.35);
  cursor: pointer;
}

/* --- Filter Tabs --- */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 40px;
}

.filter-tab {
  padding: 10px 20px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.filter-tab:hover {
  color: var(--text-primary);
  border-color: #CBD5E1;
  background: var(--bg-surface-alt);
}

.filter-tab.active {
  color: #FFFFFF;
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(12, 30, 60, 0.2);
}

/* --- Accordion (FAQ - Exact Mockup Match) --- */
.accordion {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 880px;
  margin: 0 auto;
}

.accordion-item {
  background: #060e1d;
  border: 1.5px solid rgba(0, 140, 255, 0.22);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.accordion-item:hover {
  border-color: rgba(0, 180, 255, 0.45);
  box-shadow: 0 4px 25px rgba(0, 140, 255, 0.15);
}

.accordion-item.active {
  background: #08162e;
  border: 2px solid #00F0FF;
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.35), inset 0 0 15px rgba(0, 240, 255, 0.06);
}

.accordion-header {
  padding: 20px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  cursor: pointer;
  user-select: none;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: #FFFFFF;
  transition: color 0.2s ease;
}

.accordion-header span {
  flex: 1 1 auto;
  line-height: 1.4;
}

.accordion-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(0, 150, 255, 0.35);
  background: rgba(0, 30, 60, 0.5);
  color: #38BDF8;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.accordion-plus-icon {
  width: 16px;
  height: 16px;
  display: block;
}

.accordion-icon-vert {
  transform-origin: center;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.accordion-item.active .accordion-icon {
  border: 1.5px solid #00F0FF;
  background: rgba(0, 240, 255, 0.15);
  color: #00F0FF;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.4);
}

.accordion-item.active .accordion-icon-vert {
  transform: rotate(90deg);
  opacity: 0;
}

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease-out, padding 0.35s ease-out;
  padding: 0 26px;
}

.accordion-item.active .accordion-body {
  max-height: 600px;
  padding: 0 26px 22px 26px;
}

.accordion-content {
  color: #94A3B8;
  font-size: 0.94rem;
  line-height: 1.65;
  border-top: 1px solid rgba(0, 150, 255, 0.12);
  padding-top: 14px;
}

/* --- Modal Overlay & Dialog --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-dialog {
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 40px;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-light);
  position: relative;
  transform: scale(0.95) translateY(10px);
  transition: transform var(--transition-normal);
}

.modal-overlay.active .modal-dialog {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-surface-alt);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.modal-close:hover {
  background: #E2E8F0;
  color: var(--text-primary);
  transform: rotate(90deg);
}

/* --- Toast Notifications --- */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-lg);
  padding: 16px 20px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 320px;
  max-width: 420px;
  pointer-events: auto;
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.toast-success {
  border-left: 4px solid var(--success);
}

.toast.toast-error {
  border-left: 4px solid var(--danger);
}

/* --- Floating WhatsApp Quick Action Button --- */
.floating-wa-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 26px rgba(37, 211, 102, 0.45), 0 2px 8px rgba(0, 0, 0, 0.4);
  z-index: 1020;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
  text-decoration: none;
  cursor: pointer;
}

.floating-wa-btn:hover {
  transform: scale(1.1) translateY(-3px);
  box-shadow: 0 12px 32px rgba(37, 211, 102, 0.65), 0 4px 12px rgba(0, 0, 0, 0.5);
}

.floating-wa-tooltip {
  position: absolute;
  right: 68px;
  background: rgba(15, 23, 42, 0.92);
  color: #FFFFFF;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.12);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateX(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.floating-wa-btn:hover .floating-wa-tooltip {
  opacity: 1;
  transform: translateX(0);
}


/* ==========================================================================
   HEADER NAVIGATION DROPDOWN: НАШИ НИШИ (УСПЕШНО РАБОТАЕМ)
   ========================================================================== */
.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-dropdown-toggle {
  background: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-secondary, #94a3b8);
  transition: all 0.3s ease;
}

.nav-dropdown-toggle:hover,
.nav-dropdown:hover .nav-dropdown-toggle,
.nav-dropdown.active .nav-dropdown-toggle {
  color: #00F0FF;
}

.dropdown-chevron {
  width: 12px;
  height: 12px;
  transition: transform 0.25s ease;
  stroke: currentColor;
}

.nav-dropdown:hover .dropdown-chevron,
.nav-dropdown.active .dropdown-chevron {
  transform: rotate(180deg);
  color: #00F0FF;
}

/* Invisible bridge so hover doesn't break */
.nav-dropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 14px;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 380px;
  width: max-content;
  max-width: calc(100vw - 32px);
  background: rgba(10, 18, 36, 0.98);
  border: 1px solid rgba(0, 240, 255, 0.35);
  border-radius: 16px;
  padding: 10px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7), 0 0 25px rgba(0, 240, 255, 0.15);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  z-index: 1000;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown-head-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px 10px 8px;
  font-size: 0.74rem;
  font-weight: 800;
  color: #34D399;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 6px;
}

.nav-dropdown-live-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34D399;
  box-shadow: 0 0 8px #34D399;
  display: inline-block;
  animation: navPulse 2s infinite;
}

@keyframes navPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

.nav-dropdown-item:hover {
  background: rgba(0, 240, 255, 0.12);
  transform: translateX(4px);
}

.nav-dropdown-item.active {
  background: rgba(0, 240, 255, 0.18);
  border-left: 3px solid #00F0FF;
}

.nav-dropdown-item-icon {
  font-size: 1.35rem;
  flex-shrink: 0;
  line-height: 1;
}

.nav-dropdown-item-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 2px;
}

.nav-dropdown-item-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #FFFFFF;
  font-family: var(--font-heading, sans-serif);
  white-space: nowrap;
}

.nav-dropdown-badge-live {
  font-size: 0.68rem;
  font-weight: 800;
  color: #34D399;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.3);
  padding: 2px 8px;
  border-radius: 5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  display: inline-flex;
  align-items: center;
  line-height: 1.2;
}

.nav-dropdown-item-sub {
  font-size: 0.75rem;
  color: #94A3B8;
  line-height: 1.3;
}

.nav-dropdown-footer-note {
  margin-top: 6px;
  padding: 8px 8px 4px 8px;
  font-size: 0.72rem;
  color: #94A3B8;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}
