/* ============================================================
   Purehearts Widgets – hover-card.css  v1.3.0
   Inactive : photo + green bar at bottom with title + arrow
   Hovered  : full green overlay slides up; title, arrow, desc
   Icon hover : white fill, #2F499E arrow stroke
   ============================================================ */

/* ── Card shell ─────────────────────────────────────────────── */
.phw-card {
  position: relative;
  width: 100%;
  height: 440px;
  border-radius: 12px;
  overflow: hidden;
  display: block;
  cursor: pointer;
  isolation: isolate;
}

/*
 * Stretch mode: height controlled by the Elementor column.
 * Enable via: Section → Equal Height ON, Column → Vertical Align: Stretch.
 */
.elementor-widget-phw_hover_card,
.elementor-widget-phw_hover_card > .elementor-widget-container {
  height: 100%;
}

/* Full-card link target */
.phw-card-link {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: block;
}

/* ── Image layer ─────────────────────────────────────────────── */
.phw-image-wrap {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.phw-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.phw-card:hover .phw-image-wrap img,
.phw-card:focus-within .phw-image-wrap img {
  transform: scale(1.05);
}

/* ── Bottom bar (always visible – inactive state) ────────────── */
.phw-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3;
  background-color: #009172;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  transition: transform 0.48s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              opacity   0.30s ease;
}

.phw-card:hover .phw-bar,
.phw-card:focus-within .phw-bar,
.phw-card.phw-touch-open .phw-bar {
  transform: translateY(100%);
  opacity: 0;
}

.phw-card[data-slide="down"]:hover .phw-bar,
.phw-card[data-slide="down"]:focus-within .phw-bar { transform: translateY(-100%); opacity: 0; }

.phw-card[data-slide="left"]:hover .phw-bar,
.phw-card[data-slide="left"]:focus-within .phw-bar { transform: translateX(-100%); opacity: 0; }

.phw-card[data-slide="right"]:hover .phw-bar,
.phw-card[data-slide="right"]:focus-within .phw-bar { transform: translateX(100%); opacity: 0; }

/* ── Green overlay (hovered state) ──────────────────────────── */
.phw-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  background-color: #009172;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  transition: transform 0.52s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.phw-card[data-slide="up"] .phw-overlay              { transform: translateY(100%); }
.phw-card[data-slide="up"]:hover .phw-overlay,
.phw-card[data-slide="up"]:focus-within .phw-overlay,
.phw-card[data-slide="up"].phw-touch-open .phw-overlay { transform: translateY(0); }

.phw-card[data-slide="down"] .phw-overlay              { transform: translateY(-100%); }
.phw-card[data-slide="down"]:hover .phw-overlay,
.phw-card[data-slide="down"]:focus-within .phw-overlay,
.phw-card[data-slide="down"].phw-touch-open .phw-overlay { transform: translateY(0); }

.phw-card[data-slide="left"] .phw-overlay              { transform: translateX(100%); }
.phw-card[data-slide="left"]:hover .phw-overlay,
.phw-card[data-slide="left"]:focus-within .phw-overlay,
.phw-card[data-slide="left"].phw-touch-open .phw-overlay { transform: translateX(0); }

.phw-card[data-slide="right"] .phw-overlay              { transform: translateX(-100%); }
.phw-card[data-slide="right"]:hover .phw-overlay,
.phw-card[data-slide="right"]:focus-within .phw-overlay,
.phw-card[data-slide="right"].phw-touch-open .phw-overlay { transform: translateX(0); }

/* ── Overlay inner layout ─────────────────────────────────────── */
.phw-overlay-inner {
  width: 100%;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.phw-overlay-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

/* ── Shared title styles ─────────────────────────────────────── */
.phw-title {
  color: #ffffff;
  margin: 0;
  padding: 0;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.2;
  flex: 1;
}

.phw-bar-title {
  font-size: 1.25rem;
}

/* ── Arrow icon ──────────────────────────────────────────────── */
.phw-arrow-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  transition: background-color 0.22s ease,
              border-color     0.22s ease,
              transform        0.22s ease;
}

.phw-arrow-icon svg {
  width: 18px;
  height: 18px;
  stroke: #ffffff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  transition: stroke 0.22s ease;
}

/* Card-level hover — subtle rightward nudge on all icons */
.phw-card:hover .phw-arrow-icon,
.phw-card:focus-within .phw-arrow-icon {
  transform: translateX(3px);
}

/* Direct icon hover — white background, blue (#2F499E) arrow stroke */
.phw-arrow-icon:hover {
  background-color: #ffffff;
  border-color: #ffffff;
  transform: translateX(3px);
}

.phw-arrow-icon:hover svg {
  stroke: #2F499E;
}

/* ── Description ─────────────────────────────────────────────── */
.phw-description {
  color: #ffffff;
  font-size: 0.975rem;
  line-height: 1.65;
  margin: 0;
}

.phw-description p {
  margin: 0 0 0.75em;
}

.phw-description p:last-child {
  margin-bottom: 0;
}

/* ── Accessibility: reduced motion ──────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .phw-overlay,
  .phw-bar,
  .phw-image-wrap img,
  .phw-arrow-icon,
  .phw-arrow-icon svg {
    transition: none !important;
  }
}
