@keyframes hc-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.8);
  }
}

@keyframes hc-bounce {
  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  40% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

#hiw-section {
  position: relative;
  overflow: hidden;
  overflow-x: hidden;
  background:
    url("/higher-education/assets/marketing/Rectangle.png") center / cover no-repeat,
    linear-gradient(180deg, #e8e5ff 0%, #f0edff 58%, #f4f2ff 100%);
  padding: 80px 80px;
  border-bottom: none;
}

.hiw-inner {
  max-width: 1350px;
  margin: 0 auto;
}

.hiw-section-title {
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #1f1c26;
  margin: 0 0 48px;
  max-width: 800px;
}

.hiw-grid {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: 56px;
  align-items: center;
}

.hiw-steps-viewport {
  min-width: 0;
  width: 100%;
}

.hiw-steps-track {
  display: flex;
  flex-direction: column;
  gap: 28px;
  transform: none;
}

.hiw-step-num {
  font-size: 30px;
  font-weight: 800;
  color: #5848f7;
  margin-bottom: 8px;
}

.hiw-step-title {
  font-size: 19px;
  font-weight: 700;
  color: #1f1c26;
  margin: 0 0 8px;
}

.hiw-step-desc {
  font-size: 15.5px;
  line-height: 1.7;
  color: #4c4951;
  margin: 0;
}

.hiw-card-col {
  margin-left: auto;
  max-width: 720px;
  width: 100%;
  min-width: 0;
}

/* Flat card — 3D tilt/pulse on hero-chat-wrap blurs text and avatars */
.hiw-card-col .hero-chat-wrap {
  perspective: none;
}

.hiw-card-col .hero-chat-tilt,
.hiw-card-col .hero-chat-tilt-y,
.hiw-card-col .hero-chat-pulse {
  transform: none !important;
  animation: none !important;
}

#hiw-section::before,
#hiw-section::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: clamp(260px, 30vw, 460px);
  background: url("/higher-education/assets/marketing/skilly-side-dots.svg") center/cover no-repeat;
  opacity: 0.62;
  pointer-events: none;
  z-index: 0;
  filter: saturate(1.25) brightness(0.88);
}

#hiw-section::before {
  right: -80px;
}

#hiw-section::after {
  left: -80px;
  transform: scaleX(-1);
}

#hiw-section > div {
  position: relative;
  z-index: 1;
}

.hiw-step {
  cursor: pointer;
  background: #fff;
  border: 1px solid #e9e9ea;
  border-radius: 12px;
  padding: 20px 22px;
  border-left: 3px solid #e9e9ea;
  box-shadow: 0 1px 6px rgba(31, 28, 38, 0.06);
  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease;
  font: inherit;
  width: 100%;
  text-align: left;
  appearance: none;
}

.hiw-step > * {
  transition: opacity 0.3s ease;
}

.hiw-step:not(.is-active) > * {
  opacity: 0.5;
}

.hiw-step.is-active {
  border-left: 3px solid #5848f7;
  box-shadow: 0 1px 10px rgba(31, 28, 38, 0.08);
}

.hiw-step.is-active > * {
  opacity: 1;
}

.hiw-card-shell {
  position: relative;
}

