/* ============================================
   Charon Landing — Optimized Figma-based Design
   ============================================ */

/* --- Variables --- */
:root {
  /* Colors */
  --primary: #3b82f6;
  --primary-dark: #3276f2;
  --primary-hover: #2563eb;
  --accent: #635ffb;
  --purple: #a19ff3;
  --success: #10b981;
  --error: #ff3b30;

  /* Backgrounds */
  --bg-main: #f8fbff;
  --bg-white: #ffffff;
  --bg-light: #ebf1fa;
  --bg-gradient: linear-gradient(296deg, #edf3f7 0%, #edf0f7 55%, #edf3f7 100%);
  --bg-gradient-alt: linear-gradient(
    135deg,
    #edf3f7 0%,
    #edf0f7 55%,
    #edf3f7 100%
  );
  --bg-purple-gradient: linear-gradient(134.53deg, #3f1c79 -9%, #862f9a 75.35%);
  --bg-purple-gradient-hover: linear-gradient(
    134.53deg,
    #4a2389 -9%,
    #9a3aae 75.35%
  );
  --bg-purple-gradient-active: linear-gradient(
    134.53deg,
    #341367 -9%,
    #75267f 75.35%
  );

  /* Text */
  --text-dark: #0f172a;
  --text-secondary: #69749a;
  --text-muted: #5d6a88;
  --text-option: #555e70;

  /* Borders */
  --border-light: #ebf1fa;
  --border-blue: #c4d9ff;
  --border-input: #e2e8f0;
  --border-subtle: rgba(15, 23, 42, 0.15);

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-card: 0 10px 40px rgba(0, 0, 0, 0.15);
  --shadow-dropdown:
    0px 0px 32px rgba(68, 83, 113, 0.1), 0px 32px 32px rgba(68, 83, 113, 0.05);
  --shadow-focus: 0 0 0 3px rgba(50, 118, 242, 0.2);
  --outline-focus: 2px solid rgba(50, 118, 242, 0.35);

  /* Radius */
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 32px;
  --radius-xl: 60px;
  --radius-full: 105px;

  /* Spacing */
  --section-padding: 100px 0;
  --container-max: 1560px;

  /* Fonts */
  --font-main:
    "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display:
    "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-smooth: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-main);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-dark);
  background-color: var(--bg-main);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a:hover {
  color: var(--primary);
}

ul,
ol {
  list-style: none;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
}

/* --- Container --- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Typography --- */
h1,
h2,
h3,
h4 {
  font-weight: 700;
  line-height: 1.1;
  color: var(--text-dark);
}

h1 {
  font-size: clamp(36px, 6vw, 74px);
}

h2 {
  font-size: clamp(32px, 5vw, 64px);
  margin-bottom: 16px;
}

h3 {
  font-size: clamp(20px, 3vw, 36px);
  font-weight: 500;
}

.text-accent {
  color: var(--primary);
}

.text-purple {
  color: var(--accent);
}

.text-center {
  text-align: center;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 500;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
  cursor: pointer;
  text-decoration: none;
}

/* Синяя кнопка с двойной рамкой */
.btn-primary {
  position: relative;
  background: var(--bg-light);
  border: 1px solid var(--border-blue);
  border-radius: var(--radius-full);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 16px;
  line-height: 120%;
  color: var(--bg-white);
  padding: 16px 20px;
  z-index: 1;
}

.btn-primary::before {
  content: "";
  position: absolute;
  inset: 8px;
  background: var(--primary-dark);
  border-radius: var(--radius-lg);
  z-index: -1;
  transition: background var(--transition-fast);
}

.btn-primary:hover::before {
  background: var(--primary-hover);
}

.btn-primary:hover {
  background: var(--primary-hover);
  color: var(--bg-white);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-primary:active::before {
  background: var(--primary);
}

.btn-primary:focus-visible {
  outline: var(--outline-focus);
  outline-offset: 2px;
}

/* Большая кнопка */
.btn-lg.btn-primary {
  font-size: 20px;
  padding: 28px 32px;
}

.btn-lg.btn-primary::before {
  inset: 12px;
}

/* Белая кнопка с обводкой */
.btn-outline,
.btn-header {
  position: relative;
  background: var(--bg-light);
  border: 1px solid var(--border-blue);
  border-radius: var(--radius-full);
  padding: 16px 20px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 16px;
  line-height: 120%;
  color: var(--text-dark);
  z-index: 1;
}

.btn-outline::before,
.btn-header::before {
  content: "";
  position: absolute;
  inset: 8px;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  z-index: -1;
  transition: all var(--transition-fast);
}

.btn-outline:hover,
.btn-header:hover {
  background: var(--bg-white);
  border-color: var(--primary-dark);
  color: var(--text-dark);
}

.btn-outline:active,
.btn-header:active {
  transform: scale(0.98);
  border-color: var(--primary);
}

.btn-outline:focus-visible,
.btn-header:focus-visible {
  outline: var(--outline-focus);
  outline-offset: 2px;
}

.full-width {
  width: 100%;
}

/* --- Header --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-light);
  padding: 20px 0;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 42px;
  height: 39px;
}

.logo-text {
  font-size: 35px;
  font-weight: 400;
  color: var(--text-dark);
}

.nav-links {
  display: none;
  gap: 60px;
}

.nav-links a {
  font-size: 20px;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.nav-links a:hover {
  color: var(--primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.header-contacts-link {
  font-size: 20px;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: color var(--transition-fast);
}

.header-contacts-link:hover {
  color: var(--primary);
}

/* Mobile header actions (hidden on desktop) */
.header-mobile-actions {
  display: none;
  align-items: center;
  gap: 16px;
}

/* Burger menu button */
.burger-menu {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.burger-menu span {
  display: block;
  width: 100%;
  height: 2px;
  background: #222222;
  border-radius: 1px;
  transition: all var(--transition-normal);
}

/* Mobile menu */
.mobile-menu {
  position: fixed;
  top: 81px;
  left: 0;
  right: 0;
  bottom: 0;
  background: #f8fbff;
  z-index: 999;
  overflow-y: auto;
}

.mobile-menu[hidden] {
  display: none;
}

.mobile-menu-content {
  display: flex;
  flex-direction: column;
  padding: 40px 16px;
  gap: 16px;
}

.mobile-menu-label {
  font-size: 20px;
  line-height: 120%;
  color: #69749a;
  margin-bottom: -8px;
}

.mobile-menu-card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mobile-menu-link {
  font-size: 20px;
  line-height: 120%;
  color: var(--text-dark);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.mobile-menu-link:hover {
  color: var(--primary);
}

.mobile-menu-separator {
  height: 0.5px;
  background: rgba(50, 50, 70, 0.15);
  border-radius: 2px;
}

.mobile-contact-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-contact-label {
  font-size: 16px;
  line-height: 120%;
  color: #69749a;
}

.mobile-contact-value {
  font-size: 20px;
  line-height: 120%;
  color: var(--text-dark);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.mobile-contact-value:hover {
  color: var(--primary);
}

.mobile-social-icons {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity var(--transition-fast);
}

.social-icon:hover {
  opacity: 0.8;
}

.social-telegram {
  border: 1px solid #0088cc;
}

.social-whatsapp {
  border: 1px solid #25d366;
}

.mobile-cta-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px 20px;
  margin-top: 16px;
  background: var(--bg-light);
  border: 1px solid var(--border-blue);
  border-radius: 105px;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.mobile-cta-btn span {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 16px 20px;
  background: var(--primary-dark);
  border-radius: 32px;
  font-size: 20px;
  line-height: 120%;
  color: var(--bg-white);
  transition: background var(--transition-fast);
}

.mobile-cta-btn:hover span {
  background: var(--primary-hover);
}

.mobile-cta-btn:active {
  transform: scale(0.98);
}

.mobile-cta-btn:active span {
  background: var(--primary);
}

.mobile-cta-btn:focus-visible {
  outline: var(--outline-focus);
  outline-offset: 2px;
}

/* --- Hero Section --- */
.hero {
  padding-top: 140px;
  padding-bottom: 100px;
  background: var(--bg-main);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 60px;
  align-items: center;
}

.hero-content h1 {
  margin-bottom: 40px;
}

.hero-features {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 40px;
}

.hero-feature {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.feature-icon {
  flex-shrink: 0;
}

.feature-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.feature-text strong {
  font-size: 24px;
  font-weight: 400;
  color: var(--text-dark);
}

.feature-text span {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.2;
}

.hero-image {
  display: flex;
  justify-content: center;
}

.hero-image img {
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  background: var(--bg-gradient);
}

/* Mobile hero image - hidden on desktop */
.hero-image-mobile {
  display: none;
}

.hero-image-mobile img {
  width: 100%;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  background: var(--bg-gradient);
}

/* --- Sections --- */
.section {
  padding: var(--section-padding);
}

.section-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 60px;
}

.section-header p {
  font-size: 20px;
  color: var(--text-secondary);
  margin-top: 16px;
}

.subtitle-with-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 48px;
  font-weight: 500;
  color: var(--text-muted);
}

.charon-inline-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-blue);
  font-size: 33px;
  font-weight: 400;
  color: var(--text-dark);
}

.charon-inline-badge svg {
  width: 39px;
  height: 37px;
}

/* --- Flow Diagram Section --- */
.flow-section {
  padding: 40px 0;
  overflow: hidden;
}

@media (max-width: 767px) {
  .flow-section {
    padding: 30px 0;
  }
}

.flow-diagram-wrapper {
  width: 100%;
  overflow: visible;
  padding: 40px 0;
}

.flow-diagram {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 0;
  width: 1400px;
  margin: 0 auto;
  padding: 0;
  transform-origin: center center;
}

.flow-block {
  position: relative;
  flex-shrink: 0;
}

.flow-title {
  font-size: clamp(28px, 4vw, 41px);
  font-weight: 500;
  margin-bottom: 24px;
  line-height: 1.2;
  text-align: center;
}

/* Messengers block */
.flow-messengers-block {
  z-index: 5;
  position: relative;
}

.flow-messengers-outer {
  background: var(--bg-light);
  border: 10px solid var(--border-blue);
  border-radius: 100px;
  padding: 10px;
  position: relative;
  z-index: 2;
}

.flow-messengers-inner {
  background: white;
  border-radius: 80px;
  padding: 40px 36px;
  border: 1px solid rgba(196, 217, 255, 0.7);
}

.messenger-icons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.messenger-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.messenger-icon {
  width: 105px;
  height: 105px;
  border-radius: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.messenger-icon.whatsapp {
  background: #2fc700;
}
.messenger-icon.telegram {
  background: #29a9eb;
}
.messenger-icon.wechat {
  background: #bebebe;
}

.messenger-item span {
  font-size: 21px;
  color: var(--text-dark);
}

.messenger-disabled {
  opacity: 0.6;
}

/* Wave connectors */
.flow-wave {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  z-index: 1;
}

.flow-wave-left {
  margin-left: -60px;
  margin-right: -50px;
}

.flow-wave-left svg {
  width: 200px;
  height: 345px;
}

.flow-wave-right {
  margin-left: -50px;
  margin-right: -100px;
  transform: scaleX(-1);
}

.flow-wave-right svg {
  width: 320px;
  height: 345px;
}

/* Center: Charon logo */
.flow-center {
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  padding: 20px 0;
  position: relative;
}

.flow-charon-box {
  width: 125px;
  height: 117px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #689ff9;
  border-radius: 14px;
  background: white;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.15);
  position: relative;
  z-index: 5;
}

.charon-icon {
  width: 66px;
  height: 61px;
}

/* Charon rays */
.charon-rays {
  display: flex;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  align-items: center;
  z-index: 1;
}

.charon-rays .ray {
  flex-shrink: 0;
}

.charon-rays-left {
  right: 100%;
  flex-direction: row;
  transform: translateY(-50%) scaleX(-1);
}

.charon-rays-right {
  left: 100%;
  flex-direction: row;
}

.charon-rays .ray:nth-child(1) {
  width: 12px;
  height: 45px;
}
.charon-rays .ray:nth-child(2) {
  width: 16px;
  height: 65px;
}
.charon-rays .ray:nth-child(3) {
  width: 20px;
  height: 85px;
}
.charon-rays .ray:nth-child(4) {
  width: 24px;
  height: 105px;
}
.charon-rays .ray:nth-child(5) {
  width: 28px;
  height: 125px;
}
.charon-rays .ray:nth-child(6) {
  width: 32px;
  height: 145px;
}

/* CRM block (hexagon) */
.flow-crm-block {
  z-index: 5;
  position: relative;
}

.flow-crm-hexagon {
  position: relative;
  width: 420px;
  height: 460px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.hexagon-bg,
.hexagon-inner {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.hexagon-bg {
  z-index: 1;
}
.hexagon-inner {
  z-index: 2;
}

.flow-crm-content {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 20px;
}

.flow-crm-content .flow-title {
  margin-bottom: 20px;
}

/* CRM icons pyramid layout */
.crm-icons-pyramid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  margin-top: 20px;
}

.crm-icons-row {
  display: flex;
  justify-content: center;
}

.crm-icons-row.crm-row-top {
  gap: 80px;
}
.crm-icons-row.crm-row-bottom {
  margin-top: 5px;
}

.crm-icon {
  width: 105px;
  height: 105px;
  border-radius: 50%;
  object-fit: cover;
}

.crm-bitrix {
  border-radius: 50%;
  overflow: hidden;
}

.crm-bitrix svg {
  display: block;
}

.crm-custom,
.crm-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid #2fc7f7;
  background: white;
}

.crm-custom span,
.crm-placeholder span {
  font-size: 15px;
  color: var(--text-dark);
}

.crm-custom strong {
  font-size: 30px;
  font-weight: 800;
  color: #0084bf;
}

.crm-placeholder {
  border-color: #ddd;
  background: #f5f5f5;
}

.crm-placeholder span {
  font-size: 12px;
  color: #999;
}

/* --- How It Works Section --- */
.how-section {
  background: var(--bg-main);
}

.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  margin-bottom: 60px;
}

.step-card {
  background: var(--bg-light);
  border: 12px solid var(--border-blue);
  border-radius: 111px;
  padding: 32px;
  text-align: left;
  position: relative;
  min-height: 450px;
}

.step-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--bg-white);
  border-radius: 100px;
}

.step-card > * {
  position: relative;
  z-index: 1;
}

.step-title {
  font-size: 37px;
  font-weight: 500;
  line-height: 1.1;
  margin-bottom: 16px;
}

.step-card p {
  font-size: 23px;
  color: var(--text-dark);
  line-height: 1.2;
}

.step-card .step-icon-big {
  position: absolute;
  bottom: 40px;
  right: 40px;
  opacity: 0.8;
}

/* --- Benefits Section --- */
.benefits-section {
  padding: 100px 20px;
  background: var(--bg-main);
}

.benefits-section .control-wrapper {
  max-width: 1558px;
  margin: 0 auto;
}

/* --- Efficiency Section --- */
.efficiency-section {
  background: var(--bg-main);
}

.efficiency-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: flex-start;
}

