/* ===== How Works Section ===== */

.how-works-section {
  background: linear-gradient(135deg, #a01d1d 0%, #7d1a1a 50%, #a01d1d 100%);
  padding: 24px 16px;
  position: relative;
  overflow: hidden;
}

.how-works-section::before {
  content: "";
  position: absolute;
  top: -80px;
  right: -80px;
  width: 250px;
  height: 250px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 50%;
  pointer-events: none;
}

.how-works-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: center;
}

.how-works-container {
  min-width: 0;
}

.how-works-header {
  text-align: center;
  margin-bottom: 16px;
}

.how-works-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 40px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  margin-bottom: 8px;
}

.how-works-title {
  font-size: clamp(18px, 2.8vw, 26px);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.12;
  letter-spacing: -0.3px;
  margin: 0;
}

.how-works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.how-works-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.how-works-number {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 800;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border: 2px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  margin-bottom: 8px;
  transition: all 0.22s ease;
}

.how-works-card:hover .how-works-number {
  background: rgba(255, 255, 255, 0.22);
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.how-works-card-title {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 6px;
  line-height: 1.28;
}

.how-works-card-desc {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.4;
  margin: 0;
}

.how-works-cta {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 10px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.cta-content {
  flex: 1;
  min-width: 160px;
}

.cta-title {
  font-size: 15px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 4px;
  line-height: 1.28;
}

.cta-subtitle {
  font-size: 12px;
  color: #666666;
  margin: 0;
  line-height: 1.35;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: linear-gradient(135deg, #db0011 0%, #5e0c12 100%);
  color: #ffffff;
  font-weight: 600;
  font-size: 14px;
  border-radius: 8px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.22s ease;
  box-shadow: 0 3px 10px rgba(219, 0, 17, 0.18);
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(219, 0, 17, 0.35);
}

.cta-button:active {
  transform: translateY(0);
}

.how-works-character {
  display: none; /* removed right-column image; character lives inside CTA now */
}

.cta-figure {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  margin-right: 16px;
  /* allow the character to visually overlap the CTA card */
  width: 46%;
  max-width: 520px;
  position: relative;
  z-index: 2;
}

.character-img {
  width: auto;
  max-width: 420px; /* bigger on desktop to match screenshot */
  height: auto;
  border-radius: 6px;
  filter: drop-shadow(0 8px 28px rgba(0, 0, 0, 0.15));
  transition: transform 0.2s ease;
  /* slight overlap and lift for the visual style in your screenshot */
  margin-right: -40px;
  transform: translateY(0);
}

.how-works-cta:hover .character-img {
  transform: translateY(-6px) scale(1.02);
}

@keyframes characterFloat {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-12px);
  }
}

/* Larger character image on wider screens */
@media (min-width: 768px) {
  .character-img {
    max-width: 420px;
  }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .how-works-wrapper {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  /* small adjustments for image inside CTA */
  .character-img {
    max-width: 260px;
    margin-right: -20px;
  }
}

@media (max-width: 768px) {
  .how-works-section {
    padding: 32px 16px;
  }

  .how-works-header {
    margin-bottom: 16px;
  }

  .how-works-title {
    font-size: 20px;
  }

  .how-works-grid {
    gap: 12px;
    margin-bottom: 16px;
  }

  .how-works-number {
    width: 48px;
    height: 48px;
    font-size: 26px;
    margin-bottom: 10px;
  }

  .how-works-card-title {
    font-size: 13px;
  }

  .how-works-card-desc {
    font-size: 11px;
  }

  .how-works-cta {
    padding: 12px 14px;
    justify-content: center;
    text-align: center;
  }

  .cta-content {
    flex: 1 1 100%;
  }

  .cta-button {
    flex: 1 1 100%;
    justify-content: center;
    padding: 9px 18px;
  }

  .character-img {
    max-width: 120px;
    margin-right: 0;
  }
}

@media (max-width: 480px) {
  .how-works-section {
    padding: 24px 12px;
  }

  .how-works-section::before {
    width: 150px;
    height: 150px;
    top: -60px;
    right: -60px;
  }

  .how-works-title {
    font-size: 18px;
  }

  .how-works-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .how-works-number {
    width: 44px;
    height: 44px;
    font-size: 22px;
    margin-bottom: 6px;
  }

  .how-works-card-title {
    font-size: 12px;
  }

  .how-works-card-desc {
    font-size: 10px;
  }

  .how-works-cta {
    padding: 18px 16px;
    gap: 14px;
  }

  .cta-title {
    font-size: 14px;
  }

  .cta-subtitle {
    font-size: 12px;
  }

  .cta-button {
    padding: 10px 20px;
    font-size: 13px;
  }

  .character-img {
    max-width: 120px;
    margin-right: 0;
  }
}

.how-works-card-desc {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.7;
  margin: 0;
}

.how-works-cta {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  padding: 20px 40px 1px 180px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  position: relative;
  z-index: 1; /* box is behind */
  min-height: 120px;
}

/* Position the character image overlapping the CTA on larger screens */
@media (min-width: 768px) {
  .how-works-cta {
    position: relative;
    padding-left: 153px; /* room for overlapping image */
    min-height: 96px;
  }

  .cta-figure {
    position: absolute;
    left: 0;
    top: -95px; /* image touches line above */
    width: auto;
    max-width: 200px;
    z-index: 4; /* image in front */
  }

  .character-img {
    height: 150px; /* taller to reach/touch line */
    width: auto;
    object-fit: contain;
    border-radius: 6px;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.15));
    margin: 0;
  }
}

.cta-content {
  flex: 1;
  min-width: 250px;
}

.cta-title {
  font-size: 16px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 4px;
  line-height: 1.3;
}

.cta-subtitle {
  font-size: 12px;
  color: #666666;
  margin: 0;
  line-height: 1.4;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 36px;
  background: linear-gradient(135deg, #db0011 0%, #5e0c12 100%);
  color: #ffffff;
  font-weight: 600;
  font-size: 15px;
  border-radius: 50px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(219, 0, 17, 0.3);
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(219, 0, 17, 0.4);
}

.cta-button:active {
  transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
  .how-works-section {
    padding: 60px 16px;
  }

  .how-works-title {
    font-size: 32px;
  }

  .how-works-grid {
    gap: 30px;
    margin-bottom: 40px;
  }

  .how-works-number {
    width: 70px;
    height: 70px;
    font-size: 40px;
    margin-bottom: 20px;
  }

  .how-works-card-title {
    font-size: 18px;
  }

  .how-works-cta {
    padding: 24px 28px;
    justify-content: center;
    text-align: center;
  }

  .cta-content {
    flex: 1 1 100%;
  }

  .cta-button {
    flex: 1 1 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .how-works-section {
    padding: 50px 12px;
  }

  .how-works-title {
    font-size: 24px;
  }

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

  .how-works-number {
    width: 60px;
    height: 60px;
    font-size: 36px;
  }

  .how-works-card-title {
    font-size: 16px;
  }

  .how-works-card-desc {
    font-size: 14px;
  }

  .cta-button {
    padding: 12px 24px;
    font-size: 14px;
  }
}

#how-works .cta-button {
  background: linear-gradient(135deg, #db0011 0%, #5e0c12 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 16px rgba(219, 0, 17, 0.3) !important;
}

#how-works .cta-button:hover {
  box-shadow: 0 8px 28px rgba(219, 0, 17, 0.4) !important;
}
