.cont {
  background: gray;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  text-align: center;
  padding: 1em;
  box-sizing: border-box;

  display: flex;
  justify-content: center;
  align-items: stretch;  /* stretch all children to same height */
  gap: 10px;
  flex-wrap: wrap;
}

.content-wrap1,
.content-wrap3 {
  display: flex;
  flex-direction: column; /* stack text on top */
  align-items: center;
  justify-content: flex-start; /* align content to top */
  gap: 20px;
  background-color: skyblue;
  flex: 1;
  min-width: 300px;
  padding-bottom: 30px;
}

.text-section {
  width: 100%;
  text-align: center; /* keep heading centered horizontally */
  margin-top: 0;      /* remove any extra space */
}

.text-section h2{
  max-width: 100%;
  margin-bottom: 50px;
  color: #324b97;
}

.card-wrap {
  display: flex;
  gap: 10px;
}

.card, .card2 {
  position: relative;
  max-width: 340px;
  min-width: 100px;
  padding: 10px;
}

.card img {
  width: 120px;
  height: auto;
  transition: transform 1s, box-shadow 1s;
}

.card2 img {
  width: 150px;
  height: auto;
  transition: transform 1s, box-shadow 1s;
}

.ahover .a img {animation: glide 1s forwards;}
.ahover .b img {animation: glide1 1s forwards;}
.bhover .a img {animation: glide2 1s forwards;}
.bhover .b img {animation: glide3 1s forwards;}
@keyframes glide {
  0% {transform: translate(20px, 0px) scale(0.9);}
  50% {transform: translate(-20px, -10px);}
  100% {transform: translate(20px, -20px) scale(1.2); box-shadow: 30px 30px 30px rgba(0, 0, 0, 0.5);}
}
@keyframes glide1 {
  0% {transform: translate(-20px, -20px) scale(1.2);}
  50% {transform: translate(20px, 10px);}
  100% {transform: translate(-20px, 0px) scale(0.9);}
}
@keyframes glide2 {
  0% {transform: translate(20px, -20px) scale(1.2);}
  50% {transform: translate(-20px, -10px);}
  100% {transform: translate(20px, 0px) scale(0.9);}
}
@keyframes glide3 {
  50% {transform: translate(20px, -10px);}
  100% {transform: translate(-20px, -20px) scale(1.2); box-shadow: 30px 30px 30px rgba(0, 0, 0, 0.5);}
}

.paint-animation {
    position: relative;
    width: 330px;
    height: 260px;
    overflow: hidden;
}

/* Brush image */
.brush {
    position: absolute;
    bottom: 120px;
    left: 150px;
    width: 130px;
    transform-origin: center bottom;
    animation: brushSweep 5s ease-in-out infinite;
    z-index: 1000;
}

/* Paint strokes */
.stroke {
    position: absolute;
    bottom: -50px;
    left: 30px;
    width: 0;
    opacity: 0;
}

.stroke1 { animation: paintStroke 1s ease forwards 1s; }

/* Brush movement */
@keyframes brushSweep {
    0%, 20% { transform: translateX(0) rotate(0deg); }
    40% { transform: translateX(50px) rotate(-8deg); }
    60% { transform: translateX(0) rotate(0deg); }
    80% { transform: translateX(-50px) rotate(8deg); }
    100% { transform: translateX(0) rotate(0deg); }
}

/* Stroke growth animation */
@keyframes paintStroke {
    0% { width: 0; opacity: 1; }
    100% { width: 300px; opacity: 1; }
}
