/* Landing: Доработка интернет-магазинов */
.refine-page {
  --refine-blue: #2f80ff;
  --refine-blue-deep: #1e5eff;
  --refine-blue-soft: #47b4ff;
  overflow: hidden;
}

.refine-section-title {
  margin: 0 0 28px;
  font-family: var(--veridan-font-display);
  font-size: clamp(1.6rem, 3vw, 2.35rem);
  font-weight: 500;
  line-height: 1.2;
  color: var(--veridan-text-dark);
}

/* Hero */
.refine-hero {
  position: relative;
  padding: 48px 0 72px;
  overflow: visible;
}

.refine-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.22fr);
  gap: 20px 32px;
  align-items: stretch;
}

.refine-hero__content {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.refine-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(47, 128, 255, 0.1);
  color: var(--refine-blue);
  font-size: 0.92rem;
  font-weight: 600;
}

.refine-hero__badge i {
  font-size: 0.85rem;
}

.refine-hero__title {
  margin: 0 0 18px;
  max-width: 12ch;
  font-family: var(--veridan-font);
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #111;
}

.refine-hero__lead {
  margin: 0 0 28px;
  max-width: 52ch;
  color: #6b7280;
  font-size: 1.05rem;
  line-height: 1.65;
}

.refine-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: auto;
  padding-top: 28px;
}

.refine-hero__btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 28px;
  border: 1.5px solid var(--refine-blue);
  border-radius: 999px;
  background: transparent;
  color: var(--refine-blue);
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease;
}

.refine-hero__btn-outline:hover {
  background: var(--refine-blue);
  color: #fff;
}

.refine-hero__visual {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-width: 0;
}

.refine-hero__visual img {
  display: block;
  position: relative;
  z-index: -1;
  width: 100%;
  max-width: none;
  height: auto;
}

@media (min-width: 1200px) {
  .refine-hero__inner {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.22fr);
    gap: 16px 24px;
  }

  .refine-hero__visual img {
    transform: scale(1.08);
    transform-origin: center right;
  }
}

/* Services */
.refine-services {
  padding: 72px 0 0;
}

.refine-services__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.refine-service-card {
  display: flex;
  flex-direction: column;
  min-height: 220px;
  padding: 28px 26px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.refine-service-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.1);
}

.refine-service-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(71, 180, 255, 0.2) 0%, rgba(47, 128, 255, 0.12) 100%);
  color: var(--refine-blue);
  font-size: 1.15rem;
}

.refine-service-card h3 {
  margin: 0 0 10px;
  font-family: var(--veridan-font);
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.3;
  color: #111;
}

.refine-service-card p {
  margin: 0;
  color: #6b7280;
  font-size: 0.94rem;
  line-height: 1.55;
}

/* Platforms */
.refine-platforms {
  padding: 72px 0 0;
}

.refine-platforms__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.refine-platform-card {
  position: relative;
  overflow: hidden;
  padding: 32px 160px 36px 32px;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.06);
}

.refine-platform-card__head {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  min-height: 40px;
}

.refine-platform-card__brand {
  display: block;
  width: auto;
  max-width: 220px;
  height: 36px;
  object-fit: contain;
  object-position: left center;
}

.refine-platform-card__logo {
  display: none;
}

.refine-platform-card h3 {
  margin: 0;
  font-family: var(--veridan-font);
  font-size: 1.35rem;
  font-weight: 700;
  color: #111;
}

.refine-platform-card__list {
  position: relative;
  z-index: 2;
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.refine-platform-card__list li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #444;
  font-size: 0.95rem;
  line-height: 1.4;
}

.refine-platform-card__list img {
  flex-shrink: 0;
}

.refine-platform-card__decor {
  position: absolute;
  right: 8px;
  bottom: 4px;
  z-index: 1;
  width: 244px;
  height: auto;
  pointer-events: none;
  object-fit: contain;
}

/* Steps */
.refine-steps {
  padding: 72px 0 0;
}

.refine-steps__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  position: relative;
}

.refine-steps__grid::before {
  content: "";
  position: absolute;
  top: 28px;
  left: 12%;
  right: 12%;
  height: 2px;
  background: linear-gradient(90deg, rgba(47, 128, 255, 0.15) 0%, rgba(47, 128, 255, 0.45) 50%, rgba(47, 128, 255, 0.15) 100%);
  z-index: 0;
}

.refine-step {
  position: relative;
  z-index: 1;
  padding: 0 8px;
  text-align: center;
}

.refine-step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #47b4ff 0%, #2f80ff 100%);
  color: #fff;
  font-family: var(--veridan-font-display);
  font-size: 1.25rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(47, 128, 255, 0.3);
}

.refine-step h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  color: #111;
}

.refine-step p {
  margin: 0;
  color: #6b7280;
  font-size: 0.88rem;
  line-height: 1.5;
}

/* Cases — variant A: compact equal cards */
.refine-cases {
  padding: 72px 0 0;
}

