.ahsd-wrap {
  max-width: 760px;
  margin: 30px auto;
  padding: 28px;
  border: 1px solid #dde3df;
  border-radius: 12px;
  background: #fff;
  color: #111111;
  box-shadow: 0 10px 28px rgba(12, 22, 16, 0.06);
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
}

.ahsd-success {
  background: #f4f8f5;
  border: 1px solid #cbd8d0;
  color: #1f3a2c;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 18px;
}

.ahsd-step {
  display: none;
}

.ahsd-step.is-active {
  display: block;
}

.ahsd-step h3 {
  margin: 0 0 14px;
  color: #2f4f3a;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.ahsd-form label {
  display: block;
  margin: 0 0 4px;
  color: #111111;
  font-weight: 600;
}

.ahsd-form select,
.ahsd-form input,
.ahsd-form textarea {
  width: 100%;
  box-sizing: border-box;
  margin-top: 0;
  margin-bottom: 12px;
  border: 1px solid #cfd8d3;
  border-radius: 8px;
  background: #ffffff;
  color: #111111;
  padding: 11px 12px;
  font-size: 15px;
}

.ahsd-form select:focus,
.ahsd-form input:focus,
.ahsd-form textarea:focus {
  outline: none;
  border-color: #2f4f3a;
  box-shadow: 0 0 0 3px rgba(47, 79, 58, 0.15);
}

.ahsd-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.ahsd-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.ahsd-service-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 14px;
}

.ahsd-service-card {
  position: relative;
  overflow: hidden;
  border: 1px solid #c6d5cc;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f9f6 100%);
  color: #254836;
  padding: 14px 12px;
  min-height: 124px;
  aspect-ratio: 1 / 1;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 8px 18px rgba(16, 36, 26, 0.06);
  transition: background-color 0.22s ease, border-color 0.22s ease, transform 0.18s ease, color 0.22s ease, box-shadow 0.22s ease;
}

.ahsd-service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.03) 55%, rgba(255, 255, 255, 0) 100%);
  opacity: 0;
  transition: opacity 0.22s ease;
  pointer-events: none;
}

.ahsd-service-card::after {
  content: "";
  position: absolute;
  top: -35%;
  left: -88%;
  width: 34%;
  height: 180%;
  background: linear-gradient(
    100deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.06) 34%,
    rgba(255, 255, 255, 0.18) 41%,
    rgba(255, 255, 255, 0.38) 48%,
    rgba(255, 255, 255, 0.2) 55%,
    rgba(255, 255, 255, 0.06) 60%,
    rgba(255, 255, 255, 0) 63%,
    rgba(255, 255, 255, 0.08) 69%,
    rgba(255, 255, 255, 0.24) 72%,
    rgba(255, 255, 255, 0.1) 75%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(16deg);
  opacity: 0;
  filter: blur(0.8px);
  transition: left 780ms ease, opacity 180ms ease;
  pointer-events: none;
}

.ahsd-service-card:hover,
.ahsd-service-card:focus {
  background: linear-gradient(180deg, rgba(63, 106, 77, 0.96) 0%, rgba(53, 92, 68, 0.96) 100%);
  border-color: rgba(42, 79, 57, 0.9);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(16, 36, 26, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  outline: none;
}

.ahsd-service-card.is-active {
  background: linear-gradient(180deg, rgba(47, 79, 58, 0.96) 0%, rgba(38, 65, 49, 0.96) 100%);
  border-color: rgba(35, 60, 45, 0.92);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(15, 28, 20, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.ahsd-service-card:hover::before,
.ahsd-service-card:focus::before,
.ahsd-service-card.is-active::before {
  opacity: 0.72;
}

.ahsd-service-card:hover::after,
.ahsd-service-card:focus::after {
  left: 112%;
  opacity: 0.58;
}

.ahsd-service-card.is-active::after {
  left: -88%;
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .ahsd-service-card:hover::after,
  .ahsd-service-card:focus::after,
  .ahsd-service-card.is-active::after {
    animation: none;
  }
}

.ahsd-service-card:focus-visible {
  box-shadow: 0 0 0 4px rgba(47, 79, 58, 0.2), 0 10px 20px rgba(16, 36, 26, 0.12);
}

.ahsd-service-icon {
  width: 38px;
  height: 38px;
  line-height: 1;
  margin-bottom: 10px;
}

.ahsd-service-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.ahsd-service-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.ahsd-field-full {
  grid-column: 1 / -1;
}

.ahsd-field-full h5 {
  margin: 8px 0 6px;
  color: #2f4f3a;
  font-size: 15px;
}

.ahsd-legal-block {
  grid-column: 1 / -1;
  border: 1px solid #d9e3dd;
  background: #f8fbf9;
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 6px;
}

.ahsd-legal-block h5 {
  margin: 0 0 8px;
  color: #2f4f3a;
  font-size: 15px;
}

.ahsd-legal-block p {
  margin: 0 0 8px;
  color: #1e2a22;
  line-height: 1.45;
}

.ahsd-legal-block p:last-child {
  margin-bottom: 0;
}

.ahsd-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.ahsd-btn {
  border: 1px solid #2f4f3a;
  background: #2f4f3a;
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.ahsd-btn:hover {
  background: #254331;
  border-color: #254331;
  transform: translateY(-1px);
}

.ahsd-btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.ahsd-prev {
  background: #fff;
  color: #2f4f3a;
}

@media (max-width: 640px) {
  .ahsd-wrap {
    margin: 20px auto;
    padding: 18px;
    border-radius: 10px;
  }

  .ahsd-grid {
    grid-template-columns: 1fr;
  }

  .ahsd-service-picker {
    grid-template-columns: repeat(2, minmax(116px, 1fr));
    gap: 10px;
  }

  .ahsd-service-card {
    min-height: 114px;
    border-radius: 12px;
    padding: 12px 10px;
  }

  .ahsd-service-icon {
    width: 34px;
    height: 34px;
    margin-bottom: 8px;
  }

  .ahsd-service-title {
    font-size: 13px;
  }
}

@media (min-width: 1024px) {
  .ahsd-service-picker {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
  }

  .ahsd-service-card {
    flex: 0 1 calc((100% - 42px) / 4);
    max-width: 182px;
    min-width: 156px;
  }
}

