.heading {
  text-align: center;
  max-width: 1100px;
  margin: 0 auto 60px;
}
.heading h1 {
  font-size: 44px;
  font-weight: 800;
  color: #0b1b3b;
  margin-bottom: 18px;
}
.heading p {
  font-size: 16px;
  color: #3a4a6b;
  line-height: 1.6;
  max-width: 820px;
  margin: 0 auto;
}

.cards {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 24px;
  max-width: 1200px;
  width: 95%;
  margin: 0 auto;
}
.card {
  position: relative;
  flex: 1 1 0;
  height: 380px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 10px 40px rgba(15, 38, 90, 0.08);
  overflow: hidden;
  cursor: pointer;
  transition: flex-grow 1.2s cubic-bezier(0.7, 0.1, 0.2, 1);
  padding: 38px 34px;
}
.cards:hover .card {
  flex-grow: 1;
}
.cards .card:hover {
  flex-grow: 1.6;
}

/* color themes */
.card.blue {
  --c: #2f6bff;
  --c-soft: #e8efff;
}
.card.orange {
  --c: #f08a2a;
  --c-soft: #fdecd8;
}
.card.indigo {
  --c: #3b6bd6;
  --c-soft: #e6eeff;
}

.icon {
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.5s ease;
}
.icon svg {
  width: 30px;
  height: 30px;
}

.num {
  color: var(--c);
  font-weight: 700;
  font-size: 18px;
  margin-top: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.num::after {
  content: "";
  display: block;
  width: 28px;
  height: 2px;
  background: var(--c);
}

.title {
  color: var(--c);
  font-size: 18px;
  font-weight: 700;
  margin-top: 10px;
}
.desc {
  color: #3a4a6b;
  font-size: 13px;
  line-height: 1.65;
  margin-top: 14px;
  max-width: 100%;
}

/* bottom bg wave / image */
.bg-wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 200px;
  background-size: cover;
  background-position: center;
  pointer-events: none;
  transition: all 0.6s ease;
  opacity: 0.9;
}
.card.blue .bg-wave {
  background-image:
    radial-gradient(
      ellipse at 20% 80%,
      rgba(47, 107, 255, 0.18),
      transparent 60%
    ),
    radial-gradient(
      ellipse at 80% 90%,
      rgba(47, 107, 255, 0.22),
      transparent 60%
    );
}
.card.orange .bg-wave {
  background-image:
    radial-gradient(
      ellipse at 20% 80%,
      rgba(240, 138, 42, 0.22),
      transparent 60%
    ),
    radial-gradient(
      ellipse at 80% 90%,
      rgba(240, 138, 42, 0.25),
      transparent 60%
    );
}
.card.indigo .bg-wave {
  background-image:
    radial-gradient(
      ellipse at 20% 80%,
      rgba(59, 107, 214, 0.18),
      transparent 60%
    ),
    radial-gradient(
      ellipse at 80% 90%,
      rgba(59, 107, 214, 0.22),
      transparent 60%
    );
}

/* layout: compact vs expanded */
.compact {
  display: flex;
  flex-direction: column;
  transition:
    opacity 0.7s ease,
    transform 1s ease;
  min-width: 260px;
}
.expanded {
  position: absolute;
  inset: 38px 34px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto 1fr;
  gap: 18px 30px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(15px);
  transition:
    opacity 0.8s ease 0.35s,
    transform 1s ease 0.35s;
}
.card:hover .compact {
  opacity: 0;
  transform: translateX(-20px);
}
.card:hover .expanded {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.expanded .left-top {
  display: flex;
  align-items: flex-start;
}
.expanded .right-top {
}
.expanded .right-top .num {
  margin-top: 6px;
}
.expanded .right-top .title {
  font-size: 16px;
}
.expanded .desc {
  font-size: 11px;
}
.expanded .checklist {
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 10px;
  margin-top: -18px;
}
.expanded .checklist li {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #0b1b3b;
  font-size: 12px;
  font-weight: 500;
}
.expanded .right-top .desc {
  max-width: none;
}

.checklist {
  align-self: end;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 10px;
}
.checklist li {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #0b1b3b;
  font-size: 15px;
  font-weight: 500;
}
.check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--c);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.check svg {
  width: 12px;
  height: 12px;
}

.illus {
  align-self: end;
  justify-self: end;
  width: 100%;
  height: 170px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: right bottom;
  opacity: 0.85;
}
.card.blue .illus {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 160'><g fill='none' stroke='%232f6bff' stroke-width='2' opacity='.7'><circle cx='120' cy='80' r='42'/><path d='M120 50 v60 M90 80 h60'/><path d='M100 60 l40 40' stroke-dasharray='3 4'/></g></svg>");
}
.card.orange .illus {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 160'><g fill='none' stroke='%23f08a2a' stroke-width='2' opacity='.7'><path d='M100 130 C100 90 60 80 60 50 M100 130 C100 90 140 80 140 50'/><circle cx='100' cy='40' r='14'/></g></svg>");
}
.card.indigo .illus {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 160'><g fill='none' stroke='%233b6bd6' stroke-width='2' opacity='.7'><circle cx='70' cy='90' r='14'/><circle cx='110' cy='80' r='16'/><circle cx='150' cy='95' r='14'/><path d='M55 130 q15 -20 30 -20 M95 130 q15 -25 30 -25 M135 130 q15 -20 30 -20'/></g></svg>");
}

