.pricing-section {
  background-color: var(
    --naf-secondary
  ); /* Dark navy background like reference */
  padding-top: 80px;
  padding-bottom: 120px; /* Increased bottom padding to prevent overflow */
}

.pricing-section .section-title-main {
  color: var(--naf-bg-paper); /* White text on dark background */
  font-size: 3rem; /* Larger, matches reference */
  font-weight: 700;
  margin-bottom: 15px;
  text-align: center; /* Centered like reference */
}

.pricing-section .section-subtitle {
  color: rgba(255, 255, 255, 0.8); /* Light white text */
  font-size: 1.125rem; /* Slightly larger */
  margin-bottom: 60px;
  text-align: center; /* Centered like reference */
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Custom Grid Layout */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.pricing-card-wrapper {
  display: flex;
  justify-content: center;
}

.pricing-card {
  background-color: rgba(
    255,
    255,
    255,
    0.05
  ); /* Semi-transparent dark background */
  border: 1px solid rgba(255, 255, 255, 0.1); /* Subtle border */
  border-radius: 12px; /* More rounded corners */
  padding: 40px 30px;
  transition: transform 0.3s ease, box-shadow 0.3s ease,
    background-color 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  width: 100%;
  max-width: 350px;
}

.pricing-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  background-color: rgba(255, 255, 255, 0.08);
}

.pricing-card.popular-plan {
  background-color: rgba(
    255,
    255,
    255,
    0.05
  ); /* Same dark background as others */
  color: var(--naf-bg-paper); /* White text like others */
  border-color: var(--naf-primary); /* Gold border to distinguish */
  border-width: 2px;
  transform: scale(1.02); /* Reduced scale to prevent overflow */
}

.pricing-card.popular-plan:hover {
  transform: scale(1.02) translateY(-8px); /* Reduced scale to prevent overflow */
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
  background-color: rgba(255, 255, 255, 0.08);
}

.pricing-card.popular-plan .plan-title,
.pricing-card.popular-plan .plan-description-text,
.pricing-card.popular-plan .plan-price-number,
.pricing-card.popular-plan .plan-currency {
  color: var(--naf-bg-paper); /* White text like other cards */
}

.pricing-card.popular-plan .plan-features li {
  color: rgba(255, 255, 255, 0.8); /* Same light white text as others */
}

.pricing-card.popular-plan .plan-features li .fas {
  color: var(--naf-primary); /* Gold check icon for popular plan */
}

.pricing-card.popular-plan .plan-button {
  background-color: var(--naf-primary); /* Gold button for popular plan */
  border-color: var(--naf-primary);
  color: var(--naf-secondary); /* Navy text on gold button */
}

.pricing-card.popular-plan .plan-button:hover {
  background-color: var(--naf-primary-dark);
  border-color: var(--naf-primary-dark);
  color: var(--naf-secondary);
}

.popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--naf-primary);
  color: var(--naf-secondary);
  padding: 8px 20px;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 20px;
  text-transform: uppercase;
  z-index: 10;
  letter-spacing: 0.5px;
}

.pricing-card .plan-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--naf-bg-paper); /* White text for dark cards */
  margin-bottom: 8px;
  text-align: center;
}

.pricing-card .plan-description-text {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7); /* Light white text */
  margin-bottom: 30px;
  text-align: center;
  min-height: 25px;
}

.pricing-card .plan-price {
  margin-bottom: 35px;
  text-align: center;
}

.pricing-card .plan-price .plan-price-number {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--naf-bg-paper); /* White text */
  line-height: 1;
  margin-right: 5px;
}

.pricing-card .plan-price .plan-currency {
  font-size: 1.25rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  vertical-align: top;
  margin-left: 2px;
}

.pricing-card .plan-features {
  margin-bottom: 40px;
  padding-left: 0;
  text-align: left;
  flex-grow: 1;
  list-style: none;
}

.pricing-card .plan-features li {
  padding: 12px 0;
  color: rgba(255, 255, 255, 0.8); /* Light white text */
  font-size: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
}

.pricing-card .plan-features li:last-child {
  border-bottom: none;
}

.pricing-card .plan-features li .fas {
  color: var(--naf-primary);
  margin-right: 12px;
  font-size: 0.9rem;
  width: 16px;
  flex-shrink: 0;
}

.pricing-card .plan-button {
  background-color: transparent;
  border: 2px solid var(--naf-primary);
  color: var(--naf-primary);
  padding: 15px 20px; /* Reduced horizontal padding to prevent overflow */
  font-size: 0.9rem; /* Slightly smaller font */
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 8px;
  transition: all 0.3s ease;
  margin-top: auto;
  display: block;
  width: 100%;
  text-align: center;
  text-decoration: none;
  letter-spacing: 0.5px;
  box-sizing: border-box; /* Ensure padding is included in width calculation */
}

.pricing-card .plan-button:hover {
  background-color: var(--naf-primary);
  color: var(--naf-secondary);
  transform: translateY(-2px);
}

/* Center the section title and subtitle */
.pricing-section .section-title {
  text-align: center;
  margin-bottom: 60px;
}

.pricing-section .section-title-main,
.pricing-section .section-subtitle {
  margin-bottom: 0;
}

/* Remove any unwanted bottom spacing */
.pricing-section .container {
  margin-bottom: 0;
  padding-bottom: 0;
}

/* Responsive adjustments */
@media (max-width: 991px) {
  .pricing-section {
    padding-top: 60px;
    padding-bottom: 80px; /* Increased bottom padding for tablets */
  }

  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    padding: 0 15px;
  }

  .pricing-section .section-title-main {
    font-size: 2.5rem;
  }

  .pricing-section .section-subtitle {
    font-size: 1rem;
    margin-bottom: 50px;
  }

  .pricing-card.popular-plan {
    transform: none; /* Remove scale on smaller screens */
  }

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

  .pricing-card .plan-price .plan-price-number {
    font-size: 3rem;
  }

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

@media (max-width: 767px) {
  .pricing-section {
    padding-top: 50px;
    padding-bottom: 60px; /* Adequate bottom padding for mobile */
  }

  .pricing-grid {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 0 15px;
  }

  .pricing-section .section-title-main {
    font-size: 2rem;
  }

  .pricing-section .section-subtitle {
    font-size: 0.95rem;
    margin-bottom: 40px;
  }

  .pricing-card {
    padding: 30px 25px;
  }

  .pricing-card .plan-price .plan-price-number {
    font-size: 2.5rem;
  }

  .pricing-card .plan-title {
    font-size: 1.4rem;
  }

  .popular-badge {
    font-size: 0.7rem;
    padding: 6px 16px;
  }

  .pricing-card .plan-button {
    padding: 12px 20px;
    font-size: 0.85rem;
  }
}