.efficiency-features {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.eff-feature {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.eff-icon {
  flex-shrink: 0;
}

.eff-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.eff-text strong {
  font-size: 24px;
  font-weight: 400;
  color: var(--text-dark);
}

.eff-text span {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.2;
}

.efficiency-image {
  background: var(--bg-light);
  border-radius: 45px;
  border: 9px solid var(--border-blue);
  overflow: hidden;
  padding: 12px;
}

.interface-window {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg-light);
}

.interface-window img {
  width: 100%;
  display: block;
  border-radius: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* --- Cases Section --- */
.cases-section {
  background: var(--bg-main);
}

.cases-carousel {
  position: relative;
}

.cases-slider {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}

/* Стопка карточек */
.cases-cards-stack {
  position: relative;
  width: 100%;
  max-width: 463px;
  height: 520px;
  margin: 0 auto;
}

.stack-card {
  position: absolute;
  width: 320px;
  height: 400px;
  border-radius: 40px;
  overflow: hidden;
  background: white;
  box-shadow: var(--shadow-card);
  transition: all var(--transition-smooth);
  cursor: pointer;
}

.stack-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.stack-label {
  position: absolute;
  top: 20px;
  left: 20px;
  right: 20px;
  background: white;
  padding: 16px 20px;
  border-radius: 24px;
}

.stack-label h4 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.stack-label p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Позиции карточек в стопке */
.stack-card-1 {
  z-index: 3;
  left: 0;
  top: 80px;
  transform: scale(1);
  opacity: 1;
}
.stack-card-2 {
  z-index: 2;
  left: 60px;
  top: 40px;
  transform: scale(0.95) rotate(2deg);
  opacity: 0.85;
}
.stack-card-3 {
  z-index: 1;
  left: 100px;
  top: 0;
  transform: scale(0.9) rotate(4deg);
  opacity: 0.7;
}

/* Слайд 1 - Логистика */
.cases-carousel[data-active="1"] .stack-card-1 {
  z-index: 2;
  left: 60px;
  top: 40px;
  transform: scale(0.95) rotate(2deg);
  opacity: 0.85;
}
.cases-carousel[data-active="1"] .stack-card-2 {
  z-index: 3;
  left: 0;
  top: 80px;
  transform: scale(1) rotate(0deg);
  opacity: 1;
}
.cases-carousel[data-active="1"] .stack-card-3 {
  z-index: 1;
  left: 100px;
  top: 0;
  transform: scale(0.9) rotate(4deg);
  opacity: 0.7;
}

/* Слайд 2 - Финансы */
.cases-carousel[data-active="2"] .stack-card-1 {
  z-index: 1;
  left: 100px;
  top: 0;
  transform: scale(0.9) rotate(4deg);
  opacity: 0.7;
}
.cases-carousel[data-active="2"] .stack-card-2 {
  z-index: 2;
  left: 60px;
  top: 40px;
  transform: scale(0.95) rotate(2deg);
  opacity: 0.85;
}
.cases-carousel[data-active="2"] .stack-card-3 {
  z-index: 3;
  left: 0;
  top: 80px;
  transform: scale(1) rotate(0deg);
  opacity: 1;
}

/* Hover на передней карточке */
.cases-carousel[data-active="0"] .stack-card-1:hover,
.cases-carousel[data-active="1"] .stack-card-2:hover,
.cases-carousel[data-active="2"] .stack-card-3:hover {
  transform: scale(1.02) rotate(0deg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

/* Результаты - слайдер */
.case-results-wrapper {
  position: relative;
  min-height: 400px;
}

.case-slide {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--transition-smooth);
}

.case-slide.active {
  position: relative;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.case-results-title {
  font-size: 28px;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 24px;
  line-height: 1.3;
}

/* Индикаторы */
.cases-dots {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 40px;
}

.case-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  background: transparent;
  cursor: pointer;
  transition:
    background var(--transition-normal),
    transform var(--transition-normal);
}

.case-dot:hover {
  transform: scale(1.2);
}
.case-dot.active {
  background: var(--primary);
}

.case-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.case-list li {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.case-icon {
  flex-shrink: 0;
}

.case-list li strong {
  display: block;
  font-size: 24px;
  font-weight: 400;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.case-list li span {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.2;
}

/* Mobile cases carousel - hidden by default */
.cases-mobile-carousel {
  display: none;
}

/* --- Control Section --- */
.control-section {
  padding: 100px 0;
  background: var(--bg-main);
}

.control-wrapper {
  max-width: 1558px;
  margin: 0 auto;
  padding: 60px 40px;
  background: var(--bg-gradient-alt);
  border-radius: var(--radius-xl);
  border: 3px solid rgba(196, 217, 255, 0.2);
  overflow: hidden;
}

.control-title {
  text-align: center;
  font-size: 64px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.1;
  margin-bottom: 60px;
}

.control-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  padding: 0 20px;
}

.control-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 40px 32px;
  min-height: 442px;
  position: relative;
  overflow: hidden;
  transition:
    transform var(--transition-normal),
    box-shadow var(--transition-normal);
}

.control-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.control-card h3 {
  font-size: 32px;
  font-weight: 500;
  color: var(--text-dark);
  line-height: 1.1;
  margin-bottom: 16px;
}

.control-card p {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.2;
  max-width: 90%;
}

.control-card-image {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 180px;
  height: 180px;
}

.control-card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* --- Pricing Section --- */
.pricing-section {
  background: var(--bg-main);
}

.pricing-calculator {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  background: transparent;
  max-width: 1558px;
  margin: 0 auto;
}

.calc-left-column {
  display: contents;
}

.calc-controls {
  order: 1;
}

.calc-result {
  order: 2;
}

.license-banner {
  order: 3;
}

.calc-controls {
  padding: 40px;
  background: var(--bg-white);
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border-input);
  border-radius: 44px;
}

.calc-section-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-dark);
  text-align: center;
  margin-bottom: 24px;
}