@media (max-width: 900px) {
  .cards {
    flex-direction: column !important;
    max-width: 100% !important;
    padding: 0 5% !important;
    gap: 20px !important;
  }
  .card {
    height: auto !important;
    min-height: unset !important;
    flex: none !important;
    width: 100% !important;
    padding: 22px 20px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    overflow: visible !important;
    box-shadow: 0 15px 35px rgba(15, 38, 90, 0.12) !important;

    /* Scroll entrance animation styling */
    opacity: 0;
    transform: translateY(30px) scale(0.96);
    transition:
      opacity 3s cubic-bezier(0.16, 1, 0.3, 1),
      transform 3s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }
  .card.visible {
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
  }
  .cards .card:hover {
    flex-grow: 1 !important;
  }
  .card .compact {
    display: none !important;
  }
  .card1 {
    display: none !important; /* Hide compact wave background */
  }
  .card .expanded {
    position: relative !important;
    inset: auto !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: none !important;
    display: grid !important;
    grid-template-columns: 52px 1fr !important;
    grid-template-rows: auto auto auto auto !important;
    gap: 8px 12px !important;
  }
  .expanded .left-top {
    grid-column: 1 !important;
    grid-row: 1 / span 2 !important;
    align-self: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    margin-bottom: 0px !important;
  }
  .expanded .left-top .icon {
    width: 48px !important;
    height: 48px !important;
    border-radius: 12px !important;
    background: var(--c-soft) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    /* Micro-animation scale entrance */
    transform: scale(0.6);
    opacity: 0;
    transition:
      transform 2s cubic-bezier(0.34, 1.56, 0.64, 1) 0.4s,
      opacity 2s ease 0.4s !important;
  }
  .card.visible .expanded .left-top .icon {
    transform: scale(1) !important;
    opacity: 1 !important;
  }
  .expanded .left-top .icon img,
  .expanded .left-top .icon svg {
    width: 28px !important;
    height: 28px !important;
    color: var(--c) !important;
  }
  .expanded .right-top {
    display: contents !important; /* Let children flow directly into the grid */
  }
  .expanded .right-top .num {
    grid-column: 2 !important;
    grid-row: 1 !important;
    font-size: 13px !important;
    margin-top: 0 !important;
    font-weight: 700 !important;
    color: var(--c) !important;
    display: flex !important;
    align-items: center !important;
    line-height: 1 !important;
  }
  .expanded .right-top .title {
    grid-column: 2 !important;
    grid-row: 2 !important;
    font-size: 18px !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    line-height: 1.25 !important;
  }
  .expanded .right-top .desc {
    grid-column: 1 / span 2 !important;
    grid-row: 3 !important;
    font-size: 12.5px !important;
    margin-top: 2px !important;
    line-height: 1.45 !important;
  }
  .expanded .checklist {
    grid-column: 1 / span 2 !important;
    grid-row: 4 !important;
    margin-top: 2px !important;
    gap: 8px !important;
    max-width: 58% !important; /* Cap width to leave space for image on right */
  }
  .expanded .checklist li {
    font-size: 12px !important;
    gap: 8px !important;
    /* Micro-animation slide from left */
    opacity: 0;
    transform: translateX(-15px);
    transition:
      opacity 1.5s ease,
      transform 1.5s ease !important;
  }
  .card.visible .expanded .checklist li:nth-child(1) {
    transition-delay: 0.6s !important;
    opacity: 1 !important;
    transform: translateX(0) !important;
  }
  .card.visible .expanded .checklist li:nth-child(2) {
    transition-delay: 0.9s !important;
    opacity: 1 !important;
    transform: translateX(0) !important;
  }
  .card.visible .expanded .checklist li:nth-child(3) {
    transition-delay: 1.2s !important;
    opacity: 1 !important;
    transform: translateX(0) !important;
  }
  .card.visible .expanded .checklist li:nth-child(4) {
    transition-delay: 1.5s !important;
    opacity: 1 !important;
    transform: translateX(0) !important;
  }

  .check {
    width: 18px !important;
    height: 18px !important;
  }
  .check svg {
    width: 10px !important;
    height: 10px !important;
  }
  img.card1a,
  img.card2a {
    position: absolute !important;
    bottom: 20px !important;
    right: 15px !important;
    width: 48% !important;
    max-width: 190px !important; /* Increased for better visibility */
    height: auto !important;
    margin: 0 !important;
    left: auto !important;
    top: auto !important;
    border-radius: 8px !important;
    z-index: 5 !important;
    /* Micro-animation scale entrance */
    transform: scale(0.9);
    opacity: 0;
    transition:
      transform 1.5s cubic-bezier(0.16, 1, 0.3, 1) 0.8s,
      opacity 1.5s ease 0.8s !important;
  }
  .card.visible img.card1a,
  .card.visible img.card2a {
    transform: scale(1) !important;
    opacity: 0.95 !important;
  }
}

@media (max-width: 480px) {
  .card {
    padding: 18px 16px !important;
  }
  .heading h1 {
    font-size: 26px !important;
  }
  .heading p {
    font-size: 14px !important;
  }
  .cards {
    gap: 16px !important;
  }
}

.card1 {
  position: relative;
  left: -36px;
  top: -56px;
}
.cards .card:hover .card1 {
  display: none;
}