.refine-cases__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.refine-cases__head .refine-section-title {
  margin: 0;
}

.refine-cases__all {
  color: var(--refine-blue);
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}

.refine-cases__all:hover {
  opacity: 0.75;
  color: var(--refine-blue);
}

.refine-cases__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}

.refine-case-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.refine-case-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.1);
}

.refine-case-card__media {
  display: block;
  flex-shrink: 0;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #eef1f6;
}

.refine-case-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.35s ease;
}

.refine-case-card:hover .refine-case-card__media img {
  transform: scale(1.03);
}

.refine-case-card__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #9ca3af;
  font-size: 1.6rem;
  background:
    linear-gradient(135deg, rgba(47, 128, 255, 0.12), rgba(30, 94, 255, 0.04)),
    #eef1f6;
}

.refine-case-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 16px 18px 18px;
}

.refine-case-card__topic {
  margin: 0 0 6px;
  color: var(--refine-blue);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.refine-case-card h3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  color: #111;
}

.refine-case-card h3 a {
  color: inherit;
  transition: color 0.2s ease;
}

.refine-case-card h3 a:hover {
  color: var(--refine-blue);
}

.refine-case-card__excerpt {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  margin: 0 0 14px;
  color: #6b7280;
  font-size: 0.88rem;
  line-height: 1.5;
}

.refine-case-card__excerpt h1,
.refine-case-card__excerpt h2,
.refine-case-card__excerpt h3,
.refine-case-card__excerpt h4,
.refine-case-card__excerpt ul,
.refine-case-card__excerpt ol,
.refine-case-card__excerpt p,
.refine-case-card__excerpt div {
  display: inline;
  margin: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  list-style: none;
}

.refine-case-card__more {
  margin-top: auto;
  color: var(--refine-blue);
  font-size: 0.88rem;
  font-weight: 600;
  transition: opacity 0.2s ease;
}

.refine-case-card__more:hover {
  opacity: 0.8;
  color: var(--refine-blue);
}

/* Estimate chat */
.refine-estimate {
  padding: 72px 0 0;
}

.refine-estimate__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 40px 48px;
  align-items: center;
}

.refine-estimate__title {
  margin: 0 0 16px;
  max-width: 12ch;
  font-family: var(--veridan-font);
  font-size: clamp(2rem, 3.6vw, 3rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: #111;
}

.refine-estimate__title span {
  color: var(--refine-blue);
}

.refine-estimate__lead {
  margin: 0 0 22px;
  max-width: 42ch;
  color: #6b7280;
  font-size: 1.02rem;
  line-height: 1.6;
}

.refine-estimate__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.refine-estimate__chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e5e7eb;
  color: #111;
  font-size: 0.9rem;
  font-weight: 600;
  box-sizing: border-box;
}

.refine-estimate__chip i {
  color: var(--refine-blue);
  font-size: 0.95em;
}

.refine-estimate__chip--logo {
  padding: 10px 16px;
}

.refine-estimate__chip-logo {
  display: block;
  height: 20px;
  width: 102px;
  max-width: 120px;
  object-fit: contain;
  object-position: center;
}

.refine-estimate__cta {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 420px;
  padding: 16px 22px;
  border: 0;
  border-radius: 20px;
  background: linear-gradient(90deg, #47b4ff 0%, #2f80ff 50%, #1e5eff 100%);
  color: #fff;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(47, 128, 255, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.refine-estimate__cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(47, 128, 255, 0.34);
}

.refine-estimate__cta > i {
  font-size: 1.25rem;
}

.refine-estimate__cta span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.refine-estimate__cta strong {
  font-size: 1rem;
  font-weight: 700;
}

.refine-estimate__cta em {
  font-style: normal;
  font-size: 0.82rem;
  opacity: 0.9;
}

.refine-chat {
  display: flex;
  flex-direction: column;
  min-height: 520px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.refine-chat__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px 14px;
  border-bottom: 1px solid #eef1f6;
}

.refine-chat__agent {
  display: flex;
  align-items: center;
  gap: 12px;
}

.refine-chat__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #47b4ff 0%, #2f80ff 100%);
  color: #fff;
  font-weight: 700;
}

.refine-chat__agent strong {
  display: block;
  font-size: 0.98rem;
  color: #111;
}

.refine-chat__status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #6b7280;
  font-size: 0.82rem;
}

.refine-chat__status i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
}

.refine-chat__messages {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1 1 auto;
  min-height: 0;
  max-height: 360px;
  margin: 16px 0;
  padding-right: 4px;
  overflow-y: auto;
}

.refine-chat__msg {
  max-width: 88%;
  padding: 14px 16px;
  border-radius: 18px;
  font-size: 0.94rem;
  line-height: 1.5;
}

.refine-chat__msg p {
  margin: 0;
}

.refine-chat__msg--bot {
  align-self: flex-start;
  background: #fff;
  color: #111;
  border: 1px solid #eef1f6;
  border-bottom-left-radius: 6px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}

