.hero-section-blog {
  padding: 80px 100px;
  display: flex;
  justify-content: center;
  margin-bottom: 50px;
}

.hero-section-blog img {
  width: 100%;
  height: auto;
  border-radius: 50px;
  display: block;
}

/* -------------------Card Grid----------------------------------------- */
/* Wrapper */
.flip-wrapper {
  display: flex;
  flex-direction: column;
}
.flip-scene {
  /* height: 440px; */
  perspective: 1200px;
}

/* Rotating card */
.flip-card {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.65s cubic-bezier(0.45, 0.05, 0.55, 0.95);
  border-radius: 20px;
}

.flip-wrapper:hover .flip-card,
.flip-wrapper.active .flip-card {
  transform: rotateY(180deg);
}

/* Both faces */
.flip-front,
.flip-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 32px;
  overflow: hidden;
}
.flip-front {
  position: relative;
}

.flip-front::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 70%; /* how far up the fade goes */
  background: linear-gradient(
    to top,
    rgba(151, 158, 120, 0.9) 0%,
    /* match your page bg color */ rgba(240, 244, 232, 0) 100%
  );
  pointer-events: none;
  border-radius: 0 0 20px 20px;
}

/* Front */
.flip-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Back */
.flip-back {
  transform: rotateY(180deg);
  background: #979e6b;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 32px 28px 24px; /* 2rem 1.75rem 1.5rem */
  color: #fff;
  height: 500px;
}

.flip-back .back-date {
  display: flex;
  gap: 8px; /* 0.5rem */
  margin-bottom: 20px; /* 1.25rem */
}

.flip-back .back-date span {
  background: rgb(255, 255, 255);
  color: #16404efc;
  font-size: 12px; /* 0.75rem */
  font-weight: 600;
  padding: 4.8px 13.6px; /* 0.3rem 0.85rem */
  border-radius: 50px;
  letter-spacing: 0.02em;
}

.flip-back h3 {
  font-family: "DM Serif Display", serif;
  font-size: 30px; /* 1.4rem */
  line-height: 1.3;
  margin-bottom: 16px; /* 1rem */
  color: #fff;
  text-align: left;
}

.flip-back p {
  font-size: 12px; /* 0.85rem */
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.88);
  text-align: justify;
}

.flip-back .read-more-btn {
  margin-top: 13px;
  display: inline-block;
  background: #fff;
  color: #979e6b;
  font-weight: 600;
  font-size: 17px;
  padding: 5px 65px;
  border-radius: 50px;
  text-decoration: none;
  align-self: center;
  transition:
    background 0.2s,
    color 0.2s;
}

.flip-back .read-more-btn:hover {
  background: #1e4a4a;
  color: #fff;
}

/* Button row */
.btn-row {
  display: flex;
  gap: 10px; /* 0.625rem */
  overflow: hidden;
  max-height: 50px;
  opacity: 1;
  margin-top: 12px; /* 0.75rem */
  transition:
    max-height 0.65s ease,
    opacity 0.65s ease,
    margin-top 0.65s ease;
}

.flip-wrapper:hover .btn-row,
.flip-wrapper.active .btn-row {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
}

/* Know More button */
.btn-know {
  flex: 1;
  background: #16404efc;
  color: #fff;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.01em;
  border: none;
  border-radius: 21px;
  padding: 14.4px 24px;
  cursor: pointer;
  text-align: center;
  transition: background 0.3s;
  display: flex;
  justify-content: center;
  align-items: center;
}

.btn-know:hover {
  background: #18404de7;
}

/* Arrow button */
.btn-arrow {
  aspect-ratio: 1;
  width: 80px;
  flex-shrink: 0;
  background: #16404efc;
  color: #fff;
  font-size: 40px; /* 1rem */
  border: none;
  border-radius: 21px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}

.btn-arrow img {
  width: 30px;
}

.btn-arrow:hover {
  background: #18404de9;
}

.cards-section {
  width: 100%;
  margin-bottom: 100px;
  height: auto;
  padding: 22px 86px;
  min-height: 1500px;
}

/* Allow overlap */
.cards-section .col-12 {
  position: relative;
}

/* Make scene expandable */
.flip-scene {
  transition: height 0.65s ease;
  position: relative;
  z-index: 2;
  margin-bottom: 10px;
}

/* Button sits below initially */
.btn-row {
  position: relative;
  z-index: 1;
  margin-top: 12px;
  transition:
    transform 0.65s ease,
    opacity 0.4s ease;
}

/* Move button under card */
.flip-wrapper:hover + .btn-row {
  opacity: 0;
  pointer-events: none;
}

/* .flip-wrapper:hover .flip-scene {
  height: 500px;
} */

/* Move button under card */
.flip-wrapper:hover + .btn-row {
  opacity: 0;
  pointer-events: none;
}

/* Responsive */
@media (max-width: 768px) {
  .flip-wrapper {
    height: 360px;
  }
}

@media (max-width: 576px) {
  .flip-wrapper {
    height: 343px;
  }

  .flip-back h3 {
    font-size: 18.4px; /* 1.15rem */
  }
  .hero-section-blog {
    padding: 80px 16px;
  }
  .hero-section-blog img {
    border-radius: 22px;
  }
  .cards-section {
    padding: 22px 30px;
  }
  .flip-back {
    height: max-content;
    padding: 32px 28px 18px;
  }

  .hide_para {
    display: none;
  }

  .flip-back .read-more-btn {
    margin-top: auto;
  }
  .flip-back p {
    font-size: 12px;
  }
}
@media (min-width: 750px) and (max-width: 1000px) {
  .flip-back {
    height: 330px;
  }
  .flip-back h3 {
    font-size: 21px;
  }
  .flip-back .back-date {
    scale: 0.9;
  }
  .flip-back p {
    display: none;
  }
  .flip-back .read-more-btn {
    padding: 5px 37px;
  }
  .flip-back {
    justify-content: space-between;
  }
}