.period-selector,
.volume-selector {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  width: 100%;
}

.calc-divider {
  height: 1px;
  background: var(--border-light);
  margin: 32px 0;
}

.period-toggles {
  display: flex;
  align-items: center;
  padding: 6px;
  background: var(--bg-main);
  border: 1px solid var(--border-subtle);
  border-radius: 23px;
  width: 100%;
  justify-content: center;
  gap: 4px;
}

.p-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: transparent;
  border-radius: 18px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(14px, 1.5vw, 20px);
  line-height: 120%;
  color: #363636;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  flex-shrink: 1;
  min-width: 0;
}

.p-btn:hover:not(.active) {
  background: var(--bg-light);
}

.p-btn.active {
  background: var(--primary-dark);
  color: var(--bg-white);
  font-weight: 600;
}

.p-btn:focus-visible {
  outline: var(--outline-focus);
  outline-offset: 2px;
}

.discount-tag {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 5px 8px;
  gap: 6px;
  background: var(--success);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(11px, 1.2vw, 14px);
  line-height: 120%;
  color: var(--bg-white);
  white-space: nowrap;
  flex-shrink: 0;
}

.p-btn:not(.active) .discount-tag {
  background: var(--bg-white);
  color: var(--success);
}

.volume-slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 5px;
  background: var(--border-light);
  outline: none;
  margin-bottom: 16px;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  border: 3px solid white;
  box-shadow: 0 0 0 2px var(--primary);
}

.volume-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  border: 3px solid white;
  box-shadow: 0 0 0 2px var(--primary);
}

.volume-steps {
  display: flex;
  justify-content: space-between;
  width: 100%;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
}

.volume-steps span {
  cursor: pointer;
  transition: color var(--transition-fast);
}

.volume-steps span:hover {
  color: var(--primary);
}

/* Правый блок - результат */
.calc-result {
  padding: 40px;
  background: var(--bg-white);
  border: 9px solid var(--border-blue);
  border-radius: 44px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.savings-badge {
  position: absolute;
  top: 28px;
  right: 28px;
  background: #d8fff2;
  color: #10b981;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 400;
  font-size: 24px;
  line-height: 120%;
  border: 1px solid #10b981;
}

.price-display {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 40px;
  margin-bottom: 8px;
}

.price-amount {
  font-size: 64px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 110%;
}

.price-currency {
  font-size: 40px;
  font-weight: 700;
  color: var(--text-dark);
}

.billing-cycle {
  font-size: 24px;
  color: var(--text-muted);
  font-weight: 400;
}

.competitor-comparison {
  font-size: 24px;
  line-height: 120%;
  color: #69749a;
  font-weight: 400;
}

.comp-price {
  text-decoration: line-through;
  color: var(--text-dark);
  font-weight: 600;
  margin-left: 5px;
}

.result-features {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 0;
  padding: 32px 0;
  border-top: 1px solid var(--border-light);
  flex-grow: 1;
}

.result-features li {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 20px;
  line-height: 120%;
  letter-spacing: -0.01em;
  color: var(--text-dark);
  font-weight: 400;
}

.feature-star,
.feature-icon-box {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.feature-icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-white);
  border: 1px solid var(--border-blue);
  border-radius: 16px;
}

.feature-icon-box svg {
  width: 24px;
  height: auto;
}

.calc-result-header {
  display: contents;
}

.calc-result .btn-primary {
  margin-top: auto;
}

.enterprise-link {
  text-align: center;
  font-size: 20px;
  color: var(--text-secondary);
}

.enterprise-link a {
  transition: color var(--transition-fast);
}

.enterprise-link a:hover {
  color: var(--primary);
}

/* --- Personal License Banner --- */
.license-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 32px 40px;
  background: linear-gradient(182.57deg, #35438f -14.88%, #7726b9 104.14%);
  border-radius: 44px;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
  position: relative;
  overflow: hidden;
  min-height: 340px;
}

.license-banner__content {
  flex: 1;
  max-width: 500px;
}

.license-banner__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 32px;
  line-height: 110%;
  color: var(--bg-white);
  margin-bottom: 24px;
}

.license-banner__features {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.license-banner__features li {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 20px;
  line-height: 120%;
  letter-spacing: -0.01em;
  color: #dbdbdb;
}

.license-star {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  display: block;
}

.license-banner__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: #f2ebfa;
  border: 1px solid var(--border-blue);
  border-radius: 105px;
  text-decoration: none;
  transition: background var(--transition-fast);
}

.license-banner__btn span {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 40px;
  background: var(--bg-purple-gradient);
  border-radius: 32px;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 20px;
  line-height: 120%;
  color: var(--bg-white);
  white-space: nowrap;
  transition: background var(--transition-fast);
}

.license-banner__btn:hover {
  background: var(--bg-purple-gradient);
}

.license-banner__btn:hover span {
  background: var(--bg-purple-gradient-hover);
}

.license-banner__btn:active {
  transform: scale(0.98);
  background: var(--bg-purple-gradient-active);
}

.license-banner__btn:active span {
  background: var(--bg-purple-gradient-active);
}

.license-banner__btn:focus-visible {
  outline: var(--outline-focus);
  outline-offset: 2px;
}

.license-banner__image {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.license-banner__image img {
  width: 180px;
  height: 180px;
  object-fit: contain;
}

/* --- FAQ Section --- */
.faq-section {
  background: var(--bg-main);
}

.faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  font-size: 24px;
  font-weight: 400;
  color: var(--text-dark);
  background: transparent;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.faq-question:hover {
  background: var(--bg-light);
}

.faq-chevron {
  flex-shrink: 0;
  transition: transform var(--transition-normal);
}

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition:
    max-height var(--transition-normal),
    padding var(--transition-normal);
}

.faq-item.open .faq-answer {
  max-height: 300px;
  padding: 0 24px 20px;
}

.faq-answer p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* --- CTA Section --- */
.cta-section {
  background: var(--bg-main);
}

.cta-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}

.cta-image {
  background: linear-gradient(180deg, #93c5fd 0%, #dbeafe 100%);
  border-radius: 40px;
  overflow: hidden;
}

.cta-monitor-wrapper {
  position: relative;
  width: 100%;
}

.cta-bg {
  width: 100%;
  display: block;
}

.cta-screen {
  position: absolute;
  top: 20%;
  left: 17%;
  width: 64%;
  height: auto;
  border-radius: 4px;
}

.cta-form-wrapper {
  max-width: 572px;
}

.cta-form-wrapper h3 {
  font-size: 32px;
  font-weight: 500;
  margin-bottom: 32px;
}

.cta-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* --- Form inputs --- */
.input-group input,
.input-group select {
  width: 100%;
  box-sizing: border-box;
  padding: 16px;
  background: var(--bg-white);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-sm);
  font-size: 16px;
  line-height: 20px;
  color: var(--text-secondary);
  outline: none;
  transition: border-color var(--transition-fast);
}

