/* ===== CSS Reset & Base ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.hidden {
  display: none !important;
}

:root {
  /* Default Theme (Lavender/Purple) */
  --color-primary: #8a63e5;
  --color-primary-hover: #7b57cf;
  --color-primary-light: rgba(138, 99, 229, 0.1);
  --gradient-primary: linear-gradient(135deg, #8a63e5 0%, #a282f1 100%);
  --gradient-cta: linear-gradient(
    135deg,
    #8a63e5 0%,
    #a282f1 50%,
    #7b57cf 100%
  );
  --shadow-primary: 0 8px 25px rgba(138, 99, 229, 0.3);

  --color-bg: #ffffff;
  --color-bg-secondary: #f8f9fc;
  --color-bg-tertiary: #f0f2f7;
  --color-text: #1a1a2e;
  --color-text-secondary: #5a5a7a;
  --color-text-muted: #8a8aaa;
  --color-white: #ffffff;
  --color-border: #e5e7eb;

  --gradient-hero: linear-gradient(135deg, #f8f9fc 0%, #ffffff 100%);
  --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 30px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.15);
}

/* Theme: Gold */
:root[data-theme="gold"] {
  --color-primary: #d4af37;
  --color-primary-hover: #c5a059;
  --color-primary-light: rgba(212, 175, 55, 0.1);
  --gradient-primary: linear-gradient(135deg, #d4af37 0%, #c5a059 100%);
  --gradient-cta: linear-gradient(
    135deg,
    #d4af37 0%,
    #e6cd73 50%,
    #c5a059 100%
  );
  --shadow-primary: 0 8px 25px rgba(212, 175, 55, 0.3);
}

/* Theme: Emerald */
:root[data-theme="emerald"] {
  --color-primary: #2a5c43;
  --color-primary-hover: #1e402f;
  --color-primary-light: rgba(42, 92, 67, 0.1);
  --gradient-primary: linear-gradient(135deg, #2a5c43 0%, #3e8160 100%);
  --gradient-cta: linear-gradient(
    135deg,
    #2a5c43 0%,
    #3e8160 50%,
    #1e402f 100%
  );
  --shadow-primary: 0 8px 25px rgba(42, 92, 67, 0.3);
}

/* Theme: Terracotta */
:root[data-theme="terracotta"] {
  --color-primary: #e27d60;
  --color-primary-hover: #d86c5a;
  --color-primary-light: rgba(226, 125, 96, 0.1);
  --gradient-primary: linear-gradient(135deg, #e27d60 0%, #e89b85 100%);
  --gradient-cta: linear-gradient(
    135deg,
    #e27d60 0%,
    #e89b85 50%,
    #d86c5a 100%
  );
  --shadow-primary: 0 8px 25px rgba(226, 125, 96, 0.3);
}

/* Theme: Burgundy */
:root[data-theme="burgundy"] {
  --color-primary: #6b2d5c;
  --color-primary-hover: #521f45;
  --color-primary-light: rgba(107, 45, 92, 0.1);
  --gradient-primary: linear-gradient(135deg, #6b2d5c 0%, #8c427a 100%);
  --gradient-cta: linear-gradient(
    135deg,
    #6b2d5c 0%,
    #8c427a 50%,
    #521f45 100%
  );
  --shadow-primary: 0 8px 25px rgba(107, 45, 92, 0.3);
}

/* Theme: Dusty Rose */
:root[data-theme="rose"] {
  --color-primary: #c57b86;
  --color-primary-hover: #b46b76;
  --color-primary-light: rgba(197, 123, 134, 0.1);
  --gradient-primary: linear-gradient(135deg, #c57b86 0%, #d47a95 100%);
  --gradient-cta: linear-gradient(
    135deg,
    #c57b86 0%,
    #d47a95 50%,
    #e294aa 100%
  );
  --shadow-primary: 0 8px 25px rgba(197, 123, 134, 0.3);
}

:root {
  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 50px;
  --radius-full: 50%;

  /* Typography */
  --font-family:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-size-xs: 12px;
  --font-size-sm: 14px;
  --font-size-base: 16px;
  --font-size-lg: 18px;
  --font-size-xl: 20px;
  --font-size-2xl: 24px;
  --font-size-3xl: 32px;
  --font-size-4xl: 40px;
  --font-size-5xl: 52px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.2s ease;
  --transition-slow: 0.3s ease;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

html.no-scroll,
body.no-scroll {
  overflow: hidden !important;
  height: 100% !important;
  touch-action: none; /* Prevent touch scrolling */
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-base);
}

ul {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ===== Container ===== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 12px 28px;
  font-size: var(--font-size-sm);
  font-weight: 600;
  border-radius: var(--radius-pill);
  transition: all var(--transition-base);
  white-space: nowrap;
}

.btn--primary {
  background: var(--gradient-primary);
  color: var(--color-white);
  box-shadow: var(--shadow-primary);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(69, 65, 254, 0.4);
}

.btn--outline {
  border: 2px solid var(--color-border);
  color: var(--color-text);
  background: transparent;
}

.btn--outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn--ghost {
  color: var(--color-primary);
  background: var(--color-primary-light);
}

.btn--ghost:hover {
  background: rgba(69, 65, 254, 0.15);
}

.btn--white {
  background: var(--color-white);
  color: var(--color-primary);
}

.btn--white:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn--large {
  padding: 16px 36px;
  font-size: var(--font-size-base);
}

.btn--full {
  width: 100%;
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow var(--transition-base);
}

.header.scrolled {
  box-shadow: var(--shadow-md);
}

.header__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--color-text);
}

.logo__icon {
  width: 24px;
  height: 24px;
  color: var(--color-primary);
}

/* Lucide icon base styles */
[data-lucide] {
  width: 1em;
  height: 1em;
  stroke-width: 2;
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.nav__link {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: color var(--transition-base);
}

.nav__link:hover {
  color: var(--color-primary);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  z-index: 1002;
}

.burger span {
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: all var(--transition-base);
  transform-origin: center;
}

/* Burger to X animation */
.burger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.burger.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.burger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu overlay */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
  z-index: 999;
}

.menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ===== Hero ===== */
.hero {
  padding: 140px 0 40px;
  background: var(--gradient-hero);
  overflow: hidden;
}

.hero__container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: stretch;
}

.hero__badge {
  display: inline-block;
  padding: 8px 16px;
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-size: var(--font-size-sm);
  font-weight: 600;
  border-radius: var(--radius-pill);
  margin-bottom: var(--space-lg);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.hero__title {
  font-size: var(--font-size-5xl);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: var(--space-lg);
  color: var(--color-text);
}

.highlight {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
}

.hero__icons {
  display: flex;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
  justify-content: center;
}

.hero__icons i {
  font-size: 28px;
  --ph-duotone-secondary: var(--color-primary-light);
}

.hero__icons .ph-palette {
  color: #ec4899;
}

.hero__icons .ph-hand {
  color: #f472b6;
}

.hero__icons .ph-scissors {
  color: #8b5cf6;
}

.hero__subtitle {
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xl);
  line-height: 1.7;
}

.hero__buttons {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-2xl);
}

.hero__stats {
  display: flex;
  gap: var(--space-2xl);
}

.stat {
  text-align: center;
}

.stat__number {
  display: block;
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--color-primary);
}

