@import url("https://fonts.googleapis.com/css2?family=Inter:wght@500;600;700&display=swap");

.eih-card {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  min-height: 450px;
  height: auto;
  width: 100%;
  display: flex;
  align-items: flex-end;
  font-family: "Inter", sans-serif;
  background-color: #6c74a7;
}

.eih-card-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform 0.5s ease;
  z-index: 1;
}

/* Gradient for default view - matches screenshot 1 (white fade at bottom) */
.eih-card-overlay-1 {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 40%,
    rgba(255, 255, 255, 0.9) 80%,
    rgba(255, 255, 255, 1) 100%
  );
  z-index: 2;
  transition: opacity 0.4s ease;
}

/* Darker overlay for hover view - matches screenshot 2 */
.eih-card-overlay-2 {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgb(82 88 88 / 70%) 0%, #000000 100%);
  z-index: 2;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.eih-card-content {
  position: relative;
  z-index: 3;
  width: 100%;
  padding: 30px;
  height: 100%;
  display: grid;
  grid-template-areas: "content";
}

.eih-card-title {
  margin: 0 0 15px 0;
  font-family: "Inter", sans-serif;
  font-size: 36px;
  font-weight: 600;
  color: #2d3440;
  transition: color 0.4s ease;
}

/* View 1 Layout */
.eih-card-view-1 {
  grid-area: content;
  align-self: end;
  opacity: 1;
  transform: translateY(0);
  transition: all 0.4s ease;
}

.eih-card-desc {
  margin: 0;
  font-family: "Inter", sans-serif;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.5;
  color: #64748b;
}

/* View 2 Layout */
.eih-card-view-2 {
  grid-area: content;
  align-self: center;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease;
  pointer-events: none; /* Prevent interaction when hidden */
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* On view 2, title should be white according to screenshot 2 */
.eih-card-view-2 .eih-card-title {
  color: #ffffff;
  margin-bottom: 25px;
}

.eih-card-list {
  list-style: none;
  padding: 0;
  margin: 0 0 30px 0;
}

.eih-card-list li {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  font-family: "Inter", sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: #94a3b8;
}

.eih-list-icon {
  margin-right: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.eih-list-icon i {
  color: #f6a838;
  font-size: 20px;
}
.eih-list-icon svg {
  fill: #f5a623;
  width: 22px;
  height: 22px;
}

.eih-btn-wrapper {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: auto; /* Push to bottom */
}

/* The parent anchor wrapper */
.eih-btn-icon-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  gap: 15px; /* Gap between text and icon */
  transition: all 0.3s ease;
}

/* The text part */
.eih-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #f6a838;
  color: #1a202c !important;
  padding: 12px 25px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s ease;
  border: none;
}

/* The icon circle part */
.eih-btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: #f6a838;
  border-radius: 50%;
  transition: all 0.3s ease;
}

/* Hover effects when hovering the parent link */
.eih-btn-icon-link:hover .eih-btn,
.eih-btn-icon-link:hover .eih-btn-icon {
  background-color: #ed8936;
}

.eih-btn-icon i {
  font-size: 18px;
  color: #1a202c;
}
.eih-btn-icon svg {
  width: 16px;
  height: 16px;
  fill: #1a202c;
}

/* Hover effects */
.eih-card:hover .eih-card-bg {
  transform: scale(1.05); /* Slight zoom on image */
  filter: blur(5px);
}

.eih-card:hover .eih-card-overlay-1 {
  opacity: 0;
}

.eih-card:hover .eih-card-overlay-2 {
  opacity: 1;
}

.eih-card:hover .eih-card-view-1 {
  opacity: 0;
  transform: translateY(-20px);
  pointer-events: none;
}

.eih-card:hover .eih-card-view-2 {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Mobile Responsive */
@media (max-width: 767px) {
  .eih-card {
    min-height: 380px;
  }
  .eih-card-content {
    padding: 20px;
  }
  .eih-card-title {
    font-size: 24px;
  }
  .eih-card-view-2 .eih-card-title {
    margin-bottom: 15px;
    font-size: 24px;
  }
  .eih-card-desc {
    font-size: 15px;
  }
  .eih-card-list {
    margin: 0 0 20px 0;
  }
  .eih-card-list li {
    font-size: 15px;
    margin-bottom: 12px;
  }
  .eih-list-icon i {
    font-size: 18px;
  }
  .eih-list-icon svg {
    width: 18px;
    height: 18px;
  }
  .eih-btn-wrapper {
    width: 100%;
    margin-top: 15px;
  }
  .eih-btn-icon-link {
    width: 100%;
    justify-content: space-between;
  }
  .eih-btn {
    width: calc(100% - 55px);
    text-align: center;
    padding: 10px 15px;
    font-size: 15px;
  }
  .eih-btn-icon {
    width: 38px;
    height: 38px;
  }
}