.input-group select {
  padding-right: 44px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 7.5L10 12.5L15 7.5' stroke='%23939BAD' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 20px 20px;
}

.input-group input::placeholder {
  color: var(--text-secondary);
}

.input-group input:hover,
.input-group select:hover {
  border-color: var(--border-blue);
}

.input-group input:focus,
.input-group select:focus {
  border-color: var(--primary-dark);
  box-shadow: none;
}

.input-group select:focus {
  background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 12.5L10 7.5L15 12.5' stroke='%23939BAD' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.input-group input.error,
.input-group select.error {
  border-color: var(--error);
}

.input-group .error-message {
  font-size: 12px;
  line-height: 16px;
  color: var(--error);
  margin-top: 8px;
  display: flex;
  align-items: center;
}

.input-group select option {
  font-size: 16px;
  color: var(--text-option);
  padding: 8px 12px;
  background: var(--bg-white);
}

.input-group select option:checked {
  background: rgba(192, 213, 250, 0.19);
  color: var(--primary-dark);
}
.input-group select option:disabled {
  color: #858fa3;
  opacity: 0.6;
}

/* Consent Checkbox */
.consent-group {
  margin-top: 8px;
}

.consent-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.consent-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.consent-checkbox {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-input);
  border-radius: 6px;
  background: var(--bg-white);
  transition: all var(--transition-fast);
  position: relative;
  margin-top: 1px;
}

.consent-checkbox::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 6px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.consent-label input[type="checkbox"]:checked + .consent-checkbox {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.consent-label input[type="checkbox"]:checked + .consent-checkbox::after {
  opacity: 1;
}
.consent-label:hover .consent-checkbox {
  border-color: var(--border-blue);
}
.consent-label input[type="checkbox"]:focus + .consent-checkbox {
  box-shadow: var(--shadow-focus);
}

.consent-text {
  font-size: 14px;
  line-height: 1.4;
  color: var(--text-secondary);
}

.consent-text a {
  color: var(--primary);
  text-decoration: underline;
}

.consent-text a:hover {
  text-decoration: none;
}

.consent-error {
  display: block;
  margin-top: 8px;
  margin-left: 32px;
  font-size: 12px;
  color: var(--error);
}

.consent-group.error .consent-checkbox {
  border-color: var(--error);
}

.form-status {
  margin-top: 16px;
  font-size: 14px;
  font-weight: 500;
}

.form-status.success {
  color: #059669;
  background: #ecfdf5;
  padding: 12px;
  border-radius: 8px;
}

.form-status.error {
  color: #ef4444;
  background: #fef2f2;
  padding: 12px;
  border-radius: 8px;
}

/* --- Custom Select (cselect) --- */
.cselect {
  position: relative;
  width: 100%;
}

.cselect__trigger {
  width: 100%;
  box-sizing: border-box;
  padding: 16px 44px 16px 16px;
  background: var(--bg-white);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-sm);
  font-size: 16px;
  line-height: 20px;
  color: var(--text-secondary);
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cselect__trigger:hover {
  border-color: var(--border-blue);
}
.cselect.is-open .cselect__trigger {
  border-color: var(--primary-dark);
}
.cselect.error .cselect__trigger {
  border-color: var(--error);
}

.cselect__value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cselect__chevron {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 7.5L10 12.5L15 7.5' stroke='%23939BAD' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  transition: transform var(--transition-fast);
}

.cselect.is-open .cselect__chevron {
  transform: rotate(180deg);
}

.cselect__menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  background: var(--bg-white);
  box-shadow: var(--shadow-dropdown);
  border-radius: var(--radius-sm);
  flex-direction: column;
  padding: 8px 10px;
  gap: 4px;
  z-index: 999;
  max-height: 240px;
  overflow: auto;
  display: none;
}

.cselect.is-open .cselect__menu {
  display: flex;
}

.cselect__option {
  width: 100%;
  height: 32px;
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 16px;
  color: var(--text-option);
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
}

.cselect__option:hover,
.cselect__option.is-active,
.cselect__option[aria-selected="true"] {
  background: rgba(192, 213, 250, 0.19);
  color: var(--primary-dark);
}

.cselect__trigger:focus-visible,
.cselect__option:focus-visible {
  outline: var(--outline-focus);
  outline-offset: 2px;
}

