/* Sakireem Solutions - Pricing Card Flip Effect */

.price-plan-wrapper > [class*='col-'] {
  display: flex;
}

.price-flip-card {
  width: 100%;
  min-height: 100%;
  perspective: 1200px;
  cursor: pointer;
  outline: none;
}

.price-flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 540px;
  transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
  transform-style: preserve-3d;
}

@media (hover: hover) and (pointer: fine) {
  .price-flip-card:hover .price-flip-inner,
  .price-flip-card:focus-visible .price-flip-inner {
    transform: rotateY(180deg);
  }
}

.price-flip-card.is-flipped .price-flip-inner {
  transform: rotateY(180deg);
}

.price-flip-front,
.price-flip-back {
  width: 100%;
  height: 100%;
  min-height: 540px;
  border-radius: inherit;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.price-flip-front {
  position: relative;
  z-index: 2;
  transform: rotateY(0deg);
}

.price-flip-back {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  overflow: hidden;
  transform: rotateY(180deg);
  border-radius: 8px;
  color: #fff;
  box-shadow: 0 3px 20px 0 rgba(0, 0, 0, 0.12);
}

/* Back colors follow each plan's existing accent family. */
.price-flip-starter .price-flip-back {
  background: linear-gradient(135deg, #007bff, #391a75);
}

.price-flip-full .price-flip-back {
  background: linear-gradient(135deg, #ff6a88, #dc3644);
}

.price-flip-bilingual .price-flip-back {
  background: linear-gradient(135deg, #f3e412, #f39c12);
}

.price-flip-seo .price-flip-back {
  background: linear-gradient(135deg, #2ae73a, #159957);
}

.price-flip-back-content {
  text-align: center;
}

.price-flip-back-content h3 {
  margin-bottom: 1.5rem;
  color: #fff;
}

.price-flip-cta {
  min-width: 150px;
  padding: 12px 26px;
  border: 2px solid #fff;
  border-radius: 100px;
  background: #fff;
  color: #391a75 !important;
  font-weight: 700;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.price-flip-cta:hover,
.price-flip-cta:focus {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

@media (max-width: 767px) {
  .price-flip-inner,
  .price-flip-front,
  .price-flip-back {
    min-height: 520px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .price-flip-inner {
    transition-duration: 0.01ms;
  }
}

/* Selected package field in the consultation form */
#selected-package {
  cursor: pointer;
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

#selected-package.package-selected {
  border-color: #391a75;
  box-shadow: 0 0 0 3px rgba(57, 26, 117, 0.12);
}

/* Force pricing elements to stack vertically */
.price-flip-front .plan-price {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center;
  text-align: center;
}

/* Starting at label */
.price-flip-front .plan-price .starting-at {
  display: block !important;
  width: 100%;
  font-size: 15px !important;
  font-weight: 500;
  line-height: 1.4;
  color: #777;
  margin: 0 0 5px 0;
}

/* Price amount */
.price-flip-front .plan-price .price-amount {
  display: flex !important;
  flex-direction: row !important;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
  width: 100%;
  white-space: nowrap;
}

/* Price typography */
.price-flip-front .price-amount .h1 {
  margin: 0;
}

/* ========================================
   COMPACT PRICING CARDS
======================================== */

/* Reduce overall card height */
.price-plan-wrapper .price-flip-inner,
.price-plan-wrapper .price-flip-front,
.price-plan-wrapper .price-flip-back {
  min-height: 470px;
}

/* Slightly rounded card corners */
.price-plan-wrapper .price-flip-card {
  border-radius: 14px;
}

.price-plan-wrapper .price-flip-inner {
  border-radius: inherit;
}

.price-plan-wrapper .price-flip-front,
.price-plan-wrapper .price-flip-back {
  border-radius: inherit;
}

/* Reduce internal padding */
.price-plan-wrapper .price-flip-front {
  padding: 30px 20px !important;
}

/* Tighter spacing between features */
.price-plan-wrapper .plan-features li {
  padding-top: 7px !important;
  padding-bottom: 7px !important;
}

/* Adjust spacing around price */
.price-plan-wrapper .plan-price {
  padding-bottom: 12px !important;
  margin-bottom: 8px;
}

/* Ensure cards remain consistent on mobile */
@media (max-width: 767px) {
  .price-plan-wrapper .price-flip-inner,
  .price-plan-wrapper .price-flip-front,
  .price-plan-wrapper .price-flip-back {
    min-height: 450px;
  }
}

/* Payment type label beneath price */
.price-flip-front .plan-price .payment-type {
  display: block;
  width: 100%;
  text-align: center;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  color: #999;
  margin-top: 4px;
}

/* Pricing disclaimer below cards */
.pricing-disclaimer {
  margin: 28px auto 0;
  max-width: 850px;
  text-align: center;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.7;
  color: #888;
}

@media (max-width: 767px) {
  .pricing-disclaimer {
    margin-top: 24px;
    padding: 0 15px;
    font-size: 12px;
  }
}

/* SEO+ Branding */
.price-flip-seo-plus .seo-plus-badge {
  background: #391a75;
  color: #fff;
}

.price-flip-seo-plus .price-amount span {
  color: #391a75 !important;
}

.price-flip-seo-plus .price-flip-back {
  background: linear-gradient(135deg, #391a75, #8060c2);
}

/* ========================================
   FIVE-COLUMN PRICING LAYOUT
======================================== */

@media (min-width: 1200px) {
  .price-plan-wrapper.five-card-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 20px;
    margin-left: 0;
    margin-right: 0;
  }

  /* Override Bootstrap column widths */
  .price-plan-wrapper.five-card-grid > div {
    width: 100%;
    max-width: 100%;
    flex: none;
    padding: 0;
    margin-top: 0 !important;
    min-width: 0;
  }

  /* Adjust padding for narrower cards */
  .price-plan-wrapper.five-card-grid .price-flip-front {
    padding: 25px 12px !important;
  }

  /* Keep longer feature names from overflowing */
  .price-plan-wrapper.five-card-grid .plan-features li {
    overflow-wrap: break-word;
  }
}

/* ========================================
   WIDER FIVE-CARD PRICING LAYOUT
======================================== */

@media (min-width: 1200px) {
  /* Expand pricing section beyond Bootstrap width */
  #pricing > .container {
    max-width: 1550px;
    width: 95%;
  }

  /* Five equal-width cards */
  .price-plan-wrapper.five-card-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 22px;
    margin-left: 0;
    margin-right: 0;
  }

  /* Override Bootstrap column sizing */
  .price-plan-wrapper.five-card-grid > div {
    width: 100%;
    max-width: 100%;
    flex: none;
    padding: 0;
    margin-top: 0 !important;
    min-width: 0;
  }

  /* Comfortable internal spacing */
  .price-plan-wrapper.five-card-grid .price-flip-front {
    padding: 28px 18px !important;
  }

  /* Prevent content overflow */
  .price-plan-wrapper.five-card-grid .plan-features li {
    overflow-wrap: break-word;
  }
}

/* More compact card height */
.price-plan-wrapper .price-flip-inner,
.price-plan-wrapper .price-flip-front,
.price-plan-wrapper .price-flip-back {
  min-height: 480px;
}
