/* Grid Layout */
.esa-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

/* Card Base */
.esa-card {
  position: relative;
  flex: 1 1 calc(33% - 20px);
  overflow: hidden;
  border-radius: 16px;                     /* rounded corners */
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);  /* soft drop‑shadow */
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  min-width: 0;
}
.esa-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 16px 32px rgba(0,0,0,0.2);
}

/* Inner Wrapper to preserve rounding */
.esa-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 16px;
  overflow: hidden;
}

/* Main Overlay (black @30%) */
.esa-overlay-main {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3) !important;
  z-index: 2;
}

/* Main Content: bottom center */
.esa-main {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end; /* bottom */
  align-items: center;       /* center horizontally */
  text-align: center;
  padding-bottom: 20px;
  box-sizing: border-box;
  z-index: 3;
}

/* Icon spacing */
.esa-icon {
  display: block;
  margin-bottom: 30px;
}

/* Typography for main panel */
.esa-main h3 {
  margin: 0 0 8px;
  font-size: 1.5rem;
  color: #fff !important;
  font-weight: 600;
}
.esa-main p {
  margin: 0;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.85) !important;
}

/* Hover Panel Base */
.esa-hover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-size: cover !important;
  background-position: center !important;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-20%);
  transition: opacity 0.6s ease, transform 0.6s ease;
  padding: 20px;
  box-sizing: border-box;
  z-index: 4;
  text-align: center;
}
.esa-card:hover .esa-hover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.esa-card:hover .esa-main {
  display: none;
}

/* Hover Subtitle */
.esa-hover p {
  margin: 0 0 16px;
  font-size: 1rem;
  color: #fff !important;
  line-height: 1.4;
}

/* Button: text only, no background */
.esa-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 0;
  background: none !important;
  color: #fff !important;
  text-decoration: none !important;
  font-weight: bold;
  transition: color 0.3s ease;
  z-index: 5;
}
.esa-btn:hover {
  color: grey !important;
  background: none !important;
}

/* Responsive: stack on mobile */
@media (max-width: 767px) {
  .esa-card {
    flex: 1 1 100%;
  }
  .esa-hover {
    padding: 30px;
  }
  .esa-main {
    padding-bottom: 20px;
  }
}