/* --- Footer --- */
.footer {
  background: var(--bg-white);
  border-top: 1px solid var(--border-light);
  padding: 60px 0 20px;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand .logo {
  margin-bottom: 16px;
}

.footer-links {
  display: flex;
  gap: 100px;
  flex-wrap: wrap;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col h4 {
  font-size: 24px;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.footer-col a {
  font-size: 20px;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.footer-col a:hover {
  color: var(--primary);
}

.footer-bottom {
  text-align: left;
  font-size: 20px;
  color: var(--text-secondary);
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
}

/* --- Cookie Banner --- */
.cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: 900px;
  width: calc(100% - 40px);
  padding: 20px 28px;
  background: var(--bg-white);
  border: 1px solid var(--border-blue);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.15);
  animation: cookieSlideUp 0.4s ease-out;
}

@keyframes cookieSlideUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.cookie-banner.hidden {
  display: none;
}

.cookie-banner__text {
  flex: 1;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-dark);
}

.cookie-banner__btn {
  flex-shrink: 0;
  position: relative;
  background: var(--bg-light);
  border: 1px solid var(--border-blue);
  border-radius: var(--radius-full);
  padding: 14px 24px;
  font-weight: 500;
  font-size: 15px;
  line-height: 120%;
  color: var(--bg-white);
  cursor: pointer;
  transition: all var(--transition-fast);
  z-index: 1;
}

.cookie-banner__btn::before {
  content: "";
  position: absolute;
  inset: 6px;
  background: var(--primary-dark);
  border-radius: var(--radius-lg);
  z-index: -1;
  transition: background var(--transition-fast);
}

.cookie-banner__btn:hover {
  background: var(--primary-dark);
}

.cookie-banner__btn:hover::before {
  background: var(--primary-hover);
}

.cookie-banner__btn:active {
  transform: scale(0.98);
}

.cookie-banner__btn:active::before {
  background: var(--primary);
}

.cookie-banner__btn:focus-visible {
  outline: var(--outline-focus);
  outline-offset: 2px;
}

/* --- Animations --- */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.8s ease-out,
    transform 0.8s ease-out;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-100 {
  transition-delay: 0.1s;
}
.delay-200 {
  transition-delay: 0.2s;
}

/* --- Scroll margin --- */
section[id] {
  scroll-margin-top: 100px;
}

/* ============================================
   RESPONSIVE STYLES
   ============================================ */

/* --- Tablet and up (768px+) --- */
@media (min-width: 768px) {
  .container {
    padding: 0 40px;
  }
  .steps-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .benefits-section {
    padding: 100px 40px;
  }
}

/* --- Medium screens (900px+) --- */
@media (min-width: 900px) {
  .pricing-calculator {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto;
    align-items: stretch;
  }

  .calc-mode-toggle-row {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .calc-controls {
    order: unset;
    grid-column: 1;
    grid-row: 2;
  }

  .calc-result {
    order: unset;
    grid-column: 2;
    grid-row: 2 / 4;
    display: flex;
    flex-direction: column;
  }

  .license-banner {
    order: unset;
    grid-column: 1;
    grid-row: 3;
  }
}

@media (min-width: 900px) and (max-width: 1100px) {
  .period-toggles {
    padding: 4px;
    gap: 2px;
  }
  .p-btn {
    padding: 8px 10px;
    font-size: 13px;
    min-height: 38px;
    gap: 4px;
  }
  .discount-tag {
    padding: 3px 6px;
    font-size: 11px;
  }
  .calc-controls {
    padding: 30px 20px;
  }
}

/* --- Desktop navigation (992px+) --- */
@media (min-width: 992px) {
  .nav-links {
    display: flex;
  }
}

/* --- Desktop layouts (1024px+) --- */
@media (min-width: 1024px) {
  .efficiency-grid {
    grid-template-columns: 1fr 1.3fr;
  }
  .cases-slider {
    grid-template-columns: 500px 1fr;
  }
  .cta-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* --- Large desktop (1200px+) --- */
@media (min-width: 1200px) {
  .hero-grid {
    grid-template-columns: 1fr 1fr;
  }

  .control-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* --- Flow diagram responsive scaling using zoom --- */
@media (max-width: 1440px) {
  .flow-diagram-wrapper {
    display: flex;
    justify-content: center;
  }
  .flow-diagram {
    zoom: 0.95;
  }
}

@media (max-width: 1300px) {
  .flow-diagram {
    zoom: 0.85;
  }
}

@media (max-width: 1199px) {
  .flow-diagram {
    zoom: 0.75;
  }
}

@media (max-width: 1024px) {
  .flow-diagram {
    zoom: 0.62;
  }
}

@media (max-width: 900px) {
  .flow-diagram {
    zoom: 0.52;
  }
}

@media (max-width: 767px) {
  .flow-diagram {
    flex-direction: column;
    width: 100%;
    max-width: 500px;
    transform: scale(0.95);
  }

  .flow-wave {
    margin: -60px 0;
  }

  .flow-wave-left {
    margin-left: 0;
    margin-right: 0;
    order: 1;
  }

  .flow-wave-left svg {
    width: 345px;
    height: 200px;
    transform: rotate(90deg);
  }

  .flow-wave-right {
    margin-left: 0;
    margin-right: 0;
    order: 3;
  }

  .flow-wave-right svg {
    width: 345px;
    height: 320px;
    transform: rotate(90deg) scaleX(-1);
  }

  .flow-messengers-block {
    order: 0;
    transform: scale(1.3);
    margin-bottom: 185px;
  }

  .flow-center {
    order: 2;
    padding: 0;
  }

  .flow-crm-block {
    order: 4;
    transform: scale(1.3);
    margin-top: 40px;
  }

  /* Rotate charon rays for vertical layout */
  .charon-rays-left {
    right: auto;
    left: 50%;
    top: auto;
    bottom: 100%;
    flex-direction: column;
    transform: translateX(-50%) scaleY(-1);
  }

  .charon-rays-right {
    left: 50%;
    top: 100%;
    flex-direction: column;
    transform: translateX(-50%);
  }

  .charon-rays .ray {
    transform: rotate(90deg);
  }
}

@media (max-width: 600px) {
  .flow-diagram {
    max-width: 420px;
    transform: scale(0.85);
  }

  .flow-wave {
    margin: -50px 0;
  }

  .flow-wave-left svg {
    width: 300px;
    height: 180px;
    transform: rotate(90deg);
  }

  .flow-wave-right svg {
    width: 300px;
    height: 280px;
    transform: rotate(90deg) scaleX(-1);
  }

  .charon-rays-left {
    right: auto;
    left: 50%;
    top: auto;
    bottom: 100%;
    flex-direction: column;
    transform: translateX(-50%) scaleY(-1);
  }

  .charon-rays-right {
    left: 50%;
    top: 100%;
    flex-direction: column;
    transform: translateX(-50%);
  }

  .charon-rays .ray {
    transform: rotate(90deg);
  }

  .flow-messengers-block {
    transform: scale(1.3);
    margin-bottom: 185px;
  }

  .flow-crm-block {
    transform: scale(1.3);
    margin-top: 35px;
  }
}

@media (max-width: 480px) {
  .flow-diagram {
    max-width: 350px;
    transform: scale(0.75);
  }

  .flow-messengers-block {
    transform: scale(1.3);
    margin-bottom: 170px;
  }

  .flow-crm-block {
    transform: scale(1.3);
    margin-top: 30px;
  }

  .flow-wave {
    margin: -40px 0;
  }

  .flow-wave-left svg {
    width: 260px;
    height: 160px;
    transform: rotate(90deg);
  }

  .flow-wave-right svg {
    width: 260px;
    height: 240px;
    transform: rotate(90deg) scaleX(-1);
  }

  .charon-rays-left {
    right: auto;
    left: 50%;
    top: auto;
    bottom: 100%;
    flex-direction: column;
    transform: translateX(-50%) scaleY(-1);
  }

  .charon-rays-right {
    left: 50%;
    top: 100%;
    flex-direction: column;
    transform: translateX(-50%);
  }

  .charon-rays .ray {
    transform: rotate(90deg);
  }
}

@media (max-width: 380px) {
  .flow-diagram {
    max-width: 300px;
    transform: scale(0.68);
  }

  .flow-wave {
    margin: -35px 0;
  }

  .flow-wave-left svg {
    width: 220px;
    height: 140px;
    transform: rotate(90deg);
  }

  .flow-wave-right svg {
    width: 220px;
    height: 210px;
    transform: rotate(90deg) scaleX(-1);
  }

  .charon-rays-left {
    right: auto;
    left: 50%;
    top: auto;
    bottom: 100%;
    flex-direction: column;
    transform: translateX(-50%) scaleY(-1);
  }

  .charon-rays-right {
    left: 50%;
    top: 100%;
    flex-direction: column;
    transform: translateX(-50%);
  }

  .charon-rays .ray {
    transform: rotate(90deg);
  }

  .flow-messengers-block {
    transform: scale(1.3);
    margin-bottom: 180px;
  }

  .flow-crm-block {
    transform: scale(1.3);
    margin-top: 25px;
  }
}

/* --- Control section tablet (max 1200px) --- */
@media (max-width: 1200px) {
  .control-title {
    font-size: 48px;
  }
  .control-cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .control-card:last-child {
    grid-column: span 2;
    max-width: 500px;
    margin: 0 auto;
  }
}

/* --- Mobile header (max 991px) --- */
@media (max-width: 991px) {
  .header {
    padding: 0;
  }

  .header-container {
    height: 80px;
    padding: 0 16px;
  }

  .nav-links,
  .header-actions {
    display: none;
  }

  .header-mobile-actions {
    display: flex;
  }

  /* Mobile logo */
  .logo-icon {
    width: 27px;
    height: 25px;
  }

  .logo-text {
    font-size: 23px;
  }

  /* Mobile button with double border */
  .header-mobile-actions .btn-header {
    padding: 15px;
    background: var(--bg-light);
    border: 1px solid var(--border-blue);
    border-radius: 105px;
    font-size: 14px;
    line-height: 120%;
    color: var(--text-dark);
  }

  .header-mobile-actions .btn-header::before {
    inset: 7px;
    background: var(--bg-white);
    border-radius: 32px;
  }

  /* Burger menu */
  .burger-menu {
    width: 24px;
    height: 24px;
    justify-content: center;
  }

  .burger-menu span {
    width: 24px;
    height: 1.5px;
    background: #222222;
    position: absolute;
  }

  .burger-menu span:nth-child(1) {
    top: 8px;
  }

  .burger-menu span:nth-child(2) {
    top: 12px;
  }

  .burger-menu span:nth-child(3) {
    top: 16px;
  }

  /* Burger active state (X) */
  .burger-menu.active span:nth-child(1) {
    top: 11px;
    transform: rotate(45deg);
  }

  .burger-menu.active span:nth-child(2) {
    opacity: 0;
  }

  .burger-menu.active span:nth-child(3) {
    top: 11px;
    transform: rotate(-45deg);
  }
}

/* --- Tablet cases (max 1023px) --- */
@media (max-width: 1023px) {
  .cases-slider {
    flex-direction: column;
    gap: 30px;
  }
  .cases-cards-stack {
    height: 400px;
    max-width: 100%;
  }
  .stack-card {
    width: 260px;
    height: 340px;
  }
  .stack-label h4 {
    font-size: 20px;
  }
  .stack-label p {
    font-size: 12px;
  }

  .stack-card-1 {
    left: 0;
    top: 60px;
  }
  .stack-card-2 {
    left: 40px;
    top: 30px;
  }
  .stack-card-3 {
    left: 80px;
    top: 0;
  }

  .cases-carousel[data-active="1"] .stack-card-1 {
    left: 40px;
    top: 30px;
  }
  .cases-carousel[data-active="1"] .stack-card-2 {
    left: 0;
    top: 60px;
  }

  .cases-carousel[data-active="2"] .stack-card-1 {
    left: 80px;
    top: 0;
  }
  .cases-carousel[data-active="2"] .stack-card-2 {
    left: 40px;
    top: 30px;
  }
  .cases-carousel[data-active="2"] .stack-card-3 {
    left: 0;
    top: 60px;
  }

  .case-results-wrapper {
    min-height: auto;
  }
  .case-results-title {
    font-size: 22px;
  }
  .control-card-image {
    width: 140px;
    height: 140px;
  }
}

/* --- Mobile pricing (max 899px) --- */
@media (max-width: 899px) {
  .pricing-calculator {
    gap: 16px;
  }
  .calc-controls {
    padding: 30px 20px;
    border-radius: 30px;
  }
  .calc-result {
    padding: 30px 20px;
    border-radius: 30px;
    gap: 20px;
  }
  .price-amount {
    font-size: 48px;
  }
  .price-currency {
    font-size: 28px;
  }
  .billing-cycle {
    font-size: 18px;
  }
  .competitor-comparison {
    font-size: 18px;
  }
  .savings-badge {
    font-size: 18px;
    padding: 10px 16px;
    top: 20px;
    right: 20px;
  }
  .result-features {
    gap: 16px;
    padding: 24px 0;
  }
  .result-features li {
    font-size: 18px;
    gap: 12px;
  }
  .feature-icon-box {
    width: 40px;
    height: 40px;
  }
  .feature-icon-box svg {
    width: 20px;
  }
  .enterprise-link {
    font-size: 18px;
  }
  .period-toggles {
    padding: 4px;
    min-height: auto;
    gap: 2px;
  }
  .p-btn {
    padding: 10px 12px;
    font-size: 14px;
    min-height: 40px;
    gap: 6px;
  }
  .discount-tag {
    padding: 4px 6px;
    font-size: 12px;
  }
  .calc-section-title {
    font-size: 20px;
  }

  /* License banner tablet */
  .license-banner {
    padding: 28px;
    min-height: 300px;
    gap: 20px;
  }

  .license-banner__title {
    font-size: 26px;
    margin-bottom: 20px;
  }

  .license-banner__features {
    margin-bottom: 24px;
    gap: 10px;
  }

  .license-banner__features li {
    font-size: 16px;
    gap: 12px;
  }

  .license-banner__image img {
    width: 140px;
    height: 140px;
  }

  .license-banner__btn span {
    font-size: 18px;
    padding: 14px 36px;
  }

  .calc-controls {
    border-radius: 32px;
  }

  .license-banner {
    border-radius: 32px;
  }

  .calc-result {
    border-radius: 32px;
    border-width: 6px;
  }

  .pricing-calculator {
    gap: 16px;
  }
}

/* --- Mobile (max 767px) --- */
@media (max-width: 767px) {
  :root {
    --section-padding: 60px 0;
  }

  .section-header {
    margin-bottom: 40px;
  }

  .subtitle-with-badge {
    flex-direction: column;
    font-size: 32px;
  }
  .charon-inline-badge {
    font-size: 24px;
    margin-top: 16px;
  }

  /* Hero section mobile */
  .hero {
    padding-top: 100px;
    padding-bottom: 60px;
  }

  .hero-image {
    display: none;
  }

  .hero-image-mobile {
    display: block;
    margin-bottom: 24px;
  }

  .hero-content h1 {
    font-size: 32px;
    margin-bottom: 24px;
  }

  .hero-features {
    gap: 20px;
    margin-bottom: 32px;
  }

  .hero-feature {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 16px;
    gap: 16px;
  }

  .feature-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
  }

  .feature-icon svg {
    width: 48px;
    height: 48px;
  }

  .feature-text strong {
    font-size: 18px;
  }

  .feature-text span {
    font-size: 14px;
  }

  /* Steps */
  /* Steps horizontal scroll */
  .steps-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 16px;
    padding-bottom: 16px;
    margin-left: -20px;
    margin-right: -20px;
    padding-left: 20px;
    padding-right: 20px;
  }

  .steps-grid::-webkit-scrollbar {
    display: none;
  }

  .steps-grid {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .step-card {
    flex: 0 0 calc(100vw - 80px);
    max-width: 340px;
    min-height: 320px;
    padding: 24px;
    border-radius: 40px;
    border-width: 6px;
    scroll-snap-align: center;
    display: flex;
    flex-direction: column;
  }
  .step-card::before {
    border-radius: 30px;
  }
  .step-title {
    font-size: 28px;
  }
  .step-card .step-icon-big {
    position: absolute;
    bottom: 20px;
    right: 20px;
    margin-top: 0;
  }
  .step-icon-big svg {
    width: 80px;
    height: 80px;
  }

  /* Buttons mobile */
  .btn-primary,
  .btn-lg.btn-primary {
    width: 100%;
    padding: 24px;
    background: var(--bg-light);
    border: 1px solid var(--border-blue);
    border-radius: 105px;
    font-size: 20px;
  }

  .btn-primary::before,
  .btn-lg.btn-primary::before {
    inset: 12px;
    background: var(--primary-dark);
    border-radius: 32px;
  }

  /* Control */
  .control-wrapper {
    padding: 40px 20px;
    border-radius: 40px;
  }
  .control-title {
    font-size: 32px;
    margin-bottom: 40px;
  }
  .control-cards {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 0;
  }
  .control-card {
    border-radius: 40px;
    padding: 32px 24px;
    min-height: 350px;
  }
  .control-card:last-child {
    grid-column: span 1;
    max-width: 100%;
  }
  .control-card h3 {
    font-size: 17px;
  }

  /* Benefits */
  .benefits-section {
    padding: 60px 10px;
  }

  /* Cases - hide desktop version on mobile */
  .cases-carousel {
    display: none;
  }

  /* Cases - mobile swipeable carousel */
  .cases-mobile-carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 16px;
    padding-bottom: 16px;
    margin-left: -20px;
    margin-right: -20px;
    padding-left: 20px;
    padding-right: 20px;
  }

  .cases-mobile-carousel::-webkit-scrollbar {
    display: none;
  }

  .cases-mobile-carousel {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .case-mobile-slide {
    flex: 0 0 calc(100vw - 40px);
    max-width: 340px;
    scroll-snap-align: center;
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  .case-mobile-card {
    position: relative;
    width: 100%;
    height: 280px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
  }

  .case-mobile-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .case-mobile-label {
    position: absolute;
    top: 16px;
    left: 16px;
    right: 16px;
    background: white;
    padding: 12px 16px;
    border-radius: 16px;
  }

  .case-mobile-label h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
  }

  .case-mobile-label p {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.3;
  }

  .case-mobile-results {
    padding: 0;
  }

  .case-mobile-results .case-results-title {
    font-size: 18px;
    margin-bottom: 16px;
  }

  .case-mobile-results .case-list {
    gap: 16px;
  }

  .case-mobile-results .case-list li {
    gap: 12px;
  }

  .case-mobile-results .case-icon svg {
    width: 40px;
    height: 40px;
  }

  .case-mobile-results .case-list li strong {
    font-size: 16px;
  }

  .case-mobile-results .case-list li span {
    font-size: 13px;
  }

  .case-list li strong {
    font-size: 18px;
  }

  /* FAQ */
  .faq-question {
    font-size: 18px;
    padding: 16px;
  }

  /* CTA */
  .cta-form-wrapper h3 {
    font-size: 24px;
  }

  /* Footer */
  .footer-links {
    gap: 40px;
  }
  .footer-col h4 {
    font-size: 18px;
  }
  .footer-col a {
    font-size: 16px;
  }
  .footer-bottom {
    font-size: 16px;
  }
}

/* --- Cookie banner mobile (max 600px) --- */
@media (max-width: 600px) {
  .cookie-banner {
    flex-direction: column;
    gap: 16px;
    padding: 20px;
    bottom: 12px;
    width: calc(100% - 24px);
    border-radius: 24px;
  }
  .cookie-banner__text {
    text-align: center;
    font-size: 14px;
  }
  .cookie-banner__btn {
    width: 100%;
    padding: 16px 24px;
  }
}

/* --- Mobile pricing optimization (max 600px) --- */
@media (max-width: 600px) {
  .pricing-calculator {
    border-radius: 24px;
    box-shadow: none;
  }

  .calc-controls {
    padding: 24px 16px;
  }

  .calc-section-title {
    font-size: 18px;
    margin-bottom: 16px;
  }

  /* Period toggles - 2x2 grid on mobile */
  .period-toggles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 6px;
    gap: 6px;
    border-radius: 20px;
  }

  .p-btn {
    padding: 14px 12px;
    font-size: 15px;
    min-height: 48px;
    gap: 6px;
    border-radius: 14px;
    justify-content: center;
  }

  .p-btn.active {
    box-shadow: 0 2px 8px rgba(50, 118, 242, 0.3);
  }

  .discount-tag {
    padding: 4px 8px;
    font-size: 11px;
    border-radius: 8px;
  }

  .calc-divider {
    margin: 24px 0;
  }

  /* Volume slider */
  .volume-slider {
    height: 8px;
    margin-bottom: 12px;
  }

  .volume-slider::-webkit-slider-thumb {
    width: 28px;
    height: 28px;
  }

  .volume-slider::-moz-range-thumb {
    width: 28px;
    height: 28px;
  }

  .volume-steps {
    font-size: 16px;
    font-weight: 600;
  }

  /* Result block - Figma design */
  .calc-result {
    margin: 0;
    padding: 24px;
    background: var(--bg-white);
    border: 6px solid var(--border-blue);
    border-radius: 40px;
    gap: 16px;
  }

  /* Price header section */
  .calc-result-header {
    display: contents;
  }

  .savings-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 10px 16px;
    font-size: 16px;
  }

  .price-display {
    margin-top: 60px;
    margin-bottom: 6px;
  }

  .price-amount {
    font-size: 42px;
    font-weight: 700;
  }

  .price-currency {
    font-size: 28px;
    font-weight: 700;
  }

  .billing-cycle {
    font-size: 20px;
    font-weight: 400;
  }

  .competitor-comparison {
    font-size: 18px;
  }

  /* Features list */
  .result-features {
    gap: 16px;
    padding: 24px 0;
    margin: 0;
  }

  .result-features li {
    font-size: 18px;
    font-weight: 400;
    gap: 12px;
  }

  .feature-star,
  .feature-icon-box {
    width: 40px;
    height: 40px;
    background: var(--bg-white);
    border: 1px solid var(--border-blue);
    border-radius: 11px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .feature-icon-box svg {
    width: 19px;
    height: 21px;
  }

  /* CTA Button - double border style */
  .enterprise-link {
    font-size: 18px;
  }

  /* License banner mobile */
  .license-banner {
    flex-direction: column;
    padding: 24px 20px;
    border-radius: 24px;
    gap: 16px;
    min-height: auto;
    text-align: center;
  }

  .license-banner__content {
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .license-banner__title {
    font-size: 22px;
    margin-bottom: 16px;
  }

  .license-banner__features {
    gap: 8px;
    margin-bottom: 20px;
    align-items: flex-start;
    text-align: left;
  }

  .license-banner__features li {
    font-size: 14px;
    gap: 10px;
  }

  .license-star {
    width: 14px;
    height: 14px;
  }

  .license-banner__btn {
    padding: 10px;
    width: 100%;
  }

  .license-banner__btn span {
    padding: 14px 32px;
    font-size: 16px;
    width: 100%;
  }

  .license-banner__image {
    order: -1;
  }

  .license-banner__image img {
    width: 80px;
    height: 80px;
  }

  .calc-controls {
    border-radius: 24px;
  }

  .calc-result {
    border-radius: 24px;
    border-width: 5px;
  }

  .pricing-calculator {
    gap: 12px;
  }
}

/* --- Extra small screens (max 380px) --- */
@media (max-width: 380px) {
  .p-btn {
    padding: 12px 8px;
    font-size: 14px;
    min-height: 44px;
  }

  .discount-tag {
    padding: 3px 6px;
    font-size: 10px;
  }

  .calc-result {
    padding: 16px;
    border-radius: 20px;
    border-width: 4px;
    gap: 12px;
  }

  .price-amount {
    font-size: 32px;
  }

  .price-currency {
    font-size: 22px;
  }

  .billing-cycle {
    font-size: 16px;
  }

  .competitor-comparison {
    font-size: 14px;
  }

  .savings-badge {
    font-size: 14px;
    padding: 8px 12px;
    top: 16px;
    right: 16px;
  }

  .price-display {
    margin-top: 50px;
  }

  .result-features {
    gap: 12px;
    padding: 16px 0;
  }

  .result-features li {
    font-size: 14px;
    gap: 10px;
  }

  .feature-icon-box {
    width: 32px;
    height: 32px;
  }

  .feature-icon-box svg {
    width: 16px;
  }

  .enterprise-link {
    font-size: 14px;
  }

  /* License banner extra small */
  .license-banner {
    padding: 20px 16px;
    border-radius: 20px;
  }

  .license-banner__title {
    font-size: 18px;
    margin-bottom: 14px;
  }

  .license-banner__features li {
    font-size: 13px;
  }

  .license-banner__btn span {
    padding: 12px 24px;
    font-size: 14px;
  }

  .license-banner__image img {
    width: 60px;
    height: 60px;
  }

  .calc-controls {
    padding: 20px 16px;
    border-radius: 20px;
  }

  .calc-result {
    border-radius: 20px;
  }

  .pricing-calculator {
    gap: 10px;
  }
}

/* ============================================
   Modal Styles
   ============================================ */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal[hidden] {
  display: none;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
}

.modal-container {
  position: relative;
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-light);
  flex-shrink: 0;
}

.modal-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-dark);
  margin: 0;
}