.stat__label {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.hero__image {
  position: relative;
}

.hero__image img {
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
}

/* ===== Sections ===== */
.section {
  padding: var(--space-2xl) 0;
}

.section__title {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--space-md);
}

.section__subtitle {
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
  text-align: center;
  max-width: 600px;
  margin: 0 auto var(--space-3xl);
}

/* ===== Services ===== */
.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.service-card {
  padding: var(--space-xl);
  background: var(--color-bg-secondary);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.service-card:hover {
  background: var(--color-white);
  border-color: var(--color-primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.service-card__icon {
  font-size: 48px;
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-md);
  color: var(--color-primary);
}

.service-card__icon svg {
  width: 48px;
  height: 48px;
}

.service-card__title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.service-card__text {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
}

/* ===== Examples / Carousel ===== */
.examples {
  background: var(--color-bg-secondary);
  overflow: hidden;
}

/* Carousel */
.carousel {
  position: relative;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto var(--space-xl);
}

.carousel__track-container {
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: var(--space-md) 0;
}

.carousel__track {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.carousel__slide {
  flex: 0 0 100%;
  width: 100%;
  padding: 0 var(--space-lg);
  display: flex;
  justify-content: center;
}

/* Mockups container */
.carousel__mockups {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: var(--space-2xl);
  width: 100%;
  position: relative;
}

/* General Mockup */
.mockup {
  position: relative;
  background: #111;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  z-index: 1;
}

.mockup__screen {
  background: var(--color-bg);
  overflow: hidden;
  position: relative;
}

.mockup__screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

/* Phone Mockup */
.mockup--phone {
  width: 260px;
  height: 520px;
  border: 12px solid #111;
  border-radius: 36px;
  z-index: 2;
  margin-bottom: -20px; /* pull down slightly relative to pc */
}

.mockup--phone::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 24px;
  background: #111;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
  z-index: 3;
}

.mockup--phone .mockup__screen {
  border-radius: 24px;
  height: 100%;
}

/* PC Mockup */
.mockup--pc {
  width: 580px;
  height: 360px;
  padding: 16px;
  padding-bottom: 24px;
  background: #111;
  border-radius: 16px 16px 0 0;
}

.mockup--pc .mockup__screen {
  height: 100%;
  border-radius: 4px;
}

.mockup--pc .mockup__base {
  position: absolute;
  top: 98%;
  left: 0%;
  width: 100%;
  height: 18px;
  background: #2a2a2a;
  border-radius: 0 0 16px 16px;
  box-shadow: 0 15px 25px rgba(0, 0, 0, 0.5);
  border-top: 1px solid #444;
}

.mockup--pc .mockup__base::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 6px;
  background: #1a1a1a;
  border-radius: 0 0 6px 6px;
}

/* Carousel controls */
.carousel__button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  z-index: 10;
  transition: all var(--transition-fast);
}

