
    .toggle-wrapper {
      display: flex;
      justify-content: center;
      border: 2px solid #00307c;
      border-radius: 50px;
      min-width: 280px;
      overflow: hidden;
      margin-bottom: 15px;
      box-shadow: 0 4px 8px rgba(0,0,0,0.05);
      background: white;
      margin-top: 10px;
      margin-left: 20px;
      margin-right: 20px;
    }

    .toggle-option {
      padding: 10px 22px;
      font-size: 18px;
      border: none;
      cursor: pointer;
      background: none;
      color: #00307c;
      transition: all 0.3s ease;
      flex: 1;
    }

    .toggle-option.active {
      background-color: #00307c;
      color: white;
      font-weight: bold;
    }

    .course-section {
      display: none;
      max-width: 1200px;
      width: 100%;
      padding-left: 6px;
      padding-right: 6px;
      animation: fadeIn 0.3s ease-in-out;
    }

    .course-section.active {
      display: block;
    }

    .course-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr); /* Forces 4 items per row */
      gap: 20px;
      padding: 10px;
    }


    .course-card {
      background: white;
      border-radius: 16px;
      padding: 24px;
      box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
      transition: transform 0.2s ease;
    }

    .course-card:hover {
      transform: translateY(-4px);
    }

    .course-card h3 {
      margin-top: 0;
      color: #00307c;
      font-size: 20px;
      font-weight: 640;
      margin-bottom: 4px;
    }

    .course-card h4 {
      margin-top: 0;
      color: #00307c;
      font-size: 16px;
      font-weight: 640;
    }

    .course-card p {
      color: #666;
      font-size: 15px;
      line-height: 1.5;
      margin-bottom: 12px;
    }

    .heartbeat-label {
      background: linear-gradient(45deg, #00307c, #f05454);
      color: white;
      padding: 6px 12px;
      border-radius: 12px;
      font-size: 14px;
      font-weight: 600;
      animation: heartbeat 1.8s infinite;
      margin: 10px auto; /* centered */
      text-align: center;
      box-shadow: 0 0 10px rgba(255, 75, 31, 0.4);
      max-width: 340px;
      width: fit-content;
    }



    @keyframes heartbeat {
      0% { transform: scale(1); }
      14% { transform: scale(1.1); }
      28% { transform: scale(1); }
      42% { transform: scale(1.1); }
      70% { transform: scale(1); }
    }


    .price.desktop-price {
      font-size: 20px;
      color: #00307c;
      font-weight: 600;
      margin-bottom: 3px;
    }


    .mobile-price {
      display: none;
      font-size: 22px;
      color: #00307c;
      font-weight: 600;
      margin-bottom: 8px;
      text-align: center;
    }

    .enroll-button {
      background: #00307c;
      color: white;
      border: none;
      padding: 12px 24px;
      border-radius: 4px;
      cursor: pointer;
      font-size: 14px;
      transition: background 0.3s ease;
      min-width: 140px;
      font-weight: bold;
    }

    .enroll-button:hover {
      opacity: 0.7;
    }

    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(10px); }
      to { opacity: 1; transform: translateY(0); }
    }

    @media (max-width: 600px) {
      .heartbeat-label {
        font-size: 15px;
        padding: 4px 10px;
        width: 300px;
      }
      .price.desktop-price {
        display: none;
      }

      .mobile-price {
        display: block;
      }

      .card-footer {
        flex-direction: column;
        align-items: center;
        background-color: white;
      }

      .enroll-button {
        width: 60%;
        padding: 14px;
        font-size: 18px;
        font-weight: normal;
      }
      .course-grid {
        grid-template-columns: repeat(1, 1fr); /* Forces 4 items per row */
        gap: 5px;
        padding: 4px;
      }
    }

    @media (min-width: 600px) {
      .course-grid {
        grid-template-columns: repeat(2, 1fr); /* Forces 4 items per row */
        gap: 10px;
        padding: 8px;
      }
    }

    @media (min-width: 900px) {
      .course-grid {
        grid-template-columns: repeat(4, 1fr); /* Forces 4 items per row */
        gap: 10px;
        padding: 8px;
      }
    }

    .card-image {
      width: 100%;
      height: auto;
      max-height: 300px;
      object-fit: cover;
      border-radius: 12px;
      margin-bottom: 16px;
    }
    .card-footer {
      display: flex;
      justify-content: center;   /* centers items horizontally */
      align-items: center;
      flex-direction: column;    /* stack price above button */
      gap: 10px;
      background-color: white;
    }



    .rating {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 15px;
      color: #f5a623;
      font-weight: 600;
    }

    .rating-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 10px;
      margin-top: 16px;
    }

    .badge-group {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-right: 10px;
    }

    .stars {
      font-size: 16px;
      letter-spacing: 1px;
    }

    .score {
      color: #666;
      font-size: 14px;
    }

    .divider {
      border: none;
      border-top: 1px solid #ddd;
      margin: 16px 0 16px 0;
    }

    .class-type-icon {
      width: 30px;
      height: 30px;
      border-radius: 50%;
      background-color: #00307c;
      display: flex;
      align-items: center;
      justify-content: center;
      color: white;
      font-size: 14px;
    }

    .badge-group {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .class-label {
      font-size: 14px;
      font-weight: 500;
      color: #333;
    }

    