.modal-close {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: 50%;
  font-size: 24px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--bg-white);
}

.modal-close:active {
  transform: scale(0.95);
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.modal-close:focus-visible {
  outline: var(--outline-focus);
  outline-offset: 2px;
}

.modal-content {
  padding: 32px;
  overflow-y: auto;
  flex: 1;
}

.modal-content h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-dark);
  margin: 24px 0 12px 0;
}

.modal-content h3:first-child {
  margin-top: 0;
}

.modal-content p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.modal-content ul {
  margin: 12px 0;
  padding-left: 24px;
  list-style: disc;
}

.modal-content li {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.modal-content strong {
  color: var(--text-dark);
}

/* Modal mobile styles */
@media (max-width: 768px) {
  .modal {
    padding: 10px;
  }

  .modal-container {
    max-height: 95vh;
    border-radius: var(--radius-md);
  }

  .modal-header {
    padding: 16px 20px;
  }

  .modal-title {
    font-size: 18px;
  }

  .modal-close {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    font-size: 20px;
    border-radius: 50%;
    flex-shrink: 0;
  }

  .modal-content {
    padding: 20px;
  }

  .modal-content h3 {
    font-size: 16px;
  }

  .modal-content p,
  .modal-content li {
    font-size: 14px;
  }
}

/* ============================================
   Messenger Widget Section
   ============================================ */
.messenger-widget-section {
  background: var(--bg-main);
}

.messenger-section-header {
  text-align: center;
  margin-bottom: 48px;
}

.messenger-new-badge {
  display: inline-block;
  padding: 6px 20px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius-full);
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}

