/* ==========================================================================
   Direct Homes – Pricing / Packages
   Rules:  middle card (PREMIUM) is filled with the primary colour,
           SELF and PROFI are light and get the same fill on hover.
   ========================================================================== */

section.dh-pricing {
  padding: 4.6rem 0;
  background: #fff;
}

.dh-pricing__row {
  row-gap: 30px;
  padding-top: 16px; /* room for the "Bestseller" badge */
}

/* Card */
.dh-pricing .dh-plan {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 36px 36px 36px;
  border: 1px solid var(--dh-sand);
  border-radius: 20px;
  background: #fff;
  color: var(--dh-primary);
  transition: background-color 0.35s ease, border-color 0.35s ease, transform 0.35s ease, box-shadow 0.35s ease;
}

.dh-pricing .dh-plan:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 48px rgba(var(--dh-primary-rgb), 0.18);
}

/* Filled state: PREMIUM always, SELF/PROFI on hover */
.dh-pricing .dh-plan--featured,
.dh-pricing .dh-plan:hover {
  border-color: var(--dh-primary);
  background: var(--dh-primary);
  color: #fff;
}

.dh-plan__badge {
  position: absolute;
  top: 0;
  left: 50%;
  padding: 6px 18px;
  border-radius: 999px;
  background: var(--dh-accent);
  color: #fff;
  font-family: var(--dh-font-body);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transform: translate(-50%, -50%);
}

/* Head */
.dh-plan__name {
  margin: 0 0 6px;
  font-family: var(--dh-font-heading);
  font-size: clamp(26px, calc(20px + 0.6vw), 32px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.01em;
  color: inherit;
  text-transform: none;
}

.dh-plan__tagline {
  margin: 0 0 22px;
  font-family: var(--dh-font-heading);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--dh-accent);
}

.dh-plan__price {
  margin: 0 0 6px;
  font-family: var(--dh-font-heading);
  font-size: clamp(32px, calc(24px + 0.9vw), 42px);
  font-weight: 600;
  line-height: 1.1;
  color: inherit;
}

.dh-plan__price small {
  font-family: var(--dh-font-body);
  font-size: 15px;
  font-weight: 400;
  opacity: 0.75;
}

.dh-plan__note {
  margin: 0 0 24px;
  font-family: var(--dh-font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--dh-accent);
}

.dh-plan hr {
  margin: 0 0 24px;
  border: 0;
  border-top: 1px solid var(--dh-sand);
  transition: border-color 0.35s ease;
}

.dh-plan--featured hr,
.dh-plan:hover hr {
  border-top-color: rgba(255, 255, 255, 0.2);
}

/* Feature list */
.dh-plan__list {
  margin: 0 0 32px;
  padding: 0;
}

.dh-plan__list li {
  position: relative;
  margin-bottom: 14px;
  padding-left: 32px;
  font-family: var(--dh-font-body);
  font-size: 15px;
  line-height: 1.45;
  color: inherit;
}

.dh-plan__list li:last-child {
  margin-bottom: 0;
}

.dh-plan__list .dh-plan__lead {
  font-weight: 700;
}

.dh-plan__list .cs_feature_icon {
  position: absolute;
  top: 0;
  left: 0;
  display: inline-flex;
  color: var(--dh-accent);
}

/* Button (plain text, colour change only) */
.dh-pricing .dh-plan__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  margin-top: auto;
  padding: 0 20px;
  overflow: hidden;
  border: 1.5px solid var(--dh-primary);
  border-radius: 999px;
  background: var(--dh-primary);
  color: #fff;
  font-family: var(--dh-font-body);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.dh-pricing .dh-plan--featured .dh-plan__btn,
.dh-pricing .dh-plan:hover .dh-plan__btn {
  border-color: #fff;
  background: #fff;
  color: var(--dh-primary);
}

.dh-pricing .dh-plan__btn:hover,
.dh-pricing .dh-plan__btn:focus-visible {
  text-decoration: none;
}

@media (max-width: 1399px) {
  .dh-pricing .dh-plan {
    padding: 32px 26px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dh-pricing .dh-plan {
    transition: none;
  }
}

/* Desktop: middle card is a little taller than the other two */
@media (min-width: 992px) {
  .dh-pricing__row {
    align-items: center;
    padding-top: 34px;
    padding-bottom: 18px;
  }

  .dh-pricing .dh-plan {
    height: auto;
    min-height: 100%;
  }

  .dh-pricing .dh-plan.dh-plan--featured {
    padding-top: 56px;
    padding-bottom: 56px;
  }
}

/* Button hover: gold fill from the mouse (css/directhomes-buttons.css).
   Needed here because the filled-card rules above are more specific. */
.dh-pricing .dh-plan .dh-plan__btn.dh-btn:hover,
.dh-pricing .dh-plan .dh-plan__btn.dh-btn:focus-visible {
  border-color: var(--dh-accent);
  color: #fff;
}
