/* Billing Toggle Section (Vertical alignment) */
.billing-toggle-container {
  display: flex;
  flex-direction: column; /* Align vertically */
  align-items: center;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

.billing-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 10px;
}

.billing-toggle input[type="checkbox"] {
  width: 50px;
  height: 25px;
  appearance: none;
  background-color: #ddd;
  border-radius: 50px;
  position: relative;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.billing-toggle input[type="checkbox"]:checked {
  background-color: var(--color-primary);
}

.billing-toggle input[type="checkbox"]:before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: white;
  transition: transform 0.3s ease;
  left: 3px;
  top: 3px;
}

.billing-toggle input[type="checkbox"]:checked:before {
  transform: translateX(25px);
}

.toggle-label {
  margin-left: 10px;
  font-size: 1rem;
  font-weight: 500;
}

/* Plan Section - Horizontal Display */
.plans-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 3rem;
}

.plans {
  display: grid;
  grid-template-columns: 1fr; /* Default: single column for the grid */
  gap: 0rem;
  padding: 0rem;
  max-width: 1200px;
  margin: 0 auto;
}

.plan {
  flex: 1 1 calc(25% - 2rem); /* 4 columns with space */
  min-width: 250px;
  box-sizing: border-box;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  background-color: #fff;
  animation: fadeInUp 0.8s ease forwards;
  opacity: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
}

.plan {
  display: flex;
  flex-direction: column; /* Stack children vertically */
}

.plan-button {
  margin-top: auto; /* Pushes the button to the bottom */
}

/* Remove fixed width! */
.plan:hover {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.plan:nth-child(1) {
  animation-delay: 0.2s;
}
.plan:nth-child(2) {
  animation-delay: 0.4s;
}
.plan:nth-child(3) {
  animation-delay: 0.6s;
}

.plan.featured {
  border-color: var(--color-primary);
}

.plan h2 {
  color: var(--color-primary);
  margin-bottom: 1rem;
}

.plan p {
  margin-bottom: 1.5rem;
}

.plan .price {
  font-size: 1.2rem;
  color: #333;
}

.plan button {
  background-color: var(--color-primary);
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.plan button:hover {
  background-color: #0056b3;
}

.plan-button {
  display: inline-block;
  background-color: var(--color-primary);
  color: white;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  transition: background-color 0.3s ease;
  text-align: center;
}

.plan-button:hover {
  background-color: #0056b3; /* or var(--color-secondary) if defined */
}

/* Animations pour les plans */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Styling */
@media (max-width: 768px) {
  .billing-toggle-container {
    margin-bottom: 1rem;
  }

  .plans-container {
    flex-direction: column;
    align-items: center;
  }

  /* Ensure plans are centered and stack properly */
  .plans {
    display: flex; /* Flexbox to stack plans vertically */
    flex-direction: column; /* Align plans vertically in a single column */
    width: 90%; /* Limit width to 95% */
  }

  .plan {
    width: 100%; /* Full width in mobile view */
    margin-bottom: 2rem; /* Space between the plans */
    max-width: 100%; /* Avoid any other maximum width restrictions */
  }
}