.carousel__button:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.carousel__button--left {
  left: 0;
}

.carousel__button--right {
  right: 0;
}

.carousel__nav {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.carousel__indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-border);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.carousel__indicator.current-indicator {
  background: var(--color-primary);
}

.examples__cta {
  text-align: center;
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .carousel__mockups {
    align-items: center;
    gap: var(--space-md);
  }
  .mockup--phone {
    width: 200px;
    height: 400px;
    border-width: 8px;
    border-radius: 24px;
    margin-bottom: -10px;
  }
  .mockup--phone::before {
    width: 80px;
    height: 16px;
  }
  .mockup--phone .mockup__screen {
    border-radius: 16px;
  }
  .mockup--pc {
    width: 400px;
    height: 250px;
    padding: 10px;
    padding-bottom: 16px;
  }
}

@media (max-width: 768px) {
  .carousel__button--left {
    left: 8px;
  }
  .carousel__button--right {
    right: 8px;
  }
  .carousel__slide {
    padding: 0 var(--space-xs);
  }
  .carousel__button {
    background: rgba(255, 255, 255, 0.9);
  }
  .carousel__mockups {
    flex-direction: column-reverse;
    gap: var(--space-2xl); /* Увеличенный отступ */
  }
  .mockup--phone {
    margin-bottom: 0;
    margin-top: 0; /* Убрано наложение */
    z-index: 3;
  }
}

@media (max-width: 480px) {
  .mockup--pc {
    width: 300px;
    height: 190px;
    padding: 8px;
    padding-bottom: 12px;
  }
  .mockup--phone {
    width: 160px;
    height: 320px;
    margin-top: 0; /* Убрано наложение */
  }
}

/* ===== Advantages ===== */
.advantages__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.advantage {
  padding: var(--space-xl);
  background: var(--color-bg-secondary);
  border-radius: var(--radius-lg);
  transition: all var(--transition-slow);
}

.advantage:hover {
  background: var(--color-white);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.advantage__icon {
  font-size: 40px;
  margin-bottom: var(--space-md);
  color: var(--color-primary);
}

.advantage__icon svg {
  width: 40px;
  height: 40px;
}

.advantage__title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.advantage__text {
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
}

/* ===== FAQ ===== */
.faq {
  background: var(--color-bg-secondary);
}

.faq__list {
  max-width: 800px;
  margin: 0 auto;
}

.faq__item {
  background: var(--color-white);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.faq__question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg) var(--space-xl);
  font-size: var(--font-size-base);
  font-weight: 600;
  text-align: left;
  color: var(--color-text);
  transition: color var(--transition-base);
}

.faq__question:hover {
  color: var(--color-primary);
}

.faq__icon {
  font-size: var(--font-size-xl);
  font-weight: 400;
  transition: transform var(--transition-base);
}

