/* Modern Premium SaaS Pricing Section */
.pricing-section {
  padding: 80px 0;
  background: #ffffff;
}

/* Main Category Tabs */
.pricing-main-tabs {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-bottom: 2rem;
  background: white;
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.pricing-main-tab {
  flex: 1;
  padding: 14px 28px;
  border: none;
  background: transparent;
  color: #64748b;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  position: relative;
}

.pricing-main-tab:hover {
  background: rgba(59, 130, 246, 0.08);
  color: #3b82f6;
}

.pricing-main-tab.active {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Sub-category Tabs */
.pricing-sub-tabs {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-bottom: 3rem;
  background: #f8fafc;
  border-radius: 10px;
  padding: 5px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.pricing-sub-tab {
  flex: 1;
  padding: 12px 24px;
  border: none;
  background: transparent;
  color: #64748b;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.pricing-sub-tab:hover {
  background: rgba(59, 130, 246, 0.08);
  color: #3b82f6;
}

.pricing-sub-tab.active {
  background: white;
  color: #3b82f6;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

/* Category Content */
.pricing-category-content {
  display: none;
}

.pricing-category-content.active {
  display: block;
}

.pricing-subcategory-content {
  display: none;
}

.pricing-subcategory-content.active {
  display: block;
}

@media (max-width: 768px) {
  .pricing-main-tabs {
    flex-direction: column;
    max-width: 85%;
    padding: 5px;
  }

  .pricing-main-tab {
    padding: 12px 20px;
    font-size: 0.95rem;
  }

  .pricing-sub-tabs {
    flex-direction: column;
    max-width: 85%;
    padding: 4px;
  }

  .pricing-sub-tab {
    padding: 10px 18px;
    font-size: 0.9rem;
  }
}

/* Billing Toggle - Clean Design */
.pricing-toggle {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-bottom: 3rem;
}

.toggle-label {
  font-weight: 600;
  color: #94a3b8;
  transition: color 0.3s ease;
  font-size: 1.125rem;
}

.toggle-label.active {
  color: #1e293b;
  font-weight: 700;
}

.save-badge {
  display: inline-block;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-left: 8px;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 26px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #cbd5e1;
  transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 26px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 4px;
  bottom: 4px;
  background: white;
  transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked + .toggle-slider {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

input:checked + .toggle-slider:before {
  transform: translateX(26px);
}

/* Category Section */
.pricing-category {
  margin-bottom: 4rem;
  padding-top: 2rem;
}

.pricing-category:not(:first-child) {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding-top: 4rem;
}

.category-title {
  font-size: 2.25rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 0.75rem;
  color: #1e293b;
  letter-spacing: -0.5px;
}

.category-subtitle {
  text-align: center;
  margin-bottom: 3rem;
  color: #64748b;
  font-size: 1.125rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* Pricing Grid - Modern Layout */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 1.5rem;
  align-items: stretch;
}

/* Pricing Card - Clean Premium Design */
.pricing-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  padding: 0;
  position: relative;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.pricing-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
  border-color: rgba(59, 130, 246, 0.3);
}

/* Highlighted Featured Plan */
.pricing-card.popular {
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  transform: scale(1.05);
  box-shadow: 0 12px 32px rgba(59, 130, 246, 0.2);
  border: 2px solid #3b82f6;
  z-index: 10;
}

.pricing-card.popular:hover {
  transform: scale(1.05) translateY(-12px);
  box-shadow: 0 24px 48px rgba(59, 130, 246, 0.25);
}

/* Top Corner Ribbon Badge - Diagonal Cross Strip */
.popular-badge {
  position: absolute;
  top: 15px;
  right: -45px;
  transform: rotate(45deg);
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  padding: 10px 60px;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4);
  text-transform: uppercase;
  letter-spacing: 1px;
  z-index: 20;
}

/* Ribbon Badge Variations */
.pricing-card[data-badge="best-value"] .popular-badge {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
}

.pricing-card[data-badge="recommended"] .popular-badge {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4);
}

.pricing-card[data-badge="limited-offer"] .popular-badge {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.4);
}

/* Plan Name - Bold & Clear */
.plan-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  margin-top: 2rem;
  padding: 0 2rem;
  text-align: center;
  color: #1e293b;
  letter-spacing: -0.3px;
  position: relative;
  z-index: 2;
}

.pricing-card.popular .plan-name {
  color: #3b82f6;
  font-size: 1.625rem;
}

/* Tagline - Short Description */
.plan-tagline {
  text-align: center;
  padding: 0 2rem;
  margin-bottom: 1rem;
  color: #64748b;
  font-size: 0.875rem;
  line-height: 1.5;
  min-height: 40px;
}

/* Price - Large Bold Font */
.plan-price {
  text-align: center;
  margin-bottom: 1.5rem;
  padding: 1rem 2rem;
  position: relative;
  z-index: 2;
}

.original-price {
  display: block;
  color: #94a3b8;
  text-decoration: line-through;
  font-size: 1rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.price-amount {
  display: block;
  font-size: 3rem;
  font-weight: 900;
  color: #1e293b;
  line-height: 1;
  margin-bottom: 0.5rem;
  letter-spacing: -2px;
}

.pricing-card.popular .price-amount {
  font-size: 3.25rem;
  color: #3b82f6;
}

.price-period {
  display: block;
  color: #64748b;
  font-size: 1rem;
  font-weight: 600;
}

/* Features List - Check Icons */
.plan-features {
  flex-grow: 1;
  margin-bottom: 1.5rem;
  padding: 0 2rem;
  position: relative;
  z-index: 2;
}

.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  color: #334155;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.6;
}

.check-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
  color: #10b981;
}

