.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start; /* Keep everything locked smoothly to the left */
  gap: 8px;
  padding: 14px 28px;
  height: 50px;
  text-decoration: none;
}

.btn-primary {
  background: var(--bg);
  color: var(--green-dark);
  font-family: "Parkinsans", sans-serif;
  font-weight: 500;
  font-size: 15px;
  padding: 14px 28px;
  border-radius: 50px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}
.btn-primary:hover {
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: var(--green-dark);
  font-family: "Parkinsans", sans-serif;
  font-weight: 600;
  font-size: 15px;
  padding: 14px 28px;
  border-radius: 50px;
  border: 1.5px solid var(--border2);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: all 0.2s;
  cursor: pointer;
}
.btn-secondary:hover {
  border-color: var(--green-dark);
  background: var(--bg3);
}

.btn-white {
  background: #fff;
  color: var(--green-dark);
  font-family: "Parkinsans", sans-serif;
  font-weight: 700;
  font-size: 15px;
  padding: 14px 28px;
  border-radius: 50px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}
.btn-white:hover {
  background: var(--accent);
  transform: translateY(-2px);
}

.btn-outline-white {
  background: #2f5a55;
  color: #fff;
  font-family: "Parkinsans", sans-serif;
  font-weight: 500;
  font-size: 15px;
  padding: 14px 28px;
  border-radius: 50px;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: all 0.2s;
  cursor: pointer;
}

/* ── 1. The original text element ── */
.btn span {
  display: inline-block;
  line-height: 1.2; /* Explicit height baseline setting */
  transition: transform 0.6s cubic-bezier(0.6, 0.01, 0.05, 1);
}

/* ── 2. The hidden duplicate text element ── */
.btn::after {
  content: attr(data-text);
  position: absolute;

  /* Lock its position perfectly horizontally with the active text span */
  left: 28px; /* Matches your exact button left padding */
  top: 50%;
  transform: translateY(100%); /* Pushed completely down into the hidden zone */

  line-height: 1.2; /* Must match the span's line-height perfectly */
  white-space: nowrap;
  opacity: 0; /* Hidden initially to avoid clipping overlapping artifacts */
  color: currentColor;
  transition:
    transform 0.6s cubic-bezier(0.6, 0.01, 0.05, 1),
    opacity 0.3s ease;
}

/* ── 3. The Hover State Animations ── */
.btn:hover span {
  /* Push the original text cleanly straight up out of the frame */
  transform: translateY(-250%);
}

.btn:hover::after {
  /* Bring the replacement text up into dead-center layout position */
  transform: translateY(
    -50%
  ); /* Adjusts perfectly to match top: 50% vertical centering */
  opacity: 1;
}

/* ── 4. The Icon Layout ── */
.btn img {
  position: relative;
  z-index: 2;
  width: 14px;
  height: auto;
  pointer-events: none;
}