.messenger-subtitle {
  font-size: 20px;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.5;
}

.messenger-features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

.messenger-feature-card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  text-align: center;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.messenger-feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.messenger-feature-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(59, 130, 246, 0.08);
  border-radius: 20px;
  margin: 0 auto 20px;
  color: var(--primary);
}

.messenger-feature-card h3 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-dark);
}

.messenger-feature-card p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.messenger-cta {
  text-align: center;
}

.messenger-cta-hint {
  margin-top: 12px;
  font-size: 14px;
  color: var(--text-muted);
}

@media (max-width: 900px) {
  .messenger-features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .messenger-features-grid {
    grid-template-columns: 1fr;
  }

  .messenger-subtitle {
    font-size: 16px;
  }

  .messenger-feature-card {
    padding: 28px 20px;
  }
}

/* ============================================
   Messenger Demo Modal — matches real widget
   ============================================ */
.messenger-demo-container {
  position: relative;
  width: 100%;
  max-width: 1060px;
  height: 82vh;
  max-height: 740px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    0 25px 60px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  /* Messenger gradient background */
  background:
    radial-gradient(at 0% 0%, hsla(253, 16%, 7%, 0.05) 0, transparent 50%),
    radial-gradient(at 50% 0%, hsla(225, 39%, 30%, 0.05) 0, transparent 50%),
    radial-gradient(at 100% 0%, hsla(339, 49%, 30%, 0.05) 0, transparent 50%),
    linear-gradient(120deg, #e0c3fc 0%, #8ec5fc 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  color: #1f2937;
}

.messenger-demo-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 50;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.messenger-demo-close:hover {
  background: rgba(255, 255, 255, 0.9);
  color: #1f2937;
  transform: scale(1.05);
}

.messenger-demo-body {
  display: flex;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* --- Sidebar --- */
.demo-sidebar {
  width: 360px;
  min-width: 320px;
  height: 100%;
  border-right: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.02);
  position: relative;
}

.demo-sidebar-top {
  flex-shrink: 0;
  padding: 16px 16px 8px;
  position: relative;
}

.demo-selector-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.demo-connection-selector {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 12px;
  cursor: default;
  transition: all 0.2s ease;
}

.demo-selector-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.demo-messenger-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.demo-messenger-icon--wa,
.demo-messenger-icon--whatsapp { color: #25D366; }
.demo-messenger-icon--tg,
.demo-messenger-icon--telegram { color: #2AABEE; }

.demo-selector-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.demo-selector-name {
  font-size: 13px;
  font-weight: 600;
  color: #1f2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.demo-selector-status {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #6b7280;
}

.demo-connection-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
}

.demo-selector-chevron {
  color: #9ca3af;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.demo-refresh-btn {
  padding: 10px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 12px;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  cursor: default;
}

.demo-search {
  padding: 8px 16px 12px;
  position: relative;
}

.demo-search-icon {
  position: absolute;
  left: 28px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  pointer-events: none;
}

.demo-search input {
  width: 100%;
  padding: 10px 16px 10px 36px;
  background: rgba(243, 244, 246, 0.5);
  border: 1px solid rgba(229, 231, 235, 0.5);
  border-radius: 12px;
  font-size: 14px;
  color: #1f2937;
  outline: none;
  transition: all 0.2s ease;
}

.demo-search input::placeholder {
  color: #9ca3af;
}

.demo-chat-list {
  flex: 1;
  overflow-y: auto;
  padding: 0 8px;
}

/* Scrollbar matching widget */
.demo-chat-list::-webkit-scrollbar,
.demo-messages::-webkit-scrollbar {
  width: 5px;
}
.demo-chat-list::-webkit-scrollbar-track,
.demo-messages::-webkit-scrollbar-track {
  background: transparent;
}
.demo-chat-list::-webkit-scrollbar-thumb,
.demo-messages::-webkit-scrollbar-thumb {
  background: rgba(156, 163, 175, 0.5);
  border-radius: 10px;
}
.demo-chat-list::-webkit-scrollbar-thumb:hover,
.demo-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(107, 114, 128, 0.8);
}

/* --- Chat item --- */
.demo-chat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  margin: 2px 0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.demo-chat-item:hover {
  background: rgba(255, 255, 255, 0.4);
}

.demo-chat-item.active {
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  outline: 1px solid rgba(0, 0, 0, 0.05);
}

.demo-chat-avatar {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(to bottom right, #128C7E, #075E54);
  position: relative;
}

.demo-chat-info {
  flex: 1;
  min-width: 0;
}

.demo-chat-name-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}

.demo-chat-name {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.demo-chat-item.active .demo-chat-name {
  color: #312e81;
}

.demo-chat-time {
  font-size: 12px;
  color: #9ca3af;
  flex-shrink: 0;
}

.demo-chat-item.active .demo-chat-time {
  color: #818cf8;
}

.demo-chat-last-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.demo-chat-last {
  font-size: 13px;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.demo-chat-item.active .demo-chat-last {
  color: rgba(79, 70, 229, 0.7);
}

.demo-unread-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 9999px;
  background: rgba(37, 211, 102, 0.9);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* --- Main panel --- */
.demo-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  position: relative;
}

/* --- Glass header --- */
.demo-main-header {
  height: 64px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  z-index: 10;
}

.demo-contact-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.demo-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(to bottom right, #128C7E, #075E54);
}

.demo-contact-name {
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
}

.demo-contact-status {
  font-size: 12px;
  color: #6b7280;
  margin-top: 1px;
}

.demo-header-search-btn {
  padding: 8px;
  border-radius: 50%;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  transition: all 0.2s ease;
}

/* --- Messages area --- */
.demo-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Empty state — glass icon box */
.demo-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  padding: 24px;
}

.demo-empty-icon {
  width: 96px;
  height: 96px;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: rgba(99, 102, 241, 0.8);
}

.demo-empty-title {
  font-size: 24px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 8px;
}

.demo-empty-subtitle {
  font-size: 15px;
  color: #6b7280;
  max-width: 280px;
  line-height: 1.5;
}

/* --- Message bubbles --- */
.demo-msg {
  max-width: 75%;
  padding: 8px 16px;
  font-size: 15px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
  position: relative;
}

.demo-msg.incoming {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.85);
  color: #1f2937;
  border-radius: 18px 18px 18px 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.demo-msg.outgoing {
  align-self: flex-end;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #fff;
  border-radius: 18px 18px 2px 18px;
  box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.2);
}

