/* Pricing Section Layout */
.pricing {
  background: #ffffff;
  position: relative;
  overflow: hidden;
}

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-xl);
  max-width: 900px;
  margin: 0 auto;
  align-items: center;
}

/* Common Card Styles */
.pricing-card {
  background: #ffffff;
  border-radius: var(--border-radius-2xl);
  padding: var(--spacing-xl);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
}

.full-width {
  width: 100%;
  justify-content: center;
}

/* FREE Card Styling */
.card-free {
  border: 1px solid var(--color-gray-200);
  box-shadow: none;
}

.card-free .pricing-title {
  color: var(--color-gray-600);
  font-size: 1.25rem;
  font-weight: 600;
}

.icon-check-gray {
  width: 18px;
  height: 18px;
  color: var(--color-gray-400);
}

/* PRO Card Styling (The "Pop") */
.card-pro {
  border: var(--border-width-base) solid var(--color-primary-500);
  box-shadow: 0 20px 40px -10px rgba(124, 58, 237, 0.15);
  transform: scale(1.02);
  z-index: 10;
  padding: var(--spacing-2xl) var(--spacing-xl);
}

.popular-badge {
  position: absolute;
  top: calc(var(--spacing-sm) * -1.5);
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary-600);
  color: #ffffff;
  padding: var(--spacing-xs) var(--spacing-md);
  border-radius: 99px;
  font-size: var(--font-size-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 6px -1px rgba(124, 58, 237, 0.3);
}

.card-pro .pricing-title {
  color: var(--color-primary-700);
  font-size: var(--font-size-2xl);
  font-weight: 700;
}

.pricing-price {
  font-size: clamp(2.5rem, 6vw, 3rem);
  font-weight: 800;
  color: var(--color-gray-900);
  line-height: 1;
  margin: var(--spacing-md) 0 var(--spacing-sm) 0;
  display: flex;
  align-items: flex-start;
}

.pricing-price .currency {
  font-size: var(--font-size-2xl);
  margin-top: 6px;
  font-weight: 600;
}

.pricing-price .period {
  font-size: var(--font-size-base);
  color: var(--color-gray-500);
  font-weight: 500;
  margin-top: auto;
  margin-bottom: 6px;
  margin-left: var(--spacing-xs);
}

.pricing-desc {
  color: var(--color-gray-500);
  font-size: var(--font-size-sm);
}

/* Feature Lists */
.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--spacing-lg) 0;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  color: var(--color-gray-700);
  font-size: var(--font-size-sm);
}

.icon-check-purple {
  width: 20px;
  height: 20px;
  color: var(--color-primary-600);
  flex-shrink: 0;
}

.feature-highlight {
  color: var(--color-gray-900);
  font-weight: 500;
}

.guarantee-text {
  text-align: center;
  font-size: var(--font-size-xs);
  color: var(--color-gray-400);
  margin-top: var(--spacing-sm);
}

/* Pulse Animation for Pro Button */
@keyframes softPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(124, 58, 237, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(124, 58, 237, 0);
  }
}

.pulse-button {
  animation: softPulse 2s infinite;
}

/* --- New 3-Column Layout Support --- */
@media (min-width: 1024px) {
  .pricing-grid {
    grid-template-columns: 1fr 1.1fr 1fr; /* Center card slightly wider */
    gap: 2rem;
    max-width: 1200px; /* Increase max-width for 3 cards */
  }
}

/* --- New Elements Styling --- */

/* Savings Badge for Yearly Plan */
.savings-badge {
  background-color: #dcfce7;
  color: #166534;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-top: 4px;
}

/* Feature List Updates */
.pricing-features li {
  align-items: flex-start; /* Align icon to top for multi-line text */
  line-height: 1.4;
}

/* Feature Icons */
.pricing-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px; /* Optical alignment with text */
}

.icon-gray {
  color: var(--color-gray-400);
}
.icon-purple {
  color: var(--color-primary-600);
}
.icon-red {
  color: #ef4444;
  width: 16px;
  height: 16px;
}

/* Limited Feature Style (Strikethrough/Dimmed) */
.feature-limited {
  opacity: 0.6;
}

/* Button Updates */
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  text-align: center;
}

.btn-secondary {
  background: white;
  border: 1px solid var(--color-gray-200);
  color: var(--color-gray-700);
}

.btn-secondary:hover {
  background: #f9fafb;
  border-color: var(--color-gray-400);
}

.btn-primary {
  background: linear-gradient(135deg, #6d28d9 0%, #5b21b6 100%);
  color: white;
  border: none;
  box-shadow: 0 4px 6px rgba(109, 40, 217, 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 12px rgba(109, 40, 217, 0.3);
}

@media (max-width: 768px) {
  .pricing-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 1rem;
    padding-bottom: 2rem; /* Space for scrollbar */
    padding-left: 1rem; /* Peek from left */
    padding-right: 1rem;
    margin: 0 -1rem; /* Pull container wider than parent padding */
    width: calc(100% + 2rem);
    padding-top: 40px;
  }

  .pricing-card {
    min-width: 85%; /* Shows 85% of card, forcing user to see next one implies scroll */
    scroll-snap-align: center;
  }

  /* Hide scrollbar for cleaner look but keep functionality */
  .pricing-grid::-webkit-scrollbar {
    display: none;
  }
}