.pricing-card.popular .check-icon {
  color: #3b82f6;
}

/* CTA Button - Professional */
.btn-select-plan {
  width: calc(100% - 3rem);
  margin: 0 1.5rem 1.5rem;
  padding: 16px 24px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  color: white;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  z-index: 2;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.btn-select-plan:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.btn-select-plan:active {
  transform: translateY(-1px);
}

.pricing-card.popular .btn-select-plan {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  font-size: 1.0625rem;
  padding: 18px 24px;
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.pricing-card.popular .btn-select-plan:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  box-shadow: 0 10px 32px rgba(59, 130, 246, 0.5);
}

/* Color Variants for Different Cards */
.pricing-card:nth-child(1):not(.popular) .btn-select-plan {
  background: linear-gradient(135deg, #64748b, #475569);
}

.pricing-card:nth-child(1):not(.popular) .btn-select-plan:hover {
  background: linear-gradient(135deg, #475569, #334155);
}

.pricing-card:nth-child(3):not(.popular) .btn-select-plan {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.pricing-card:nth-child(3):not(.popular) .btn-select-plan:hover {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
}

.pricing-card:nth-child(4):not(.popular) .btn-select-plan {
  background: linear-gradient(135deg, #10b981, #059669);
}

.pricing-card:nth-child(4):not(.popular) .btn-select-plan:hover {
  background: linear-gradient(135deg, #059669, #047857);
}

/* Coupon Section */
.coupon-section {
  max-width: 600px;
  margin: 0 auto;
  padding: 2rem;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(37, 99, 235, 0.08));
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.1);
}

.coupon-input {
  padding: 14px 20px;
  border: 2px solid rgba(59, 130, 246, 0.2);
  border-radius: 12px;
  font-size: 1rem;
  margin-right: 0.75rem;
  text-transform: uppercase;
  min-width: 200px;
  font-weight: 600;
  transition: all 0.3s ease;
  background: white;
}

.coupon-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  transform: translateY(-2px);
}

.btn-coupon {
  padding: 14px 28px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-coupon:hover {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.coupon-message {
  margin-top: 1rem;
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 12px;
}

.coupon-message.success {
  color: white;
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.coupon-message.error {
  color: white;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Loading & Error States */
.pricing-loading,
.pricing-error {
  text-align: center;
  padding: 4rem;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e5e7eb;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.pricing-error p {
  color: #ef4444;
  font-weight: 600;
  font-size: 1.125rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .pricing-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
  }
}

@media (max-width: 900px) {
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 700px;
  }

  .pricing-card.popular {
    transform: scale(1);
  }

  .pricing-card.popular:hover {
    transform: translateY(-12px);
  }
}

@media (max-width: 768px) {
  .pricing-section {
    padding: 60px 0;
  }

  .category-title {
    font-size: 1.875rem;
  }

  .category-subtitle {
    font-size: 1rem;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
    gap: 1.5rem;
  }

  .price-amount {
    font-size: 2.5rem;
  }

  .pricing-card.popular .price-amount {
    font-size: 2.75rem;
  }

  .coupon-section {
    padding: 1.5rem;
  }

  .coupon-input {
    width: 100%;
    margin-right: 0;
    margin-bottom: 0.75rem;
  }

  .btn-coupon {
    width: 100%;
  }

  .popular-badge {
    font-size: 0.65rem;
    padding: 8px 50px;
    top: 12px;
    right: -40px;
  }
}

@media (max-width: 480px) {
  .pricing-toggle {
    flex-direction: column;
    gap: 0.75rem;
  }

  .toggle-label {
    font-size: 1rem;
  }

  .plan-name {
    font-size: 1.375rem;
  }

  .pricing-card.popular .plan-name {
    font-size: 1.5rem;
  }

  .price-amount {
    font-size: 2.25rem;
  }

  .pricing-card.popular .price-amount {
    font-size: 2.5rem;
  }

  .category-title {
    font-size: 1.625rem;
  }
}