.refine-chat__msg--user {
  align-self: flex-end;
  background: linear-gradient(135deg, #dbebff 0%, #c5dcff 100%);
  color: #111;
  border-bottom-right-radius: 6px;
}

.refine-chat__estimate {
  margin-top: 12px;
  border: 1px solid #eef1f6;
  border-radius: 16px;
  overflow: hidden;
  background: #fafbfd;
}

.refine-chat__estimate-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid #eef1f6;
}

.refine-chat__estimate-row:last-child {
  border-bottom: 0;
}

.refine-chat__estimate-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(47, 128, 255, 0.1);
  color: var(--refine-blue);
}

.refine-chat__estimate-label {
  color: #6b7280;
  font-size: 0.88rem;
}

.refine-chat__estimate-value {
  color: #111;
  font-size: 0.95rem;
  font-weight: 700;
}

.refine-chat__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  min-height: 40px;
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--refine-blue);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
}

.refine-chat__action:hover {
  color: #fff;
  opacity: 0.92;
}

.refine-chat__msg--typing p {
  color: #6b7280;
  font-style: italic;
}

.refine-chat__composer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #fff;
}

.refine-chat__input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 10px 14px;
  border: 0;
  background: transparent;
  color: #111;
  font: inherit;
  font-size: 0.94rem;
  outline: none;
}

.refine-chat__send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #47b4ff 0%, #2f80ff 100%);
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.refine-chat__send:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(47, 128, 255, 0.3);
}

.refine-chat__hint {
  margin: 10px 0 0;
  text-align: center;
  color: #9ca3af;
  font-size: 0.8rem;
}

/* FAQ + Contact */
.refine-faq-contact {
  padding: 72px 0 88px;
}

.refine-faq-contact__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: start;
}

.refine-faq__list {
  display: grid;
  gap: 10px;
}

.refine-faq__item {
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.refine-faq__question {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border: 0;
  background: transparent;
  color: #111;
  font: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.refine-faq__question i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(47, 128, 255, 0.1);
  color: var(--refine-blue);
  font-size: 0.85rem;
  transition: transform 0.2s ease;
}

.refine-faq__item.is-open .refine-faq__question i {
  transform: rotate(45deg);
}

.refine-faq__answer {
  padding: 0 22px 18px;
}

.refine-faq__answer p {
  margin: 0;
  color: #6b7280;
  font-size: 0.94rem;
  line-height: 1.6;
}

.refine-contact-card {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  overflow: hidden;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.08);
}

.refine-contact-card__visual {
  min-height: 100%;
  background-color: #e8f3ff;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.refine-contact-card__form {
  padding: 32px 28px;
}

.refine-contact-card__form h2 {
  margin: 0 0 8px;
  font-family: var(--veridan-font-display);
  font-size: clamp(1.3rem, 2.2vw, 1.75rem);
  font-weight: 500;
}

.refine-contact-card__form > p {
  margin: 0 0 20px;
  color: #6b7280;
  font-size: 0.94rem;
  line-height: 1.5;
}

.refine-contact-card__form .veridan-field {
  display: block;
  margin-bottom: 12px;
}

.refine-contact-card__footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
}

.refine-contact-card__footer .veridan-checkbox {
  font-size: 0.82rem;
  color: #6b7280;
}

/* Responsive */
@media (max-width: 1100px) {
  .refine-hero__inner {
    grid-template-columns: 1fr;
  }

  .refine-hero__title {
    max-width: none;
  }

  .refine-hero__visual img {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    transform: none;
  }

  .refine-services__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .refine-steps__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
  }

  .refine-steps__grid::before {
    display: none;
  }

  .refine-cases__grid,
  .refine-estimate__inner {
    grid-template-columns: 1fr;
  }

  .refine-estimate__title {
    max-width: none;
  }
}

@media (max-width: 768px) {
  .refine-hero {
    padding: 32px 0 48px;
  }

  .refine-cases__head {
    flex-direction: column;
    align-items: flex-start;
  }

  .refine-services__grid,
  .refine-platforms__grid {
    grid-template-columns: 1fr;
  }

  .refine-platform-card {
    padding: 28px 24px 220px;
  }

  .refine-platform-card__decor {
    right: 50%;
    bottom: 8px;
    width: 244px;
    transform: translateX(50%);
  }

  .refine-steps__grid {
    grid-template-columns: 1fr;
  }

  .refine-step {
    text-align: left;
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 0 16px;
    align-items: start;
  }

  .refine-step__num {
    grid-row: 1 / 3;
    margin-bottom: 0;
  }

  .refine-contact-card {
    grid-template-columns: 1fr;
  }

  .refine-contact-card__visual {
    min-height: 180px;
  }
}

@media (max-width: 480px) {
  .refine-hero__actions {
    flex-direction: column;
  }

  .refine-hero__actions .veridan-btn,
  .refine-hero__btn-outline {
    width: 100%;
  }
}