.hiw-card-mascot {
  position: absolute;
  top: -74px;
  right: -26px;
  width: auto;
  height: 112px;
  z-index: 2;
  display: block;
  transform-origin: 50% 85%;
  transform: rotate(10deg) translateY(0) scale(1);
  animation: hiw-card-mascot-float 4s ease-in-out infinite;
  filter: drop-shadow(0 5px 12px rgba(88, 72, 247, 0.14));
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

@keyframes hiw-card-mascot-float {
  0%,
  100% {
    transform: rotate(10deg) translateY(0) scale(1);
  }
  50% {
    transform: rotate(10deg) translateY(-2px) scale(1.035);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hiw-card-mascot {
    animation: none;
  }
}

.hiw-card {
  background: #fff;
  border: 1px solid #e9e9ea;
  border-radius: 16px;
  box-shadow:
    0 1px 13px rgba(0, 0, 0, 0.08),
    0 26px 52px -22px rgba(31, 28, 38, 0.2);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.hero-chat-tilt .hiw-card {
  box-shadow:
    0 1px 13px rgba(0, 0, 0, 0.08),
    0 26px 52px -22px rgba(31, 28, 38, 0.2);
}

.hiw-card img {
  cursor: default;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.hiw-clip {
  height: 600px;
  overflow-y: auto;
  overflow-x: hidden;
  background: #fcfbfD;
  position: relative;
  border-radius: 16px 16px 0 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.hiw-clip::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.hiw-thread {
  padding: 20px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transform: none;
}

.hiw-thread .hc-anim.is-hidden {
  display: none !important;
}

.hiw-guide-content {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

.hiw-day {
  text-align: center;
  font-size: 12px;
  color: #9a999d;
  font-weight: 600;
}

.hiw-user-row {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  justify-content: flex-end;
}

.hiw-ububble {
  background: #5848f7;
  color: #fff;
  border-radius: 16px 16px 4px 16px;
  padding: 11px 14px;
  font-size: 13.5px;
  line-height: 1.5;
  max-width: 82%;
  font-weight: 500;
}

.hiw-uav {
  width: 38px;
  height: 38px;
  border-radius: 9999px;
  object-fit: cover;
  flex: none;
  margin-top: 1px;
}

.hiw-guide-row {
  display: flex;
  gap: 9px;
  align-items: flex-start;
}

.hiw-gav {
  width: 28px;
  height: 28px;
  flex: none;
  margin-top: 2px;
}

.hiw-gbubble {
  background: #fff;
  color: #36333c;
  border: 1px solid #e9e9ea;
  border-radius: 4px 16px 16px 16px;
  padding: 11px 14px;
  font-size: 13.5px;
  line-height: 1.55;
  max-width: 84%;
  box-shadow: 0 1px 4px rgba(31, 28, 38, 0.05);
}

.hiw-gbubble strong {
  color: #1f1c26;
  font-weight: 700;
}

.hiw-sources {
  padding-left: 37px;
  margin-top: -2px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hiw-srcchips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hiw-srcchip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #fff;
  border: 1px solid #e4e1ec;
  border-radius: 8px;
  padding: 5px 10px 5px 6px;
  font-size: 11px;
  font-weight: 600;
  color: #4c4951;
}

.hiw-filebadge {
  width: 18px;
  height: 21px;
  border-radius: 4px;
  color: #fff;
  font-size: 7.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.hiw-tcard {
  margin-left: 37px;
  background: #fff;
  border: 1px solid #e9e9ea;
  border-radius: 12px;
  padding: 13px;
  box-shadow: 0 1px 4px rgba(31, 28, 38, 0.05);
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.hiw-tphoto {
  width: 38px;
  height: 38px;
  border-radius: 9999px;
  object-fit: cover;
  flex: none;
}

.hiw-tquote {
  font-size: 12.5px;
  line-height: 1.5;
  color: #36333c;
  font-weight: 500;
}

.hiw-tname {
  font-size: 11.5px;
  font-weight: 700;
  color: #1f1c26;
  margin-top: 6px;
}

.hiw-ttag {
  display: inline-block;
  margin-top: 12px;
  background: #efedfe;
  color: #5848f7;
  font-size: 10.5px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 7px;
}

.hiw-next {
  margin-left: 37px;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 10px;
}

.hiw-btn-primary {
  background: #5848f7;
  color: #fff;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  border: none;
  padding: 11px 16px;
  border-radius: 10px;
  cursor: default;
  text-align: center;
  pointer-events: none;
  user-select: none;
  display: inline-block;
}

.hiw-btn-secondary {
  background: #fff;
  color: #1f1c26;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  border: 1px solid #d9d5e4;
  padding: 11px 16px;
  border-radius: 10px;
  cursor: default;
  text-align: center;
  pointer-events: none;
  user-select: none;
  display: inline-block;
}

.hiw-dot {
  width: 9px;
  height: 9px;
  border-radius: 99px;
  background: #d9d5e4;
  border: none;
  padding: 0;
  cursor: pointer;
  transition:
    width 0.3s ease,
    background 0.3s ease;
}

.hiw-dot.is-active {
  width: 26px;
  background: #5848f7;
}

.hiw-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 34px;
}

.hiw-cta-row {
  display: flex;
  justify-content: center;
  margin-top: 56px;
}

.hiw-section-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: #5848f7;
  color: #fff;
  font-family: "Manrope", sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  padding: 20px 44px;
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(88, 72, 247, 0.35);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hiw-section-cta-btn:hover {
  background: #3827d9;
  transform: translateY(-1px);
}

@media (max-width: 1080px) {
  #hiw-section {
    padding: 64px 32px;
  }

  .hiw-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hiw-card-col {
    margin-left: 0;
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  #hiw-section {
    padding: 48px 20px;
  }

  #hiw-section::before,
  #hiw-section::after {
    display: none;
  }

  .hiw-cta-row {
    margin-top: 28px;
  }

  .hiw-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hiw-card-col {
    margin-left: 0;
    max-width: 100%;
  }

  .hiw-section-title {
    margin-bottom: 28px;
  }

  .hiw-steps-viewport {
    overflow: hidden;
    width: 100%;
    touch-action: pan-y;
    transition: height 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
  }

  .hiw-steps-track {
    flex-direction: row;
    align-items: flex-start;
    gap: 0;
    transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
    transform: translateX(calc(var(--hiw-step-index, 0) * -100%));
    will-change: transform;
  }

  .hiw-step {
    flex: 0 0 100%;
    min-width: 100%;
    box-sizing: border-box;
    align-self: flex-start;
    display: block;
    padding: 16px 18px;
    box-shadow: 0 1px 4px rgba(31, 28, 38, 0.05);
  }

  .hiw-step.is-active {
    box-shadow: 0 1px 6px rgba(31, 28, 38, 0.06);
  }

  .hiw-step:not(.is-active) > * {
    opacity: 1;
  }

  .hiw-step-num {
    font-size: 26px;
    margin-bottom: 6px;
  }

  .hiw-step-title {
    font-size: 17px;
    line-height: 1.3;
  }

  .hiw-step-desc {
    font-size: 15px;
    line-height: 1.6;
  }

  .hiw-card-mascot {
    display: none;
  }

  #hiw-section .hiw-card,
  #hiw-section .hero-chat-tilt .hiw-card {
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
  }

  .hero-chat-tilt,
  .hero-chat-tilt-y,
  .hero-chat-pulse {
    transform: none !important;
    animation: none !important;
  }

  .hero-chat-wrap {
    perspective: none;
    overflow: hidden;
  }

  #hiw-section .hiw-section-cta-btn {
    font-size: 16px;
    font-weight: 600;
    padding: 15px 28px;
    border-radius: 8px;
    box-shadow: none;
    width: auto;
    max-width: 100%;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hiw-steps-track {
    transition: none !important;
  }

  .hiw-steps-viewport {
    transition: none !important;
  }

  .hiw-thread .hc-anim {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .hero-chat-tilt,
  .hero-chat-tilt-y {
    transform: rotateX(5deg) rotateY(-5deg) !important;
    animation: none !important;
  }

  .hero-chat-pulse {
    animation: none !important;
  }

  .hc-dot,
  .hc-typing span {
    animation: none !important;
  }
}