.faq__item.active .faq__icon {
  transform: rotate(45deg);
}

.faq__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-slow);
}

.faq__item.active .faq__answer {
  max-height: 200px;
}

.faq__answer p {
  padding: 0 var(--space-xl) var(--space-lg);
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* ===== Contacts ===== */
.contacts__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  max-width: 900px;
  margin: 0 auto;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

/* New Contacts Section Styles */
.contacts__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 8px 16px;
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-size: var(--font-size-sm);
  font-weight: 600;
  border-radius: var(--radius-pill);
  margin: 0 auto var(--space-lg);
}

.contacts__badge svg {
  width: 16px;
  height: 16px;
}

.contacts .container {
  text-align: center;
}

.contact-form--centered {
  max-width: 600px;
  margin: 0 auto;
  text-align: left;
}

/* Chips */
.form-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
  margin-bottom: var(--space-xl);
  min-height: 44px;
}

.chip {
  cursor: grab;
  user-select: none;
}

.chip:active {
  cursor: grabbing;
}

.chip input {
  display: none;
}

.chip__content {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 10px 16px;
  background: var(--color-bg-secondary);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-pill);
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: all var(--transition-base);
}

.chip__content svg {
  width: 16px;
  height: 16px;
}

.chip:hover .chip__content {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.chip input:checked + .chip__content {
  background: var(--gradient-primary);
  border-color: var(--color-primary);
  color: var(--color-white);
}

.chip.dragging {
  opacity: 0.5;
}

.chip.drag-over .chip__content {
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
}

/* Style Selection - Radio Chips */
.style-field {
  margin-bottom: var(--space-lg);
}

.style-label {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
}

.style-label .optional {
  font-weight: 400;
  color: var(--color-text-muted);
}

.style-chips {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.style-chip {
  cursor: pointer;
}

.style-chip input {
  display: none;
}

.style-chip__content {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 8px 14px;
  background: var(--color-bg-secondary);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-pill);
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: all var(--transition-base);
  white-space: nowrap;
}

.style-chip__content svg {
  width: 14px;
  height: 14px;
}

.style-chip:hover .style-chip__content {
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: translateY(-2px);
}

.style-chip input:checked + .style-chip__content {
  background: var(--gradient-primary);
  border-color: var(--color-primary);
  color: var(--color-white);
}

/* Form Row */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.form-group label {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-text);
}

.form-group input,
.form-group textarea {
  padding: var(--space-md);
  font-size: var(--font-size-base);
  font-family: inherit;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  resize: none;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

.contact-form--centered .form-group {
  margin-bottom: var(--space-md);
}

.contact-form--centered button {
  width: 100%;
  margin-top: var(--space-md);
}

.form-note {
  text-align: center;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-md);
}