.demo-msg-text {
  white-space: pre-wrap;
  word-wrap: break-word;
  line-height: 1.5;
}

.demo-msg-time {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 4px;
  font-size: 10px;
  font-weight: 500;
  opacity: 0.8;
  user-select: none;
}

.demo-msg.incoming .demo-msg-time {
  color: #9ca3af;
}

.demo-msg.outgoing .demo-msg-time {
  color: rgba(199, 210, 254, 0.9);
}

.demo-msg-status {
  flex-shrink: 0;
  opacity: 0.7;
}

/* --- Glass input bar --- */
.demo-input-bar {
  padding: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.6);
  border-top: 1px solid rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.demo-input-pill {
  flex: 1;
  background: #fff;
  border-radius: 24px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: flex-end;
  padding: 4px;
}

.demo-input-pill input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px 12px;
  font-size: 14px;
  color: #374151;
  outline: none;
  line-height: 1.5;
}

.demo-input-pill input::placeholder {
  color: #9ca3af;
}

.demo-pill-btn {
  padding: 10px;
  color: #9ca3af;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
  cursor: default;
}

.demo-send-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
  background: #fff;
  color: #d1d5db;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  cursor: not-allowed;
}

/* FAB button — bottom right of sidebar */
.demo-fab {
  position: absolute;
  bottom: 16px;
  right: 16px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #6366f1;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
  cursor: default;
  z-index: 10;
}

/* --- Mobile demo --- */
@media (max-width: 768px) {
  .messenger-demo-container {
    max-width: 100%;
    width: 100%;
    height: 92vh;
    max-height: none;
    border-radius: 16px;
  }

  .messenger-demo-close {
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
  }

  .messenger-demo-body {
    flex-direction: column;
  }

  .demo-sidebar {
    width: 100%;
    min-width: 100%;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
    max-height: none;
  }

  .demo-sidebar-top {
    display: none;
  }

  .demo-search {
    display: none;
  }

  .demo-fab {
    display: none;
  }

  .demo-chat-list {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 12px;
    gap: 12px;
    -webkit-overflow-scrolling: touch;
  }

  .demo-chat-item {
    flex-direction: column;
    min-width: 56px;
    padding: 4px;
    margin: 0;
    gap: 4px;
    text-align: center;
    border-radius: 12px;
  }

  .demo-chat-item .demo-chat-info {
    display: none;
  }

  .demo-chat-item .demo-chat-avatar {
    width: 48px;
    height: 48px;
    min-width: 48px;
  }

  .demo-chat-item.active {
    background: transparent;
    box-shadow: none;
    outline: none;
  }

  .demo-chat-item.active .demo-chat-avatar {
    box-shadow: 0 0 0 2px #6366f1;
  }

  .demo-chat-item::after {
    content: attr(data-short-name);
    font-size: 11px;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 56px;
  }

  .demo-main-header {
    height: 56px;
    padding: 0 12px;
  }

  .demo-avatar {
    width: 36px;
    height: 36px;
    font-size: 13px;
  }

  .demo-contact-name {
    font-size: 14px;
  }

  .demo-messages {
    padding: 12px;
    gap: 8px;
  }

  .demo-msg {
    max-width: 85%;
    font-size: 14px;
  }

  .demo-input-bar {
    padding: 12px;
  }

  .demo-send-btn {
    width: 40px;
    height: 40px;
  }

  .demo-empty-icon {
    width: 72px;
    height: 72px;
    border-radius: 20px;
  }

  .demo-empty-icon svg {
    width: 32px;
    height: 32px;
  }

  .demo-empty-title {
    font-size: 20px;
  }

  .demo-empty-subtitle {
    font-size: 14px;
  }
}

/* ============================================
   Calculator Mode Toggle
   ============================================ */
.calc-mode-toggle-row {
  text-align: center;
  margin-bottom: 8px;
  order: 0;
}

.mode-toggle-buttons {
  display: inline-flex;
  background: var(--bg-light);
  border-radius: var(--radius-full);
  padding: 4px;
  gap: 4px;
}

.mode-btn {
  padding: 10px 24px;
  font-size: 15px;
  font-weight: 500;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mode-btn.active {
  background: var(--bg-white);
  color: var(--text-dark);
  box-shadow: var(--shadow-sm);
}

.mode-btn:hover:not(.active) {
  color: var(--text-dark);
}

.mode-discount-tag {
  display: inline-block;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: var(--success);
  border-radius: var(--radius-full);
}

.mode-hint {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 8px;
}

@media (max-width: 480px) {
  .mode-btn {
    padding: 8px 16px;
    font-size: 14px;
  }
}

/* ============================================
   Connection Dropdown
   ============================================ */
.demo-connection-dropdown {
  position: absolute;
  top: 100%;
  left: 12px;
  right: 12px;
  margin-top: 4px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  z-index: 50;
  overflow: hidden;
}

.demo-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  transition: background 0.15s ease;
  font-size: 14px;
  color: #374151;
}

.demo-dropdown-item:hover {
  background: rgba(99, 102, 241, 0.06);
}

.demo-dropdown-item.active {
  background: rgba(99, 102, 241, 0.1);
  font-weight: 600;
  color: #6366f1;
}

.demo-dropdown-item .demo-messenger-icon {
  width: 28px;
  height: 28px;
  min-width: 28px;
}

.demo-dropdown-item-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.demo-dropdown-item svg:last-child {
  flex-shrink: 0;
  color: #6366f1;
}

/* ============================================
   Contact Profile Panel
   ============================================ */
.demo-profile-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  border-radius: inherit;
}

.demo-profile-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.demo-profile-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 340px;
  max-width: 80%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-left: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.08);
  z-index: 70;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  border-radius: 0 24px 24px 0;
}

.demo-profile-panel.open {
  transform: translateX(0);
}

.demo-profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(229, 231, 235, 0.5);
  flex-shrink: 0;
}

.demo-profile-header-title {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
}

.demo-profile-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s ease;
  background: transparent;
  border: none;
}

.demo-profile-close:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #374151;
}

.demo-profile-body {
  flex: 1;
  overflow-y: auto;
}

.demo-profile-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 20px 24px;
  text-align: center;
}

.demo-profile-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.demo-profile-name {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 4px;
}

.demo-profile-phone {
  font-size: 14px;
  color: #6b7280;
  margin: 0 0 8px;
}

.demo-profile-group-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 500;
  color: #6366f1;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 999px;
  margin-top: 8px;
}

.demo-profile-section {
  padding: 16px 20px;
  border-top: 1px solid rgba(229, 231, 235, 0.5);
}

.demo-profile-section-title {
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.demo-profile-info-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
}

.demo-profile-info-item + .demo-profile-info-item {
  border-top: 1px solid rgba(229, 231, 235, 0.3);
}

.demo-profile-info-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #6366f1;
}

.demo-profile-info-label {
  font-size: 12px;
  color: #9ca3af;
  margin-bottom: 2px;
}

.demo-profile-info-value {
  font-size: 14px;
  color: #111827;
  font-weight: 500;
}

.demo-profile-media-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 80px;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 12px;
  border: 1px dashed rgba(209, 213, 219, 0.6);
}

.demo-profile-media-empty span {
  font-size: 13px;
  color: #9ca3af;
}

/* Profile panel mobile */
@media (max-width: 768px) {
  .demo-profile-panel {
    width: 100%;
    max-width: 100%;
    border-radius: 0;
  }
}