/* Keep old styles for compatibility */
.contacts__info {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  justify-content: center;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.contact-item__icon {
  font-size: 32px;
  color: var(--color-primary);
}

.contact-item__icon svg {
  width: 32px;
  height: 32px;
}

.contact-item h4 {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-bottom: 2px;
}

.contact-item a {
  font-size: var(--font-size-base);
  font-weight: 500;
  color: var(--color-text);
}

.contact-item a:hover {
  color: var(--color-primary);
}

/* ===== CTA ===== */
.cta {
  background: var(--gradient-cta);
  padding: var(--space-2xl) 0;
  text-align: center;
}

.cta__title {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: var(--space-md);
}

.cta__text {
  font-size: var(--font-size-lg);
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: var(--space-xl);
}

/* ===== Footer ===== */
.footer {
  background: var(--color-text);
  color: var(--color-white);
  padding: var(--space-3xl) 0 var(--space-xl);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.logo--footer {
  color: var(--color-white);
  margin-bottom: var(--space-md);
}

.footer__tagline {
  color: rgba(255, 255, 255, 0.6);
  font-size: var(--font-size-sm);
}

.footer__column h4 {
  font-size: var(--font-size-sm);
  font-weight: 600;
  margin-bottom: var(--space-md);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer__column ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer__column a {
  color: rgba(255, 255, 255, 0.6);
  font-size: var(--font-size-sm);
  transition: color var(--transition-base);
}

.footer__column a:hover {
  color: var(--color-white);
}

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-xl);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer__bottom p {
  color: rgba(255, 255, 255, 0.5);
  font-size: var(--font-size-sm);
}

.footer__socials {
  display: flex;
  gap: var(--space-md);
}

.footer__socials a {
  font-size: var(--font-size-xl);
  transition: transform var(--transition-base);
}

.footer__socials a:hover {
  transform: scale(1.1);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .hero__container {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }

  .hero__content {
    text-align: center;
  }

  .hero__title {
    font-size: var(--font-size-2xl);
  }

  .hero__buttons {
    justify-content: center;
  }

  .hero__stats {
    justify-content: center;
  }

  .hero__image {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
  }

  .hero__image img {
    width: 100%;
    height: auto;
  }

  .steps {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }

  .services__grid,
  .advantages__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav,
  .header__actions {
    display: none;
  }

  .burger {
    display: flex;
  }

  .nav.active {
    display: flex;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--color-white);
    padding: var(--space-lg);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
  }

  .header__actions.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: calc(72px + 200px);
    left: 0;
    right: 0;
    padding: var(--space-lg);
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
  }

  .hero {
    padding: 120px 0 60px;
  }

  .hero__title {
    font-size: var(--font-size-3xl);
  }

  .hero__buttons {
    flex-direction: column;
  }

  .hero__stats {
    flex-direction: column;
    gap: var(--space-lg);
  }

  .hero__image {
    max-width: 100%;
  }

  .hero__image img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
  }

  .section {
    padding: var(--space-xl) 0;
  }

  .section__title {
    font-size: var(--font-size-3xl);
  }

  .services__grid,
  .advantages__grid {
    grid-template-columns: 1fr;
  }

  .contacts__grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .form-chips {
    gap: var(--space-xs);
  }

  .chip__content {
    padding: 8px 12px;
    font-size: var(--font-size-xs);
  }

  .footer__grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer__bottom {
    flex-direction: column;
    gap: var(--space-md);
  }

  .cta__title {
    font-size: var(--font-size-3xl);
  }
}

/* ===== Animations ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Chat Widget ===== */
.chat-fab {
  position: fixed;
  bottom: 36px;
  right: 34px;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--gradient-primary);
  color: var(--color-white);
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
  z-index: 1100;
}

.chat-fab:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 35px rgba(69, 65, 254, 0.4);
}

.chat-fab svg {
  width: 24px;
  height: 24px;
}

.hero__icons .ph-palette {
  color: #8b5cf6; /* Violet */
}

/* Chat Overlay */
.chat-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5); /* Dim background */
  z-index: 1000; /* Below widget (1001), above everything else */
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
  backdrop-filter: blur(2px);
}

.chat-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Chat Widget */
.chat-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 380px;
  max-height: 600px;
  background: var(--color-bg);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  z-index: 1001; /* Above overlay */
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.3s ease;
  display: none; /* Hidden by default */
}

.chat-widget.active {
  display: flex;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chat-widget__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  background: var(--gradient-primary);
  color: var(--color-white);
  font-weight: 600;
}

.chat-widget__close {
  background: none;
  border: none;
  color: var(--color-white);
  cursor: pointer;
  padding: 4px;
  display: flex;
  transition: opacity var(--transition-base);
}

.chat-widget__close:hover {
  opacity: 0.8;
}

.chat-widget__close svg {
  width: 20px;
  height: 20px;
}

/* Consultant header */
.chat-consultant {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.chat-consultant__avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--color-bg-tertiary); /* Fallback */
  overflow: hidden; /* For image */
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--color-primary);
  flex-shrink: 0;
}

.chat-consultant__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-consultant__info {
  display: flex;
  flex-direction: column;
}

.chat-consultant__name {
  font-weight: 600;
  font-size: var(--font-size-sm);
}

.chat-consultant__status {
  font-size: 11px;
  opacity: 0.9;
  display: flex;
  align-items: center;
  gap: 4px;
}

.chat-consultant__status::before {
  content: "";
  width: 6px;
  height: 6px;
  background: #22c55e;
  border-radius: 50%;
}

.chat-widget__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

.chat-widget__messages {
  flex: 1;
  padding: var(--space-md);
  overflow-y: auto;
  min-height: 150px;
  max-height: 200px;
}

.chat-message {
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
  font-size: var(--font-size-sm);
  max-width: 85%;
}

.chat-message--bot {
  background: var(--color-bg-secondary);
  color: var(--color-text);
  border-bottom-left-radius: 4px;
}

.chat-message--user {
  background: var(--gradient-primary);
  color: var(--color-white);
  margin-left: auto;
  border-bottom-right-radius: 4px;
}

.chat-widget__form {
  padding: 12px 64px 12px 16px;
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 72px;
}

/* Typing Indicator */
.chat-typing {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
  background: var(--color-bg-secondary);
  border-bottom-left-radius: 4px;
  border-radius: var(--radius-card);
  width: fit-content;
  margin-bottom: var(--space-sm);
  align-items: center;
}

.chat-typing__dot {
  width: 6px;
  height: 6px;
  background: var(--color-text-secondary);
  border-radius: 50%;
  animation: typing-bounce 1.4s infinite ease-in-out both;
}

.chat-typing__dot:nth-child(1) {
  animation-delay: -0.32s;
}
.chat-typing__dot:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes typing-bounce {
  0%,
  80%,
  100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}

.chat-step-hidden {
  display: none !important;
}

.chat-input-label {
  display: block;
  font-size: 11px;
  color: var(--color-text-secondary);
  font-weight: 500;
  margin-bottom: 4px; /* Slightly above input */
  width: 100%;
  min-height: 15px; /* Prevent layout shift */
}

.chat-error {
  display: none;
  font-size: 12px;
  color: #ef4444;
  padding: 0 var(--space-sm);
}

.chat-error.visible {
  display: block;
}

.chat-input-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  align-items: flex-end;
}

.chat-input-row textarea,
.chat-input-row input {
  width: 100%;
}

.chat-input-row textarea {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  resize: none;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
  background: var(--color-bg-secondary);
}

.chat-input-row textarea:focus,
.chat-input-row input:focus {
  border-color: var(--color-primary);
  background: var(--color-white);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

.chat-input-row input[type="tel"] {
  flex: 1;
  padding: 12px 16px; /* Match textarea padding */
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  font-size: var(--font-size-sm);
  font-family: inherit;
  transition: border-color var(--transition-base);
}

.chat-input-row input[type="tel"]:focus {
  outline: none;
  border-color: var(--color-primary);
}

.chat-send-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--gradient-primary);
  color: var(--color-white);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition-base);
}

.chat-send-btn:hover {
  transform: scale(1.05);
}

.chat-send-btn svg {
  width: 18px;
  height: 18px;
}

/* Captcha Modal */
.captcha-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.captcha-modal.active {
  display: flex;
}

.captcha-modal__content {
  background: var(--color-white);
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  max-width: 320px;
  width: 90%;
  text-align: center;
}

.captcha-modal__content h3 {
  margin-bottom: var(--space-sm);
  color: var(--color-text);
}

.captcha-modal__content p {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-md);
}

.captcha-modal__content input {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-base);
  margin-bottom: var(--space-sm);
}

.captcha-modal__content input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.captcha-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.captcha-row span {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
}

.captcha-row input {
  width: 80px;
  text-align: center;
  margin-bottom: 0;
}

.captcha-modal__buttons {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
}

@keyframes pulse-ring {
  0% {
    box-shadow: 0 0 0 0 rgba(69, 65, 254, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(69, 65, 254, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(69, 65, 254, 0);
  }
}

@media (max-width: 480px) {
  .chat-widget {
    position: fixed;
    top: auto; /* Remove top: 0 */
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 75vh; /* 75% height */
    max-height: none;
    border-radius: 20px 20px 0 0; /* Add rounded corners at top */
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
  }

  .chat-widget__messages {
    min-height: auto;
    max-height: none;
    flex: 1;
  }

  .chat-fab {
    right: 8px;
    bottom: 16px;
    z-index: 1002;
  }

  .chat-fab.pulsing {
    animation: pulse-ring 2s infinite;
  }
}

/* ===== Request Modal ===== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

.modal__overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.modal__content {
  position: relative;
  background: var(--color-bg);
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  max-width: 400px;
  width: 90%;
  z-index: 1;
  box-shadow: var(--shadow-xl);
  transform: translateY(20px);
  transition: transform var(--transition-base);
}

.modal.active .modal__content {
  transform: translateY(0);
}

.modal__close {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  border-radius: var(--radius-full);
  transition: background var(--transition-fast);
}

.modal__close:hover {
  background: var(--color-bg-secondary);
  color: var(--color-text);
}
